PostText/templates/thread/by_page.html.ep

39 lines
1.3 KiB
Plaintext
Raw Normal View History

% layout 'default';
2022-10-01 18:00:23 -04:00
% 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>
2023-04-24 23:00:09 -04:00
<h3 class="title">
<%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %>
<%= $thread->{'title'} %>
<% end %>
</h3>
2022-10-01 18:00:23 -04:00
<h4 class="date"><%= $thread->{'date'} %></h4>
<h5 class="author"><%= $thread->{'author'} %></h5>
2023-04-25 11:56:42 -04:00
<div class="body"><%== markdown truncate_text $thread->{'body'} %></div>
2023-04-24 23:00:09 -04:00
<nav>
2022-10-01 18:00:23 -04:00
<%= link_to Remark => post_remark => {thread_id => $thread->{'id'}} %>
<%= link_to url_for(single_thread => {thread_id => $thread->{'id'}})
2023-04-24 23:00:09 -04:00
->fragment('remarks'), begin %>
(<%= $thread->{'remark_count'} %> remarks)\
<% end =%>
<%= link_to Bump => bump_thread => {thread_id => $thread->{'id'}} %>
(<%= $thread->{'bump_tally'} %> bumps)
<span class="flag">
<%= link_to Flag => flag_thread => {thread_id => $thread->{'id'}} %>
</span>
2022-10-13 23:57:58 -04:00
</nav>
2022-10-01 18:00:23 -04:00
</article>
<% } =%>
</div>
<% if ($last_page && $last_page != 1) { =%>
<nav>
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
</nav>
<% } =%>