aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSteven Day <steve@mysociety.org>2015-06-23 16:14:27 +0100
committerSteven Day <steve@mysociety.org>2015-06-29 12:43:01 +0100
commitbadc0954505c93c12a8ecf4932245958425d15ec (patch)
tree00c3b2c8b26d6e248070c4a84399d5426e514749 /templates
parent5313adb5005a91648a98525d73b6a37b661f4b22 (diff)
Combine all My Reports into a single list, allow filtering
Diffstat (limited to 'templates')
-rw-r--r--templates/web/fixmystreet/my/_problem-list.html27
-rw-r--r--templates/web/fixmystreet/my/my.html22
2 files changed, 28 insertions, 21 deletions
diff --git a/templates/web/fixmystreet/my/_problem-list.html b/templates/web/fixmystreet/my/_problem-list.html
new file mode 100644
index 000000000..1a891de80
--- /dev/null
+++ b/templates/web/fixmystreet/my/_problem-list.html
@@ -0,0 +1,27 @@
+[% FOREACH p = problems.confirmed %]
+ [% IF loop.first %]<h2>[% loc('Open reports') %]</h2>[% END %]
+ [% INCLUDE problem %]
+[% END %]
+
+[% FOREACH p = problems.fixed %]
+ [% IF loop.first %]<h2>[% loc('Fixed reports') %]</h2>[% END %]
+ [% INCLUDE problem %]
+[% END %]
+
+[% FOREACH p = problems.closed %]
+ [% IF loop.first %]<h2>[% loc('Closed reports') %]</h2>[% END %]
+ [% INCLUDE problem %]
+[% END %]
+
+[%# FOREACH p = problems.unconfirmed;
+ IF loop.first;
+ '<h2>' _ loc('Unconfirmed reports') _ '</h2>';
+ END;
+ INCLUDE problem;
+END %]
+
+[% BLOCK problem %]
+ [% "<ul class='issue-list-a full-width'>" IF loop.first %]
+ [% INCLUDE 'report/_item.html', problem = p, no_fixed =1 %]
+ [% "</ul>" IF loop.last %]
+[% END %]
diff --git a/templates/web/fixmystreet/my/my.html b/templates/web/fixmystreet/my/my.html
index eaf521494..9c857aab9 100644
--- a/templates/web/fixmystreet/my/my.html
+++ b/templates/web/fixmystreet/my/my.html
@@ -34,27 +34,7 @@
param = 'p'
%]
-[% FOREACH p = problems.confirmed %]
- [% IF loop.first %]<h2>[% loc('Open reports') %]</h2>[% END %]
- [% INCLUDE problem %]
-[% END %]
-
-[% FOREACH p = problems.fixed %]
- [% IF loop.first %]<h2>[% loc('Fixed reports') %]</h2>[% END %]
- [% INCLUDE problem %]
-[% END %]
-
-[% FOREACH p = problems.closed %]
- [% IF loop.first %]<h2>[% loc('Closed reports') %]</h2>[% END %]
- [% INCLUDE problem %]
-[% END %]
-
-[%# FOREACH p = problems.unconfirmed;
- IF loop.first;
- '<h2>' _ loc('Unconfirmed reports') _ '</h2>';
- END;
- INCLUDE problem;
-END %]
+[% INCLUDE 'my/_problem-list.html' %]
[% FOREACH u IN updates %]
[% IF loop.first %]