2022-11-29 04:22:25 +00:00
|
|
|
% layout 'default';
|
2022-10-01 22:00:23 +00:00
|
|
|
% title 'Threads List';
|
|
|
|
<h2><%= title %></h2>
|
2023-05-10 00:07:28 +00:00
|
|
|
<main class="threads">
|
2022-10-01 22:00:23 +00:00
|
|
|
<% for my $thread (@{$threads}) { =%>
|
|
|
|
<article class="thread">
|
2023-04-25 03:00:09 +00:00
|
|
|
<h3 class="title">
|
|
|
|
<%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %>
|
|
|
|
<%= $thread->{'title'} %>
|
|
|
|
<% end %>
|
2023-05-10 00:07:28 +00:00
|
|
|
<span class="id">
|
|
|
|
<%= link_to "#$thread->{'id'}",
|
|
|
|
single_thread => {thread_id => $thread->{'id'}} %>
|
|
|
|
</span>
|
2023-04-25 03:00:09 +00:00
|
|
|
</h3>
|
2022-10-01 22:00:23 +00:00
|
|
|
<h4 class="date"><%= $thread->{'date'} %></h4>
|
|
|
|
<h5 class="author"><%= $thread->{'author'} %></h5>
|
2023-05-04 01:05:57 +00:00
|
|
|
<div class="body">
|
|
|
|
<%== markdown truncate_text $thread->{'body'} =%>
|
|
|
|
</div>
|
2023-04-25 03:00:09 +00:00
|
|
|
<nav>
|
2022-10-01 22:00:23 +00:00
|
|
|
<%= link_to Remark => post_remark => {thread_id => $thread->{'id'}} %>
|
2022-10-09 02:39:54 +00:00
|
|
|
<%= link_to url_for(single_thread => {thread_id => $thread->{'id'}})
|
2023-04-25 03:00:09 +00:00
|
|
|
->fragment('remarks'), begin %>
|
2023-05-12 21:45:19 +00:00
|
|
|
(<%= $thread->{'remark_tally'} %> remarks)\
|
2023-04-25 03:00:09 +00:00
|
|
|
<% 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-14 03:57:58 +00:00
|
|
|
</nav>
|
2022-10-01 22:00:23 +00:00
|
|
|
</article>
|
|
|
|
<% } =%>
|
2023-05-10 00:07:28 +00:00
|
|
|
</main>
|
2022-10-01 22:00:23 +00:00
|
|
|
<% if ($last_page && $last_page != 1) { =%>
|
|
|
|
<nav>
|
|
|
|
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
|
|
|
|
</nav>
|
|
|
|
<% } =%>
|