From ab9b055047fa0397a270d6e9a1e8f512bed455c8 Mon Sep 17 00:00:00 2001 From: swaggboi Date: Mon, 22 Aug 2022 17:33:15 -0400 Subject: [PATCH] Implement hyperlinking to single-thread view --- README.md | 15 ++++++++++----- templates/page.html.ep | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9ce79a3..a526d7f 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ A textboard written in Perl Install dependencies - $ cpanm --installdeps . + cpanm --installdeps . ## Running locally Run it in development mode - $ morbo PostText.pl + morbo PostText.pl Now try requesting http://localhost:3000 @@ -20,9 +20,14 @@ Now try requesting http://localhost:3000 Run the tests locally (against development environment) - $ prove -l + prove -l ## TODOs -1. Add hyperlink somewhere to single thread view (whoopsie) -1. Paging for replies in single thread view +1. Paging for remarks in single thread view +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 diff --git a/templates/page.html.ep b/templates/page.html.ep index 49d68b3..4082662 100644 --- a/templates/page.html.ep +++ b/templates/page.html.ep @@ -4,6 +4,7 @@
<% for my $thread (@$threads) { =%>
+ <%= link_to '#' . %$thread{'id'}, '/thread/' . %$thread{'id'} %>

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

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

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