aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-12-03 17:59:23 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-12-04 10:08:14 +0000
commit51cbde5ebcc08c52d3d5531c529c0c7a52b5e230 (patch)
treecc49b82f9c6b7e0a9fff52444b1665912cfe39b8 /templates
parentbe3c0f5917fe1de5d87442f9341b033e3007c344 (diff)
Fix moderation without JavaScript.
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/report/_main.html7
-rw-r--r--templates/web/base/report/update.html7
2 files changed, 10 insertions, 4 deletions
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html
index 6c5537fb4..d40b1db52 100644
--- a/templates/web/base/report/_main.html
+++ b/templates/web/base/report/_main.html
@@ -6,7 +6,9 @@ can_moderate_title = c.user.can_moderate_title(problem, can_moderate)
<a href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]"
class="problem-back js-back-to-report-list">[% loc('Back to all reports') %]</a>
-<div class="problem-header clearfix" data-lastupdate="[% problem.lastupdate %]">
+<div class="problem-header clearfix
+ [%~ ' show-moderation' IF show_moderation == 'report' ~%]
+ " data-lastupdate="[% problem.lastupdate %]">
[% IF permissions.planned_reports %]
<form method="post" action="/my/planned/change" id="planned_form" class="hidden-label-target">
@@ -129,7 +131,8 @@ can_moderate_title = c.user.can_moderate_title(problem, can_moderate)
[% IF can_moderate OR permissions.planned_reports %]
<div class="moderate-display segmented-control" role="menu">
[% IF can_moderate %]
- <a class="js-moderate btn" role="menuitem" aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</a>
+ <a class="js-moderate btn" role="menuitem" href="/report/[% problem.id %]/moderate"
+ aria-label="[% loc('Moderate this report') %]">[% loc('Moderate') %]</a>
[% END %]
[% IF permissions.planned_reports %]
[%~ IF c.user.is_planned_report(problem) ~%]
diff --git a/templates/web/base/report/update.html b/templates/web/base/report/update.html
index d8b3b5629..bac28dd11 100644
--- a/templates/web/base/report/update.html
+++ b/templates/web/base/report/update.html
@@ -4,12 +4,15 @@
<h4 class="static-with-rule">[% loc('Updates') %]</h4>
<ul class="item-list item-list--updates">
[% END %]
- <li class="item-list__item item-list__item--updates">
+ <li class="item-list__item item-list__item--updates
+ [%~ ' show-moderation' IF show_moderation == update.id ~%]
+ ">
<a name="update_[% update.id %]" class="internal-link-fixed-header"></a>
[% IF can_moderate; original_update = update.moderation_original_data %]
<form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
<input type="hidden" name="token" value="[% csrf_token %]">
- <input type="button" class="btn js-moderate moderate-display" value="[% loc('Moderate this update') %]">
+ <a role="menuitem" href="/report/[% problem.id %]/moderate/[% update.id %]#update_[% update.id %]"
+ class="btn js-moderate moderate-display">[% loc('Moderate this update') %]</a>
<div class="moderate-edit">
<label><input type="checkbox" class="hide-document" name="update_hide">
[% loc('Hide update completely?') %]</label>