Link to remark form

This commit is contained in:
swaggboi 2022-08-23 21:20:23 -04:00
parent 013f2ec59f
commit 9169d8b8cd
3 changed files with 20 additions and 13 deletions

View File

@ -1 +1,5 @@
.field-with-error {} .field-with-error {}
.thread, .remark {
border-style: dotted;
}

View File

@ -7,7 +7,7 @@
<h3 class="title"><%= %$thread{'title'} %></h3> <h3 class="title"><%= %$thread{'title'} %></h3>
<h4 class="date"><%= %$thread{'date'} %></h4> <h4 class="date"><%= %$thread{'date'} %></h4>
<h5 class="author"><%= %$thread{'author'} %></h5> <h5 class="author"><%= %$thread{'author'} %></h5>
<p class="body"><%= $thread_body %></p> <p class="body"><%= %$thread{'body'} %></p>
</article> </article>
</div> </div>
<form method="post"> <form method="post">

View File

@ -1,18 +1,20 @@
% layout 'main'; % layout 'main';
% title "View Thread - #$thread->{'id'}"; % title "View Thread - #$thread->{'id'}";
<h2><%= title %></h2> <h2><%= title %></h2>
<% if (my $thread_body = %$thread{'body'}) { =%> <div class="threads">
<div class="threads"> <article class="thread">
<article class="thread"> <h3 class="title"><%= %$thread{'title'} %></h3>
<h3 class="title"><%= %$thread{'title'} %></h3> <h4 class="date"><%= %$thread{'date'} %></h4>
<h4 class="date"><%= %$thread{'date'} %></h4> <h5 class="author"><%= %$thread{'author'} %></h5>
<h5 class="author"><%= %$thread{'author'} %></h5> <p class="body"><%= %$thread{'body'} %></p>
<p class="body"><%= $thread_body %></p> </article>
</article> </div>
</div> <nav>
<% } =%> <%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
</nav>
<% if (my $first_remark = @$remarks[0]) { =%> <% if (my $first_remark = @$remarks[0]) { =%>
<div class="remarks"> <div class="remarks">
<h3>Remarks</h3>
<% for my $remark (@$remarks) { =%> <% for my $remark (@$remarks) { =%>
<article class="remark"> <article class="remark">
<span class="id">#<%= %$remark{'id'} %></span> <span class="id">#<%= %$remark{'id'} %></span>
@ -22,9 +24,10 @@
</article> </article>
<% } =%> <% } =%>
</div> </div>
<% if ($last_page && $last_page != 1) { =%>
<nav> <nav>
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
<% if ($last_page && $last_page != 1) { =%>
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %> <%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
<% } %>
</nav> </nav>
<% } %>
<% } =%> <% } =%>