Commit d926dc3e

mo k <mo@mokhan.ca>
2012-06-08 04:56:32
display the number of comments in the creation gallery.
1 parent be1563b
Changed files (1)
app/views/shared/_creation_image_gallery.html.erb
@@ -6,11 +6,12 @@
       <div class="caption">
         <h5><a href="<%= url_for creation %>"><%= short_name(creation, 20) %></a></h5>
         <h6><a href="<%= url_for profile_path(creation.user) %>"><%= creation.user.name %></a></h6>
-        <p>
         <% if creation.favorites.count > 0 %>
-          <a href="<%= url_for creation_favorites_path(:creation_id => creation.id) %>"><%= creation.favorites.count %><i class="icon-heart"></i></a>
-        <% else %>&nbsp;<% end %>
-        </p>
+          <span> <a href="<%= url_for creation_favorites_path(:creation_id => creation.id) %>"><%= creation.favorites.count %><i class="icon-heart"></i></a> </span>
+        <% else %>
+          <span>&nbsp;</span>
+        <% end %>
+        <span class="badge badge-success" title="<%= creation.comment_threads.count %> comments"><%= creation.comment_threads.count %> </span>
       </div>
     </div>
     </li>