From ba702dcd7ac9b2e6c4d46ad21c7bfacfd6883189 Mon Sep 17 00:00:00 2001 From: Dexter Morgan Date: Wed, 20 Feb 2013 16:07:49 +0000 Subject: Add 4.0 branch --- template/en/default/bug/activity/table.html.tmpl | 8 +- template/en/default/bug/comments.html.tmpl | 93 ++---- .../en/default/bug/create/comment-guided.txt.tmpl | 8 +- .../en/default/bug/create/create-guided.html.tmpl | 200 ++++-------- template/en/default/bug/create/create.html.tmpl | 359 +++++++++++---------- template/en/default/bug/dependency-tree.html.tmpl | 2 +- template/en/default/bug/edit.html.tmpl | 219 +++++++------ template/en/default/bug/field-events.js.tmpl | 4 + template/en/default/bug/field-help.none.tmpl | 241 ++++++++++++++ template/en/default/bug/field-label.html.tmpl | 52 +++ template/en/default/bug/field.html.tmpl | 111 ++++--- template/en/default/bug/format_comment.txt.tmpl | 12 +- template/en/default/bug/navigate.html.tmpl | 64 ++-- template/en/default/bug/process/header.html.tmpl | 4 +- template/en/default/bug/process/midair.html.tmpl | 4 +- template/en/default/bug/process/results.html.tmpl | 3 +- .../bug/process/verify-new-product.html.tmpl | 32 +- template/en/default/bug/show-header.html.tmpl | 9 +- template/en/default/bug/show-multiple.html.tmpl | 13 +- template/en/default/bug/show.xml.tmpl | 8 +- template/en/default/bug/summarize-time.html.tmpl | 22 +- 21 files changed, 865 insertions(+), 603 deletions(-) create mode 100644 template/en/default/bug/field-help.none.tmpl create mode 100644 template/en/default/bug/field-label.html.tmpl (limited to 'template/en/default/bug') 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 @@ Attachment #[% change.attachid %] [% 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 %] [% 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 %] - - + [% 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 %] +
+ + Add Comment +
+[% 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
  • Expand All Comments
  • + [% IF user.settings.comment_box_position.value == "after_comments" && user.id %] +
  • + Add Comment
  • + [% END %] [% END %] @@ -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 %] -
    [% IF count == description %] @@ -194,7 +141,7 @@ [% END %] - [%- comment_label FILTER html %] @@ -229,7 +176,7 @@ #%]
    -  [%- comment.body_full({ wrap => 1 }) FILTER quoteUrls(bug, comment) -%]
    +  [%- comment_text FILTER quoteUrls(bug, comment) -%]
     
    [% 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 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 // 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 // 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); + } }; --> -

       Submit a bug using the expert bug form.

    +

       Submit [% terms.abug %] using the +expert [% terms.bug %] form.

    -
    + - - + @@ -298,6 +215,7 @@ function onChangePackage(input_obj) {
    +

    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) {

    - 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 mysqld, then execute rpm -qif /usr/sbin/mysqld. 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")) %] -
       - - + [% IF user.is_insider %] +
       + + [% END %]

    @@ -475,16 +391,18 @@ function onChangePackage(input_obj) { Assign To: - [% 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 %]

    Leave the above blank to assign to the default component owner.

    + + [% Hook.process('form') %]

    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');" %] -[% USE Bugzilla %] -[% SET select_fields = {} %] -[% FOREACH field = Bugzilla.get_fields( - { type => constants.FIELD_TYPE_SINGLE_SELECT, custom => 0 }) -%] - [% select_fields.${field.name} = field %] -[% END %] - + class="enter_bug_form" enctype="multipart/form-data" + onsubmit="return validateEnterBug(this)"> - +
    - - - - - + [% 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 %] [%# We can't use the select block in these two cases for various reasons. %] - - - [% 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) %] + + [%# 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. + #%] + + [% 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) %] + [%###############%] [%# Component #%] [%###############%] - - [% 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) + %] [% END %] @@ -899,13 +914,19 @@ [% BLOCK section_customfields %] [%# *** Custom Fields *** %] - + [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] - [% 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 %] + [% IF extra_field_item %] + + + + + [% END %] [% END %] [% END %] @@ -1022,9 +1043,9 @@ [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %] @@ -1042,16 +1063,15 @@ [%############################################################################%] [% BLOCK comment_box %] -
    - +
    [% IF user.id %] : [% IF user.is_insider %] - + onClick="updateCommentTagControl(this, 'comment')">
    @@ -210,22 +199,26 @@ TUI_hide_default('expert_fields');
    Product:[% product.name FILTER html %]Reporter:[% user.login FILTER html %]
    - - Component: - - + + + + [%# Enclose the fieldset in a nested table so that its width changes based # on the length on the component description. %] @@ -264,9 +270,11 @@ TUI_hide_default('expert_fields'); - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.version editable = 1 rowspan = 3 + %] [% 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 %] [% 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 %] [% 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 %] + [% IF !Param('defaultplatform') || !Param('defaultopsys') %] + + + + + [% END %] [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] - [% sel = { description => 'Target Milestone', name => 'target_milestone' } %] - [% INCLUDE select %] + [% INCLUDE select field = bug_fields.target_milestone %] [% ELSE %] [% 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 %] @@ -312,40 +335,16 @@ TUI_hide_default('expert_fields'); -[% IF !Param('defaultplatform') || !Param('defaultopsys') %] - - - - - - -[% END %] - -[% IF bug_status.size <= 1 %] - - - -[% 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 %] [%# Calculate the number of rows we can use for flags %] @@ -376,9 +375,12 @@ TUI_hide_default('expert_fields'); - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.assigned_to editable = 1 + %] - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.qa_contact editable = 1 + %] - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.cc editable = 1 + %] - + - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.estimated_time editable = 1 + %] - - + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.deadline, value = deadline, + editable = 1, value_span = 2 %] @@ -454,7 +462,9 @@ TUI_hide_default('expert_fields'); [% IF Param("usebugaliases") %] - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.alias editable = 1 + %] @@ -462,21 +472,23 @@ TUI_hide_default('expert_fields'); [% END %] - - - + [% USE Bugzilla %] [% FOREACH field = Bugzilla.active_custom_fields %] [% NEXT UNLESS field.enter_bug %] [% SET value = ${field.name}.defined ? ${field.name} : "" %] - + [% 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'); - - + [% IF feature_enabled('jsonrpc') AND !cloned_bug_id %] + + + + + [% END %] + [% END %] + [% IF Param("maxattachmentsize") %] + [% END %] [% IF user.in_group('editbugs', product.id) %] [% IF use_keywords %] - - + [% INCLUDE bug/field.html.tmpl + bug = default, field = bug_fields.keywords, editable = 1, + value = keywords, desc_url = "describekeywords.cgi", + value_span = 2 + %] [% END %] - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.dependson editable = 1 + %] - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.blocked editable = 1 + %] @@ -599,13 +644,14 @@ TUI_hide_default('expert_fields'); - [% IF group.size %] + [% IF product.groups_available.size %] @@ -634,14 +682,11 @@ TUI_hide_default('expert_fields'); @@ -659,30 +704,20 @@ TUI_hide_default('expert_fields'); [%############################################################################%] [% BLOCK select %] - [% IF sel.description %] - - [% END %] + [% INCLUDE "bug/field-label.html.tmpl" + field = field editable = 1 + %] [% 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 %] -    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 %] - - + @@ -211,23 +213,11 @@
    Version: - [%- FOREACH v = version %]
      +
    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.
    +
      
      - 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. -
     
    Initial State:[% display_value("bug_status", default.bug_status) FILTER html %] 
    Assign To: [% 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") %]
    QA Contact: [% 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 %]
    CC: [% INCLUDE global/userselect.html.tmpl + id => "cc" name => "cc" value => cc disabled => cc_disabled @@ -421,7 +429,7 @@ TUI_hide_default('expert_fields');
    Default CC:Default [% field_descs.cc FILTER html %]:
    @@ -434,17 +442,17 @@ TUI_hide_default('expert_fields'); [% IF user.is_timetracker %]
    Estimated Hours:
    Deadline: - - (YYYY-MM-DD) -
    Alias:
    URL: - + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.bug_file_loc editable = 1 + %] + +
    Summary: + [% INCLUDE "bug/field-label.html.tmpl" + field = bug_fields.short_desc editable = 1 + %] + + class="required text_input" id="short_desc">
    Possible
    Duplicates:
    +
    + +
    Description: + [% 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');      - -
    Attachment: - +
    + +
    + +
    +
    Add an attachment @@ -562,35 +606,36 @@ TUI_hide_default('expert_fields'); flag_table_id ="attachment_flags" %]
    - +
    Keywords: - (optional) -
    Depends on:
    Blocks:
     
    - 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 %]:
    @@ -615,12 +661,14 @@ TUI_hide_default('expert_fields');
    - [% FOREACH g = group %] -      - -
    + + [% FOREACH group = product.groups_available %] + +
    [% END %]
      - +      + onclick="bz_no_validate_enter_bug=true" class="expert_fields">
    - [% sel.description %]: - - + [%- FOREACH x = ${field.name} %] [% END %] - - [% IF sel.name == "bug_status" %] - - [% END %]
    - [%# *** Additional Comments *** %] -
    - [% PROCESS bug/comments.html.tmpl - comments = bug.comments - mode = user.id ? "edit" : "show" - %] -
    - - + [% 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 %]
    - - [% PROCESS comment_box %] - -
    -
    -
    [% PROCESS section_restrict_visibility %]
    + [%# *** Additional Comments *** %] +
    + [% PROCESS bug/comments.html.tmpl + comments = bug.comments + mode = user.id ? "edit" : "show" + %] +
    + + [% IF user.settings.comment_box_position.value == 'after_comments' %] +
    + [% PROCESS comment_box %] + [% END %] + [%############################################################################%] @@ -323,26 +329,36 @@ [%#############%] [%# PRODUCT #%] [%#############%] -
    - -
    @@ -360,11 +376,11 @@ [% 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) %] + [% IF user.id || bug.cc.size %] + + [% END %]
    [% extra_field_item.header FILTER none %][% extra_field_item.data FILTER none %]
    -
    - (YYYY-MM-DD) + [% INCLUDE bug/field.html.tmpl + field = bug_fields.deadline, value = bug.deadline, no_tds = 1 + editable = bug.check_can_change_field('deadline', 0, 1) %]
    +
    @@ -1086,13 +1106,19 @@ [%# For logged-out users %] [% ELSE %] -
    Status: - [% PROCESS bug/knob.html.tmpl %]
    - Note - You need to - log in - before you can comment on or make changes to this [% terms.bug %]. -
    + + + + +
    +
    + Note + You need to + log in + before you can comment on or make changes to this [% terms.bug %]. +
    +
    [% END %] [% END %] @@ -1157,9 +1183,6 @@

    - [% IF bug.user.canmove %] - - [% END %]
    [% 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 + # Max Kanat-Alexander + #%] + +[%# 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. + +

    You should normally use this field to refer to $terms.bugs in + other installations. For $terms.bugs in this + installation, it is better to use the $vars.field_descs.dependson and + $vars.field_descs.blocked fields.

    ", + +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 %] + Note: 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 + #%] + +[%# 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 . + # 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 %] + ' IF editable %] + 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 # Max Kanat-Alexander # Elliotte Martin + # Guy Pyrzak + # Reed Loden #%] [%# 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 %] - - [% IF editable %] - ' IF editable %] - -[% END %] - -[% IF NOT no_tds %] - + [% PROCESS "bug/field-label.html.tmpl" %] + [% END %] [% Hook.process('start_field_column') %] [% IF editable %] @@ -77,11 +61,13 @@ + maxlength="[% constants.MAX_FREETEXT_LENGTH FILTER none %]" + [% ' aria-required="true"' IF field.is_mandatory %]> [% CASE constants.FIELD_TYPE_DATETIME %] -
    +
    [% 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 %]