Return number of remarks with thread and clean up templates (explicit dereference)
This commit is contained in:
parent
3d5a75ffd8
commit
e69ca992c0
|
@ -2,17 +2,18 @@
|
||||||
% title 'Threads List';
|
% title 'Threads List';
|
||||||
<h2><%= title %></h2>
|
<h2><%= title %></h2>
|
||||||
<div class="threads">
|
<div class="threads">
|
||||||
<% for my $thread (@$threads) { =%>
|
<% for my $thread (@{$threads}) { =%>
|
||||||
<article class="thread">
|
<article class="thread">
|
||||||
<span class="id">
|
<span class="id">
|
||||||
<%= link_to "Thread #$thread->{'id'}",
|
<%= link_to "Thread #$thread->{'id'}",
|
||||||
thread_page => {thread_id => $thread->{'id'}} %>
|
thread_page => {thread_id => $thread->{'id'}} %>
|
||||||
</span>
|
</span>
|
||||||
<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>
|
||||||
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
|
<%= link_to Remark => thread_id => {thread_id => $thread->{'id'}} %>
|
||||||
|
<footer><%= $thread->{'remark_count'} %> remarks</footer>
|
||||||
</article>
|
</article>
|
||||||
<% } =%>
|
<% } =%>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user