diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-02-23 01:06:05 -0500 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-02-23 01:06:05 -0500 |
commit | 90062dd4e7d12189ee75bce626aaf4c6d9e3723d (patch) | |
tree | 4ec9e91be889eea91469e04701ff7389e091b755 | |
parent | Bug 632717: Limit the total number of results that a search can ever return. (diff) | |
download | bugzilla-90062dd4e7d12189ee75bce626aaf4c6d9e3723d.tar.gz bugzilla-90062dd4e7d12189ee75bce626aaf4c6d9e3723d.tar.bz2 bugzilla-90062dd4e7d12189ee75bce626aaf4c6d9e3723d.zip |
Bug 609968 - Allow local See Also links to show status/summary when mouseover
r=timello,a=mkanat
-rw-r--r-- | Bugzilla/BugUrl/Bugzilla.pm | 5 | ||||
-rw-r--r-- | template/en/default/bug/field.html.tmpl | 17 |
2 files changed, 18 insertions, 4 deletions
diff --git a/Bugzilla/BugUrl/Bugzilla.pm b/Bugzilla/BugUrl/Bugzilla.pm index f8e714d9d..53f174556 100644 --- a/Bugzilla/BugUrl/Bugzilla.pm +++ b/Bugzilla/BugUrl/Bugzilla.pm @@ -59,4 +59,9 @@ sub _check_value { return $uri; } +sub target_bug_id { + my ($self) = @_; + return new URI($self->name)->query_param('id'); +} + 1; diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index 900a78271..323b4b6be 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -165,8 +165,7 @@ [% '<ul class="bug_urls">' IF value.size %] [% FOREACH bug_url = value %] <li> - <a href="[% bug_url.name FILTER html %]"> - [% bug_url.name FILTER html %]</a> + [% PROCESS bug_url_link bug_url = bug_url %] <label><input type="checkbox" value="[% bug_url.name FILTER html %]" name="remove_[% field.name FILTER html %]"> Remove</label> @@ -215,8 +214,9 @@ [% ELSIF field.type == constants.FIELD_TYPE_BUG_URLS %] [% '<ul class="bug_urls">' IF value.size %] [% FOREACH bug_url = value %] - <li><a href="[% bug_url.name FILTER html %]"> - [% bug_url.name FILTER html %]</a></li> + <li> + [% PROCESS bug_url_link bug_url = bug_url %] + </li> [% END %] [% '</ul>' IF value.size %] [% ELSE %] @@ -237,3 +237,12 @@ [% ELSE %] [% extra_field_item = '' %] [% END %] + +[% BLOCK bug_url_link %] + [% IF bug_url.isa('Bugzilla::BugUrl::Bugzilla::Local') %] + [% bug_url.target_bug_id FILTER bug_link(bug_url.target_bug_id, use_alias => 1) FILTER none %] + [% ELSE %] + <a href="[% bug_url.name FILTER html %]"> + [% bug_url.name FILTER html %]</a> + [% END %] +[% END %] |