aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/web/base/my/planned.html4
-rw-r--r--templates/web/base/report/_item.html33
-rw-r--r--templates/web/base/report/_main.html2
-rw-r--r--templates/web/base/reports/_list-filters.html3
4 files changed, 39 insertions, 3 deletions
diff --git a/templates/web/base/my/planned.html b/templates/web/base/my/planned.html
index eb67247c4..d1a6b7b1b 100644
--- a/templates/web/base/my/planned.html
+++ b/templates/web/base/my/planned.html
@@ -22,11 +22,11 @@
[% END %]
<section class="full-width">
-[% INCLUDE "reports/_list-filters.html", use_form_wrapper = 1 %]
+[% INCLUDE "reports/_list-filters.html", use_form_wrapper = 1 shortlist = 1 %]
<div class="js-pagination">
[% INCLUDE 'pagination.html', pager = problems_pager, param = 'p' %]
</div>
-[% INCLUDE 'my/_problem-list.html' %]
+[% INCLUDE 'my/_problem-list.html' shortlist = 1 %]
</section>
</div>
diff --git a/templates/web/base/report/_item.html b/templates/web/base/report/_item.html
index dc4ccbf4e..e233ff09f 100644
--- a/templates/web/base/report/_item.html
+++ b/templates/web/base/report/_item.html
@@ -2,6 +2,30 @@
[% PROCESS 'admin/report_blocks.html' ~%]
[% END ~%]
+[% IF c.user.has_permission_to('planned_reports', problem.bodies_str_ids) ~%]
+ [% item_extra_class = "item-list__item--indented" ~%]
+ [% item_action = BLOCK ~%]
+ <input type="submit" value="1"
+ data-label-remove="[% loc('Remove from shortlist') %]"
+ data-label-add="[% loc('Add to shortlist') %]"
+ [% IF c.user.is_planned_report(problem) ~%]
+ name="shortlist-remove" title="[% loc('Remove from shortlist') %]" class="item-list__item__shortlist-remove"
+ [%~ ELSE ~%]
+ name="shortlist-add" title="[% loc('Add to shortlist') %]" class="item-list__item__shortlist-[% IF problem.shortlisted_user %]take[% ELSE %]add[% END %]"
+ [%~ END ~%]
+ >
+ [%~ END %]
+[% END %]
+
+[% IF shortlist %]
+ [% item_extra_class = "item-list__item--indented item-list__item--act-and-sort" %]
+ [% item_action = BLOCK %]
+ [% item_action %]
+ <input type="submit" name="shortlist-up" value="[% loc('Up one') %]" title="[% loc('Up one') %]" class="item-list__item__shortlist-up" [% IF loop.first %]disabled[% END %]>
+ <input type="submit" name="shortlist-down" value="[% loc('Down one') %]" title="[% loc('Down one') %]" class="item-list__item__shortlist-down" [% IF loop.last %]disabled[% END %]>
+ [% END %]
+[% END %]
+
<li class="item-list__item item-list--reports__item [% item_extra_class %]"
data-report-id="[% problem.id | html %]" data-lastupdate="[% problem.lastupdate %]">
<a href="[% c.cobrand.base_url_for_report( problem ) %][% problem.url %]">
@@ -87,4 +111,13 @@
</a>
+[% IF item_action AND page != 'around' %]
+ <form method="post" action="/my/planned/change">
+ <input type="hidden" name="id" value="[% problem.id %]">
+ <input type="hidden" name="token" value="[% csrf_token %]">
+ [% item_action %]
+ </form>
+[% ELSIF item_action ~%]
+ [% item_action.replace('("shortlist-[^"]*)', '$1-' _ problem.id) %]
+[% END ~%]
</li>
diff --git a/templates/web/base/report/_main.html b/templates/web/base/report/_main.html
index d5224f23e..e232a575c 100644
--- a/templates/web/base/report/_main.html
+++ b/templates/web/base/report/_main.html
@@ -11,7 +11,7 @@
<form method="post" action="/my/planned/change" id="planned_form" class="hidden-label-target">
<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 %]">
+ <input type="hidden" name="[% IF c.user.is_planned_report(problem) %]shortlist-remove[% ELSE %]shortlist-add[% END %]" value="1">
<p><input
type="submit"
id="shortlist-report"
diff --git a/templates/web/base/reports/_list-filters.html b/templates/web/base/reports/_list-filters.html
index 9c2a74e57..05fe6123b 100644
--- a/templates/web/base/reports/_list-filters.html
+++ b/templates/web/base/reports/_list-filters.html
@@ -32,6 +32,9 @@
<p class="report-list-filters">
<label for="sort">[% loc('Sort by') %]</label>
<select class="form-control" name="sort" id="sort">
+ [% IF shortlist %]
+ <option value="shortlist"[% ' selected' IF sort_key == 'shortlist' %]>[% loc('Manual order') %]</option>
+ [% END %]
<option value="created-desc"[% ' selected' IF sort_key == 'created-desc' %]>[% loc('Newest') %]</option>
<option value="created-asc"[% ' selected' IF sort_key == 'created-asc' %]>[% loc('Oldest') %]</option>
<option value="updated-desc"[% ' selected' IF sort_key == 'updated-desc' %]>[% loc('Recently updated') %]</option>