2022-07-28 20:44:47 -04:00
|
|
|
% layout 'main';
|
2022-08-24 00:48:48 -04:00
|
|
|
% title 'Threads List';
|
2022-07-28 20:44:47 -04:00
|
|
|
<h2><%= title %></h2>
|
2022-08-04 22:46:35 -04:00
|
|
|
<div class="threads">
|
2022-09-20 14:33:56 -04:00
|
|
|
<% for my $thread (@{$threads}) { =%>
|
2022-08-04 22:46:35 -04:00
|
|
|
<article class="thread">
|
2022-08-22 23:09:48 -04:00
|
|
|
<span class="id">
|
2022-09-20 21:16:42 -04:00
|
|
|
<%= link_to "#$thread->{'id'}",
|
2022-09-02 22:45:41 -04:00
|
|
|
thread_page => {thread_id => $thread->{'id'}} %>
|
2022-08-22 23:09:48 -04:00
|
|
|
</span>
|
2022-09-20 14:33:56 -04:00
|
|
|
<h3 class="title"><%= $thread->{'title'} %></h3>
|
|
|
|
<h4 class="date"><%= $thread->{'date'} %></h4>
|
|
|
|
<h5 class="author"><%= $thread->{'author'} %></h5>
|
|
|
|
<p class="body"><%= $thread->{'body'} %></p>
|
2022-09-20 21:16:42 -04:00
|
|
|
<span class="remarks">
|
|
|
|
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
|
|
|
|
<%= link_to thread_page => {thread_id => $thread->{'id'}}, begin %>
|
|
|
|
(<%= $thread->{'remark_count'} %> remarks)
|
|
|
|
<% end %>
|
|
|
|
</span>
|
2022-08-04 22:46:35 -04:00
|
|
|
</article>
|
|
|
|
<% } =%>
|
|
|
|
</div>
|
2022-08-14 18:30:22 -04:00
|
|
|
<% if ($last_page && $last_page != 1) { =%>
|
|
|
|
<nav>
|
|
|
|
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
|
|
|
|
</nav>
|
|
|
|
<% } =%>
|