diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 00:43:47 +0200 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-10-05 00:43:47 +0200 |
commit | befdcc8f9a30f55e91227bac0ee1813a661002b3 (patch) | |
tree | 34daa9fe986e9cc42e803f6dc8b382e2f05feb4a /extensions/InlineHistory | |
parent | 8592e84f5d251a284f09fae2947101715e094a78 (diff) | |
download | bugzilla-befdcc8f9a30f55e91227bac0ee1813a661002b3.tar.gz bugzilla-befdcc8f9a30f55e91227bac0ee1813a661002b3.tar.xz |
more porting work
Diffstat (limited to 'extensions/InlineHistory')
-rw-r--r-- | extensions/InlineHistory/Extension.pm | 6 | ||||
-rw-r--r-- | extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl | 47 |
2 files changed, 33 insertions, 20 deletions
diff --git a/extensions/InlineHistory/Extension.pm b/extensions/InlineHistory/Extension.pm index 63a67304b..d8d5161cc 100644 --- a/extensions/InlineHistory/Extension.pm +++ b/extensions/InlineHistory/Extension.pm @@ -91,6 +91,12 @@ sub template_before_process { $change->{added} = $change->{added} ? 'true' : 'false'; } + # identify buglist changes + $change->{buglist} = + $change->{fieldname} eq 'blocked' || + $change->{fieldname} eq 'dependson' || + $change->{fieldname} eq 'dupe'; + # split multiple flag changes (must be processed last) if ($change->{fieldname} eq 'flagtypes.name') { my @added = split(/, /, $change->{added}); diff --git a/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl b/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl index 4af08dca8..68c3e2703 100644 --- a/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl +++ b/extensions/InlineHistory/template/en/default/hook/bug/comments-aftercomments.html.tmpl @@ -66,25 +66,36 @@ + '>Attachment #[% change.attachid FILTER none %]</a> - '; [% END %] - [%# display duplicates as history rather than comments %] - [% IF change.dupe %] - html += 'Duplicate of this [% terms.bug %]: '; + [%# buglists need to be displayed differently, as we shouldn't use strike-out %] + [% IF change.buglist %] + [% IF change.dupe %] + [% label = 'Duplicate of this ' _ terms.bug %] + [% ELSE %] + [% label = field_descs.${change.fieldname} %] + [% END %] + [% IF change.added != '' %] + html += '[% label FILTER js %]: '; + [% PROCESS add_change value = change.added %] + [% END %] + [% IF change.removed != '' %] + html += 'No longer [% label FILTER lcfirst FILTER js %]: '; + [% PROCESS add_change value = change.removed %] + [% END %] [% ELSE %] html += '[% field_descs.${change.fieldname} FILTER js %]: '; - [% END %] - - [% IF change.removed != '' %] - [% IF change.added == '' %] - html += '<span class="ih_deleted">'; - [% END %] - [% PROCESS add_change value = change.removed, is_old = 1 %] - [% IF change.added == '' %] - html += '</span>'; - [% ELSE %] - html += ' ➔ '; + [% IF change.removed != '' %] + [% IF change.added == '' %] + html += '<span class="ih_deleted">'; + [% END %] + [% PROCESS add_change value = change.removed %] + [% IF change.added == '' %] + html += '</span>'; + [% ELSE %] + html += ' ➔ '; + [% END %] [% END %] + [% PROCESS add_change value = change.added %] [% END %] - [% PROCESS add_change value = change.added, is_old = 0 %] [% "html += '<br>';" UNLESS loop.last %] [% IF change.fieldname == 'cc' %] @@ -112,14 +123,11 @@ [% BLOCK add_change %] html += '[%~%] - [% '<span class="old">' IF is_old %] [% IF change.fieldname == 'estimated_time' || change.fieldname == 'remaining_time' || change.fieldname == 'work_time' %] [% PROCESS formattimeunit time_unit = value FILTER html FILTER js %] - [% ELSIF change.fieldname == 'blocked' || - change.fieldname == 'dependson' || - change.fieldname == 'dupe' %] + [% ELSIF change.buglist %] [% value FILTER bug_list_link FILTER js %] [% ELSIF change.fieldname == 'assigned_to' || change.fieldname == 'reporter' || @@ -130,6 +138,5 @@ [% ELSE %] [% display_value(change.fieldname, value) FILTER html FILTER js %] [% END %] - [% '</span>' IF is_old %] [%~ %]'; [% END %] |