PostText/templates/thread_page.html.ep

36 lines
1.0 KiB
Plaintext
Raw Normal View History

2022-08-24 00:35:35 -04:00
% layout 'main';
2022-08-24 00:48:48 -04:00
% title "Thread - #$thread->{'id'}";
2022-08-24 00:35:35 -04:00
<h2><%= title %></h2>
<div class="threads">
<article class="thread">
<h3 class="title"><%= %$thread{'title'} %></h3>
<h4 class="date"><%= %$thread{'date'} %></h4>
<h5 class="author"><%= %$thread{'author'} %></h5>
<p class="body"><%= %$thread{'body'} %></p>
</article>
</div>
<nav>
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
</nav>
<% if (my $first_remark = @$remarks[0]) { =%>
<div class="remarks">
<h3>Remarks</h3>
<% for my $remark (@$remarks) { =%>
<article class="remark">
2022-09-03 13:05:54 -04:00
<span class="id">
<%= link_to "#$remark->{'id'}",
remark_id => {remark_id => $remark->{'id'}} %>
</span>
2022-08-24 00:35:35 -04:00
<h4 class="date"><%= %$remark{'date'} %></h4>
<h5 class="author"><%= %$remark{'author'} %></h5>
<p class="body"><%= %$remark{'body'} %></p>
</article>
<% } =%>
</div>
<nav>
<% if ($last_page && $last_page != 1) { =%>
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
2022-08-24 22:15:52 -04:00
<% } =%>
2022-08-24 00:35:35 -04:00
</nav>
<% } =%>