Add hyperlink to single remark view

This commit is contained in:
swaggboi 2022-09-03 13:05:54 -04:00
parent b14d87dfee
commit a0a423e3aa
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,6 @@ Run the tests locally (against development environment)
## TODOs ## TODOs
1. Add hyperlink to single remarks
1. More tests (single remark view at least... maybe more) 1. More tests (single remark view at least... maybe more)
1. Grow into Mojo hybrid 1. Grow into Mojo hybrid

View File

@ -17,7 +17,10 @@
<h3>Remarks</h3> <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">
<%= link_to "#$remark->{'id'}",
remark_id => {remark_id => $remark->{'id'}} %>
</span>
<h4 class="date"><%= %$remark{'date'} %></h4> <h4 class="date"><%= %$remark{'date'} %></h4>
<h5 class="author"><%= %$remark{'author'} %></h5> <h5 class="author"><%= %$remark{'author'} %></h5>
<p class="body"><%= %$remark{'body'} %></p> <p class="body"><%= %$remark{'body'} %></p>