Sha256: 027b1f8f53b48a8837972fb5e690ca7a6fad773a3087440575a29f4e283a8ce0

Contents?: true

Size: 712 Bytes

Versions: 2

Compression:

Stored size: 712 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

2 entries across 2 versions & 1 rubygems

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