29 lines
926 B
Plaintext
29 lines
926 B
Plaintext
|
% layout 'main';
|
||
|
% title 'Threads List';
|
||
|
<h2><%= title %></h2>
|
||
|
<div class="threads">
|
||
|
<% for my $thread (@{$threads}) { =%>
|
||
|
<article class="thread">
|
||
|
<nav class="id">
|
||
|
<%= link_to "#$thread->{'id'}",
|
||
|
single_thread => {thread_id => $thread->{'id'}} %>
|
||
|
</nav>
|
||
|
<h3 class="title"><%= $thread->{'title'} %></h3>
|
||
|
<h4 class="date"><%= $thread->{'date'} %></h4>
|
||
|
<h5 class="author"><%= $thread->{'author'} %></h5>
|
||
|
<p class="body"><%= truncate_text $thread->{'body'} %></p>
|
||
|
<nav class="remarks">
|
||
|
<%= link_to Remark => post_remark => {thread_id => $thread->{'id'}} %>
|
||
|
<%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %>
|
||
|
(<%= $thread->{'remark_count'} %> remarks)
|
||
|
<% end %>
|
||
|
</nav>
|
||
|
</article>
|
||
|
<% } =%>
|
||
|
</div>
|
||
|
<% if ($last_page && $last_page != 1) { =%>
|
||
|
<nav>
|
||
|
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
|
||
|
</nav>
|
||
|
<% } =%>
|