diff options
Diffstat (limited to 'templates/web/default')
-rw-r--r-- | templates/web/default/report/updates.html | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/templates/web/default/report/updates.html b/templates/web/default/report/updates.html index 4d2e94961..736d36528 100644 --- a/templates/web/default/report/updates.html +++ b/templates/web/default/report/updates.html @@ -1,3 +1,4 @@ +[% global.last_state = '' %] [% FOREACH update IN updates %] [% INCLUDE 'report/update.html' %] [% END %] @@ -22,19 +23,20 @@ [%- ELSE %] [% tprintf( loc( 'Posted by %s at %s' ), update.name, prettify_epoch( update.confirmed_local.epoch ) ) | html -%] [%- END -%] - [%- ", " _ loc( 'marked as fixed' ) IF update.mark_fixed %] - [%- ", " _ loc( 'reopened' ) IF update.mark_open %] - [%- IF c.cobrand.moniker == 'bromley' %] - [%- IF update.problem_state %] - [%- update_state = update_state.problem_state %] - [%- IF update.problem_state == 'unable to fix' %] - [%- update_state = loc('no further action') %] - [%- ELSIF update.problem_state == 'confirmed' %] - [%- update_state = loc('open') %] - [%- END %] - [%- ", " _ tprintf(loc( 'marked as %s' ), update_state ) %] + [%- update_state = '' %] + [%- IF update.mark_fixed %][% update_state = ", " _ loc( 'marked as fixed' ) %][% END %] + [%- IF update.mark_open %][% update_state = ", " _ loc( 'reopened' ) %][% END %] + [%- IF !update_state && update.problem_state %] + [%- state = update.meta_problem_state %] + [%- IF c.cobrand.moniker == 'bromley' AND update.problem_state == 'unable to fix' %] + [%- state = loc('no further action') %] + [% END %] + [%- IF update.problem_state == 'confirmed' %] + [%- update_state = ", " _ loc('reopened') %] + [%- ELSE %] + [%- update_state = ", " _ tprintf(loc( 'marked as %s' ), state ) %] + [% END %] [%- END %] - [%- ELSE %] - [%- ", " _ tprintf(loc( 'marked as %s' ), update.meta_problem_state ) IF update.problem_state %] - [% END %] + [%- update_state IF update_state != global.last_state %] + [%- global.last_state = update_state %] [% END %] |