From 4ffa8b26134a50ded160cded6a6b27e7abb5a298 Mon Sep 17 00:00:00 2001 From: swag Date: Thu, 8 Dec 2022 13:29:55 -0600 Subject: [PATCH] Buttons for remark mod stuff --- t/moderator.t | 11 ++++++----- templates/remark/by_id.html.ep | 7 +++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/t/moderator.t b/t/moderator.t index b2b54b7..df2f483 100644 --- a/t/moderator.t +++ b/t/moderator.t @@ -73,13 +73,14 @@ subtest Login => sub { ->element_exists('a[href*="/unhide/1"]') ->element_exists('a[href*="/unflag/1"]'); - #$t->get_ok('/remark/single/1') - # ->status_is(200) - # ->element_exists('a[href*="/hide/1"]' ) - # ->element_exists('a[href*="/unhide/1"]') - # ->element_exists('a[href*="/unflag/1"]'); + $t->get_ok('/remark/single/1') + ->status_is(200) + ->element_exists('a[href*="/hide/1"]' ) + ->element_exists('a[href*="/unhide/1"]') + ->element_exists('a[href*="/unflag/1"]'); }; + # Mod session ends $t->get_ok('/logout') ->status_is(302) ->header_like(Location => qr{thread/list}); diff --git a/templates/remark/by_id.html.ep b/templates/remark/by_id.html.ep index f165a1f..6b7438f 100644 --- a/templates/remark/by_id.html.ep +++ b/templates/remark/by_id.html.ep @@ -13,3 +13,10 @@ <%= link_to Thread => single_thread => {thread_id => $remark->{'thread_id'}} %> <%= link_to Flag => flag_remark => {remark_id => $remark->{'id'} } %> +<% if (is_mod) { =%> + +<% } =%>