aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/my/planned.html32
-rw-r--r--templates/web/base/report/_main.html17
-rw-r--r--templates/web/oxfordshire/header.html6
3 files changed, 55 insertions, 0 deletions
diff --git a/templates/web/base/my/planned.html b/templates/web/base/my/planned.html
new file mode 100644
index 000000000..2e852ea01
--- /dev/null
+++ b/templates/web/base/my/planned.html
@@ -0,0 +1,32 @@
+[%
+ SET bodyclass = 'mappage';
+ PROCESS "maps/${map.type}.html" IF problems.size;
+ INCLUDE 'header.html', title = loc('Your planned reports')
+%]
+
+[% IF problems.size %]
+ [% map_html %]
+ </div>
+ <div id="map_sidebar">
+ <div id="side">
+[% ELSE %]
+ <div id="map_sidebar">
+ <div id="skipped-map">
+[% END %]
+
+<h1>[% loc('Your planned reports') %]</h1>
+
+[% IF ! has_content %]
+[% loc('You haven&rsquo;t planned any reports yet.') %]
+[% END %]
+
+<section class="full-width">
+[% INCLUDE "reports/_list-filters.html", use_form_wrapper = 1 %]
+[% INCLUDE 'pagination.html', pager = problems_pager, param = 'p' %]
+[% INCLUDE 'my/_problem-list.html' %]
+</section>
+
+ </div>
+ </div>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html
index dfcfb8ce4..ffda48074 100644
--- a/templates/web/base/report/_main.html
+++ b/templates/web/base/report/_main.html
@@ -5,6 +5,23 @@
<div class="problem-header clearfix" problem-id="[% problem.id %]">
+[% IF c.user.has_permission_to('planned_reports', problem.bodies_str) %]
+<form method="post" action="/my/planned/change" id="planned_form">
+ <input type="hidden" name="id" value="[% problem.id %]">
+ <input type="hidden" name="token" value="[% csrf_token %]">
+ <input type="hidden" name="change" value="[% IF c.user.is_planned_report(problem) %]remove[% ELSE %]add[% END %]">
+ <p><input type="submit"
+ data-remove="[% loc('Remove from planned reports') %]" data-add="[% loc('Add to planned reports') %]"
+ value="
+ [%~ IF c.user.is_planned_report(problem) ~%]
+ [% loc('Remove from planned reports') %]
+ [%~ ELSE ~%]
+ [% loc('Add to planned reports') %]
+ [%~ END ~%]
+ "></p>
+</form>
+[% END %]
+
[% IF moderating %]
[% original = problem_original %]
<form method="post" action="/moderate/report/[% problem.id %]">
diff --git a/templates/web/oxfordshire/header.html b/templates/web/oxfordshire/header.html
index 6878f491a..e347c8677 100644
--- a/templates/web/oxfordshire/header.html
+++ b/templates/web/oxfordshire/header.html
@@ -42,6 +42,12 @@
<[% IF c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) %]span[% ELSE %]a href="/my"[% END
%]>[% c.user_exists ? loc("Your account") : loc("Sign in") %]</[% ( c.req.uri.path == '/my' OR ( c.req.uri.path == '/auth' AND c.req.params.r == 'my' ) ) ? 'span' : 'a' %]>
</li>
+ [% IF c.user_exists AND c.user.has_permission_to('planned_reports', c.user.from_body.id) %]
+ <li>
+ <[% IF c.req.uri.path == '/my/planned' %]span[% ELSE %]a href="/my/planned"[% END
+ %]>[% loc('Planned reports') %]</[% c.req.uri.path == '/my/planned' ? 'span' : 'a' %]>
+ </li>
+ [% END %]
<li>
<[% IF c.req.uri.path == '/reports/Oxfordshire' %]span[% ELSE %]a href="/reports/Oxfordshire"[% END
%]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]>