From 997030e295661b4e18f29cef9832af98cc2a4038 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Wed, 10 Oct 2007 15:06:52 +0000 Subject: Bug 57842: On enter_bug.cgi, show component description when it is selected - Patch by Frédéric Buclin r/a=mkanat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/bug/create/create.html.tmpl | 238 ++++++++++++------------ 1 file changed, 124 insertions(+), 114 deletions(-) (limited to 'template/en') diff --git a/template/en/default/bug/create/create.html.tmpl b/template/en/default/bug/create/create.html.tmpl index fa6b7b020..cfbd2a819 100644 --- a/template/en/default/bug/create/create.html.tmpl +++ b/template/en/default/bug/create/create.html.tmpl @@ -21,6 +21,7 @@ # Marc Schumann # Akamai Technologies # Max Kanat-Alexander + # Frédéric Buclin #%] [% PROCESS "global/field-descs.none.tmpl" %] @@ -40,6 +41,7 @@ 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 comp_desc = new Array([% product.components.size %]); var flags = new Array([% product.components.size %]); [% IF Param("useqacontact") %] var initialqacontacts = new Array([% product.components.size %]); @@ -48,6 +50,7 @@ var flags = new Array([% product.components.size %]); [% count = 0 %] [%- FOREACH c = product.components %] components[[% count %]] = "[% c.name FILTER js %]"; + comp_desc[[% count %]] = "[% c.description FILTER html_light FILTER js %]"; initialowners[[% count %]] = "[% c.default_assignee.login FILTER js %]"; [% flag_list = [] %] [% FOREACH f = c.flag_types.bug %] @@ -101,6 +104,7 @@ function set_assign_to() { } document.getElementById('initial_cc').innerHTML = initialccs[index]; + document.getElementById('comp_desc').innerHTML = comp_desc[index]; [% IF Param("useqacontact") %] var contact = initialqacontacts[index]; @@ -160,11 +164,10 @@ function handleWantsAttachment(wants_attachment) { - - +
+ - - - - + - - + + - - + + [%# We can't use the select block in these two cases for various reasons. %] - - - - + - - - - + + + + [% sel = { description => 'Severity', name => 'bug_severity' } %] [% INCLUDE select %] + + [% sel = { description => 'Platform', name => 'rep_platform' } %] [% INCLUDE select %] + [% sel = { description => 'OS', name => 'op_sys' } %] + [% INCLUDE select %] + + + + + + [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] + [% sel = { description => 'Target Milestone', name => 'target_milestone' } %] + [% INCLUDE select %] + [% ELSE %] + + [% END %] + [% IF Param('letsubmitterchoosepriority') %] [% sel = { description => 'Priority', name => 'priority' } %] [% INCLUDE select %] @@ -240,41 +264,52 @@ function handleWantsAttachment(wants_attachment) { [% END %] - - [% sel = { description => 'OS', name => 'op_sys' } %] - [% INCLUDE select %] + - [% IF Param('usetargetmilestone') && Param('letsubmitterchoosemilestone') %] +[% IF !Param('defaultplatform') || !Param('defaultopsys') %] + - [% sel = { description => 'Target Milestone', name => 'target_milestone' } %] - [% INCLUDE select %] - + + - [% END %] + +[% END %] + - - + [% IF bug_status.size <= 1 %] - - + + [% ELSE %] [% sel = { description => 'Initial State', name => 'bug_status' } %] [% INCLUDE select %] [% END %] + [%# Calculate the number of rows we can use for flags %] [% num_rows = 6 + (Param("useqacontact") ? 1 : 0) + (user.in_group(Param('timetrackinggroup')) ? 3 : 0) + (Param("usebugaliases") ? 1 : 0) %] - - + - + - + - +
  + [%# Migration note: The following file corresponds to the old Param # 'entryheaderhtml' #%] @@ -173,39 +176,23 @@ function handleWantsAttachment(wants_attachment) {
   
Reporter:[% user.login FILTER html %]Product:[% product.name FILTER html %]Product:[% product.name FILTER html %]Reporter:[% user.login FILTER html %]
- Version: - - - - - - Component: - - + + Component: +
   + [%# Enclose the fieldset in a nested table so that its width changes based + # on the length on the component description. %] + + + + +
+
+ Component Description +
Select a component to read its description.
+
+
+
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, if we got it wrong, email [% Param('maintainer') %]. +
   
Initial State:[% get_status(default.bug_status) FILTER html %]Initial State:[% get_status(default.bug_status) FILTER html %]  + + [% IF product.flag_types.bug.size > 0 %] [% PROCESS "flag/list.html.tmpl" flag_types = product.flag_types.bug any_flags_requesteeble = 1 @@ -285,11 +320,7 @@ function handleWantsAttachment(wants_attachment) {
- - Assign To: - - Assign To: [% INCLUDE global/userselect.html.tmpl name => "assigned_to" @@ -304,7 +335,7 @@ function handleWantsAttachment(wants_attachment) { [% IF Param("useqacontact") %]
QA Contact:QA Contact: [% INCLUDE global/userselect.html.tmpl name => "qa_contact" @@ -319,7 +350,7 @@ function handleWantsAttachment(wants_attachment) { [% END %]
Cc:CC: [% INCLUDE global/userselect.html.tmpl name => "cc" @@ -332,7 +363,7 @@ function handleWantsAttachment(wants_attachment) {
Default CC:Default CC: