Sha256: df0d3078f83e3021b417d765de5f8469b2a333dbb6840701fe3dc001d2142560

Contents?: true

Size: 717 Bytes

Versions: 1

Compression:

Stored size: 717 Bytes

Contents

<h1>Topics</h1>
<% if current_user %>
  <%= link_to "New Topic", new_topic_path %>
<% end %>
<% if @topics.empty? %>
  There are currently no topics.
<% else %>
  <table id='topics'>
    <thead>
      <tr>
        <td>Subject</td>
        <td>Posts count</td>
        <td>Last post at</td>
      </tr>
    </thead>
    <tbody>
    <% @topics.each do |topic| %>
      <tr>
        <td id='topic_subject'><%= link_to topic.subject, topic %></td>
        <td id='posts_count'><%= topic.posts_count %></td>
        <td id='last_post'>
          last post was <%= time_ago_in_words(topic.last_post.created_at) %> ago by <%= topic.last_post.user %>
        </td>
      </tr>
    <% end %>
    </tbody>
  </table>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prusswan-forem-0.0.2 app/views/forem/topics/index.html.erb