diff options
Diffstat (limited to 'template/en/default/bug')
21 files changed, 865 insertions, 603 deletions
diff --git a/template/en/default/bug/activity/table.html.tmpl b/template/en/default/bug/activity/table.html.tmpl index 2492534..a9aca0a 100644 --- a/template/en/default/bug/activity/table.html.tmpl +++ b/template/en/default/bug/activity/table.html.tmpl @@ -73,7 +73,13 @@ <a href="attachment.cgi?id=[% change.attachid %]"> Attachment #[% change.attachid %]</a> [% END %] - [%+ field_descs.${change.fieldname} FILTER html %] + [% IF change.comment.defined %] + [% comment_desc = field_descs.${change.fieldname} %] + [% comment_num = "Comment $change.comment.count" FILTER bug_link(bug.bug_id, comment_num => change.comment.count) %] + [% comment_desc.replace('^(Comment )?', "$comment_num ") FILTER none %] + [% ELSE %] + [%+ field_descs.${change.fieldname} FILTER html %] + [% END %] </td> [% PROCESS change_column change_type = change.removed %] [% PROCESS change_column change_type = change.added %] diff --git a/template/en/default/bug/comments.html.tmpl b/template/en/default/bug/comments.html.tmpl index 41b91d7..580ba6b 100644 --- a/template/en/default/bug/comments.html.tmpl +++ b/template/en/default/bug/comments.html.tmpl @@ -22,76 +22,8 @@ [% PROCESS bug/time.html.tmpl %] - <script type="text/javascript"> - <!-- - function updateCommentPrivacy(checkbox, id) { - var comment_elem = document.getElementById('comment_text_'+id).parentNode; - if (checkbox.checked) { - if (!comment_elem.className.match('bz_private')) { - comment_elem.className = comment_elem.className.concat(' bz_private'); - } - } - else { - comment_elem.className = - comment_elem.className.replace(/(\s*|^)bz_private(\s*|$)/, '$2'); - } - } - - /* The functions below expand and collapse comments */ - - function toggle_comment_display(link, comment_id) { - var comment = document.getElementById('comment_text_' + comment_id); - var re = new RegExp(/\bcollapsed\b/); - if (comment.className.match(re)) - expand_comment(link, comment); - else - collapse_comment(link, comment); - } - - function toggle_all_comments(action) { - var num_comments = [% comments.size FILTER html %]; - - // If for some given ID the comment doesn't exist, this doesn't mean - // there are no more comments, but that the comment is private and - // the user is not allowed to view it. - - for (var id = 0; id < num_comments; id++) { - var comment = document.getElementById('comment_text_' + id); - if (!comment) - continue; - - var link = document.getElementById('comment_link_' + id); - if (action == 'collapse') - collapse_comment(link, comment); - else - expand_comment(link, comment); - } - } - - function collapse_comment(link, comment) { - link.innerHTML = "[+]"; - link.title = "Expand the comment."; - YAHOO.util.Dom.addClass(comment, 'collapsed'); - } - - function expand_comment(link, comment) { - link.innerHTML = "[-]"; - link.title = "Collapse the comment"; - YAHOO.util.Dom.removeClass(comment, 'collapsed'); - } - - /* This way, we are sure that browsers which do not support JS - * won't display this link */ - - function addCollapseLink(count) { - document.write(' <a href="#" class="bz_collapse_comment"' + - ' id="comment_link_' + count + - '" onclick="toggle_comment_display(this, ' + count + - '); return false;" title="Collapse the comment.">[-]<\/a> '); - } - //--> - </script> - +<script src="[% 'js/comments.js' FILTER mtime %]" type="text/javascript"> +</script> [% DEFAULT start_at = 0 mode = "show" %] [% sort_order = user.settings.comment_sort_order.value %] @@ -133,6 +65,14 @@ [% count = count + increment %] [% END %] +[% IF user.settings.comment_box_position.value == "before_comments" && user.id %] + <div class="bz_add_comment"> + <a href="#" + onclick="return goto_add_comments();"> + Add Comment</a> + </div> +[% END %] + [%# Note: this template is used in multiple places; if you use this hook, # make sure you are aware of this fact. #%] @@ -146,6 +86,11 @@ return false;">Collapse All Comments</a></li> <li><a href="#" onclick="toggle_all_comments('expand'); return false;">Expand All Comments</a></li> + [% IF user.settings.comment_box_position.value == "after_comments" && user.id %] + <li class="bz_add_comment"><a href="#" + onclick="return goto_add_comments('bug_status_bottom');"> + Add Comment</a></li> + [% END %] </ul> [% END %] </td> @@ -157,8 +102,10 @@ [% BLOCK a_comment %] [% RETURN IF comment.is_private AND ! user.is_insider %] + [% comment_text = comment.body_full({ wrap => 1 }) %] + [% RETURN IF comment_text == '' AND (comment.work_time - 0) != 0 AND !user.is_timetracker %] - <div class="bz_comment[% " bz_private" IF comment.is_private %] + <div id="c[% count %]" class="bz_comment[% " bz_private" IF comment.is_private %] [% " bz_comment_hilite" IF marks.$count %] [% " bz_first_comment" IF count == description %]"> [% IF count == description %] @@ -194,7 +141,7 @@ [% END %] <span class="bz_comment_number"> - <a name="c[% count %]" + <a href="show_bug.cgi?id=[% bug.bug_id %]#c[% count %]"> [%- comment_label FILTER html %]</a> </span> @@ -229,7 +176,7 @@ #%] <pre class="bz_comment_text" [% ' id="comment_text_' _ count _ '"' IF mode == "edit" %]> - [%- comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment) -%] + [%- comment_text FILTER quoteUrls(bug, comment) -%] </pre> </div> [% END %] diff --git a/template/en/default/bug/create/comment-guided.txt.tmpl b/template/en/default/bug/create/comment-guided.txt.tmpl index 0f68d28..66220ec 100644 --- a/template/en/default/bug/create/comment-guided.txt.tmpl +++ b/template/en/default/bug/create/comment-guided.txt.tmpl @@ -30,17 +30,13 @@ [%+ cgi.param("comment") IF cgi.param("comment") %] -[% IF cgi.param("reproducible") %] -[%+ IF cgi.param("reproducible") != "Choose one..." -%] +[%+ IF cgi.param("reproducible") != "Choose one..." -%] Reproducible: [%+ cgi.param("reproducible") %] -[% END %] [% END %] -[% IF cgi.param("reproduce_steps") %] -[% IF !(cgi.param("reproduce_steps").match('^1\.\s*2\.\s*3\.\s*$') || cgi.param("reproduce_steps").match('^\s*$')) %] +[% IF !(cgi.param("reproduce_steps").match('^1\.\s*2\.\s*3\.\s*$') || cgi.param("reproduce_steps").match('^\s*$')) %] Steps to Reproduce: [%+ cgi.param("reproduce_steps") %] -[% END %] [% END %] [% IF cgi.param("actual_results") -%] diff --git a/template/en/default/bug/create/create-guided.html.tmpl b/template/en/default/bug/create/create-guided.html.tmpl index 0628a0e..bee5f01 100644 --- a/template/en/default/bug/create/create-guided.html.tmpl +++ b/template/en/default/bug/create/create-guided.html.tmpl @@ -34,6 +34,8 @@ style = "#somebugs { width: 100%; height: 500px }" %] +[% style = "" %] + [% tablecolour = "#efefef" %] [%# This script displays the descriptions for selected components. %] @@ -57,51 +59,20 @@ function PutDescription() { var initialowners = new Array([% product.components.size %]); var last_initialowner; -var initialccs = new Array([% product.components.size %]); var components = new Array([% product.components.size %]); -var flags = new Array([% product.components.size %]); -[% IF Param("useqacontact") %] - var initialqacontacts = new Array([% product.components.size %]); - var last_initialqacontact; -[% END %] [% count = 0 %] [%- FOREACH c = product.components %] components[[% count %]] = "[% c.name FILTER js %]"; initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]"; - [% flag_list = [] %] - [% FOREACH f = c.flag_types.bug %] - [% NEXT UNLESS f.is_active %] - [% flag_list.push(f.id) %] - [% END %] - [% FOREACH f = c.flag_types.attachment %] - [% NEXT UNLESS f.is_active %] - [% flag_list.push(f.id) %] - [% END %] - flags[[% count %]] = [[% flag_list.join(",") FILTER js %]]; - [% IF Param("useqacontact") %] - initialqacontacts[[% count %]] = "[% c.default_qa_contact.login FILTER js %]"; - [% END %] - - [% SET initial_cc_list = [] %] - [% FOREACH cc_user = c.initial_cc %] - [% initial_cc_list.push(cc_user.login) %] - [% END %] - initialccs[[% count %]] = "[% initial_cc_list.join(', ') FILTER js %]"; - [% count = count + 1 %] [%- END %] function set_assign_to() { // Based on the selected component, fill the "Assign To:" field - // with the default component owner, and the "QA Contact:" field - // with the default QA Contact. It also selectively enables flags. + // with the default component owner. var form = document.Create; var assigned_to = form.assigned_to.value; -[% IF Param("useqacontact") %] - var qa_contact = form.qa_contact.value; -[% END %] - var index = -1; if (form.component.type == 'select-one') { index = form.component.selectedIndex; @@ -118,137 +89,83 @@ function set_assign_to() { form.assigned_to.value = owner; last_initialowner = owner; } - - document.getElementById('initial_cc').innerHTML = initialccs[index]; - - [% IF Param("useqacontact") %] - var contact = initialqacontacts[index]; - if (qa_contact == last_initialqacontact - || qa_contact == contact - || qa_contact == '') { - form.qa_contact.value = contact; - last_initialqacontact = contact; - } - [% END %] - - // First, we disable all flags. Then we re-enable those - // which are available for the selected component. - var inputElements = document.getElementsByTagName("select"); - var inputElement, flagField; - for ( var i=0 ; i<inputElements.length ; i++ ) { - inputElement = inputElements.item(i); - if (inputElement.name.search(/^flag_type-(\d+)$/) != -1) { - var id = inputElement.name.replace(/^flag_type-(\d+)$/, "$1"); - inputElement.disabled = true; - // Also disable the requestee field, if it exists. - inputElement = document.getElementById("requestee_type-" + id); - if (inputElement) inputElement.disabled = true; - } - } - // Now enable flags available for the selected component. - for (var i = 0; i < flags[index].length; i++) { - flagField = document.getElementById("flag_type-" + flags[index][i]); - // Do not enable flags the user cannot set nor request. - if (flagField && flagField.options.length > 1) { - flagField.disabled = false; - // Re-enabling the requestee field depends on the status - // of the flag. - toggleRequesteeField(flagField, 1); - } - } } PutDescription(); } -function handleWantsAttachment(wants_attachment) { - if (wants_attachment) { - document.getElementById('attachment_false').style.display = 'none'; - document.getElementById('attachment_true').style.display = 'block'; - } - else { - document.getElementById('attachment_false').style.display = 'block'; - document.getElementById('attachment_true').style.display = 'none'; - clearAttachmentFields(); - } -} - // this is courtesy of John Keller -var LOOKUP_ADDR = "/lookup.php?pkg="; -var ASSIGNEE_OBJ_NAME = "assigned_to"; -var NOT_FOUND = "NOT_FOUND"; - var http_connection = null; // init XMLHttpRequest object, based on browser type function initHttpConnection() { - http_connection = null; - - try { - // Firefox, Opera 8.0+, Safari - http_connection = new XMLHttpRequest(); - } catch (e) { - // Internet Explorer - try { - http_connection = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - try { - http_connection = new ActiveXObject("Microsoft.XMLHTTP"); - } catch (e) { - // browser does not support AJAX - } - } - } - - if (http_connection != null) { - http_connection.onreadystatechange = onLoadMaintainer; - } + http_connection = null; + + try { + // Firefox, Opera 8.0+, Safari + http_connection = new XMLHttpRequest(); + } catch (e) { + // Internet Explorer + try { + http_connection = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + http_connection = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (e) { + // browser does not support AJAX + } + } + } + + if (http_connection != null) { + http_connection.onreadystatechange = onLoadMaintainer; + } } // handler for data received // text field to set should be similar to // <input name="assigned_to" id="assigned_to" /> function onLoadMaintainer() { - var field_obj; - - if ((http_connection.readyState == 4) && (http_connection.status == 200)) { - if ((http_connection.responseText != null) && (http_connection.responseText != NOT_FOUND)) { - if ((field_obj = document.getElementById(ASSIGNEE_OBJ_NAME)) != null) { - field_obj.value = http_connection.responseText; - } - } - } else { - // by default, we'll leave form value alone and don't do anything else - // this is a good place to set a default or show an error, though - } + var field_obj; + + if ((http_connection.readyState == 4) && (http_connection.status == 200)) { + if ((http_connection.responseText != null) && (http_connection.responseText != 'NOT_FOUND')) { + if ((field_obj = document.getElementById('assigned_to')) != null) { + field_obj.value = http_connection.responseText; + } + } + } else { + // by default, we'll leave form value alone and don't do anything else + // this is a good place to set a default or show an error, though + } } // handler for when user enters a package // text field to set should be similar to // <input name="cf_rpmpkg" onchange="onChangePackage(this)" /> function onChangePackage(input_obj) { - initHttpConnection(); + initHttpConnection(); - if ((http_connection != null) && (input_obj.value != "")) { - http_connection.open("GET", LOOKUP_ADDR + encodeURIComponent(input_obj.value)); - http_connection.send(null); - } + if ((http_connection != null) && (input_obj.value != "")) { + http_connection.open("GET", '/lookup.php?pkg=' + encodeURIComponent(input_obj.value)); + http_connection.send(null); + } }; --> </script> -<p> Submit a bug using the <a href="enter_bug.cgi?product=[% product.name FILTER html %]">expert bug form</a>.</p> +<p> Submit [% terms.abug %] using the +<a href="enter_bug.cgi?product=[% product.name FILTER html %]">expert [% terms.bug %] form</a>.</p> -<form method="post" action="post_bug.cgi"> +<form name="Create" id="Create" method="post" action="post_bug.cgi"> <input type="hidden" name="format" value="guided"> - <input type="hidden" name="assigned_to" value=""> <input type="hidden" name="priority" value="[% default.priority FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> - <input type="hidden" name="op_sys" value="Linux"> + <input type="hidden" name="op_sys" value="[% Param('defaultopsys') FILTER html %]"> <table valign="top" cellpadding="5" cellspacing="5" border="0"> @@ -298,6 +215,7 @@ function onChangePackage(input_obj) { </td> </tr> </table> + <p> The area where the problem occurs. To pick the right component, you could use the same one as @@ -344,7 +262,7 @@ function onChangePackage(input_obj) { <td valign="top"> <input type="text" size="80" name="cf_rpmpkg" value="" onchange="onChangePackage(this)"> <p> - This is where you can identify exactly which RPM package is involved in this bug report. For instance, + This is where you can identify exactly which RPM package is involved in this [% terms.bug %] report. For instance, if you know the problem you are having is with the program <tt>mysqld</tt>, then execute <tt>rpm -qif /usr/sbin/mysqld</tt>. This will tell you the name and version of the RPM package (i.e. MySQL-5.0.27-1mga1) as well as other information. In particular, you are looking for @@ -404,13 +322,11 @@ function onChangePackage(input_obj) { cols = constants.COMMENT_COLS defaultcontent = "Description of problem:\n\n\nVersion-Release number of selected component (if applicable):\n\n\nHow reproducible:\n\n\nSteps to Reproduce:\n1.\n2.\n3.\n" %] - [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %] - <br /> - <input type="checkbox" id="commentprivacy" name="commentprivacy" - [% " checked=\"checked\"" IF commentprivacy %]> - <label for="commentprivacy"> - Initial Description is Private - </label> + [% IF user.is_insider %] + <br> + <input type="checkbox" id="comment_is_private" name="comment_is_private" + [% ' checked="checked"' IF comment_is_private %]> + <label for="comment_is_private">Initial Description is Private</label> [% END %] <p> @@ -475,16 +391,18 @@ function onChangePackage(input_obj) { <b>Assign To:</b> </td> <td valign="top"> - [% safe_assigned_to = FILTER js; bug.assigned_to.login; END %] [% INCLUDE global/userselect.html.tmpl - id => "assigned_to" - name => "assigned_to" - value => bug.assigned_to.login - size => 32 + id => "assigned_to" + name => "assigned_to" + value => "" + emptyok => 1 + size => 32 %] <p>Leave the above blank to assign to the default component owner.</p> </td> </tr> + + [% Hook.process('form') %] </table> <p> diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index 4b17457..c18e1c5 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -30,11 +30,13 @@ [% PROCESS global/header.html.tmpl title = title - style_urls = [ 'skins/standard/create_attachment.css', - 'skins/standard/yui/calendar.css' ] - javascript_urls = [ "js/attachment.js", "js/util.js", "js/yui/calendar.js", - "js/field.js", "js/TUI.js" ] - onload = 'set_assign_to();' + yui = [ 'autocomplete', 'calendar', 'datatable', 'button' ] + style_urls = [ 'skins/standard/attachment.css', + 'skins/standard/enter_bug.css' ] + javascript_urls = [ "js/attachment.js", "js/util.js", + "js/field.js", "js/TUI.js", "js/bug.js" ] + onload = "set_assign_to(); hideElementById('attachment_true'); + showElementById('attachment_false'); showElementById('btn_no_attachment');" %] <script type="text/javascript"> @@ -128,9 +130,10 @@ function set_assign_to() { if (inputElement.name.search(/^flag_type-(\d+)$/) != -1) { var id = inputElement.name.replace(/^flag_type-(\d+)$/, "$1"); inputElement.disabled = true; - // Also disable the requestee field, if it exists. + // Also hide the requestee field, if it exists. inputElement = document.getElementById("requestee_type-" + id); - if (inputElement) inputElement.disabled = true; + if (inputElement) + YAHOO.util.Dom.addClass(inputElement.parentNode, 'bz_default_hidden'); } } // Now enable flags available for the selected component. @@ -147,18 +150,11 @@ function set_assign_to() { } } -function handleWantsAttachment(wants_attachment) { - if (wants_attachment) { - document.getElementById('attachment_false').style.display = 'none'; - document.getElementById('attachment_true').style.display = 'block'; - } - else { - document.getElementById('attachment_false').style.display = 'block'; - document.getElementById('attachment_true').style.display = 'none'; - clearAttachmentFields(); - } -} - +var status_comment_required = new Array(); +[% FOREACH status = bug_status %] + status_comment_required['[% status.name FILTER js %]'] = + [% status.comment_required_on_change_from() ? 'true' : 'false' %] +[% END %] TUI_alternates['expert_fields'] = 'Show Advanced Fields'; // Hide the Advanced Fields by default, unless the user has a cookie @@ -168,20 +164,13 @@ TUI_hide_default('expert_fields'); --> </script> -[% USE Bugzilla %] -[% SET select_fields = {} %] -[% FOREACH field = Bugzilla.get_fields( - { type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 }) -%] - [% select_fields.${field.name} = field %] -[% END %] - <form name="Create" id="Create" method="post" action="post_bug.cgi" - enctype="multipart/form-data"> + class="enter_bug_form" enctype="multipart/form-data" + onsubmit="return validateEnterBug(this)"> <input type="hidden" name="product" value="[% product.name FILTER html %]"> <input type="hidden" name="token" value="[% token FILTER html %]"> -<table cellspacing="4" cellpadding="2" border="0"> +<table> <tbody> <tr> <td colspan="4"> @@ -210,22 +199,26 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th>Product:</th> - <td width="10%">[% product.name FILTER html %]</td> - - <th>Reporter:</th> - <td width="100%">[% user.login FILTER html %]</td> + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.product, editable = 0, + value = product.name %] + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.reporter, editable = 0, + value = user.login %] </tr> [%# We can't use the select block in these two cases for various reasons. %] <tr> - <th class="required"> - <a href="describecomponents.cgi?product=[% product.name FILTER url_quote %]"> - Component</a>: - </th> - <td> - <select name="component" onchange="set_assign_to();" size="7" - aria-required="true" class="required"> + [% component_desc_url = BLOCK -%] + describecomponents.cgi?product=[% product.name FILTER url_quote %] + [% END %] + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.component editable = 1 + desc_url = component_desc_url + %] + <td id="field_container_component"> + <select name="component" id="component" onchange="set_assign_to();" + size="7" aria-required="true" class="required"> [%# Build the lists of assignees and QA contacts if "usemenuforusers" is enabled. %] [% IF Param("usemenuforusers") %] [% assignees_list = user.get_userlist.clone %] @@ -234,7 +227,13 @@ TUI_hide_default('expert_fields'); [%- FOREACH c = product.components %] <option value="[% c.name FILTER html %]" - [% " selected=\"selected\"" IF c.name == default.component_ %]> + id="v[% c.id FILTER html %]_component" + [% IF c.name == default.component_ %] + [%# This is for bug/field.html.tmpl, for visibility-related + # controls. %] + [% default.component_id = c.id %] + selected="selected" + [% END %]> [% c.name FILTER html -%] </option> [% IF Param("usemenuforusers") %] @@ -245,9 +244,16 @@ TUI_hide_default('expert_fields'); [% END %] [%- END %] </select> + + <script type="text/javascript"> + <!-- + [%+ INCLUDE "bug/field-events.js.tmpl" + field = bug_fields.component %] + //--> + </script> </td> - <td colspan="2"> + <td colspan="2" id="comp_desc_container"> [%# Enclose the fieldset in a nested table so that its width changes based # on the length on the component description. %] <table> @@ -264,9 +270,11 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th rowspan="3">Version:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.version editable = 1 rowspan = 3 + %] <td rowspan="3"> - <select name="version" size="5"> + <select name="version" id="version" size="5"> [%- FOREACH v = version %] <option value="[% v FILTER html %]" [% ' selected="selected"' IF v == default.version %]>[% v FILTER html -%] @@ -276,35 +284,50 @@ TUI_hide_default('expert_fields'); </td> [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.bug_severity, editable = 1, + bug = default, field = bug_fields.bug_severity, editable = 1, value = default.bug_severity %] </tr> <tr> [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.rep_platform, editable = 1, + bug = default, field = bug_fields.rep_platform, editable = 1, value = default.rep_platform %] </tr> <tr> [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.op_sys, editable = 1, + bug = default, field = bug_fields.op_sys, editable = 1, value = default.op_sys %] </tr> + [% IF !Param('defaultplatform') || !Param('defaultopsys') %] + <tr> + <th colspan="3"> </th> + <td id="os_guess_note" class="comment"> + <div>We've made a guess at your + [% IF Param('defaultplatform') %] + operating system. Please check it + [% ELSIF Param('defaultopsys') %] + platform. Please check it + [% ELSE %] + operating system and platform. Please check them + [% END %] + and make any corrections if necessary.</div> + </td> + </tr> + [% END %] </tbody> <tbody class="expert_fields"> <tr> [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] - [% sel = { description => 'Target Milestone', name => 'target_milestone' } %] - [% INCLUDE select %] + [% INCLUDE select field = bug_fields.target_milestone %] [% ELSE %] <td colspan="2"> </td> [% END %] [% IF Param('letsubmitterchoosepriority') %] [% INCLUDE bug/field.html.tmpl - bug = default, field = select_fields.priority, editable = 1, + bug = default, field = bug_fields.priority, editable = 1, value = default.priority %] [% ELSE %] <td colspan="2"> </td> @@ -312,40 +335,16 @@ TUI_hide_default('expert_fields'); </tr> </tbody> -[% IF !Param('defaultplatform') || !Param('defaultopsys') %] - <tbody> - <tr> - <th> </th> - <td colspan="3" class="comment"> - We've made a guess at your - [% IF Param('defaultplatform') %] - operating system. Please check it - [% ELSIF Param('defaultopsys') %] - platform. Please check it - [% ELSE %] - operating system and platform. Please check them - [% END %] - and make any corrections if necessary. - </td> - </tr> - </tbody> -[% END %] - <tbody class="expert_fields"> <tr> <td colspan="4"> </td> </tr> <tr> -[% IF bug_status.size <= 1 %] - <input type="hidden" name="bug_status" - value="[% default.bug_status FILTER html %]"> - <th>Initial State:</th> - <td>[% display_value("bug_status", default.bug_status) FILTER html %]</td> -[% ELSE %] - [% sel = { description => 'Initial State', name => 'bug_status' } %] - [% INCLUDE select %] -[% END %] + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.bug_status, + editable = (bug_status.size > 1), value = default.bug_status + override_legal_values = bug_status %] <td> </td> [%# Calculate the number of rows we can use for flags %] @@ -376,9 +375,12 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th><a href="page.cgi?id=fields.html#assigned_to">Assign To</a>:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.assigned_to editable = 1 + %] <td colspan="2"> [% INCLUDE global/userselect.html.tmpl + id => "assigned_to" name => "assigned_to" value => assigned_to disabled => assigned_to_disabled @@ -392,9 +394,12 @@ TUI_hide_default('expert_fields'); [% IF Param("useqacontact") %] <tr> - <th>QA Contact:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.qa_contact editable = 1 + %] <td colspan="2"> [% INCLUDE global/userselect.html.tmpl + id => "qa_contact" name => "qa_contact" value => qa_contact disabled => qa_contact_disabled @@ -408,9 +413,12 @@ TUI_hide_default('expert_fields'); [% END %] <tr> - <th>CC:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.cc editable = 1 + %] <td colspan="2"> [% INCLUDE global/userselect.html.tmpl + id => "cc" name => "cc" value => cc disabled => cc_disabled @@ -421,7 +429,7 @@ TUI_hide_default('expert_fields'); </tr> <tr> - <th>Default CC:</th> + <th>Default [% field_descs.cc FILTER html %]:</th> <td colspan="2"> <div id="initial_cc"> </div> @@ -434,17 +442,17 @@ TUI_hide_default('expert_fields'); [% IF user.is_timetracker %] <tr> - <th>Estimated Hours:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.estimated_time editable = 1 + %] <td colspan="2"> <input name="estimated_time" size="6" maxlength="6" value="[% estimated_time FILTER html %]"> </td> </tr> <tr> - <th>Deadline:</th> - <td colspan="2"> - <input name="deadline" size="10" maxlength="10" value="[% deadline FILTER html %]"> - <small>(YYYY-MM-DD)</small> - </td> + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.deadline, value = deadline, + editable = 1, value_span = 2 %] </tr> <tr> @@ -454,7 +462,9 @@ TUI_hide_default('expert_fields'); [% IF Param("usebugaliases") %] <tr> - <th>Alias:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.alias editable = 1 + %] <td colspan="2"> <input name="alias" size="20" value="[% alias FILTER html %]"> </td> @@ -462,21 +472,23 @@ TUI_hide_default('expert_fields'); [% END %] <tr> - <th>URL:</th> - <td colspan="2"> - <input name="bug_file_loc" size="40" - value="[% bug_file_loc FILTER html %]"> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.bug_file_loc editable = 1 + %] + <td colspan="2" class="field_value"> + <input name="bug_file_loc" id="bug_file_loc" class="text_input" + size="40" value="[% bug_file_loc FILTER html %]"> </td> </tr> </tbody> -<tbody class="expert_fields"> +<tbody> [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] [% NEXT UNLESS field.enter_bug %] [% SET value = ${field.name}.defined ? ${field.name} : "" %] - <tr> + <tr [% 'class="expert_fields"' IF !field.is_mandatory %]> [% INCLUDE bug/field.html.tmpl bug = default, field = field, value = value, editable = 1, value_span = 3 %] @@ -487,17 +499,55 @@ TUI_hide_default('expert_fields'); <tbody> <tr> - <th class="required">Summary:</th> - <td colspan="3"> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.short_desc editable = 1 + %] + <td colspan="3" class="field_value"> <input name="short_desc" size="70" value="[% short_desc FILTER html %]" maxlength="255" spellcheck="true" aria-required="true" - class="required"> + class="required text_input" id="short_desc"> </td> </tr> + [% IF feature_enabled('jsonrpc') AND !cloned_bug_id %] + <tr id="possible_duplicates_container" class="bz_default_hidden"> + <th>Possible<br>Duplicates:</th> + <td colspan="3"> + <div id="possible_duplicates"></div> + <script type="text/javascript"> + var dt_columns = [ + { key: "id", label: "[% field_descs.bug_id FILTER js %]", + formatter: YAHOO.bugzilla.dupTable.formatBugLink }, + { key: "summary", + label: "[% field_descs.short_desc FILTER js %]", + formatter: "text" }, + { key: "status", + label: "[% field_descs.bug_status FILTER js %]", + formatter: YAHOO.bugzilla.dupTable.formatStatus }, + { key: "update_token", label: '', + formatter: YAHOO.bugzilla.dupTable.formatCcButton } + ]; + YAHOO.bugzilla.dupTable.addCcMessage = "Add Me to the CC List"; + YAHOO.bugzilla.dupTable.init({ + container: 'possible_duplicates', + columns: dt_columns, + product_name: '[% product.name FILTER js %]', + summary_field: 'short_desc', + options: { + MSG_LOADING: 'Searching for possible duplicates...', + MSG_EMPTY: 'No possible duplicates found.', + SUMMARY: 'Possible Duplicates' + } + }); + </script> + </td> + </tr> + [% END %] + <tr> <th>Description:</th> <td colspan="3"> + [% defaultcontent = BLOCK %] [% IF cloned_bug_id %] +++ This [% terms.bug %] was initially created as a clone of [% terms.Bug %] #[% cloned_bug_id %] +++ @@ -525,34 +575,28 @@ TUI_hide_default('expert_fields'); <th> </th> <td colspan="3"> - <input type="checkbox" id="commentprivacy" name="commentprivacy" - [% " checked=\"checked\"" IF commentprivacy %]> - <label for="commentprivacy"> - Make description private (visible only to members of the - <strong>[% Param('insidergroup') FILTER html %]</strong> group) + <input type="checkbox" id="comment_is_private" name="comment_is_private" + [% ' checked="checked"' IF comment_is_private %] + onClick="updateCommentTagControl(this, 'comment')"> + <label for="comment_is_private"> + Make description and any new attachment private (visible only to members + of the <strong>[% Param('insidergroup') FILTER html %]</strong> group) </label> </td> </tr> [% END %] + [% IF Param("maxattachmentsize") %] <tr> <th>Attachment:</th> <td colspan="3"> - <script type="text/javascript"> - <!-- - document.write( '<div id="attachment_false">' - + '<input type="button" value="Add an attachment" ' - + 'onClick="handleWantsAttachment(true)"> ' - + '<em style="display: none">This button has no ' - + 'functionality for you because your browser does ' - + 'not support CSS or does not use it.<\/em>' - + '<\/div>' - + '<div id="attachment_true" style="display: none">' - + '<input type="button" ' - + 'value="Don\'t add an attachment " ' - + 'onClick="handleWantsAttachment(false)">'); - //--> - </script> + <div id="attachment_false" class="bz_default_hidden"> + <input type="button" value="Add an attachment" onClick="handleWantsAttachment(true)"> + </div> + + <div id="attachment_true"> + <input type="button" id="btn_no_attachment" value="Don't add an attachment" + class="bz_default_hidden" onClick="handleWantsAttachment(false)"> <fieldset> <legend>Add an attachment</legend> <table class="attachment_entry"> @@ -562,35 +606,36 @@ TUI_hide_default('expert_fields'); flag_table_id ="attachment_flags" %] </table> </fieldset> - <script type="text/javascript"> - <!-- - document.write('<\/div>'); - //--> - </script> + </div> </td> </tr> + [% END %] </tbody> <tbody class="expert_fields"> [% IF user.in_group('editbugs', product.id) %] [% IF use_keywords %] <tr> - <th><a href="describekeywords.cgi">Keywords</a>:</th> - <td colspan="3"> - <input id="keywords" name="keywords" size="40" - value="[% keywords FILTER html %]"> (optional) - </td> + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.keywords, editable = 1, + value = keywords, desc_url = "describekeywords.cgi", + value_span = 2 + %] </tr> [% END %] <tr> - <th>Depends on:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.dependson editable = 1 + %] <td colspan="3"> <input name="dependson" accesskey="d" value="[% dependson FILTER html %]"> </td> </tr> <tr> - <th>Blocks:</th> + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.blocked editable = 1 + %] <td colspan="3"> <input name="blocked" accesskey="b" value="[% blocked FILTER html %]"> </td> @@ -599,13 +644,14 @@ TUI_hide_default('expert_fields'); </tbody> <tbody class="expert_fields"> - [% IF group.size %] + [% IF product.groups_available.size %] <tr> <th> </th> <td colspan="3"> <br> <strong> - Only users in all of the selected groups can view this [% terms.bug %]: + Only users in all of the selected groups can view this + [%+ terms.bug %]: </strong> <br> <font size="-1"> @@ -615,12 +661,14 @@ TUI_hide_default('expert_fields'); <br> <!-- Checkboxes --> - [% FOREACH g = group %] - - <input type="checkbox" id="bit-[% g.bit %]" - name="bit-[% g.bit %]" value="1" - [% " checked=\"checked\"" IF g.checked %]> - <label for="bit-[% g.bit %]">[% g.description FILTER html_light %]</label><br> + <input type="hidden" name="defined_groups" value="1"> + [% FOREACH group = product.groups_available %] + <input type="checkbox" id="group_[% group.id FILTER html %]" + name="groups" value="[% group.name FILTER html %]" + [% ' checked="checked"' IF default.groups.contains(group.name) + OR group.is_default %]> + <label for="group_[% group.id FILTER html %]"> + [%- group.description FILTER html_light %]</label><br> [% END %] </td> </tr> @@ -634,14 +682,11 @@ TUI_hide_default('expert_fields'); <tr> <th> </th> <td colspan="3"> - <input type="submit" id="commit" value="Submit [% terms.Bug %]" - onclick="if (this.form.short_desc.value == '') - { alert('Please enter a summary sentence for this [% terms.bug %].'); - return false; } return true;"> + <input type="submit" id="commit" value="Submit [% terms.Bug %]"> <input type="submit" name="maketemplate" id="maketemplate" value="Remember values as bookmarkable template" - class="expert_fields"> + onclick="bz_no_validate_enter_bug=true" class="expert_fields"> </td> </tr> </tbody> @@ -659,30 +704,20 @@ TUI_hide_default('expert_fields'); [%############################################################################%] [% BLOCK select %] - [% IF sel.description %] - <th> - <a href="page.cgi?id=fields.html#[% sel.name %]">[% sel.description %]</a>: - </th> - [% END %] + [% INCLUDE "bug/field-label.html.tmpl" + field = field editable = 1 + %] <td> - <select name="[% sel.name %]" id="[% sel.name %]"> - [%- FOREACH x = ${sel.name} %] + <select name="[% field.name FILTER html %]" + id="[% field.name FILTER html %]"> + [%- FOREACH x = ${field.name} %] <option value="[% x FILTER html %]" - [% " selected=\"selected\"" IF x == default.${sel.name} %]> - [% display_value(sel.name, x) FILTER html %] + [% " selected=\"selected\"" IF x == default.${field.name} %]> + [% display_value(field.name, x) FILTER html %] </option> [% END %] </select> - - [% IF sel.name == "bug_status" %] - <script type="text/javascript"> - <!-- - [%+ INCLUDE "bug/field-events.js.tmpl" - field = select_fields.bug_status %] - //--> - </script> - [% END %] </td> [% END %] diff --git a/template/en/default/bug/dependency-tree.html.tmpl b/template/en/default/bug/dependency-tree.html.tmpl index c42c3c4..627c89d 100644 --- a/template/en/default/bug/dependency-tree.html.tmpl +++ b/template/en/default/bug/dependency-tree.html.tmpl @@ -129,7 +129,7 @@ [% extra_class = " b_open" %] [% extra_args = 'onclick="return doToggle(this, event)"' %] [% END %] - <a name="b[% bugid %]" + <a id="b[% bugid %]" class="b [%+ extra_class FILTER none %]" title="Click to expand or contract this portion of the tree. Hold down the Ctrl key while clicking to expand or contract all subtrees." [% extra_args FILTER none %]> </a> diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index a4d6813..dbc23c8 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -30,14 +30,6 @@ [% PROCESS bug/time.html.tmpl %] -[% USE Bugzilla %] -[% SET select_fields = {} %] -[% FOREACH field = Bugzilla.get_fields( - { type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 }) -%] - [% select_fields.${field.name} = field %] -[% END %] - <script type="text/javascript"> <!-- @@ -78,6 +70,7 @@ [% IF user.is_insider %] if (document.getElementById('isprivate_' + real_id).checked) { document.getElementById('newcommentprivacy').checked = 'checked'; + updateCommentTagControl(document.getElementById('newcommentprivacy'), 'comment'); } [% END %] @@ -136,10 +129,19 @@ [% END %] + /* Index all classifications so we can keep track of the classification + * for the selected product, which could control field visibility. + */ + var all_classifications = new Array([% bug.choices.product.size %]); + [%- FOREACH product = bug.choices.product %] + all_classifications['[% product.name FILTER js %]'] = ' + [%- product.classification.name FILTER js %]'; + [%- END %] + //--> </script> -<form name="changeform" method="post" action="process_bug.cgi"> +<form name="changeform" id="changeform" method="post" action="process_bug.cgi"> <input type="hidden" name="delta_ts" value="[% bug.delta_ts %]"> <input type="hidden" name="longdesclength" value="[% bug.comments.size %]"> @@ -211,23 +213,11 @@ </tr> </table> - [%# *** Additional Comments *** %] - <div id="comments"> - [% PROCESS bug/comments.html.tmpl - comments = bug.comments - mode = user.id ? "edit" : "show" - %] - </div> <table id="bz_big_form_parts" cellspacing="0" cellpadding="0"><tr> <td> - - [% PROCESS comment_box %] - - <tr> - <td colspan="3"> - <hr id="bz_top_half_spacer"> - </td> - </tr> + [% IF user.is_timetracker %] + [% PROCESS section_timetracking %] + [% END %] [%# *** Attachments *** %] @@ -238,12 +228,28 @@ show_attachment_flags = bug.show_attachment_flags %] + [% IF user.settings.comment_box_position.value == 'before_comments' %] + [% PROCESS comment_box %] + [% END %] </td> <td> [% PROCESS section_restrict_visibility %] </td> </tr></table> + [%# *** Additional Comments *** %] + <div id="comments"> + [% PROCESS bug/comments.html.tmpl + comments = bug.comments + mode = user.id ? "edit" : "show" + %] + </div> + + [% IF user.settings.comment_box_position.value == 'after_comments' %] + <hr> + [% PROCESS comment_box %] + [% END %] + </form> [%############################################################################%] @@ -323,26 +329,36 @@ [%#############%] [%# PRODUCT #%] [%#############%] - <tr> [% INCLUDE bug/field.html.tmpl - bug = bug, field = select_fields.product, + bug = bug, field = bug_fields.product, override_legal_values = bug.choices.product desc_url = 'describecomponents.cgi', value = bug.product editable = bug.check_can_change_field('product', 0, 1) %] </tr> + + [%# Classification is here so that it can be used in value controllers + # and visibility controllers. It comes after product because + # it uses some javascript that depends on the existence of the + # product field. + #%] + <tr class="bz_default_hidden"> + [% INCLUDE bug/field.html.tmpl + bug = bug field = bug_fields.classification + override_legal_values = bug.choices.classification + value = bug.classification + editable = bug.check_can_change_field('product', 0, 1) %] + </tr> [%###############%] [%# Component #%] [%###############%] <tr> - <td class="field_label"> - <label for="component" accesskey="m"> - <b><a href="describecomponents.cgi?product=[% bug.product FILTER url_quote %]"> - Co<u>m</u>ponent</a>: - </b> - </label> - </td> - [% PROCESS select selname => "component" %] + [% INCLUDE bug/field.html.tmpl + bug = bug, field = bug_fields.component, value = bug.component + override_legal_values = bug.choices.component + desc_url = "describecomponents.cgi?product=$bug.product" + editable = bug.check_can_change_field('component', 0, 1) + %] </tr> <tr> <td class="field_label"> @@ -360,11 +376,11 @@ </td> <td class="field_value"> [% INCLUDE bug/field.html.tmpl - bug = bug, field = select_fields.rep_platform, + bug = bug, field = bug_fields.rep_platform, no_tds = 1, value = bug.rep_platform editable = bug.check_can_change_field('rep_platform', 0, 1) %] [%+ INCLUDE bug/field.html.tmpl - bug = bug, field = select_fields.op_sys, + 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"> @@ -411,7 +427,7 @@ [% BLOCK section_details2 %] [%###############################################################%] - [%# Importance (priority, severity and votes) #%] + [%# Importance (priority and severity) #%] [%###############################################################%] <tr> <td class="field_label"> @@ -420,30 +436,15 @@ </td> <td> [% INCLUDE bug/field.html.tmpl - bug = bug, field = select_fields.priority, + bug = bug, field = bug_fields.priority, no_tds = 1, value = bug.priority editable = bug.check_can_change_field('priority', 0, 1) %] - <b><a href="page.cgi?id=fields.html#importance"><u>S</u>everity</a></b></label>: + <b><a href="page.cgi?id=fields.html#importance"><u>S</u>everity</a></b></label>: [%+ INCLUDE bug/field.html.tmpl - bug = bug, field = select_fields.bug_severity, + bug = bug, field = bug_fields.bug_severity, no_tds = 1, value = bug.bug_severity editable = bug.check_can_change_field('bug_severity', 0, 1) %] - [% IF bug.use_votes %] - <span id="votes_container"> - [% IF bug.votes %] - with - <a href="votes.cgi?action=show_bug&bug_id=[% bug.bug_id %]"> - [% bug.votes %] - [% IF bug.votes == 1 %] - vote - [% ELSE %] - votes - [% END %]</a> - [% END %] - (<a href="votes.cgi?action=show_user&bug_id= - [% bug.bug_id %]#vote_[% bug.bug_id %]">vote</a>) - </span> - [% END %] + [% Hook.process('after_importance', 'bug/edit.html.tmpl') %] </td> </tr> @@ -483,6 +484,7 @@ id => "assigned_to" name => "assigned_to" value => bug.assigned_to.login + classes => ["bz_userfield"] size => 30 %] <br> @@ -525,6 +527,7 @@ name => "qa_contact" value => bug.qa_contact.login size => 30 + classes => ["bz_userfield"] emptyok => 1 %] <br> @@ -554,11 +557,11 @@ [%############################################################################%] [% BLOCK section_url_keyword_whiteboard %] [%# *** URL Whiteboard Keywords *** %] +[% IF Param('useurl') %] <tr> <td class="field_label"> <label for="bug_file_loc" accesskey="u"><b> - [% IF bug.bug_file_loc - AND NOT bug.bug_file_loc.match("^(javascript|data)") %] + [% IF is_safe_url(bug.bug_file_loc) %] <a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a> [% ELSE %] <u>U</u>RL @@ -568,8 +571,7 @@ <td> [% IF bug.check_can_change_field("bug_file_loc", 0, 1) %] <span id="bz_url_edit_container" class="bz_default_hidden"> - [% IF bug.bug_file_loc - AND NOT bug.bug_file_loc.match("^(javascript|data)") %] + [% 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> @@ -580,7 +582,8 @@ [% END %] <span id="bz_url_input_area"> [% url_output = PROCESS input no_td=1 inputname => "bug_file_loc" size => "40" colspan => 2 %] - [% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1) %] + [% IF NOT bug.check_can_change_field("bug_file_loc", 0, 1) + AND is_safe_url(bug.bug_file_loc) %] <a href="[% bug.bug_file_loc FILTER html %]">[% url_output FILTER none %]</a> [% ELSE %] [% url_output FILTER none %] @@ -597,6 +600,7 @@ [% END %] </td> </tr> +[% END %] [% IF Param('usestatuswhiteboard') %] <tr> @@ -613,8 +617,13 @@ <label for="keywords" accesskey="k"> <b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>: </td> - [% PROCESS input inputname => "keywords" size => 40 colspan => 2 - value => bug.keywords.join(', ') %] + <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 %] @@ -676,14 +685,15 @@ [% END %] [% IF group.ingroup %] - <input type="hidden" name="defined_bit-[% group.bit %]" value="1"> + <input type="hidden" name="defined_groups" + value="[% group.name FILTER html %]"> [% END %] - <input type="checkbox" value="1" name="bit-[% group.bit %]" - id="bit-[% group.bit %]" + <input type="checkbox" value="[% group.name FILTER html %]" + name="groups" id="group_[% group.bit %]" [% ' checked="checked"' IF group.ison %] [% ' disabled="disabled"' IF NOT group.ingroup %]> - <label for="bit-[% group.bit %]"> + <label for="group_[% group.bit %]"> [%- group.description FILTER html_light %]</label> <br> [% END %] @@ -803,9 +813,11 @@ including you [% END %] [% END %] - <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 %] + <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> + [% END %] <div id="cc_edit_area"> <br> [% IF user.id %] @@ -816,6 +828,7 @@ name => "newcc" value => "" size => 30 + classes => ["bz_userfield"] multiple => 5 %] </div> @@ -835,13 +848,15 @@ [% END %] [% END %] </div> - <script type="text/javascript"> - hideEditableField( 'cc_edit_area_showhide_container', - 'cc_edit_area', - 'cc_edit_area_showhide', - '', - ''); - </script> + [% IF user.id || bug.cc.size %] + <script type="text/javascript"> + hideEditableField( 'cc_edit_area_showhide_container', + 'cc_edit_area', + 'cc_edit_area_showhide', + '', + ''); + </script> + [% END %] </td> </tr> [% END %] @@ -899,13 +914,19 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] - + [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] <tr> - [% PROCESS bug/field.html.tmpl value=bug.${field.name} + [% PROCESS bug/field.html.tmpl value = bug.${field.name} editable = bug.check_can_change_field(field.name, 0, 1) value_span = 2 %] </tr> + [% IF extra_field_item %] + <tr> + <th class="field_label">[% extra_field_item.header FILTER none %]</th> + <td>[% extra_field_item.data FILTER none %]</td> + </tr> + [% END %] [% END %] [% END %] @@ -1022,9 +1043,9 @@ [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %] </td> <td> - <input name="deadline" id="deadline" value="[% bug.deadline %]" - size="10" maxlength="10"><br /> - <small>(YYYY-MM-DD)</small> + [% INCLUDE bug/field.html.tmpl + field = bug_fields.deadline, value = bug.deadline, no_tds = 1 + editable = bug.check_can_change_field('deadline', 0, 1) %] </td> </tr> <tr> @@ -1042,16 +1063,15 @@ [%############################################################################%] [% BLOCK comment_box %] - <div class="bz_section_additional_comments"> - <a name="add_comment"></a> + <div id="add_comment" class="bz_section_additional_comments"> [% IF user.id %] <label for="comment" accesskey="c"><b>Additional <u>C</u>omments</b></label>: [% IF user.is_insider %] - <input type="checkbox" name="commentprivacy" value="1" + <input type="checkbox" name="comment_is_private" value="1" id="newcommentprivacy" - onClick="updateCommentTagControl(this, form)"> + onClick="updateCommentTagControl(this, 'comment')"> <label for="newcommentprivacy"> Make comment private (visible only to members of the <strong>[% Param('insidergroup') FILTER html %]</strong> group) @@ -1071,13 +1091,13 @@ <br> [% PROCESS commit_button id=""%] - <table class="status" cellspacing="0" cellpadding="0"> + <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> <td> - <a name="bug_status_bottom"></a> [% PROCESS bug/knob.html.tmpl %] </td> </tr> @@ -1086,13 +1106,19 @@ [%# For logged-out users %] [% ELSE %] - <table><tr><td><fieldset> - <legend>Note</legend> - You need to - <a href="show_bug.cgi?id= - [%- bug.bug_id %]&GoAheadAndLogIn=1">log in</a> - before you can comment on or make changes to this [% terms.bug %]. - </fieldset></table><tr></td> + <table> + <tr> + <td> + <fieldset> + <legend>Note</legend> + You need to + <a href="show_bug.cgi?id= + [%- bug.bug_id %]&GoAheadAndLogIn=1">log in</a> + before you can comment on or make changes to this [% terms.bug %]. + </fieldset> + </td> + </tr> + </table> [% END %] </div> [% END %] @@ -1157,9 +1183,6 @@ <div class="knob-buttons"> <input type="submit" value="Save Changes" id="commit[% id FILTER css_class_quote %]"> - [% IF bug.user.canmove %] - <input type="submit" name="action" id="action[% id FILTER css_class_quote %]" value="[% Param("move-button-text") %]"> - [% END %] </div> [% END %] [% END %] diff --git a/template/en/default/bug/field-events.js.tmpl b/template/en/default/bug/field-events.js.tmpl index 06fba12..f9e0ea9 100644 --- a/template/en/default/bug/field-events.js.tmpl +++ b/template/en/default/bug/field-events.js.tmpl @@ -32,9 +32,13 @@ [% FOREACH val = legal_value.controlled_values.$controlled_field %] [% cont_ids.push(val.id) %] [% END %] + [% NEXT IF !cont_ids.size %] showValueWhen('[% controlled_field FILTER js %]', [[% cont_ids.join(',') FILTER js %]], '[% field.name FILTER js %]', [% legal_value.id FILTER js %]); [% END %] [% END %] +[% IF field.name == 'classification' %] + YAHOO.util.Event.on('product', 'change', setClassification); +[% END %] diff --git a/template/en/default/bug/field-help.none.tmpl b/template/en/default/bug/field-help.none.tmpl new file mode 100644 index 0000000..7ae9991 --- /dev/null +++ b/template/en/default/bug/field-help.none.tmpl @@ -0,0 +1,241 @@ +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Netscape Communications + # Corporation. Portions created by Netscape are + # Copyright (C) 1998 Netscape Communications Corporation. All + # Rights Reserved. + # + # Contributor(s): Gervase Markham <gerv@gerv.net> + # Max Kanat-Alexander <mkanat@bugzilla.org> + #%] + +[%# This file describes both bug fields and search fields. + # As calling this template once per label is very expensive, + # it is called only by Template.pm. %] + +[% RETURN UNLESS in_template_var %] + +[% vars.help_html = { + +# Note that all these keys here are in alphabetical order, though +# search-specific fields are at the bottom. + +############## +# Bug Fields # +############## + +alias => + "A short, unique name assigned to $terms.abug in order to assist with + looking it up and referring to it in other places in ${terms.Bugzilla}.", + +assigned_to => + "The person in charge of resolving the ${terms.bug}.", + +blocked => + "This $terms.bug must be resolved before the $terms.bugs listed in this + field can be resolved.", + +bug_file_loc => + "$terms.Bugs can have a URL associated with them - for example, a" + _ " pointer to a web site where the problem is seen.", + +bug_id => + "The numeric id of $terms.abug, unique within this entire installation" + _ " of ${terms.Bugzilla}.", + +bug_severity => + "How severe the $terms.bug is, or whether it's an enhancement.", + +bug_status => + "$terms.Abug may be in any of a number of states.", + +cc => + "Users who may not have a direct role to play on this $terms.bug, but who + are interested in its progress.", + +classification => + "$terms.Bugs are categorised into Classifications, Products and" + _ " Components. classifications is the top-level categorisation.", + +component => + "Components are second-level categories; each belongs to a" + _ " particular Product. Select a Product to narrow down this list.", + +creation_ts => + "When the $terms.bug was filed.", + +deadline => + "The date that this $terms.bug must be resolved by, entered in YYYY-MM-DD + format.", + +delta_ts => + "When this $terms.bug was last updated.", + +dependson => + "The $terms.bugs listed here must be resolved before this $terms.bug + can be resolved.", + +estimated_time => + "The amount of time that has been estimated it will take to resolve + this ${terms.bug}.", + +keywords => + "You can add keywords from a defined list to $terms.bugs, in order" + _ " to tag and group them.", + +longdesc => + "$terms.Bugs have comments added to them by $terms.Bugzilla users." + _ " You can search for some text in those comments.", + +op_sys => + "The operating system the $terms.bug was observed on.", + +percentage_complete => + "How close to 100% done this $terms.bug is, by comparing its + $vars.field_descs.work_time to its ${vars.field_descs.estimated_time}.", + +priority => + "Engineers prioritize their $terms.bugs using this field.", + +# Note that this has extra text added below if useclassification is on. +product => + "$terms.Bugs are categorised into Products and Components.", + +qa_contact => + "The person responsible for confirming this $terms.bug if it is" + _ " unconfirmed, and for verifying the fix once the $terms.bug" + _ " has been resolved.", + +remaining_time => + "The number of hours of work left on this $terms.bug, calculated by + subtracting the $vars.field_descs.work_time from the + ${vars.field_descs.estimated_time}.", + +rep_platform => + "The hardware platform the $terms.bug was observed on.", + +reporter => + "The person who filed this ${terms.bug}.", + +resolution => + "If $terms.abug is in a resolved state, then one of these reasons" + _ " will be given for its resolution.", + +see_also => + "This allows you to refer to $terms.bugs in other installations. + You can enter a URL to $terms.abug in the 'Add $terms.Bug URLs' + field to note that that $terms.bug is related to this one. You can + enter multiple URLs at once by separating them with a comma. + + <p>You should normally use this field to refer to $terms.bugs in + <em>other</em> installations. For $terms.bugs in this + installation, it is better to use the $vars.field_descs.dependson and + $vars.field_descs.blocked fields.</p>", + +short_desc => + "The $terms.bug summary is a short sentence which succinctly" + _ " describes what the $terms.bug is about.", + +status_whiteboard => + "Each $terms.bug has a free-form single line text entry box for" + _ " adding tags and status information.", + +target_milestone => + "The $vars.field_descs.target_milestone field is used to define when the" + _ " engineer the $terms.bug is assigned to expects to fix it.", + +version => + "The version field defines the version of the software the" + _ " $terms.bug was found in.", + +votes => + "Some $terms.bugs can be voted for, and you can limit your search to" + _ " $terms.bugs with more than a certain number of votes.", + +work_time => + "The total amount of time spent on this $terms.bug so far.", + +########################## +# Search-specific fields # +########################## + +chfield => + "You can search for specific types of change - this field defines" + _" which field you are interested in changes for.", + +# Duplicated to chfieldto below, also. +chfieldfrom => + "Specify the start and end dates either in YYYY-MM-DD format + optionally followed by HH:mm, in 24 hour clock), or in relative + dates such as 1h, 2d, 3w, 4m, 5y, which respectively mean one hour, + two days, three weeks, four months, or five years ago. 0d is last + midnight, and 0h, 0w, 0m, 0y is the beginning of this hour, week, + month, or year.", + +chfieldvalue => + "The value the field defined above changed to during that time.", + +content => + "This is a field available in searches that does a Google-like + 'full-text' search on the $vars.field_descs.short_desc and + $vars.field_descs.longdesc fields.", + +# Duplicated to email2 below, also. +email1 => + "Every $terms.bug has people associated with it in different" + _ " roles. Here, you can search on what people are in what role.", + +} %] + +[% vars.help_html.email2 = vars.help_html.email1 %] +[% vars.help_html.chfieldto = vars.help_html.chfieldfrom %] +[% vars.help_html.deadlinefrom = vars.help_html.deadline %] +[% vars.help_html.deadlineto = vars.help_html.deadline %] + +[% help_all_note = BLOCK %] + <strong>Note:</strong> When searching, selecting the option "All" + only finds [% terms.bugs %] whose value for this field is literally + the word "All". +[% END %] +[% FOREACH all_field = ['op_sys', 'rep_platform'] %] + [% vars.help_html.$all_field = vars.help_html.$all_field _ ' ' _ help_all_note %] +[% END %] + +[% IF Param('useclassification') %] + [% vars.help_html.product = vars.help_html.product + _ " Select a Classification to narrow down this list." %] +[% END %] + +[% FOREACH help_field = bug_fields.keys %] + + [%# Add help for custom fields. %] + [% IF !vars.help_html.${help_field}.defined %] + [% SET field_type = bug_fields.${help_field}.type %] + [% field_type_desc = BLOCK -%] + [% field_types.$field_type FILTER html %] + [%- END %] + [% vars.help_html.${help_field} = + "A custom $field_type_desc field in this installation" + _ " of ${terms.Bugzilla}." %] + [% END %] + + [%# Add help for the search types, for query.cgi. %] + [% type_desc = BLOCK %] + The type of [% vars.field_descs.${help_field} FILTER html %] search you + would like. + [% END %] + [% SET type_name = help_field _ '_type' %] + [% vars.help_html.$type_name = type_desc %] +[% END %] + +[% Hook.process("end") %] diff --git a/template/en/default/bug/field-label.html.tmpl b/template/en/default/bug/field-label.html.tmpl new file mode 100644 index 0000000..2138f03 --- /dev/null +++ b/template/en/default/bug/field-label.html.tmpl @@ -0,0 +1,52 @@ +[%# The contents of this file are subject to the Mozilla Public + # License Version 1.1 (the "License"); you may not use this file + # except in compliance with the License. You may obtain a copy of + # the License at http://www.mozilla.org/MPL/ + # + # Software distributed under the License is distributed on an "AS + # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + # implied. See the License for the specific language governing + # rights and limitations under the License. + # + # The Original Code is the Bugzilla Bug Tracking System. + # + # The Initial Developer of the Original Code is Everything Solved, Inc. + # Portions created by the Initial Developer are Copyright (C) 2010 the + # Initial Developer. All Rights Reserved. + # + # Contributor(s): + # Max Kanat-Alexander <mkanat@bugzilla.org> + #%] + +[%# INTERFACE: + # field: a Bugzilla::Field object + # desc_url: An alternate link to help for the field. + # hidden: True if the field label should start hidden. + # rowspan: a "rowspan" value for the label's <th>. + # tag_name: the tag to use to surround the label + #%] + +[% DEFAULT tag_name = "th" %] +<[% tag_name FILTER html %] class="field_label [% ' bz_hidden_field' IF hidden %] + [%- ' required' IF field.is_mandatory && NOT bug.id %]" + id="field_label_[% field.name FILTER html %]" + [% IF rowspan %] rowspan="[% rowspan FILTER html %]"[% END %]> + + [% IF editable %] + <label for="[% field.name FILTER html %]"> + [% END %] + + <a + [% IF help_html.${field.name}.defined %] + title="[% help_html.${field.name} FILTER txt FILTER collapse FILTER html %]" + class="field_help_link" + [% END %] + [% IF desc_url %] + href="[% desc_url FILTER html %]" + [% ELSE %] + href="page.cgi?id=fields.html#[% field.name FILTER url_quote %]" + [% END %] + >[%- field_descs.${field.name} FILTER html %]:</a> + + [% '</label>' IF editable %] +</[% tag_name FILTER html %]> diff --git a/template/en/default/bug/field.html.tmpl b/template/en/default/bug/field.html.tmpl index bb678d7..b014a6e 100644 --- a/template/en/default/bug/field.html.tmpl +++ b/template/en/default/bug/field.html.tmpl @@ -18,6 +18,8 @@ # Contributor(s): Myk Melez <myk@mozilla.org> # Max Kanat-Alexander <mkanat@bugzilla.org> # Elliotte Martin <elliotte_martin@yahoo.com> + # Guy Pyrzak <guy.pyrzak@gmail.com> + # Reed Loden <reed@reedloden.com> #%] [%# INTERFACE: @@ -40,35 +42,17 @@ #%] [% SET hidden = 0 %] -[% IF field.visibility_field.defined %] - [% IF !bug.${field.visibility_field.name} - .contains(field.visibility_value.name) - %] - [% SET hidden = 1 %] - [% END %] +[% IF field.visibility_field.defined AND bug + AND !field.visibility_value.is_set_on_bug(bug) +%] + [% SET hidden = 1 %] [% END %] [% IF NOT no_tds %] - <th class="field_label [% ' bz_hidden_field' IF hidden %]" - id="field_label_[% field.name FILTER html %]"> - [% IF editable %] - <label for="[% field.name FILTER html %]"> - [% END %] - [% IF desc_url %] - <a href="[% desc_url FILTER html %]"> - [% ELSIF !field.custom %] - <a href="page.cgi?id=fields.html#[% field.name FILTER url_quote %]"> - [% END -%] - [% field_descs.${field.name} FILTER html %]: - [%- '</a>' IF (!field.custom || desc_url) %] - [% '</label>' IF editable %] - </th> -[% END %] - -[% IF NOT no_tds %] -<td class="field_value [% ' bz_hidden_field' IF hidden %]" - id="field_container_[% field.name FILTER html %]" - [% " colspan=\"$value_span\"" FILTER none IF value_span %]> + [% PROCESS "bug/field-label.html.tmpl" %] + <td class="field_value [% ' bz_hidden_field' IF hidden %]" + id="field_container_[% field.name FILTER html %]" + [% " colspan=\"$value_span\"" FILTER none IF value_span %]> [% END %] [% Hook.process('start_field_column') %] [% IF editable %] @@ -77,11 +61,13 @@ <input id="[% field.name FILTER html %]" class="text_input" name="[% field.name FILTER html %]" value="[% value FILTER html %]" size="40" - maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]"> + maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]" + [% ' aria-required="true"' IF field.is_mandatory %]> [% CASE constants.FIELD_TYPE_DATETIME %] <input name="[% field.name FILTER html %]" size="20" id="[% field.name FILTER html %]" value="[% value FILTER html %]" + [% ' aria-required="true"' IF field.is_mandatory %] onchange="updateCalendarFromField(this)"> <button type="button" class="calendar_button" id="button_calendar_[% field.name FILTER html %]" @@ -89,8 +75,7 @@ <span>Calendar</span> </button> - <div id="con_calendar_[% field.name FILTER html %]" - class="yui-skin-sam"></div> + <div id="con_calendar_[% field.name FILTER html %]"></div> <script type="text/javascript"> createCalendar('[% field.name FILTER js %]') @@ -98,11 +83,13 @@ [% CASE constants.FIELD_TYPE_BUG_ID %] <span id="[% field.name FILTER html %]_input_area"> <input name="[% field.name FILTER html %]" id="[% field.name FILTER html %]" - value="[% value FILTER html %]" size="7"> + value="[% value FILTER html %]" size="7" + [% ' aria-required="true"' IF field.is_mandatory %]> + </span> - [% IF bug.${field.name} %] - [% bug.${field.name} FILTER bug_link(bug.${field.name}) FILTER none %] + [% IF value %] + [% value FILTER bug_link(value, use_alias => 1) FILTER none %] [% END %] <span id="[% field.name FILTER html %]_edit_container" class="edit_me bz_default_hidden"> (<a href="#" id="[% field.name FILTER html %]_edit_action">edit</a>) @@ -112,7 +99,7 @@ '[% field.name FILTER js %]_input_area', '[% field.name FILTER js %]_edit_action', '[% field.name FILTER js %]', - "[% bug.${field.name} FILTER js %]"); + "[% value FILTER js %]"); </script> [% CASE [ constants.FIELD_TYPE_SINGLE_SELECT constants.FIELD_TYPE_MULTI_SELECT ] %] @@ -124,6 +111,7 @@ [% SET field_size = field.legal_values.size %] [% END %] size="[% field_size FILTER html %]" multiple="multiple" + [% ' aria-required="true"' IF field.is_mandatory %] [% END %] > [% IF allow_dont_change %] @@ -138,8 +126,6 @@ [% legal_values = field.legal_values %] [% END %] [% FOREACH legal_value = legal_values %] - [% SET control_value = legal_value.visibility_value %] - [% SET control_field = field.value_field %] <option value="[% legal_value.name FILTER html %]" id="v[% legal_value.id FILTER html %]_ [%- field.name FILTER html %]" @@ -147,10 +133,7 @@ # hidden %] [% IF value.contains(legal_value.name).size %] selected="selected" - [% ELSIF (control_field && control_value - && !bug.${control_field.name}.contains(control_value.name)) - || !legal_value.is_active - %] + [% ELSIF bug AND !legal_value.is_visible_on_bug(bug) %] class="bz_hidden_option" disabled="disabled" [% END %]> [%- display_value(field.name, legal_value.name) FILTER html ~%] @@ -178,38 +161,70 @@ [% CASE constants.FIELD_TYPE_TEXTAREA %] [% INCLUDE global/textarea.html.tmpl id = field.name name = field.name minrows = 4 maxrows = 8 - cols = 60 defaultcontent = value %] + cols = 60 defaultcontent = value mandatory = field.is_mandatory %] [% CASE constants.FIELD_TYPE_BUG_URLS %] [% '<ul class="bug_urls">' IF value.size %] [% FOREACH url = value %] <li> <a href="[% url FILTER html %]">[% url FILTER html %]</a> - [% IF editable %] - <label><input type="checkbox" value="[% url FILTER html %]" - name="remove_[% field.name FILTER html %]"> - Remove</label> - [% END %] + <label><input type="checkbox" value="[% url FILTER html %]" + name="remove_[% field.name FILTER html %]"> + Remove</label> </li> [% END %] [% '</ul>' IF value.size %] - [% IF editable && Param('use_see_also') %] + [% IF Param('use_see_also') %] <label for="[% field.name FILTER html %]"> <strong>Add [% terms.Bug %] URLs:</strong> </label><br> <input type="text" id="[% field.name FILTER html %]" size="40" class="text_input" name="[% field.name FILTER html %]"> [% END %] + [% CASE constants.FIELD_TYPE_KEYWORDS %] + <div id="keyword_container"> + <input type="text" id="[% field.name FILTER html %]" size="40" + class="text_input" name="[% field.name FILTER html %]" + value="[% value FILTER html %]"> + <div id="keyword_autocomplete"></div> + </div> + <script type="text/javascript" defer="defer"> + YAHOO.bugzilla.keyword_array = [ + [%- FOREACH keyword = all_keywords %] + [%-# %]"[% keyword.name FILTER js %]" + [%- "," IF NOT loop.last %][% END %]]; + YAHOO.bugzilla.keywordAutocomplete.init('[% field.name FILTER js %]', + 'keyword_autocomplete'); + </script> [% END %] [% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %] <div class="uneditable_textarea">[% value FILTER wrap_comment(60) FILTER html %]</div> [% ELSIF field.type == constants.FIELD_TYPE_BUG_ID %] - [% IF bug.${field.name} %] - [% bug.${field.name} FILTER bug_link(bug.${field.name}) FILTER none %] + [% IF value %] + [% value FILTER bug_link(value, use_alias => 1) FILTER none %] [% END %] +[% ELSIF field.type == constants.FIELD_TYPE_BUG_URLS %] + [% '<ul class="bug_urls">' IF value.size %] + [% FOREACH url = value %] + <li><a href="[% url FILTER html %]">[% url FILTER html %]</a></li> + [% END %] + [% '</ul>' IF value.size %] [% ELSE %] [% value.join(', ') FILTER html %] [% END %] [% Hook.process('end_field_column') %] [% '</td>' IF NOT no_tds %] + +[%# for reverse relationships, we show this pseudo-field after the main field %] +[% IF bug.id && field.is_relationship %] + [% extra_field_item = {} %] + [% extra_field_item.header = field.reverse_desc _ ":" FILTER html %] + [% extra_field_item.data = BLOCK %] + [% FOREACH depbug = bug.related_bugs(field) %] + [% depbug.id FILTER bug_link(depbug, use_alias => 1) FILTER none %][% " " %] + [% END %] + [% END %] +[% ELSE %] + [% extra_field_item = '' %] +[% END %] diff --git a/template/en/default/bug/format_comment.txt.tmpl b/template/en/default/bug/format_comment.txt.tmpl index 7d33c23..ed89188 100644 --- a/template/en/default/bug/format_comment.txt.tmpl +++ b/template/en/default/bug/format_comment.txt.tmpl @@ -39,16 +39,6 @@ X[% comment_body %] *** This [% terms.bug %] has been marked as a duplicate of [% terms.bug %] [%+ comment.extra_data %] *** [% ELSIF comment.type == constants.CMT_HAS_DUPE %] *** [% terms.Bug %] [%+ comment.extra_data %] has been marked as a duplicate of this [% terms.bug %]. *** -[% ELSIF comment.type == constants.CMT_POPULAR_VOTES %] -*** This [% terms.bug %] has been confirmed by popular vote. *** -[% ELSIF comment.type == constants.CMT_MOVED_TO %] -X[% comment_body %] - -[%+ terms.Bug %] moved to [% Param("move-to-url") %]. -If the move succeeded, [% comment.extra_data %] will receive a mail containing -the number of the new [% terms.bug %] in the other database. -If all went well, please paste in a link to the new [% terms.bug %]. -Otherwise, reopen this [% terms.bug %]. [% ELSIF comment.type == constants.CMT_ATTACHMENT_CREATED %] Created attachment [% comment.extra_data %] [% IF is_bugmail %] @@ -65,4 +55,6 @@ Comment on attachment [% comment.extra_data %] [%+ comment.attachment.description %] [%+ comment.body %] +[% ELSE %] +X[% Hook.process('type') %] [% END %] diff --git a/template/en/default/bug/navigate.html.tmpl b/template/en/default/bug/navigate.html.tmpl index 4a3d063..19af18a 100644 --- a/template/en/default/bug/navigate.html.tmpl +++ b/template/en/default/bug/navigate.html.tmpl @@ -16,8 +16,11 @@ # Rights Reserved. # # Contributor(s): Gervase Markham <gerv@gerv.net> + # Max Kanat-Alexander <mkanat@bugzilla.org> #%] +[% RETURN IF !bug %] + [% PROCESS global/variables.none.tmpl %] [% IF bottom_navigator == 1 %] <ul class="related_actions"> @@ -36,45 +39,41 @@ <div class="navigation"> -[% IF last_bug_list.size > 0 %] - [% this_bug_idx = lsearch(last_bug_list, bug.id) %] +[% SET my_search = user.recent_search_for(bug) %] +[% IF my_search %] + [% SET last_bug_list = my_search.bug_list %] + [% SET this_bug_idx = lsearch(last_bug_list, bug.id) %] <b>[% terms.Bug %] List:</b> - [% IF this_bug_idx != -1 %] - ([% this_bug_idx + 1 %] of [% last_bug_list.size %]) - [% END %] - [% IF this_bug_idx != -1 %] - <a href="show_bug.cgi?id= - [%- last_bug_list.first FILTER url_quote %]">First</a> + ([% this_bug_idx + 1 %] of [% last_bug_list.size %]) + + <a href="show_bug.cgi?id= + [%- last_bug_list.first FILTER url_quote %]&list_id= + [%- my_search.id FILTER url_quote %]">First</a> + <a href="show_bug.cgi?id= + [%- last_bug_list.last FILTER url_quote %]&list_id= + [%- my_search.id FILTER url_quote %]">Last</a> + + [% IF this_bug_idx > 0 %] + [% prev_bug = this_bug_idx - 1 %] <a href="show_bug.cgi?id= - [%- last_bug_list.last FILTER url_quote %]">Last</a> + [%- last_bug_list.$prev_bug FILTER url_quote %]&list_id= + [%- my_search.id FILTER url_quote %]">Prev</a> + [% ELSE %] + <i><font color="#777777">Prev</font></i> [% END %] - [% IF bug.bug_id %] - [% IF this_bug_idx != -1 %] - [% IF this_bug_idx > 0 %] - [% prev_bug = this_bug_idx - 1 %] - <a href="show_bug.cgi?id= - [%- last_bug_list.$prev_bug FILTER url_quote %]">Prev</a> - [% ELSE %] - <i><font color="#777777">Prev</font></i> - [% END %] - - [% IF this_bug_idx + 1 < last_bug_list.size %] - [% next_bug = this_bug_idx + 1 %] - <a href="show_bug.cgi?id= - [%- last_bug_list.$next_bug FILTER url_quote %]">Next</a> - [% ELSE %] - <i><font color="#777777">Next</font></i> - [% END %] - [% ELSE %] - (This [% terms.bug %] is not in your last search results) - [% END %] + [% IF this_bug_idx + 1 < last_bug_list.size %] + [% next_bug = this_bug_idx + 1 %] + <a href="show_bug.cgi?id= + [%- last_bug_list.$next_bug FILTER url_quote %]&list_id= + [%- my_search.id FILTER url_quote %]">Next</a> [% ELSE %] - + <i><font color="#777777">Next</font></i> [% END %] - <a href="buglist.cgi?regetlastlist=1">Show last search results</a> + <a href="buglist.cgi?regetlastlist= + [%- my_search.id FILTER url_quote %]">Show last search results</a> [% ELSE %] [%# With no list, don't show link to search results %] <i><font color="#777777">First</font></i> @@ -82,6 +81,7 @@ <i><font color="#777777">Prev</font></i> <i><font color="#777777">Next</font></i> - <i><font color="#777777">No search results available</font></i> + <i><font color="#777777">This [% terms.bug %] is not in your last + search results.</font></i> [% END %] </div> diff --git a/template/en/default/bug/process/header.html.tmpl b/template/en/default/bug/process/header.html.tmpl index 79f0126..6b608b9 100644 --- a/template/en/default/bug/process/header.html.tmpl +++ b/template/en/default/bug/process/header.html.tmpl @@ -39,8 +39,8 @@ [% END %] [% ELSIF title_tag == "mid_air" %] [% title = "Mid-air collision!" %] -[% ELSIF title_tag == "change_votes" %] - [% title = "Change Votes" %] [% END %] +[% Hook.process('title') %] + [% PROCESS global/header.html.tmpl %] diff --git a/template/en/default/bug/process/midair.html.tmpl b/template/en/default/bug/process/midair.html.tmpl index 34031fc..8a49f7c 100644 --- a/template/en/default/bug/process/midair.html.tmpl +++ b/template/en/default/bug/process/midair.html.tmpl @@ -94,7 +94,9 @@ You have the following choices: <input type="hidden" name="id" value="[% cgi.param("id") FILTER html %]"> <input type="hidden" name="delta_ts" value="[% bug.delta_ts FILTER html %]"> <input type="hidden" name="comment" value="[% cgi.param("comment") FILTER html %]"> - <input type="hidden" name="commentprivacy" value="[% cgi.param("commentprivacy") FILTER html %]"> + <input type="hidden" name="comment_is_private" + value="[% cgi.param("comment_is_private") FILTER html %]"> + <input type="hidden" name="longdesclength" value="[% bug.comments.size %]"> <input type="hidden" name="token" value="[% cgi.param("token") FILTER html %]"> <input type="submit" id="process_comment" value="Submit only my new comment"> </form> diff --git a/template/en/default/bug/process/results.html.tmpl b/template/en/default/bug/process/results.html.tmpl index ee218d4..c62a7a5 100644 --- a/template/en/default/bug/process/results.html.tmpl +++ b/template/en/default/bug/process/results.html.tmpl @@ -42,12 +42,13 @@ 'bug' => "Changes submitted for $link" , 'dupe' => "Duplicate notation added to $link" , 'dep' => "Checking for dependency changes on $link" , - 'votes' => "$Link confirmed by number of votes" , 'created' => "$Link has been added to the database" , 'move' => "$Link has been moved to another database" , } %] +[% Hook.process('title') %] + <dl> <dt>[% title.$type %]</dt> <dd> diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl index 1cc186c..c02c264 100644 --- a/template/en/default/bug/process/verify-new-product.html.tmpl +++ b/template/en/default/bug/process/verify-new-product.html.tmpl @@ -40,7 +40,7 @@ [% SET exclude_items = ['version', 'component', 'target_milestone'] %] [% IF verify_bug_groups %] - [% exclude_items.push('bit-\d+') %] + [% exclude_items.push('groups', 'defined_groups') %] [% END %] [% Hook.process('exclude') %] @@ -124,9 +124,9 @@ [%+ terms.Bugs %] will no longer be restricted to these groups and may become public if no other group applies:<br> [% FOREACH group = old_groups %] - <input type="checkbox" id="bit-[% group.id FILTER html %]" - name="bit-[% group.id FILTER html %]" disabled="disabled" value="1"> - <label for="bit-[% group.id FILTER html %]"> + <input type="checkbox" id="group_[% group.id FILTER html %]" + name="groups" disabled="disabled" value="[% group.name FILTER html %]"> + <label for="group_[% group.id FILTER html %]"> [% group.name FILTER html %]: [% group.description FILTER html %] </label> <br> @@ -154,16 +154,15 @@ <p>These groups are optional. You can decide to restrict [% terms.bugs %] to one or more of the following groups:<br> [% FOREACH group = optional_groups %] - <input type="hidden" name="defined_bit-[% group.group.id FILTER html %]" - value="1"> - <input type="checkbox" id="bit-[% group.group.id FILTER html %]" - name="bit-[% group.group.id FILTER html %]" - [%+ ((group.membercontrol == constants.CONTROLMAPDEFAULT && user.in_group(group.group.name)) + <input type="hidden" name="defined_groups" + value="[% group.group.name FILTER html %]"> + <input type="checkbox" id="group_[% group.group.id FILTER html %]" + name="groups" + [% ' checked="checked"' IF ((group.membercontrol == constants.CONTROLMAPDEFAULT && user.in_group(group.group.name)) || (group.othercontrol == constants.CONTROLMAPDEFAULT && !user.in_group(group.group.name)) - || cgi.param("bit-$group.group.id") == 1) ? - 'checked="checked"' : '' - %] value="1"> - <label for="bit-[% group.group.id FILTER html %]"> + || cgi.param("groups").contains(group.group.name)) %] + value="[% group.group.name FILTER html %]"> + <label for="group_[% group.group.id FILTER html %]"> [% group.group.name FILTER html %]: [% group.group.description FILTER html %] </label> <br> @@ -175,9 +174,10 @@ <p>These groups are mandatory and [% terms.bugs %] will be automatically restricted to these groups:<br> [% FOREACH group = mandatory_groups %] - <input type="checkbox" id="bit-[% group.group.id FILTER html %]" checked="checked" - name="bit-[% group.group.id FILTER html %]" value="1" disabled="disabled"> - <label for="bit-[% group.group.id FILTER html %]"> + <input type="checkbox" id="group_[% group.group.id FILTER html %]" + checked="checked" disabled="disabled" + name="groups" value="[% group.group.name FILTER html %]"> + <label for="group_[% group.group.id FILTER html %]"> [% group.group.name FILTER html %]: [% group.group.description FILTER html %] </label> <br> diff --git a/template/en/default/bug/show-header.html.tmpl b/template/en/default/bug/show-header.html.tmpl index 3f81e57..e47af94 100644 --- a/template/en/default/bug/show-header.html.tmpl +++ b/template/en/default/bug/show-header.html.tmpl @@ -34,11 +34,10 @@ [% title = "$terms.Bug $bug.bug_id – $filtered_desc" %] [% header = "$terms.Bug $bug.bug_id" %] [% header_addl_info = "Last modified: $filtered_timestamp" %] -[% javascript_urls = [ "js/util.js", "js/field.js", "js/yui/calendar.js" ] %] -[% style_urls = [ "skins/standard/yui/calendar.css", - "skins/standard/show_bug.css" ] %] +[% yui = ['autocomplete', 'calendar'] %] +[% javascript_urls = [ "js/util.js", "js/field.js" ] %] +[% style_urls = [ "skins/standard/show_bug.css" ] %] [% doc_section = "bug_page.html" %] - [% bodyclasses = ['bz_bug', "bz_status_$bug.bug_status", "bz_product_$bug.product", @@ -48,3 +47,5 @@ [% FOREACH group = bug.groups_in %] [% bodyclasses.push("bz_group_$group.name") %] [% END %] + +[% Hook.process('end') %] diff --git a/template/en/default/bug/show-multiple.html.tmpl b/template/en/default/bug/show-multiple.html.tmpl index 177bea1..406de16 100644 --- a/template/en/default/bug/show-multiple.html.tmpl +++ b/template/en/default/bug/show-multiple.html.tmpl @@ -163,11 +163,11 @@ <tr> <th>[% field_descs.bug_file_loc FILTER html %]:</th> <td colspan="3"> - [% IF bug.bug_file_loc.match("^(javascript|data)") %] - [% bug.bug_file_loc FILTER html %] - [% ELSE %] + [% IF is_safe_url(bug.bug_file_loc) %] <a href="[% bug.bug_file_loc FILTER html %]"> [% bug.bug_file_loc FILTER html %]</a> + [% ELSE %] + [% bug.bug_file_loc FILTER html %] [% END %] </td> </tr> @@ -186,6 +186,13 @@ [% PROCESS bug/field.html.tmpl value=bug.${field.name} editable=0 %] [%# Even-numbered fields get a closing <tr> %] [% '</tr>' IF !(field_counter % 2) %] + [% IF extra_field_item %] + [% field_counter = field_counter + 1 %] + [% '<tr>' IF field_counter % 2 %] + <th>[% extra_field_item.header FILTER none %]</th> + <td>[% extra_field_item.data FILTER none %]</td> + [% '</tr>' IF !(field_counter % 2) %] + [% END %] [% END %] [%# And we have to finish the row if we ended on an odd number. %] [% '<th></th><td></td></tr>' IF field_counter % 2 %] diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index 2349602..8034212 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -121,7 +121,13 @@ </bugzilla> [% BLOCK bug_field %] - [% FOREACH val = bug.$field %] + [% field_values = bug.$field %] + [%# Work around TT bug https://rt.cpan.org/Public/Bug/Display.html?id=9802 %] + [% IF bug.$field.size == 1 %] + [% field_values = [bug.$field.first] %] + [% END %] + + [% FOREACH val = field_values %] [%# We need to handle some fields differently. This should become # nicer once we have custfields, and a type attribute for the fields #%] diff --git a/template/en/default/bug/summarize-time.html.tmpl b/template/en/default/bug/summarize-time.html.tmpl index eb5ba7a..21c26e8 100644 --- a/template/en/default/bug/summarize-time.html.tmpl +++ b/template/en/default/bug/summarize-time.html.tmpl @@ -32,6 +32,8 @@ header = header style_urls = ["skins/standard/summarize-time.css"] doc_section = "timetracking.html" + yui = ['calendar'] + javascript_urls = [ "js/util.js", "js/field.js" ] %] [% INCLUDE query_form %] @@ -281,11 +283,23 @@ for="start_date">Period <u>s</u>tarting</label></b>: </td><td colspan="3"> <input type="text" id="start_date" name="start_date" size="11" - align="right" value="[% start_date FILTER html %]" maxlength="10"> + align="right" value="[% start_date FILTER html %]" maxlength="10" + onchange="updateCalendarFromField(this)"> + <button type="button" class="calendar_button" + id="button_calendar_start_date" + onclick="showCalendar('start_date')"><span>Calendar</span> + </button> + <div id="con_calendar_start_date"></div> <b>and <label accesskey="e" for="end_date"><u>e</u>nding</label></b>: <input type="text" name="end_date" size="11" id="end_date" - align="right" value ="[% end_date FILTER html %]" maxlength="10"> + align="right" value ="[% end_date FILTER html %]" maxlength="10" + onchange="updateCalendarFromField(this)"> + <button type="button" class="calendar_button" + id="button_calendar_end_date" + onclick="showCalendar('end_date')"><span>Calendar</span> + </button> + <div id="con_calendar_end_date"></div> </td><td align="right"> <input type="submit" id="summarize" value="Summarize"> </td></tr> @@ -329,7 +343,9 @@ </form> <script type="text/javascript"> <!-- - document.forms['summary'].start_date.focus() + createCalendar('start_date'); + createCalendar('end_date'); + document.forms['summary'].start_date.focus(); //--></script> <hr noshade size=1> [% END %] |