diff options
author | Simon Green <sgreen@redhat.com> | 2014-08-14 09:40:47 +1000 |
---|---|---|
committer | Simon Green <sgreen@redhat.com> | 2014-08-14 09:40:47 +1000 |
commit | 424b21e37cd9aeac01588ce0defd3ee665944b1d (patch) | |
tree | 594aa91a4fafc7c30d26e0ee9a160f62bf4d063f /template/en/default/bug | |
parent | 6dbcec07eba4b0910c883141a85b0b9928b85f32 (diff) | |
download | bugs-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar bugs-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.gz bugs-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.bz2 bugs-424b21e37cd9aeac01588ce0defd3ee665944b1d.tar.xz bugs-424b21e37cd9aeac01588ce0defd3ee665944b1d.zip |
Bug 1012506 - Allow a bug to have multiple aliases
r=dkl, a=sgreen
Diffstat (limited to 'template/en/default/bug')
-rw-r--r-- | template/en/default/bug/edit.html.tmpl | 124 | ||||
-rw-r--r-- | template/en/default/bug/show-header.html.tmpl | 4 |
2 files changed, 79 insertions, 49 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index 8b55dedcb..6917a89ec 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -66,9 +66,13 @@ <table> [%# *** ID, product, component, status, resolution, Hardware, and OS *** %] [% PROCESS section_status %] - + [% PROCESS section_spacer %] - + + [% PROCESS section_aliases %] + + [% PROCESS section_spacer %] + [% PROCESS section_details1 %] [% PROCESS section_spacer %] @@ -173,61 +177,37 @@ [% BLOCK section_title %] [%# That's the main table, which contains all editable fields. %] - <div class="bz_alias_short_desc_container edit_form"> + <div class="bz_short_desc_container edit_form"> [% PROCESS commit_button id="_top"%] <a href="show_bug.cgi?id=[% bug.bug_id %]"> [%-# %]<b>[% terms.Bug %] [% bug.bug_id FILTER html %]</b> - [%-# %]</a> <span id="summary_alias_container" class="bz_default_hidden"> - [% IF bug.alias != "" %] - (<span id="alias_nonedit_display">[% bug.alias FILTER html %]</span>) + [%-# %]</a> <span id="summary_container" class="bz_default_hidden"> + [% IF bug.alias.size > 0 %] + (<span id="alias_nonedit_display">[% bug.alias.join(', ') FILTER html %]</span>) [% END %] - <span id="short_desc_nonedit_display">[% bug.short_desc FILTER quoteUrls(bug) %]</span> - [% IF bug.check_can_change_field('short_desc', 0, 1) || - bug.check_can_change_field('alias', 0, 1) %] - <small class="editme">(<a href="#" id="editme_action">edit</a>)</small> + [% IF bug.check_can_change_field('short_desc', 0, 1) %] + <small>(<a href="#" id="summary_edit_action">edit</a>)</small> [% END %] </span> - - - <div id="summary_alias_input"> - <table id="summary"> - <tr> - [% IF bug.check_can_change_field('alias', 0, 1) %] - [% INCLUDE "bug/field-label.html.tmpl" - field = bug_fields.alias - editable = 1 - %] - <td> - [% ELSIF bug.alias %] - <td colspan="2">( - [% ELSE %] - <td colspan="2"> - [% END %] - [% PROCESS input inputname => "alias" - size => "20" - maxlength => "20" - no_td => 1 - %][% ")" IF NOT bug.check_can_change_field('alias', 0, 1) - && bug.alias %] - </td> - </tr> - [%# *** Summary *** %] - <tr> - [% INCLUDE "bug/field-label.html.tmpl" - field = bug_fields.short_desc - editable = 1 - accesskey = "s" - %] - <td> - [% PROCESS input inputname => "short_desc" size => "80" colspan => 2 - maxlength => 255 spellcheck => "true" no_td => 1 %] - </td> - </tr> - </table> + + <div id="summary_input"> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.short_desc + editable = 1 + accesskey = "s" + tag_name = 'span' + %] + [% PROCESS input inputname => "short_desc" size => "80" + maxlength => 255 spellcheck => "true" no_td => 1 %] </div> </div> <script type="text/javascript"> - hideAliasAndSummary('[% bug.short_desc FILTER js %]', '[% bug.alias FILTER js %]'); + hideEditableField('summary_container', + 'summary_input', + 'summary_edit_action', + 'short_desc', + '[% bug.short_desc FILTER js %]' ); </script> [% END %] @@ -867,6 +847,56 @@ [% END %] [% END %] +[% BLOCK section_aliases %] + <tr> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.alias, editable = 1 + %] + <td> + [% IF bug.alias.size %] + [% bug.alias.join(', ') FILTER html %] + [% ELSE %] + None + [% END %] + [% IF bug.check_can_change_field('alias', 0, 1) %] + <span id="alias_edit_area_showhide_container" class="bz_default_hidden"> + (<a href="#" id="alias_edit_area_showhide">edit</a>) + </span> + <br> + <div id="alias_edit_area"> + <div> + <div> + <label for="aliases"> + <b>Add</b> + </label> + </div> + <input name="newalias" id="newalias" size="20"> + </div> + [% IF bug.alias.size %] + <select id="alias" name="alias" multiple="multiple" size="5"> + [% FOREACH a = bug.alias %] + <option value="[% a FILTER html %]">[% a FILTER html %]</option> + [% END %] + </select> + <br> + + <input type="checkbox" id="removealias" name="removealias"> + <label for="removealias">Remove selected aliases</label> + + [% END %] + </div> + <script type="text/javascript"> + hideEditableField( 'alias_edit_area_showhide_container', + 'alias_edit_area', + 'alias_edit_area_showhide', + '', + ''); + </script> + [% END %] + </td> + </tr> +[% END %] + [%############################################################################%] [%# Block for FLAGS #%] [%############################################################################%] diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index 6dfc19dfb..3b1f27252 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -13,7 +13,7 @@ # be overridden by the calling templates. #%] -[% filtered_alias = bug.alias FILTER html %] +[% filtered_alias = bug.alias.join(', ') FILTER html %] [% filtered_desc = bug.short_desc FILTER html %] [% filtered_timestamp = bug.delta_ts FILTER time %] @@ -34,7 +34,7 @@ [% header_addl_info = "Last modified: $filtered_timestamp" %] [% unfiltered_title = "$bug.bug_id – " %] [% IF bug.alias != '' %] - [% unfiltered_title = unfiltered_title _ "($bug.alias) " %] + [% unfiltered_title = unfiltered_title _ "(" _ bug.alias.join(', ') _ ") " %] [% END %] [% unfiltered_title = unfiltered_title _ bug.short_desc %] [% javascript = BLOCK %] |