Another Remark hyperlink and finally figured out link_to() smh
This commit is contained in:
parent
9169d8b8cd
commit
d9bbcf6bae
|
@ -24,14 +24,9 @@ Run the tests locally (against development environment)
|
||||||
|
|
||||||
## TODOs
|
## TODOs
|
||||||
|
|
||||||
1. Hyperlink to remarks form
|
|
||||||
1. Is there something I can do about route names?
|
1. Is there something I can do about route names?
|
||||||
1. I'm kinda hardcoding the single-thread view `link_to` in the
|
|
||||||
templates because I cannot for the life of me figure out how to use
|
|
||||||
`url_for` to populate the `thread_id` placeholder. Probably need to
|
|
||||||
clean-up the HTML too, just used `<span>` cuz I didn't know what
|
|
||||||
else to use
|
|
||||||
1. Tests for remark form
|
1. Tests for remark form
|
||||||
|
1. Return the last remark with remark form
|
||||||
1. Marked some items for clean up with comments
|
1. Marked some items for clean up with comments
|
||||||
1. Method names may need to be shortened
|
1. Method names may need to be shortened
|
||||||
1. Change 'view' to something like 'list' or 'browse'
|
1. Change 'view' to something like 'list' or 'browse'
|
||||||
|
|
|
@ -5,12 +5,14 @@
|
||||||
<% for my $thread (@$threads) { =%>
|
<% for my $thread (@$threads) { =%>
|
||||||
<article class="thread">
|
<article class="thread">
|
||||||
<span class="id">
|
<span class="id">
|
||||||
<%= link_to '#' . %$thread{'id'}, '/thread/' . %$thread{'id'} %>
|
<%= link_to "#$thread->{'id'}",
|
||||||
|
thread_idremark_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'}} %>
|
||||||
</article>
|
</article>
|
||||||
<% } =%>
|
<% } =%>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue