From 46381d01b6e3e1b0143c3fe06224a86b9960d67f Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 28 Jan 2008 01:21:11 +0000 Subject: Bug 374020: Re-work the bug editing form to be more usable. Patch By Guy Pyrzak r=mkanat, a=mkanat --- template/en/default/attachment/created.html.tmpl | 2 +- template/en/default/bug/create/created.html.tmpl | 6 +- template/en/default/bug/edit.html.tmpl | 1218 +++++++++++++--------- template/en/default/bug/navigate.html.tmpl | 15 + template/en/default/bug/process/header.html.tmpl | 2 +- template/en/default/bug/show.html.tmpl | 6 +- 6 files changed, 753 insertions(+), 496 deletions(-) (limited to 'template') diff --git a/template/en/default/attachment/created.html.tmpl b/template/en/default/attachment/created.html.tmpl index 5522380ac..d0358dac3 100644 --- a/template/en/default/attachment/created.html.tmpl +++ b/template/en/default/attachment/created.html.tmpl @@ -30,7 +30,7 @@ title = "Attachment $attachment.id added to $terms.Bug $attachment.bug_id" javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js", "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ] - style_urls = [ "skins/standard/yui/calendar.css" ] + style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ] doc_section = "bug_page.html" %] diff --git a/template/en/default/bug/create/created.html.tmpl b/template/en/default/bug/create/created.html.tmpl index 1a88c98ab..c4ec8dd0a 100644 --- a/template/en/default/bug/create/created.html.tmpl +++ b/template/en/default/bug/create/created.html.tmpl @@ -36,7 +36,11 @@ [% PROCESS global/header.html.tmpl title = "$terms.Bug $id Submitted" - javascript_urls = [ "js/util.js", "js/keyword-chooser.js" ] + javascript_urls = [ "js/util.js", "js/keyword-chooser.js", "js/field.js", + "js/yui/yahoo-dom-event.js", "js/yui/calendar.js" ] + style_urls = [ "skins/standard/yui/calendar.css", "skins/standard/show_bug.css" ] + + %] [% header_done = 1 %] diff --git a/template/en/default/bug/edit.html.tmpl b/template/en/default/bug/edit.html.tmpl index c37f93838..1a99a061a 100644 --- a/template/en/default/bug/edit.html.tmpl +++ b/template/en/default/bug/edit.html.tmpl @@ -30,7 +30,7 @@ - - - [%# *** Reporter, owner and QA contact *** %] -
- People + [%# 1st Column %] + + + [%# *** ID, product, component, status, resolution, Hardware, and OS *** %] + [% PROCESS section_details1 %] + + [% PROCESS section_spacer %] + + [%# *** severity, priority, version and milestone *** %] + [% PROCESS section_details2 %] + + [%# *** assigned to and qa contact *** %] [% PROCESS section_people %] - - - [%# *** Flags *** %] - [% show_bug_flags = 0 %] - [% FOREACH type = bug.flag_types %] - [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %] - [% show_bug_flags = 1 %] - [% LAST %] - [% END %] - [% END %] - [% IF show_bug_flags %] -
- Flags -
- - - -
- [% IF user.id %] - [% IF bug.flag_types.size > 0 %] - [% PROCESS "flag/list.html.tmpl" flag_no_header = 1 - flag_types = bug.flag_types - any_flags_requesteeble = bug.any_flags_requesteeble %] - [% END %] - [% ELSE %] - [% FOREACH type = bug.flag_types %] - [% FOREACH flag = type.flags %] - [% flag.setter.nick FILTER html %]: - [%+ type.name FILTER html FILTER no_break %][% flag.status %] - [%+ IF flag.requestee %] - ([% flag.requestee.nick FILTER html %]) - [% END %]
- [% END %] - [% END %] - [% END %] -
-
- [% END %] + + [% PROCESS section_spacer %] + + [% PROCESS section_url_keyword_whiteboard %] + + [% PROCESS section_spacer %] + + [%# *** Dependencies *** %] + [% PROCESS section_dependson_blocks %] + + + + +
 
+ + [%# 2nd Column %] + + + [%# *** Reported and modified dates *** %] + [% PROCESS section_dates %] + + [% PROCESS section_cclist %] + + [% PROCESS section_spacer %] + + [% PROCESS section_customfields %] + + [% PROCESS section_spacer %] + + [% PROCESS section_flags %] + +
+ + + + +
+ + [% PROCESS section_restrict_visibility %] [% IF user.in_group(Param('timetrackinggroup')) %]
- - - - - - - - - - - - - - - - - - - - - - -
- - - Current Est. - - - - - - %Complete - - Gain - - -
- - - [% PROCESS formattimeunit - time_unit=(bug.actual_time + bug.remaining_time) %] - - [% PROCESS formattimeunit time_unit=bug.actual_time %] + - - - - - [% PROCESS calculatepercentage act=bug.actual_time - rem=bug.remaining_time %] - - [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %] - -
- (YYYY-MM-DD) -
- - Summarize time (including time for [% terms.bugs %] - blocking this [% terms.bug %]) -
+ [% PROCESS section_timetracking %] [% END %] + [%# *** Attachments *** %] @@ -444,124 +267,19 @@

[% END %] - - - -
- Related actions - - - [% IF bug.use_votes %] -
- Votes: [% bug.votes %] - - [% END %] - - [%# Links to more things users can do with this bug. %] - [% Hook.process("links") %] -
+ [%# *** Additional Comments *** %] +
+
+ [% PROCESS bug/comments.html.tmpl + comments = bug.longdescs + mode = user.id ? "edit" : "show" + %] +
+ -
- - [% IF bug.groups.size > 0 %] - [% inallgroups = 1 %] - [% inagroup = 0 %] - [% FOREACH group = bug.groups %] - [% SET inallgroups = 0 IF NOT group.ingroup %] - [% SET inagroup = 1 IF group.ison %] - - [% IF NOT group.mandatory %] - [% IF NOT emitted_description %] - [% emitted_description = 1 %] -
- Only users in all of the selected groups can view this [% terms.bug %]: -
- - (Unchecking all boxes makes this a more public [% terms.bug %].) - -
-
- [% END %] - -      - [% IF group.ingroup %] - - [% END %] - - -
- [% END %] - [% END %] - - [% IF NOT inallgroups %] - - Only members of a group can change the visibility of [% terms.abug %] for - that group - -
- [% END %] - - [% IF inagroup %] -

- Users in the roles selected below can always view this [% terms.bug %]: -
- - (The assignee - [% IF (Param('useqacontact')) %] - and QA contact - [% END %] - can always see [% terms.abug %], and this section does not take effect unless - the [% terms.bug %] is restricted to at least one group.) - -

- -

- - - - - - -

- [% END %] - [% END %] - [% PROCESS bug/knob.html.tmpl IF user.id %] - -[%# *** Additional Comments *** %] - -
- -
-[% PROCESS bug/comments.html.tmpl - comments = bug.longdescs - mode = user.id ? "edit" : "show" - %] -
- [% IF use_keywords %] @@ -571,66 +289,117 @@ [% END %] [%############################################################################%] -[%# Block for the first table in the "Details" section #%] +[%# Block for the Title (alias and short desc) #%] [%############################################################################%] -[% BLOCK section_details1 %] - - - - - + [% END %] + [% bug.short_desc FILTER html %] + [% IF bug.check_can_change_field('short_desc', 0, 1) || + bug.check_can_change_field('alias', 0, 1) %] + (edit) + [% END %] + + + + + + [% IF Param("usebugaliases") %] + [% IF bug.check_can_change_field('alias', 0, 1) %] + :  + [% ELSIF bug.alias %] + ( + [% END %] + [% PROCESS input inputname => "alias" + size => "20" + maxlength => "20" + no_td => 1 + %][% ") " IF NOT bug.check_can_change_field('alias', 0, 1) + && bug.alias %] + [% END %] + [%# *** Summary *** %] + [% IF bug.check_can_change_field('alias', 0, 1) %] + :  + [% END %] + [% PROCESS input inputname => "short_desc" size => "60" colspan => 2 + maxlength => 255 spellcheck => "true" no_td => 1 %] + + + + +[% END %] - [% IF Param("usebugaliases") %] - - - [% PROCESS input inputname => "alias" size => "20" maxlength => "20" %] - - [% END %] +[%############################################################################%] +[%# Block for the first table in the "Details" section #%] +[%############################################################################%] + +[% BLOCK section_details1 %] + [%#############%] + [%# PRODUCT #%] + [%#############%] - [% PROCESS select selname => "product" %] - + [%###############%] + [%# Component #%] + [%###############%] - [% PROCESS select selname => "component" %] - - - - + [% PROCESS select selname => "version" %] + + [%############%] + [%# PLATFORM #%] + [%############%] - -
- [% IF Param('useclassification') && bug.classification_id != 1 %] - [[% bug.classification FILTER html %]] +[% BLOCK section_title %] + [%# That's the main table, which contains all editable fields. %] +
+ + [% IF Param('useclassification') && bug.classification_id != 1 %] + [[% bug.classification FILTER html %]] + [% END %] + + [% terms.Bug %] [% bug.bug_id FILTER html %] + - + + [% IF Param("usebugaliases") %] + [% IF bug.alias != "" %] + ([% bug.alias FILTER html %]) [% END %] - [% terms.Bug %]#: -
- - [% bug.bug_id %] -
- : -
+ :
- : + + :
- Status: + + : [% get_status(bug.bug_status) FILTER html %]
- Resolution: + + : - [% get_resolution(bug.resolution) FILTER html %] - [% IF bug.resolution == "DUPLICATE" %] - of [% terms.bug %] [%+ "${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] - [% END %] + [% PROCESS select selname => "rep_platform" no_td=> 1 %] + [%+ PROCESS select selname => "op_sys" no_td=> 1 %]
+ + + [% END %] [%############################################################################%] @@ -638,56 +407,68 @@ [%############################################################################%] [% BLOCK section_details2 %] - - - - [% PROCESS select selname => "rep_platform" %] - +[%############%] +[%# STATUS #%] +[%############%] - - [% PROCESS select selname => "op_sys" %] - + - - [% PROCESS select selname => "version" %] - + [%###############################################################%] + [%# Importance (priority, severity and votes) #%] + [%###############################################################%] - - [% PROCESS select selname => "priority" %] - - - - - [% PROCESS select selname = "bug_severity" %] [% IF Param("usetargetmilestone") && bug.target_milestone %] - [% PROCESS select selname = "target_milestone" %] [% END %] -
- : -
- : + + Status:
-
- : + [% get_status(bug.bug_status) FILTER html %]   + [% get_resolution(bug.resolution) FILTER html %] + + [% IF bug.resolution == "DUPLICATE" %] + of [% terms.bug %] [%+ "${bug.dup_id}" FILTER bug_link(bug.dup_id) FILTER none %] + [% END %] +
- : + + :
- : + + + + [% PROCESS select selname => "priority" %] + [% PROCESS select selname = "bug_severity" %] + [% IF bug.use_votes %] + + [% END %] + +
+ [% IF bug.votes %] + with + + [% bug.votes %] vote[%IF bug.votes > 1 %]s[% END %] + . + [% END %] + (vote) +
+ :
+ [% END %] [%############################################################################%] @@ -695,31 +476,37 @@ [%############################################################################%] [% BLOCK section_people %] - - - - - - - [% END %] + +[% END %] - [% IF user.id %] - - - - +[% BLOCK section_url_keyword_whiteboard %] +[%# *** URL Whiteboard Keywords *** %] + + + + + + [% IF Param('usestatuswhiteboard') %] + + + [% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %] + + [% END %] + + [% IF use_keywords %] + + + [% PROCESS input inputname => "keywords" size => 40 colspan => 2 + value => bug.keywords.join(', ') + onfocus => "this.chooser.open()" %] + + [% END %] +[% END %] + +[% BLOCK section_dependson_blocks %] + + [% PROCESS dependencies + dep = { title => "Depends on", fieldname => "dependson" } %] + + + + [% PROCESS dependencies accesskey = "b" + dep = { title => "Blocks", fieldname => "blocked" } %] + + + + + + +[% END %] + + +[%############################################################################%] +[%# Block for Restricting Visibility #%] +[%############################################################################%] + +[% BLOCK section_restrict_visibility %] + [% IF bug.groups.size > 0 %] +
- Reporter: - - [% INCLUDE user_identity user => bug.reporter %] -
- Assignee: + + Assigned To: [% IF bug.check_can_change_field("assigned_to", 0, 1) %] - [% INCLUDE global/userselect.html.tmpl - id => "assigned_to" - name => "assigned_to" - value => bug.assigned_to.login - size => 30 - %] -
- - +
+ + [% INCLUDE user_identity user=> bug.assigned_to %] + (edit) + +
+
+ [% INCLUDE global/userselect.html.tmpl + id => "assigned_to" + name => "assigned_to" + value => bug.assigned_to.login + size => 30 + %] +
+ + +
+ [% ELSE %] @@ -730,21 +517,42 @@ [% IF Param('useqacontact') %]
+ : + [% IF bug.check_can_change_field("qa_contact", 0, 1) %] - [% INCLUDE global/userselect.html.tmpl - id => "qa_contact" - name => "qa_contact" - value => bug.qa_contact.login - size => 30 - emptyok => 1 - %] -
- - + [% IF bug.qa_contact != "" %] +
+ + + [% INCLUDE user_identity user=> bug.qa_contact %] + (edit) + +
+ [% END %] +
+ [% INCLUDE global/userselect.html.tmpl + id => "qa_contact" + name => "qa_contact" + value => bug.qa_contact.login + size => 30 + emptyok => 1 + %] +
+ + +
+ [% IF bug.qa_contact != "" %] + + [% END %] [% ELSE %] @@ -753,30 +561,266 @@
- : - - [% INCLUDE global/userselect.html.tmpl - id => "newcc" - name => "newcc" - value => "" - size => 30 - multiple => 5 - %] -
+ : + + [% IF bug.check_can_change_field("bug_file_loc", 0, 1) %] + + [% IF bug.bug_file_loc + AND NOT bug.bug_file_loc.match("^(javascript|data)") %] + + [% bug.bug_file_loc FILTER html%] + [% ELSE %] + [% bug.bug_file_loc FILTER html %] + [% END %] + (edit) + [% END %] + + [% 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) %] + [% url_output FILTER none %] + [% ELSE %] + [% url_output FILTER none %] + [% END %] + + [% IF bug.check_can_change_field("bug_file_loc", 0, 1) %] + + [% END %] +
+ : +
+ : +
  + Show dependency tree + + [% IF Param('webdotbase') %] + / graph + [% END %] +
+ + + + + [% IF inagroup %] + + + + [% END %] +
+ + + [% inallgroups = 1 %] + [% inagroup = 0 %] + [% FOREACH group = bug.groups %] + [% SET inallgroups = 0 IF NOT group.ingroup %] + [% SET inagroup = 1 IF group.ison %] + + [% IF NOT group.mandatory %] + [% IF NOT emitted_description %] + [% emitted_description = 1 %] +
+ Only users in all of the selected groups can view this [% terms.bug %]: +
+ + (Unchecking all boxes makes this a more public [% terms.bug %].) + +
+ [% END %] + + [% IF group.ingroup %] + + [% END %] + + +
+ [% END %] + [% END %] + + [% IF NOT inallgroups %] + + Only members of a group can change the visibility of [% terms.abug %] for + that group. + +
+ [% END %] +
+ + +
+ Users in the roles selected below can always view this [% terms.bug %]: +
+ + (The assignee + [% IF (Param('useqacontact')) %] + and QA contact + [% END %] + can always see [% terms.abug %], and this section does not take effect unless + the [% terms.bug %] is restricted to at least one group.) + +
+
+
+ + + +
+
+ + + +
+
+
+ [% END %] +[% END %] + +[%############################################################################%] +[%# Block for Dates #%] +[%############################################################################%] +[% BLOCK section_dates %] + + + Reported: + + + [% bug.creation_ts FILTER time %] by [% INCLUDE user_identity user => bug.reporter %] + + + + + + Modified: + + + [% bug.delta_ts FILTER time FILTER replace(':\d\d$', '') FILTER replace(':\d\d ', ' ')%] + ([%# terms.Bug %]History) + + + +[% END %] + +[%############################################################################%] +[%# Block for CC LIST #%] +[%############################################################################%] +[% BLOCK section_cclist %] + [% IF user.id %] - [% IF bug.cc %] - - : + + - + + [% IF user.id %] + +
+ [% END %] + [% bug.cc.size || 0 FILTER html%] total users + [% IF user.id %] + [% IF bug.cc.contains( user.email ) %] + including you ([% INCLUDE user_identity user=> user FILTER collapse %]) + [% END %] + [% END %]. + + (edit) + +
+
+
+ +
+ [% INCLUDE global/userselect.html.tmpl + id => "newcc" + name => "newcc" + value => "" + size => 30 + multiple => 5 + %] +
+ [% IF bug.cc %] + [% ELSE %] + + [% END %] +
+ + + + [% END %] +[% END %] + +[%############################################################################%] +[%# Block for FLAGS #%] +[%############################################################################%] + +[% BLOCK section_flags %] + [%# *** Flags *** %] + [% show_bug_flags = 0 %] + [% FOREACH type = bug.flag_types %] + [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %] + [% show_bug_flags = 1 %] + [% LAST %] + [% END %] + [% END %] + [% IF show_bug_flags %] + + + + + + + + + [% show_bug_flags = 0 %] + [% FOREACH type = bug.flag_types %] + [% IF (type.flags && type.flags.size > 0) || (user.id && type.is_active) %] + [% show_bug_flags = 1 %] + [% LAST %] [% END %] + [% END %] + [% IF show_bug_flags %] + + [% IF user.id %] + [% IF bug.flag_types.size > 0 %] + [% PROCESS "flag/list.html.tmpl" flag_no_header = 1 + flag_types = bug.flag_types + any_flags_requesteeble = bug.any_flags_requesteeble %] + [% END %] + [% ELSE %] + [% FOREACH type = bug.flag_types %] + [% FOREACH flag = type.flags %] + [% flag.setter.nick FILTER html %]: + [%+ type.name FILTER html FILTER no_break %][% flag.status %] + [%+ IF flag.requestee %] + ([% flag.requestee.nick FILTER html %]) + [% END %]
+ [% END %] + [% END %] + [% END %] + [% END %] + - + [% END %] [% END %] +[%############################################################################%] +[%# Block for Section Spacer #%] +[%############################################################################%] + +[% BLOCK section_customfields %] +[%# *** Custom Fields *** %] + + [% USE Bugzilla %] + [% fields = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %] + [% IF fields %] + [% FOREACH field = fields %] + + [% PROCESS bug/field.html.tmpl value=bug.${field.name} + editable = bug.check_can_change_field(field.name, 0, 1) + value_span = 2 %] + + [% END %] + [% END %] +[% END %] + +[%############################################################################%] +[%# Block for Section Spacer #%] +[%############################################################################%] + +[% BLOCK section_spacer %] + + + +[% END %] + + + + [%############################################################################%] [%# Block for dependencies #%] [%############################################################################%] [% BLOCK dependencies %] - + + : - - [% FOREACH depbug = bug.${dep.fieldname} %] - [% depbug FILTER bug_link(depbug) FILTER none %][% " " %] - [% END %] - - + + + [% IF bug.check_can_change_field(dep.fieldname, 0, 1) %] + + [% ELSE %] + + [% END %] + + + [% FOREACH depbug = bug.${dep.fieldname} %] + [% depbug FILTER bug_link(depbug) FILTER none %][% " " %] + [% END %] [% IF bug.check_can_change_field(dep.fieldname, 0, 1) %] - - [% ELSE %] - + + (edit) + + [% END %] + [% accesskey = undef %] + [% END %] +[%############################################################################%] +[%# Block for Time Tracking Group #%] +[%############################################################################%] + +[% BLOCK section_timetracking %] + + + + + + + + + + + + + + + + + + + + + + +
+ + + Current Est. + + + + + + %Complete + + Gain + + +
+ + + [% PROCESS formattimeunit + time_unit=(bug.actual_time + bug.remaining_time) %] + + [% PROCESS formattimeunit time_unit=bug.actual_time %] + + + + + + [% PROCESS calculatepercentage act=bug.actual_time + rem=bug.remaining_time %] + + [% PROCESS formattimeunit time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %] + +
+ (YYYY-MM-DD) +
+ + Summarize time (including time for [% terms.bugs %] + blocking this [% terms.bug %]) +
+[% END %] [%############################################################################%] [%# Block for SELECT fields #%] [%############################################################################%] [% BLOCK select %] + [% IF NOT no_td %] + [% END %] [% IF bug.check_can_change_field(selname, 0, 1) AND bug.choices.${selname}.size > 1 %] [% bug.${selname} FILTER html %] [% END %] + [% IF NOT no_td %] + [% END %] + [% no_td = 0 %] [% END %] [%############################################################################%] @@ -849,7 +1083,9 @@ [%############################################################################%] [% BLOCK input %] + [% IF no_td != 1 %] + [% END %] [% val = value ? value : bug.$inputname %] [% IF bug.check_can_change_field(inputname, 0, 1) %] + [% END %] + [% no_td = 0 %] [% maxlength = 0 %] [% colspan = 0 %] [% size = 0 %] @@ -883,15 +1122,16 @@ [% BLOCK user_identity %] - [% IF user.name %] - - [% ELSE %] - - [% END %] - + [% FILTER collapse %] + [% IF user.name %] + + [% ELSE %] + + [% END %] + [% END %] [% END %] + diff --git a/template/en/default/bug/navigate.html.tmpl b/template/en/default/bug/navigate.html.tmpl index b55c4a73d..7b8f3c827 100644 --- a/template/en/default/bug/navigate.html.tmpl +++ b/template/en/default/bug/navigate.html.tmpl @@ -19,6 +19,21 @@ #%] [% PROCESS global/variables.none.tmpl %] +[% IF bottom_navigator == 1 %] + +[% END %] +