diff options
Diffstat (limited to 'template/en/default/bug/edit.html.tmpl')
-rw-r--r-- | template/en/default/bug/edit.html.tmpl | 392 |
1 files changed, 216 insertions, 176 deletions
diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index fbc6e4a96..52e5865b8 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -32,71 +32,6 @@ <script type="text/javascript"> <!-- - /* Outputs a link to call replyToComment(); used to reduce HTML output */ - function addReplyLink(id, real_id) { - /* XXX this should really be updated to use the DOM Core's - * createElement, but finding a container isn't trivial. - */ - [% IF user.settings.quote_replies.value != 'off' %] - document.write('[<a href="#add_comment" onclick="replyToComment(' + - id + ',' + real_id + '); return false;">reply<' + '/a>]'); - [% END %] - } - - /* Adds the reply text to the `comment' textarea */ - function replyToComment(id, real_id) { - var prefix = "(In reply to comment #" + id + ")\n"; - var replytext = ""; - [% IF user.settings.quote_replies.value == 'quoted_reply' %] - /* pre id="comment_name_N" */ - var text_elem = document.getElementById('comment_text_'+id); - var text = getText(text_elem); - replytext = prefix + wrapReplyText(text); - [% ELSIF user.settings.quote_replies.value == 'simple_reply' %] - replytext = prefix; - [% END %] - - [% IF user.is_insider %] - if (document.getElementById('isprivate_' + real_id).checked) { - document.getElementById('newcommentprivacy').checked = 'checked'; - updateCommentTagControl(document.getElementById('newcommentprivacy'), 'comment'); - } - [% END %] - - /* <textarea id="comment"> */ - var textarea = document.getElementById('comment'); - textarea.value += replytext; - - textarea.focus(); - } - - if (typeof Node == 'undefined') { - /* MSIE doesn't define Node, so provide a compatibility object */ - window.Node = { - TEXT_NODE: 3, - ENTITY_REFERENCE_NODE: 5 - }; - } - - /* Concatenates all text from element's childNodes. This is used - * instead of innerHTML because we want the actual text (and - * innerText is non-standard). - */ - function getText(element) { - var child, text = ""; - for (var i=0; i < element.childNodes.length; i++) { - child = element.childNodes[i]; - var type = child.nodeType; - if (type == Node.TEXT_NODE || type == Node.ENTITY_REFERENCE_NODE) { - text += child.nodeValue; - } else { - /* recurse into nodes of other types */ - text += getText(child); - } - } - return text; - } - [% IF user.is_timetracker %] var fRemainingTime = [% bug.remaining_time %]; // holds the original value function adjustRemainingTime() { @@ -115,7 +50,6 @@ // if the remaining time is changed manually, update fRemainingTime fRemainingTime = document.changeform.remaining_time.value; } - [% END %] [% IF user.id %] @@ -164,17 +98,29 @@ [% PROCESS section_url_keyword_whiteboard %] [% PROCESS section_spacer %] - - [%# *** Dependencies *** %] + + [%# *** Dependencies and duplicates *** %] + [% PROCESS section_duplicates %] + [% PROCESS section_dependson_blocks %] - + + [% IF user.id %] + <tr> + <td colspan="2"> + <span style="float:left"> + <a href="page.cgi?id=fields.html">What do these fields mean?</a> + </span> + [% PROCESS commit_button id="_top"%] + </td> + </tr> + [% END %] </table> </td> <td> <div class="bz_column_spacer"> </div> </td> [%# 2nd Column %] - <td id="bz_show_bug_column_2" class="bz_show_bug_column"> + <td id="bz_show_bug_column_2" class="bz_show_bug_column_table" valign="top"> <table cellpadding="3" cellspacing="1"> [%# *** Reported and modified dates *** %] [% PROCESS section_dates %] @@ -182,16 +128,16 @@ [% PROCESS section_cclist %] [% PROCESS section_spacer %] - - [% PROCESS section_see_also %] + + [% PROCESS section_flags %] - [% PROCESS section_customfields %] + [% PROCESS section_see_also %] [% PROCESS section_spacer %] + [% PROCESS section_customfields %] + [% Hook.process("after_custom_fields") %] - - [% PROCESS section_flags %] </table> </td> @@ -220,6 +166,8 @@ [% IF user.settings.comment_box_position.value == 'before_comments' %] [% PROCESS comment_box %] + [% ELSE %] + [% PROCESS summon_comment_box %] [% END %] </td> <td> @@ -238,7 +186,10 @@ [% IF user.settings.comment_box_position.value == 'after_comments' %] <hr> [% PROCESS comment_box %] - [% END %] + [% ELSE %] + [% PROCESS summon_comment_box %] + [% END %] + </form> @@ -249,7 +200,10 @@ [% BLOCK section_title %] [%# That's the main table, which contains all editable fields. %] <div class="bz_alias_short_desc_container edit_form"> - [% PROCESS commit_button id="_top"%] + <span class="last_comment_link"> + <a href="#c[% bug.comments.size - 1 %]" + accesskey="l"><b>L</b>ast Comment</a> + </span> <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"> @@ -351,9 +305,9 @@ %] </tr> <tr> - <td class="field_label"> - <label for="version"><b>Version</b></label>: - </td> + <th class="field_label"> + <label for="version">Version</label>: + </th> [% PROCESS select selname => "version" %] </tr> @@ -361,9 +315,9 @@ [%# PLATFORM #%] [%############%] <tr> - <td class="field_label"> - <label for="rep_platform" accesskey="h"><b>Platform</b></label>: - </td> + <th class="field_label"> + <label for="rep_platform" accesskey="h">Platform</label>: + </th> <td class="field_value"> [% INCLUDE bug/field.html.tmpl bug = bug, field = bug_fields.rep_platform, @@ -373,9 +327,6 @@ bug = bug, field = bug_fields.op_sys, no_tds = 1, value = bug.op_sys editable = bug.check_can_change_field('op_sys', 0, 1) %] - <script type="text/javascript"> - assignToDefaultOnChange(['product', 'component']); - </script> </td> </tr> @@ -389,9 +340,9 @@ [% BLOCK section_status %] <tr> - <td class="field_label"> - <b><a href="page.cgi?id=fields.html#status">Status</a></b>: - </td> + <th class="field_label"> + <a href="page.cgi?id=fields.html#status">Status</a>: + </th> <td id="bz_field_status"> <span id="static_bug_status"> [% display_value("bug_status", bug.bug_status) FILTER html %] @@ -408,6 +359,30 @@ </span> </td> </tr> + [% IF Param('usestatuswhiteboard') %] + <tr> + <th class="field_label"> + <label for="status_whiteboard" accesskey="w"><u>W</u>hiteboard</label>: + </th> + [% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %] + </tr> + [% END %] + + [% IF use_keywords %] + <tr> + <th class="field_label"> + <label for="keywords" accesskey="k"> + <a href="describekeywords.cgi"><u>K</u>eywords</a></label>: + </th> + <td class="field_value" colspan="2"> + [% INCLUDE bug/field.html.tmpl + bug = bug, field = bug_fields.keywords, value = bug.keywords + editable = bug.check_can_change_field("keywords", 0, 1), + no_tds = 1 + %] + </td> + </tr> + [% END %] [% END %] [%############################################################################%] @@ -420,10 +395,10 @@ [%# Importance (priority and severity) #%] [%###############################################################%] <tr> - <td class="field_label"> + <th class="field_label"> <label for="priority" accesskey="i"> - <b><a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a></b></label>: - </td> + <a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a></label>: + </th> <td> [% INCLUDE bug/field.html.tmpl bug = bug, field = bug_fields.priority, @@ -439,11 +414,11 @@ [% IF Param("usetargetmilestone") && bug.target_milestone %] <tr> - <td class="field_label"> + <th class="field_label"> <label for="target_milestone"> - <a href="page.cgi?id=fields.html#target_milestone"> + <a href="page.cgi?id=fields.html#target_milestone"> Target Milestone</a></label>: - </td> + </th> [% PROCESS select selname = "target_milestone" %] </tr> [% END %] @@ -457,9 +432,9 @@ [% BLOCK section_people %] <tr> - <td class="field_label"> - <b><a href="page.cgi?id=fields.html#assigned_to">Assigned To</a></b>: - </td> + <th class="field_label"> + <a href="page.cgi?id=fields.html#assigned_to">Assigned To</a>: + </th> <td> [% IF bug.check_can_change_field("assigned_to", 0, 1) %] <div id="bz_assignee_edit_container" class="bz_default_hidden"> @@ -506,41 +481,46 @@ [% IF Param('useqacontact') %] <tr> - <td class="field_label"> - <label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>: - </td> + <th class="field_label"> + <label for="qa_contact" accesskey="q"><u>Q</u>A Contact</label>: + </th> <td> [% IF bug.check_can_change_field("qa_contact", 0, 1) %] - [% IF bug.qa_contact != "" %] - <div id="bz_qa_contact_edit_container" class="bz_default_hidden"> + <div id="bz_qa_contact_edit_container" class="bz_default_hidden"> <span> - <span id="bz_qa_contact_edit_display"> - [% INCLUDE global/user.html.tmpl who = bug.qa_contact %]</span> + [% INCLUDE global/user.html.tmpl who = bug.qa_contact %] (<a href="#" id="bz_qa_contact_edit_action">edit</a>) + [% IF bug.qa_contact.id != user.id %] + (<a title="Change QA contact to yourself" + href="#" id="bz_qa_contact_take_action">take</a>) + [% END %] </span> </div> - [% END %] <div id="bz_qa_contact_input"> [% INCLUDE global/userselect.html.tmpl - id => "qa_contact" - name => "qa_contact" - value => bug.qa_contact.login - size => 30 - classes => ["bz_userfield"] - emptyok => 1 + id => "qa_contact" + name => "qa_contact" + value => bug.qa_contact.login + size => 30 + classes => ["bz_userfield"] + emptyok => 1 %] <br> <input type="checkbox" id="set_default_qa_contact" name="set_default_qa_contact" value="1"> <label for="set_default_qa_contact" id="set_default_qa_contact_label">Reset QA Contact to default</label> </div> <script type="text/javascript"> - [% IF bug.qa_contact != "" %] - hideEditableField('bz_qa_contact_edit_container', - 'bz_qa_contact_input', - 'bz_qa_contact_edit_action', - 'qa_contact', - '[% bug.qa_contact.login FILTER js %]'); - [% END %] + hideEditableField('bz_qa_contact_edit_container', + 'bz_qa_contact_input', + 'bz_qa_contact_edit_action', + 'qa_contact', + '[% bug.qa_contact.login FILTER js %]'); + hideEditableField('bz_qa_contact_edit_container', + 'bz_qa_contact_input', + 'bz_qa_contact_take_action', + 'qa_contact', + '[% bug.qa_contact.login FILTER js %]', + '[% user.login FILTER js %]'); initDefaultCheckbox('qa_contact'); </script> [% ELSE %] @@ -549,6 +529,11 @@ </td> </tr> [% END %] + <script type="text/javascript"> + assignToDefaultOnChange(['product', 'component'], + '[% bug.component_obj.default_assignee.login FILTER js %]', + '[% bug.component_obj.default_qa_contact.login FILTER js %]'); + </script> [% END %] [%############################################################################%] @@ -564,14 +549,17 @@ <td> [% IF bug.check_can_change_field("bug_file_loc", 0, 1) %] <span id="bz_url_edit_container" class="bz_default_hidden"> - [% IF is_safe_url(bug.bug_file_loc) %] - <a href="[% bug.bug_file_loc FILTER html %]" target="_blank" - title="[% bug.bug_file_loc FILTER html %]"> - [% bug.bug_file_loc FILTER truncate(40) FILTER html %]</a> - [% ELSE %] - [% bug.bug_file_loc FILTER html %] - [% END %] - (<a href="#" id="bz_url_edit_action">edit</a>)</span> + <a href="[% bug.bug_file_loc FILTER html %]" target="_blank" + title="[% bug.bug_file_loc FILTER html %]" + [% IF NOT is_safe_url(bug.bug_file_loc) %] + onclick="return confirm( + 'This is considered an unsafe URL and could possibly be harmful. ' + + 'The full URL is:\n\n[% bug.bug_file_loc FILTER js FILTER html %]\n\n' + + 'Continue?')" + [% END %]> + [% bug.bug_file_loc FILTER truncate(40) FILTER html %]</a> + (<a href="#" id="bz_url_edit_action">edit</a>) + </span> [% END %] <span id="bz_url_input_area"> [% url_output = PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %] @@ -593,36 +581,34 @@ [% END %] </td> </tr> - - [% IF Param('usestatuswhiteboard') %] - <tr> - <td class="field_label"> - <label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>: - </td> - [% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %] - </tr> - [% END %] - - [% IF use_keywords %] - <tr> - <td class="field_label"> - <label for="keywords" accesskey="k"> - <b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>: - </td> - <td class="field_value" colspan="2"> - [% INCLUDE bug/field.html.tmpl - bug = bug, field = bug_fields.keywords, value = bug.keywords - editable = bug.check_can_change_field("keywords", 0, 1), - no_tds = 1 - %] - </td> - </tr> - [% END %] [% END %] [%############################################################################%] -[%# Block for Depends On / Blocks #%] +[%# Block for Duplicates #%] [%############################################################################%] + +[% BLOCK section_duplicates %] + [% RETURN UNLESS bug.duplicates.size %] + <tr> + <th class="field_label"> + <label for="duplicates">Duplicates</label>: + </th> + <td class="field_value" colspan="2"> + <span id="duplicates"> + [% FOREACH dupe = bug.duplicates %] + [% dupe.id FILTER bug_link(dupe, use_alias => 1) FILTER none %][% " " %] + [% END %] + </span> + (<a href="buglist.cgi?bug_id=[% bug.duplicate_ids.join(",") FILTER html %]"> + [%-%]view as [% terms.bug %] list</a>) + </td> + </tr> +[% END %] + +[%############################################################################%] +[%# Block for Depends On / Blocks #%] +[%############################################################################%] + [% BLOCK section_dependson_blocks %] <tr> [% INCLUDE dependencies @@ -749,18 +735,18 @@ [% BLOCK section_dates %] <tr> - <td class="field_label"> - <b>Reported</b>: - </td> + <th class="field_label"> + Reported: + </th> <td> [% bug.creation_ts FILTER time %] by [% INCLUDE global/user.html.tmpl who = bug.reporter %] </td> </tr> <tr> - <td class="field_label"> - <b> Modified</b>: - </td> + <th class="field_label"> + Modified: + </th> <td> [% bug.delta_ts FILTER time FILTER replace(':\d\d$', '') FILTER replace(':\d\d ', ' ')%] (<a href="show_activity.cgi?id=[% bug.bug_id %]">[%# terms.Bug %]History</a>) @@ -774,9 +760,9 @@ [%############################################################################%] [% BLOCK section_cclist %] <tr> - <td class="field_label"> - <label for="newcc" accesskey="a"><b>CC List</b>:</label> - </td> + <th class="field_label"> + <label for="newcc" accesskey="a">CC List:</label> + </th> <td> [% IF user.id %] [% IF NOT bug.cc || NOT bug.cc.contains(user.login) %] @@ -808,10 +794,17 @@ [% IF user.id || bug.cc.size %] <span id="cc_edit_area_showhide_container" class="bz_default_hidden"> (<a href="#" id="cc_edit_area_showhide">[% IF user.id %]edit[% ELSE %]show[% END %]</a>) - </span> + [% IF user.id && bug.cc.size %] + <br> + <ul class="cc_list_display"> + [% FOREACH c = bug.cc %] + <li>[% c FILTER email FILTER html %]</li> + [% END %] + </ul> + [% END %] + </span> [% END %] <div id="cc_edit_area"> - <br> [% IF user.id %] <div> <div><label for="cc"><b>Add</b></label></div> @@ -885,26 +878,52 @@ [% BLOCK section_flags %] [%# *** Flags *** %] [% show_bug_flags = 0 %] + [% bug_flags_set = 0 %] + [% show_more_flags = 0 %] [% FOREACH type = bug.flag_types %] [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %] [% show_bug_flags = 1 %] - [% LAST %] [% END %] + [% IF user.id && type.is_active && (type.flags.size == 0 || type.is_multiplicable) %] + [% show_more_flags = 1 %] + [% END %] + [% IF type.flags && type.flags.size > 0 %] + [% bug_flags_set = 1 %] + [% END %] + [% LAST IF show_bug_flags && show_more_flags && bug_flags_set %] [% END %] [% IF show_bug_flags %] <tr> - <td class="field_label flags_label"> - <label><b>Flags:</b></label> - </td> - <td></td> - </tr> - <tr> - <td colspan="2"> + <th class="field_label"> + <label>Flags:</label> + </th> + <td> [% IF bug.flag_types.size > 0 %] [% PROCESS "flag/list.html.tmpl" flag_no_header = 1 flag_types = bug.flag_types any_flags_requesteeble = bug.any_flags_requesteeble %] [% END %] + [% IF show_more_flags %] + <span id="bz_flags_more_container" class="bz_default_hidden"> + [% IF !bug_flags_set %]<em>None yet set</em>[% END %] + (<a href="#" id="bz_flags_more_action">[% IF !bug_flags_set %]set[% ELSE %]more[% END %] flags</a>) + </span> + <script type="text/javascript"> + YAHOO.util.Dom.removeClass('bz_flags_more_container', 'bz_default_hidden'); + var table = YAHOO.util.Dom.get("flags"); + var rows = YAHOO.util.Dom.getElementsByClassName('bz_flag_type', 'tbody', table); + for (var i = 0; i < rows.length; i++) { + YAHOO.util.Dom.addClass(rows[i], 'bz_default_hidden'); + } + YAHOO.util.Event.addListener('bz_flags_more_action', 'click', function (e) { + YAHOO.util.Dom.addClass('bz_flags_more_container', 'bz_default_hidden'); + for (var i = 0; i < rows.length; i++) { + YAHOO.util.Dom.removeClass(rows[i], 'bz_default_hidden'); + } + YAHOO.util.Event.preventDefault(e); + }); + </script> + [% END %] </td> </tr> [% END %] @@ -917,7 +936,10 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] [% USE Bugzilla %] - [% FOREACH field = Bugzilla.active_custom_fields %] + [% FOREACH field = Bugzilla.active_custom_fields(product=>bug.product_obj,component=>bug.component_obj,type=>1) %] + [% NEXT IF NOT user.id AND field.value == "---" %] + [% Hook.process('custom_field', 'bug/edit.html.tmpl') %] + [% NEXT IF field.hidden %] <tr> [% PROCESS bug/field.html.tmpl value = bug.${field.name} editable = bug.check_can_change_field(field.name, 0, 1) @@ -1091,12 +1113,14 @@ <br> [% PROCESS commit_button id=""%] + [% Hook.process("after_comment_commit_button", 'bug/edit.html.tmpl') %] + <table id="bug_status_bottom" class="status" cellspacing="0" cellpadding="0"> <tr> - <td class="field_label"> - <b><a href="page.cgi?id=fields.html#status">Status</a></b>: - </td> + <th class="field_label"> + <a href="page.cgi?id=fields.html#status">Status</a>: + </th> <td> [% PROCESS bug/knob.html.tmpl %] </td> @@ -1123,6 +1147,21 @@ </div> [% END %] +[% BLOCK summon_comment_box %] +<div id="comment_top_hat"> + <script type="text/javascript"> + function summonCommentBox() { + var commentbox = document.getElementById('add_comment'); + document.getElementById('comment_top_hat').appendChild(commentbox); + document.getElementById('wave_wand').style.display = 'none'; + } + </script> + <p id="wave_wand"> + <a href="javascript:summonCommentBox()"><i>Summon comment box</i></a> + </p> +</div> +[% END %] + [%############################################################################%] [%# Block for SELECT fields #%] [%############################################################################%] @@ -1131,6 +1170,7 @@ <td> [% IF bug.check_can_change_field(selname, 0, 1) AND bug.choices.${selname}.size > 1 %] + <input type="hidden" id="[% selname %]_dirty"> <select id="[% selname %]" name="[% selname %]"> [% FOREACH x = bug.choices.${selname} %] [% NEXT IF NOT x.is_active AND x.name != bug.${selname} %] |