diff options
Diffstat (limited to 'templates/web/base/my')
-rw-r--r-- | templates/web/base/my/_problem-list.html | 25 | ||||
-rw-r--r-- | templates/web/base/my/my.html | 51 |
2 files changed, 36 insertions, 40 deletions
diff --git a/templates/web/base/my/_problem-list.html b/templates/web/base/my/_problem-list.html new file mode 100644 index 000000000..4b5fc73d6 --- /dev/null +++ b/templates/web/base/my/_problem-list.html @@ -0,0 +1,25 @@ +<ul class='issue-list-a full-width'> + [% IF problems.size %] + [% FOREACH problem = problems %] + [% INCLUDE 'reports/_list-entry.html' no_fixed = 1 %] + [% END %] + [% ELSE %] + <li class="empty"> + <p>[% loc('There are no reports to show.') %]</p> + </li> + [% END %] +</ul> + +[% IF ! problems.size %] +<!-- Preserve behaviour of map filters despite map not being shown --> +<script type="text/javascript"> + (function($) { + $(function() { + $(".report-list-filters [type=submit]").hide(); + $(".report-list-filters select").change(function() { + $(this).closest("form").submit(); + }); + }) + })(window.jQuery); +</script> +[% END %] diff --git a/templates/web/base/my/my.html b/templates/web/base/my/my.html index f3ad3f2fe..91cf40b68 100644 --- a/templates/web/base/my/my.html +++ b/templates/web/base/my/my.html @@ -21,32 +21,20 @@ c.uri_for('/') ) %] [% END %] +[% IF c.cobrand.moniker == 'fixmybarangay' %] + [% INCLUDE '_barangay_buttons.html' %] +[% ELSIF c.cobrand.moniker == 'hart' %] + [% INCLUDE '_hart_hants_note.html' %] +[% END %] + +[% INCLUDE "reports/_list-filters.html", use_section_wrapper = 1 %] + [% INCLUDE 'pagination.html', pager = problems_pager, 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 %] @@ -60,9 +48,9 @@ END %] <li>“[% u.text | html %]” – <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">[% u.problem.title | html %]</a>. - <em class="council_sent_info"> + <p><small class="council_sent_info"> [% tprintf( loc("Added %s"), prettify_dt( u.confirmed, 'date' ) ) %] - </em> + </small></p> </li> [% "</ul>" IF loop.last %] [% END %] @@ -70,20 +58,3 @@ END %] </div> [% INCLUDE 'footer.html' %] - -[% BLOCK problem %] - [% "<ul class='issue-list-a full-width'>" IF loop.first %] - - <li><a href="[% c.uri_for( '/report', p.id ) %]">[% p.title | html %]</a> - <em class="council_sent_info"> – - [% IF p.whensent %] - [% tprintf( loc("Reported %s, to %s"), prettify_dt( p.confirmed, 'date' ), p.body(c) ) %] - [% ELSE %] - [% tprintf( loc("Reported %s"), prettify_dt( p.confirmed, 'date' ) ) %] - [% END %] - </em> - </li> - - [% "</ul>" IF loop.last %] -[% END %] - |