summaryrefslogtreecommitdiffstats
path: root/extensions/BugModal/template
diff options
context:
space:
mode:
authorByron Jones <glob@mozilla.com>2015-08-10 17:21:22 +0200
committerByron Jones <glob@mozilla.com>2015-08-10 17:21:22 +0200
commit44cd79261e988e83b1d8293f81c9b74f26942157 (patch)
tree18d70700596aa4a81cc2bfac074e85f72ee44d82 /extensions/BugModal/template
parent7e41532fd90edd907bffc283b39f1c1d3397ab4a (diff)
downloadbugzilla-44cd79261e988e83b1d8293f81c9b74f26942157.tar.gz
bugzilla-44cd79261e988e83b1d8293f81c9b74f26942157.tar.xz
Bug 1146761 - clicking on a date/flag/etc should scroll to the corresponding change
Diffstat (limited to 'extensions/BugModal/template')
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl21
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl33
-rw-r--r--extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl14
3 files changed, 52 insertions, 16 deletions
diff --git a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
index 1658a0408..ca47047fc 100644
--- a/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/attachments.html.tmpl
@@ -40,7 +40,13 @@
[% END %]
</div>
<div>
- <span class="attach-time">[% INCLUDE bug_modal/rel_time.html.tmpl ts=attachment.attached %]</span>
+ [% activity_id = bug.find_activity_id_for_attachment(attachment) %]
+ [% IF activity_id %]
+ <a href="#[% activity_id FILTER none %]" class="attach-time activity-ref">
+ [% INCLUDE bug_modal/rel_time.html.tmpl ts=attachment.attached %]</a>
+ [% ELSE %]
+ <span class="attach-time">[% INCLUDE bug_modal/rel_time.html.tmpl ts=attachment.attached %]</span>
+ [% END %]
<span class="attach-author">[% INCLUDE bug_modal/user.html.tmpl u=attachment.attacher %]</span>
</div>
<div class="attach-info">
@@ -56,9 +62,18 @@
[% FOREACH flag IN attachment.flags %]
<div class="attach-flag">
[% INCLUDE bug_modal/user.html.tmpl u=flag.setter simple=1 %]:
- <span class="flag-name-status">
+ [% activity_id = bug.find_activity_id_for_flag(flag) %]
+ [% IF activity_id %]
+ <a href="#[% activity_id FILTER none %]"
+ [% ELSE %]
+ <span
+ [% END %]
+ class="flag-name-status rel-time-title[% " activity-ref" IF activity_id %]"
+ title="[% flag.creation_date FILTER time_duration FILTER html %]"
+ data-time="[% flag.creation_date FILTER epoch FILTER none %]"
+ >
[%+ flag.type.name FILTER html %][% flag.status FILTER none %]
- </span>
+ [% activity_id ? "</a>" : "</span>" %]
[% IF flag.requestee %]
[%+ INCLUDE bug_modal/user.html.tmpl u=flag.requestee simple=1 %]
[% END %]
diff --git a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
index 9d7588641..7e77e1582 100644
--- a/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/edit.html.tmpl
@@ -216,19 +216,32 @@
[% END %]
[% IF needinfo.size %]
<div id="status-needinfo">
- (NeedInfo from
- [%+
- IF needinfo.size == 1;
- IF needinfo.0.requestee;
- INCLUDE bug_modal/user.html.tmpl u=needinfo.0.requestee nick_only=1;
+ [%~ IF needinfo.size == 1 %]
+ [%
+ ni = needinfo.0;
+ activity_id = bug.find_activity_id_for_flag(ni);
+ %]
+ [% IF activity_id %]
+ (<a href="#[% activity_id FILTER none %]"
+ [% ELSE %]
+ (<span
+ [% END %]
+ class="flag-name-status rel-time-title[% " activity-ref" IF activity_id %]"
+ title="[% ni.creation_date FILTER time_duration FILTER html %]"
+ data-time="[% ni.creation_date FILTER epoch FILTER none %]"
+ >NeedInfo
+ [% activity_id ? "</a>" : "</span>" %]
+ from
+ [%
+ IF ni.requestee;
+ INCLUDE bug_modal/user.html.tmpl u=ni.requestee nick_only=1;
ELSE;
"anyone";
END;
- ELSE;
- " " _ needinfo.size _ " people";
- END;
- ~%]
- )
+ %])
+ [% ELSE %]
+ (Needinfo from [% needinfo.size FILTER none %] people)
+ [% END ~%]
</div>
[% END %]
[% END %]
diff --git a/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl b/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
index d86a8c8cf..0c0362902 100644
--- a/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
+++ b/extensions/BugModal/template/en/default/bug_modal/flags.html.tmpl
@@ -74,10 +74,18 @@
</td>
<td class="flag-name">
- <span class="rel-time-title" title="[% f.creation_date FILTER time_duration FILTER html %]"
- data-time="[% f.creation_date FILTER epoch FILTER none %]">
+ [% activity_id = bug.find_activity_id_for_flag(f) %]
+ [% IF activity_id %]
+ <a href="#[% activity_id FILTER none %]"
+ [% ELSE %]
+ <span
+ [% END %]
+ class="rel-time-title[% " activity-ref" IF activity_id %]"
+ title="[% f.creation_date FILTER time_duration FILTER html %]"
+ data-time="[% f.creation_date FILTER epoch FILTER none %]"
+ >
[% f.type.name FILTER html %]
- </span>
+ [% activity_id ? "</a>" : "</span>" %]
</td>
<td class="flag-value">