topiclist.rhtml

teensyweb/app/views/forum/topiclist.rhtml · 806 B

From the archive teensyweb.tar.gz

Download the archive   « Back to the archive contents

<div class="app">
  <% @topics.each do |t| %>
    <div class="forum">
    <table>
      <tr><td>
        Subject: <%= link_to t.subject, {:action => 'postlist', :id => t.id} %>
        <% if admin? %>
          [<%= link_to 'delete', {:action => 'topicdelete', :id => t.id} %>]
        <% end %>  
      </td><td align="right">
        <%= "last post: #{ftime t.posts.last.updated_at}" %>
      </td></tr>
      <tr><td>
        Author: <%= t.posts.first.user.login %>
      </td><td align="right">
      <%= "posts: #{t.posts.count}" %>
      </td></tr>
      <tr><td colspan="2">
      <%= "Created: #{ftime t.created_at}" %>
      </td></tr>
      <tr><td colspan="2">
      <hr />
      <%= "#{t.posts.first.data.first(80)}..." %>
      </td></tr>
    </table>
    </div>  
  <% end %>
  <br />
</div>

Site Stats

Snippets: 1791
Codebases: 571