summaryrefslogtreecommitdiff
path: root/app/views/tutorials/index.html.erb
blob: 978b20fe4140d21d57bbc29c0905627cd41517ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<% provide(:search_path, tutorials_path) %>
<div class="row">
  <div class="col">
    <table class='table table-bordered'>
      <tbody>
      <% @tutorials.each do |tutorial| %>
        <tr>
          <td>
            <h4><%= link_to tutorial.heading, tutorial.url %> <small><%= local_time(tutorial.created_at) %></small></h4>
            <% tutorial.tags.each do |tag| -%>
              <%= link_to tag.name, tutorial_tag_path(tag.name), class: 'badge badge-secondary' %>
            <% end -%>
          </td>
        </tr>
      <% end %>
      </tbody>
    </table>
  </div>
</div>
<%= render "shared/paging", items: @tutorials %>