Added a new div on the details. Within this are displayed the 25 latest
entries from the product's RSS feed.
Signed-off-by: Darryl L. Pierce <mcpierce(a)gmail.com>
---
app/views/products/show.html.erb | 21 +++++++++++++++++++--
public/stylesheets/tables.css | 15 +++++++++++++++
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/app/views/products/show.html.erb b/app/views/products/show.html.erb
index 0a0cb33..7eb017a 100644
--- a/app/views/products/show.html.erb
+++ b/app/views/products/show.html.erb
@@ -19,8 +19,6 @@
<% end %>
</dl>
- <%= link_to(image_tag("/images/icons/rss.png", :title =>
"Product activity feed"), rss_product_path(@product)) %>
-
</div>
</div>
@@ -48,3 +46,22 @@
<%= link_to "RSS feed...",
rss_product_path(@product), :class => "command" %>
<% end %>
+
+<div id="activity">
+ <table>
+ <caption>Recent Activity</caption>
+ <thead>
+ <%= link_to(image_tag("/images/icons/rss.png", :title =>
"Product activity feed"), rss_product_path(@product)) %>
+ </thead>
+
+ <tbody>
+ <% @product.rss_entries.each_with_index do |entry, index| %>
+ <tr>
+ <% if index < 25 %>
+ <td><%= link_to entry.title, entry.link %></td>
+ <% end %>
+ </tr>
+ <% end %>
+ </tbody>
+ </table>
+</div>
diff --git a/public/stylesheets/tables.css b/public/stylesheets/tables.css
index b5e88bd..1b74a20 100644
--- a/public/stylesheets/tables.css
+++ b/public/stylesheets/tables.css
@@ -167,3 +167,18 @@ table.edit td.value {
padding-right: 15px;
text-align: left;
}
+
+/* activities table */
+
+div#activity table caption {
+ background-color: #606060;
+ color: #ffff00;
+ text-align: center;
+ font-size: smaller;
+ font-weight: bold;
+}
+
+div#activity table tr td {
+ text-align: left;
+ font-size: smaller;
+}
--
1.6.0.6
Show replies by date