Commit e596da03 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 357534: Add fieldsets in show_bug.cgi - Patch by Frédéric Buclin…

Bug 357534: Add fieldsets in show_bug.cgi - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
parent a41782ed
......@@ -19,6 +19,7 @@
# Contributor(s): Gervase Markham <gerv@gerv.net>
# Vaskin Kissoyan <vkissoyan@yahoo.com>
# Max Kanat-Alexander <mkanat@bugzilla.org>
# Frédéric Buclin <LpSolit@gmail.com>
#%]
[% PROCESS global/variables.none.tmpl %]
......@@ -135,320 +136,146 @@
<input type="hidden" name="longdesclength" value="[% bug.longdescs.size %]">
<input type="hidden" name="id" value="[% bug.bug_id %]">
[%# *** Hardware Reporter Product OS AddCC *** %]
[%# That's the main table, which contains all editable fields. %]
<table>
<tr>
<td valign="top">
<table cellspacing="1" cellpadding="1">
<tr>
<td align="right">
[% IF Param('useclassification') && bug.classification_id != 1 %]
<b>[[% bug.classification FILTER html %]]</b>
[% END %]
<b>[% terms.Bug %]#</b>:
</td>
<td>
<a href="[% Param('urlbase') %]show_bug.cgi?id=[% bug.bug_id %]">
[% bug.bug_id %]</a>
</td>
</tr>
[% IF Param("usebugaliases") %]
<td valign="top" rowspan="2">
<fieldset>
<legend>Details</legend>
<table>
[%# *** Summary *** %]
<tr>
<td align="right">
<label for="alias" title="a name for the [% terms.bug %] that can be used in place of its ID number, f.e. when adding it to a list of dependencies"><b>Alias</b></label>:
<label for="short_desc" accesskey="s"><b><u>S</u>ummary</b></label>:
</td>
[% PROCESS input inputname => "alias" size => "20" maxlength => "20" %]
[% PROCESS input inputname => "short_desc" size => "60" colspan => 2
maxlength => 255 %]
</tr>
[% END %]
<tr>
<td align="right">
<label for="product" accesskey="p"><b><u>P</u>roduct</b></label>:
</td>
[% PROCESS select selname => "product" %]
</tr>
[%# *** Component Version CC Priority Severity AssignedTo Milestone *** %]
<tr>
<td align="right">
<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" %]
</tr>
<tr>
<td align="right">
<b><a href="page.cgi?id=fields.html#status">Status</a></b>:
</td>
<td>[% status_descs.${bug.bug_status} FILTER html %]</td>
</tr>
<tr>
<td align="right">
<b><a href="page.cgi?id=fields.html#resolution">Resolution</a></b>:
</td>
<td>
[% 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 %]
</td>
</tr>
</table>
</td>
<td valign="top">
<table cellspacing="1" cellpadding="1">
<tr>
<td align="right">
<label for="rep_platform" accesskey="h"><b><u>H</u>ardware</b></label>:
</td>
[% PROCESS select selname => "rep_platform" %]
</tr>
<tr>
<td align="right">
<label for="op_sys" accesskey="o"><b><u>O</u>S</b></label>:
</td>
[% PROCESS select selname => "op_sys" %]
</tr>
<tr>
<td align="right">
<label for="version"><b>Version</b></label>:
</td>
[% PROCESS select selname => "version" %]
</tr>
<tr>
<td align="right">
<label for="priority" accesskey="i"><b><a href="page.cgi?id=fields.html#priority">Pr<u>i</u>ority</a></b></label>:
</td>
[% PROCESS select selname => "priority" %]
</tr>
<tr>
<td align="right">
<label for="bug_severity"><b><a href="page.cgi?id=fields.html#bug_severity">Severity</a></b></label>:
</td>
[% PROCESS select selname = "bug_severity" %]
</tr>
[% IF Param("usetargetmilestone") && bug.target_milestone %]
<tr>
<td align="right">
<label for="target_milestone"><b>
[% IF bug.milestoneurl %]
<a href="[% bug.milestoneurl FILTER html %]">
[% END %]
Target Milestone[% "</a>" IF bug.milestoneurl %]
[%%]</b></label>:
<td colspan="3">
<table>
<tr>
[%# *** ID, product, component, status and resolution *** %]
<td valign="top">[% PROCESS section_details1 %]</td>
[%# *** Platform, OS, severity, priority, version and milestone *** %]
<td valign="top">[% PROCESS section_details2 %]</td>
</tr>
</table>
</td>
[% PROCESS select selname = "target_milestone" %]
</tr>
[% END %]
</table>
</td>
<tr>
<td colspan="3"><hr size="1"></td>
</tr>
<td valign="top">
<table cellpadding="1" cellspacing="1">
<tr>
<td align="right">
<b>Reporter</b>:
</td>
<td>
<a href="mailto:[% bug.reporter.email FILTER html %]">
[% bug.reporter.identity FILTER html %]</a>
</td>
</tr>
<tr>
<td align="right">
<b><a href="page.cgi?id=fields.html#assigned_to">Assigned&nbsp;To</a></b>:
</td>
<td>
<a href="mailto:[% bug.assigned_to.email FILTER html %]">
[% bug.assigned_to.identity FILTER html %]</a>
</td>
</tr>
[% IF Param('useqacontact') %]
<tr>
<td align="right">
<label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>:
</td>
<td colspan="7">
[% IF bug.check_can_change_field("qa_contact", 0, 1) || !user.id %]
[% INCLUDE global/userselect.html.tmpl
id => "qa_contact"
name => "qa_contact"
value => bug.qa_contact.login
size => 30
emptyok => 1
%]
[% ELSE %]
<input type="hidden" name="qa_contact"
value="[% bug.qa_contact.login FILTER html %]">
<a href="mailto:[% bug.qa_contact.email FILTER html %]">
[% IF bug.qa_contact.login && bug.qa_contact.login.length > 30 %]
<span title="[% bug.qa_contact.login FILTER html %]">
[% bug.qa_contact.identity FILTER truncate(30) FILTER html %]
</span>
[%# *** URL Whiteboard Keywords *** %]
<tr>
<td align="right">
<label for="bug_file_loc" accesskey="u"><b>
[% IF bug.bug_file_loc
AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
<a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a>
[% ELSE %]
[% bug.qa_contact.identity FILTER html %]
<u>U</u>RL
[% END %]
</a>
[% END %]
</td>
</tr>
[% END %]
<tr>
<td align="right" valign="top">
<label for="newcc" accesskey="a"><b><u>A</u>dd&nbsp;CC</b></label>:
</td>
<td>
[% INCLUDE global/userselect.html.tmpl
id => "newcc"
name => "newcc"
value => ""
size => 30
multiple => 5
%]
</td>
</tr>
<tr>
[% IF bug.cc %]
<td align="right" valign="top">
<label for="cc"><b>CC</b></label>:
</td>
<td valign="top">
<select id="cc" name="cc" multiple="multiple" size="5">
[% FOREACH c = bug.cc %]
<option value="[% c FILTER html %]">[% c FILTER html %]</option>
[% END %]
</select>
<br>
<input type="checkbox" id="removecc" name="removecc">
[%%]<label for="removecc">Remove selected CCs</label>
<br>
[%%]</b></label>:
</td>
[% ELSE %]
<td colspan="2"><input type="hidden" name="cc" value=""></td>
[% PROCESS input inputname => "bug_file_loc" size => "60" colspan => 2 %]
</tr>
[% IF Param('usestatuswhiteboard') %]
<tr>
<td align="right">
<label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>:
</td>
[% PROCESS input inputname => "status_whiteboard" size => "60" colspan => 2 %]
</tr>
[% END %]
</tr>
</table>
</td>
</tr>
[% IF use_keywords %]
<tr>
<td align="right">
<label for="keywords" accesskey="k">
<b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
</td>
[% PROCESS input inputname => "keywords" size => 60 colspan => 2
value => bug.keywords.join(', ') %]
</tr>
[% END %]
<tr>
<td colspan="2">
<table cellspacing="1" cellpadding="1">
[%# *** Custom Fields *** %]
[% USE Bugzilla %]
[% fields = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %]
[% IF fields %]
[% FOREACH field = fields %]
<tr>
[% PROCESS bug/field.html.tmpl value=bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1) || !user.id
value_span = 2 %]
</tr>
[% END %]
[% END %]
[%# *** URL Requests Summary Whiteboard Keywords *** %]
<tr>
<td align="right">
<label for="short_desc" accesskey="s"><b><u>S</u>ummary</b></label>:
</td>
[% PROCESS input inputname => "short_desc" size => "60" colspan => 2
maxlength => 255 %]
</tr>
<tr>
<td align="right">
<label for="bug_file_loc" accesskey="u"><b>
[% IF bug.bug_file_loc
AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
<a href="[% bug.bug_file_loc FILTER html %]"><u>U</u>RL</a>
[% ELSE %]
<u>U</u>RL
[% END %]
[%%]</b></label>:
</td>
[% PROCESS input inputname => "bug_file_loc" size => "60" colspan => 2 %]
</tr>
[%# *** Dependencies *** %]
[% IF Param('usestatuswhiteboard') %]
<tr>
<td align="right">
<label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>:
</td>
[% PROCESS input inputname => "status_whiteboard" size => "60"
colspan => 2 %]
[% PROCESS dependencies
dep = { title => "Depends&nbsp;on", fieldname => "dependson" } %]
</tr>
[% END %]
[% IF use_keywords %]
<tr>
<td align="right">
<label for="keywords" accesskey="k"><b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
[% PROCESS input inputname => "keywords" size => 60 colspan => 2
value => bug.keywords.join(', ') %]
[% PROCESS dependencies accesskey = "b"
dep = { title => "<u>B</u>locks", fieldname => "blocked" } %]
</tr>
[% END %]
[%# *** Custom Fields *** %]
[% USE Bugzilla %]
[% fields = Bugzilla.get_fields({ obsolete => 0, custom => 1 }) %]
[% IF fields %]
[% FOREACH field = fields %]
<tr>
[% PROCESS bug/field.html.tmpl value=bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1) || !user.id
value_span = 2 %]
</tr>
[% END %]
[% END %]
<tr>
[% PROCESS dependencies
dep = { title => "Depends on", fieldname => "dependson" } %]
</tr>
<tr>
[% PROCESS dependencies accesskey = "b"
dep = { title => "<u>B</u>locks", fieldname => "blocked" } %]
</tr>
<tr>
<th>&nbsp;</th>
<tr>
<th>&nbsp;</th>
<td colspan="2">
<a href="showdependencytree.cgi?id=[% bug.bug_id %]&amp;hide_resolved=1">Show
dependency tree</a>
<td colspan="2">
<a href="showdependencytree.cgi?id=[% bug.bug_id %]&amp;hide_resolved=1">Show
dependency tree</a>
[% IF Param('webdotbase') %]
- <a href="showdependencygraph.cgi?id=[% bug.bug_id %]">Show
dependency graph</a>
[% END %]
</td>
</tr>
</table>
</fieldset>
</td>
[% IF Param('webdotbase') %]
- <a href="showdependencygraph.cgi?id=[% bug.bug_id %]">Show
dependency graph</a>
[% END %]
</td>
</tr>
</table>
[%# *** Reporter, owner and QA contact *** %]
<td valign="top">
<fieldset>
<legend>People</legend>
[% PROCESS section_people %]
</fieldset>
</td>
</tr>
<tr>
[%# *** Flags *** %]
<td valign="top">
<table cellspacing="1" cellpadding="1">
<tr>
<td colspan="2" valign="top">
<fieldset>
<legend>Flags</legend>
<table cellspacing="1" cellpadding="1">
<tr>
<td colspan="2" valign="top">
[% IF bug.flag_types.size > 0 %]
[% PROCESS "flag/list.html.tmpl"
flag_types = bug.flag_types
any_flags_requesteeble = bug.any_flags_requesteeble %]
[% PROCESS "flag/list.html.tmpl" flag_no_header = 1
flag_types = bug.flag_types
any_flags_requesteeble = bug.any_flags_requesteeble %]
[% END %]
</td>
</tr>
</table>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
......@@ -685,6 +512,221 @@
</form>
[%############################################################################%]
[%# Block for the first table in the "Details" section #%]
[%############################################################################%]
[% BLOCK section_details1 %]
<table cellspacing="1" cellpadding="1">
<tr>
<td align="right">
[% IF Param('useclassification') && bug.classification_id != 1 %]
<b>[[% bug.classification FILTER html %]]</b>
[% END %]
<b>[% terms.Bug %]#</b>:
</td>
<td>
<a href="[% Param('urlbase') %]show_bug.cgi?id=[% bug.bug_id %]">
[% bug.bug_id %]</a>
</td>
</tr>
[% IF Param("usebugaliases") %]
<tr>
<td align="right">
<label for="alias" title="a name for the [% terms.bug %] that can be used in place of its ID number, f.e. when adding it to a list of dependencies"><b>Alias</b></label>:
</td>
[% PROCESS input inputname => "alias" size => "20" maxlength => "20" %]
</tr>
[% END %]
<tr>
<td align="right">
<label for="product" accesskey="p"><b><u>P</u>roduct</b></label>:
</td>
[% PROCESS select selname => "product" %]
</tr>
<tr>
<td align="right">
<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" %]
</tr>
<tr>
<td align="right">
<b><a href="page.cgi?id=fields.html#status">Status</a></b>:
</td>
<td>[% status_descs.${bug.bug_status} FILTER html %]</td>
</tr>
<tr>
<td align="right">
<b><a href="page.cgi?id=fields.html#resolution">Resolution</a></b>:
</td>
<td>
[% 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 %]
</td>
</tr>
</table>
[% END %]
[%############################################################################%]
[%# Block for the second table in the "Details" section #%]
[%############################################################################%]
[% BLOCK section_details2 %]
<table cellspacing="1" cellpadding="1">
<tr>
<td align="right">
<label for="rep_platform" accesskey="h"><b><u>H</u>ardware</b></label>:
</td>
[% PROCESS select selname => "rep_platform" %]
</tr>
<tr>
<td align="right">
<label for="op_sys" accesskey="o"><b><u>O</u>S</b></label>:
</td>
[% PROCESS select selname => "op_sys" %]
</tr>
<tr>
<td align="right">
<label for="version"><b>Version</b></label>:
</td>
[% PROCESS select selname => "version" %]
</tr>
<tr>
<td align="right">
<label for="priority" accesskey="i"><b><a href="page.cgi?id=fields.html#priority">Pr<u>i</u>ority</a></b></label>:
</td>
[% PROCESS select selname => "priority" %]
</tr>
<tr>
<td align="right">
<label for="bug_severity"><b><a href="page.cgi?id=fields.html#bug_severity">Severity</a></b></label>:
</td>
[% PROCESS select selname = "bug_severity" %]
</tr>
[% IF Param("usetargetmilestone") && bug.target_milestone %]
<tr>
<td align="right">
<label for="target_milestone"><b>
[% IF bug.milestoneurl %]
<a href="[% bug.milestoneurl FILTER html %]">
[% END %]
Target Milestone[% "</a>" IF bug.milestoneurl %]
[%%]</b></label>:
</td>
[% PROCESS select selname = "target_milestone" %]
</tr>
[% END %]
</table>
[% END %]
[%############################################################################%]
[%# Block for the table in the "People" section #%]
[%############################################################################%]
[% BLOCK section_people %]
<table cellpadding="1" cellspacing="1">
<tr>
<td align="right">
<b>Reporter</b>:
</td>
<td>
<a href="mailto:[% bug.reporter.email FILTER html %]">
[% bug.reporter.identity FILTER html %]</a>
</td>
</tr>
<tr>
<td align="right">
<b><a href="page.cgi?id=fields.html#assigned_to">Assigned&nbsp;To</a></b>:
</td>
<td>
<a href="mailto:[% bug.assigned_to.email FILTER html %]">
[% bug.assigned_to.identity FILTER html %]</a>
</td>
</tr>
[% IF Param('useqacontact') %]
<tr>
<td align="right">
<label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>:
</td>
<td colspan="7">
[% IF bug.check_can_change_field("qa_contact", 0, 1) || !user.id %]
[% INCLUDE global/userselect.html.tmpl
id => "qa_contact"
name => "qa_contact"
value => bug.qa_contact.login
size => 30
emptyok => 1
%]
[% ELSE %]
<input type="hidden" name="qa_contact"
value="[% bug.qa_contact.login FILTER html %]">
<a href="mailto:[% bug.qa_contact.email FILTER html %]">
[% IF bug.qa_contact.login && bug.qa_contact.login.length > 30 %]
<span title="[% bug.qa_contact.login FILTER html %]">
[% bug.qa_contact.identity FILTER truncate(30) FILTER html %]
</span>
[% ELSE %]
[% bug.qa_contact.identity FILTER html %]
[% END %]
</a>
[% END %]
</td>
</tr>
[% END %]
<tr>
<td align="right" valign="top">
<label for="newcc" accesskey="a"><b><u>A</u>dd&nbsp;CC</b></label>:
</td>
<td>
[% INCLUDE global/userselect.html.tmpl
id => "newcc"
name => "newcc"
value => ""
size => 30
multiple => 5
%]
</td>
</tr>
<tr>
[% IF bug.cc %]
<td align="right" valign="top">
<label for="cc"><b>CC</b></label>:
</td>
<td valign="top">
<select id="cc" name="cc" multiple="multiple" size="5">
[% FOREACH c = bug.cc %]
<option value="[% c FILTER html %]">[% c FILTER html %]</option>
[% END %]
</select>
<br>
<input type="checkbox" id="removecc" name="removecc">
[%%]<label for="removecc">Remove selected CCs</label>
<br>
</td>
[% ELSE %]
<td colspan="2"><input type="hidden" name="cc" value=""></td>
[% END %]
</tr>
</table>
[% END %]
[%############################################################################%]
[%# Block for dependencies #%]
[%############################################################################%]
......
......@@ -75,16 +75,18 @@
[% DEFAULT flag_table_id = "flags" %]
<table id="[% flag_table_id FILTER html %]">
<tr>
<th colspan="3">
Flags:
</th>
[% IF any_flags_requesteeble %]
<th>
Requestee:
[% UNLESS flag_no_header %]
<tr>
<th colspan="3">
Flags:
</th>
[% END %]
</tr>
[% IF any_flags_requesteeble %]
<th>
Requestee:
</th>
[% END %]
</tr>
[% END %]
[%# Step 1: Display every flag type (except inactive types with no flags). %]
[% FOREACH type = flag_types %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment