diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-10 14:49:30 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-09-13 08:33:24 +0100 |
commit | f2a5d899308634fb06605a1d8035e19eadb8932a (patch) | |
tree | fe7ecbb80f9699ca8a26eef8dca63acaabf7938f /templates | |
parent | 42bbac994c625e24a6eb645de9c47a7dd2b226ef (diff) |
Add cobrand hook for disallowing title moderation.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/report/_main.html | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html index 1e427fd86..6c5537fb4 100644 --- a/templates/web/base/report/_main.html +++ b/templates/web/base/report/_main.html @@ -1,4 +1,7 @@ -[% can_moderate = permissions.moderate OR c.user.can_moderate(problem, staff = permissions.moderate) %] +[% +can_moderate = permissions.moderate OR c.user.can_moderate(problem, staff = permissions.moderate) +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> @@ -38,9 +41,8 @@ <input type="hidden" name="token" value="[% csrf_token %]"> [% END %] + [% IF can_moderate_title %] <h1 class="moderate-display">[% problem.title | html %]</h1> - - [% IF can_moderate %] <div class="moderate-edit"> [% IF problem.title != original.title %] <label> @@ -50,6 +52,8 @@ [% END %] <h1><input class="form-control" type="text" name="problem_title" value="[% problem.title | html %]" data-original-value="[% original.title | html %]"></h1> </div> + [% ELSE %] + <h1>[% problem.title | html %]</h1> [% END %] <div class="moderate-edit"> |