From 06c3476c22a9b1ce690c1275423f27e9e6a84eda Mon Sep 17 00:00:00 2001 From: swag Date: Fri, 12 May 2023 17:45:19 -0400 Subject: [PATCH] Rename remark_count to remark_tally --- README.md | 1 - lib/PostText/Model/Thread.pm | 2 +- templates/thread/by_page.html.ep | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e76dec2..3028df9 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ Run the tests locally (against development environment): ## TODOs 1. Show `bump_tally` and `remark_count` in single thread view -1. Rename `remark_count` to `remark_tally` 1. Redirect mod/admin back to hidden/flagged where it makes sense 1. CSS 1. "All new posts flagged" mode (require approval for new posts) diff --git a/lib/PostText/Model/Thread.pm b/lib/PostText/Model/Thread.pm index 29fb635..92285ec 100644 --- a/lib/PostText/Model/Thread.pm +++ b/lib/PostText/Model/Thread.pm @@ -37,7 +37,7 @@ sub by_page($self, $this_page = 1) { t.thread_author AS author, t.thread_title AS title, t.thread_body AS body, - COUNT(r.*) AS remark_count, + COUNT(r.*) AS remark_tally, t.bump_tally AS bump_tally FROM threads AS t LEFT JOIN remarks AS r diff --git a/templates/thread/by_page.html.ep b/templates/thread/by_page.html.ep index b98ddfa..bdaa06d 100644 --- a/templates/thread/by_page.html.ep +++ b/templates/thread/by_page.html.ep @@ -22,7 +22,7 @@ <%= link_to Remark => post_remark => {thread_id => $thread->{'id'}} %> <%= link_to url_for(single_thread => {thread_id => $thread->{'id'}}) ->fragment('remarks'), begin %> - (<%= $thread->{'remark_count'} %> remarks)\ + (<%= $thread->{'remark_tally'} %> remarks)\ <% end =%> <%= link_to Bump => bump_thread => {thread_id => $thread->{'id'}} %> (<%= $thread->{'bump_tally'} %> bumps)