Buttons for remark mod stuff

This commit is contained in:
swag 2022-12-08 13:29:55 -06:00
parent bfb5ab9986
commit 4ffa8b2613
2 changed files with 13 additions and 5 deletions

View File

@ -73,13 +73,14 @@ subtest Login => sub {
->element_exists('a[href*="/unhide/1"]') ->element_exists('a[href*="/unhide/1"]')
->element_exists('a[href*="/unflag/1"]'); ->element_exists('a[href*="/unflag/1"]');
#$t->get_ok('/remark/single/1') $t->get_ok('/remark/single/1')
# ->status_is(200) ->status_is(200)
# ->element_exists('a[href*="/hide/1"]' ) ->element_exists('a[href*="/hide/1"]' )
# ->element_exists('a[href*="/unhide/1"]') ->element_exists('a[href*="/unhide/1"]')
# ->element_exists('a[href*="/unflag/1"]'); ->element_exists('a[href*="/unflag/1"]');
}; };
# Mod session ends
$t->get_ok('/logout') $t->get_ok('/logout')
->status_is(302) ->status_is(302)
->header_like(Location => qr{thread/list}); ->header_like(Location => qr{thread/list});

View File

@ -13,3 +13,10 @@
<%= link_to Thread => single_thread => {thread_id => $remark->{'thread_id'}} %> <%= link_to Thread => single_thread => {thread_id => $remark->{'thread_id'}} %>
<%= link_to Flag => flag_remark => {remark_id => $remark->{'id'} } %> <%= link_to Flag => flag_remark => {remark_id => $remark->{'id'} } %>
</nav> </nav>
<% if (is_mod) { =%>
<nav>
<%= link_to Hide => hide_remark => {remark_id => $remark->{'id'}} %>
<%= link_to Unhide => unhide_remark => {remark_id => $remark->{'id'}} %>
<%= link_to Unflag => unflag_remark => {remark_id => $remark->{'id'}} %>
</nav>
<% } =%>