Commit 18057824

mo khan <mo@mokhan.ca>
2015-03-19 03:04:53
update the tutorial tags pages to match the tutorials listing.
1 parent 0044a8d
Changed files (1)
app
views
tutorial_tags
app/views/tutorial_tags/show.html.erb
@@ -1,23 +1,19 @@
 <% provide(:title, @tag) -%>
 <div class="row-fluid">
-  <% @tutorials.each_slice(6).each do |batch| %>
-    <ul class='thumbnails'>
-      <% batch.each do |tutorial| %>
-        <li class="span2">
-          <div class="thumbnail">
-            <%= link_to tutorial do %>
-              <%= image_tag tutorial.image_url %>
+  <table class='table'>
+    <% @tutorials.each do |tutorial| %>
+      <tr>
+        <td>
+          <h4><%= link_to tutorial.heading, tutorial.url %> <small><%= tutorial.created_at.to_s :foomat %></small></h4>
+          <% tutorial.tags.each do |tag| -%>
+            <%= link_to tutorial_tag_path(tag.name) do %>
+              <span class="label"><%= tag.name %></span>
             <% end %>
-            <div class="caption">
-              <h4><%= link_to truncate(tutorial.heading, length: 12), tutorial %></h4>
-              <p><%= link_to truncate(tutorial.user.name, length: 20), profile_path(tutorial.user) %></p>
-              <p><small><%= time_ago_in_words(tutorial.created_at) %> ago.</small></p>
-            </div>
-          </div>
-        </li>
-      <% end %>
-    </ul>
-  <% end %>
+          <% end -%>
+        </td>
+      </tr>
+    <% end %>
+  </table>
 </div>
 <div class="row-fluid">
   <%= render "shared/paging", items: @tutorials %>