2022-08-19 23:11:20 -04:00
|
|
|
% layout 'main';
|
2022-08-19 23:28:16 -04:00
|
|
|
% title "View Thread - #$thread->{'id'}";
|
2022-08-19 23:11:20 -04:00
|
|
|
<h2><%= title %></h2>
|
2022-08-20 12:42:04 -04:00
|
|
|
<% if (my $thread_body = %$thread{'body'}) { =%>
|
|
|
|
<div class="threads">
|
2022-08-19 23:11:20 -04:00
|
|
|
<article class="thread">
|
|
|
|
<h3 class="title"><%= %$thread{'title'} %></h3>
|
|
|
|
<h4 class="date"><%= %$thread{'date'} %></h4>
|
|
|
|
<h5 class="author"><%= %$thread{'author'} %></h5>
|
2022-08-20 12:42:04 -04:00
|
|
|
<p class="body"><%= $thread_body %></p>
|
2022-08-19 23:11:20 -04:00
|
|
|
</article>
|
2022-08-20 12:42:04 -04:00
|
|
|
</div>
|
|
|
|
<% } =%>
|
2022-08-22 15:50:10 -04:00
|
|
|
<% if (my $first_remark = @$remarks[0]) { =%>
|
|
|
|
<div class="remarks">
|
|
|
|
<% for my $remark (@$remarks) { =%>
|
|
|
|
<article class="remark">
|
2022-08-22 23:09:48 -04:00
|
|
|
<span class="id">#<%= %$remark{'id'} %></span>
|
2022-08-22 15:50:10 -04:00
|
|
|
<h4 class="date"><%= %$remark{'date'} %></h4>
|
|
|
|
<h5 class="author"><%= %$remark{'author'} %></h5>
|
|
|
|
<p class="body"><%= %$remark{'body'} %></p>
|
2022-08-20 12:42:04 -04:00
|
|
|
</article>
|
|
|
|
<% } =%>
|
|
|
|
</div>
|
2022-08-22 22:17:14 -04:00
|
|
|
<% if ($last_page && $last_page != 1) { =%>
|
|
|
|
<nav>
|
|
|
|
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
|
|
|
|
</nav>
|
|
|
|
<% } %>
|
2022-08-20 12:42:04 -04:00
|
|
|
<% } =%>
|