diff --git a/PostText.pl b/PostText.pl index 583d096..f70eff1 100755 --- a/PostText.pl +++ b/PostText.pl @@ -105,7 +105,8 @@ group { my $base_path = $c->match->path_for(remark_page => undef)->{'path'}; my $this_page = $c->param('remark_page'); my $last_page = $c->remark->get_last_page_by_thread_id($thread_id); - my $remarks = $c->remark->get_remarks_by_thread_id($thread_id); + my $remarks = + $c->remark->get_remarks_by_thread_id($thread_id, $this_page); if (my $thread_body = %$thread{'body'}) { $c->stash( diff --git a/README.md b/README.md index ab557ff..ecc02ae 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,10 @@ Run the tests locally (against development environment) ## TODOs -1. Paging for remarks is broken because I conflated ascending and - descending... Need to come back to this I need sleep 1. Form to create new remarks 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 `` cuz I didn't know what else to use +1. Just clean stuff up in general lol diff --git a/templates/thread_id.html.ep b/templates/thread_id.html.ep index fda63fb..2270630 100644 --- a/templates/thread_id.html.ep +++ b/templates/thread_id.html.ep @@ -15,6 +15,7 @@
<% for my $remark (@$remarks) { =%>
+ #<%= %$remark{'id'} %>

<%= %$remark{'date'} %>

<%= %$remark{'author'} %>

<%= %$remark{'body'} %>

diff --git a/templates/view_page.html.ep b/templates/view_page.html.ep index 4082662..c83d119 100644 --- a/templates/view_page.html.ep +++ b/templates/view_page.html.ep @@ -4,7 +4,9 @@
<% for my $thread (@$threads) { =%>
- <%= link_to '#' . %$thread{'id'}, '/thread/' . %$thread{'id'} %> + + <%= link_to '#' . %$thread{'id'}, '/thread/' . %$thread{'id'} %> +

<%= %$thread{'title'} %>

<%= %$thread{'date'} %>

<%= %$thread{'author'} %>