Redesign bug edit form.

* Use "label \n field" instead of "label \t field".
* Use divs instead of tables for layout.
* Make page scale from 4 columns down to 2 and then to 1 using media queries.
* Reflow 4 custom field columns with JS to balance their height.
hinted-selects
Vitaliy Filippov 2014-09-19 20:16:11 +04:00
parent 9a7e557879
commit 275de4e4f5
9 changed files with 616 additions and 605 deletions

View File

@ -25,6 +25,7 @@ function initControlledFields()
{
doInit(i);
}
reflowFieldColumns();
}
function initControlledField(i)
@ -69,6 +70,10 @@ function handleControllerField_this(e, nonfirst)
{
handleControllerField_this.apply(document.getElementById(i), [ null, true ]);
}
if (!nonfirst)
{
reflowFieldColumns();
}
}
function setFieldValue(f, v)
@ -228,3 +233,43 @@ function handleControlledField(controlled_id, is_initial_editform)
}
}
}
// FIXME: Remove partially duplicated code with query-visibility.js:reflowFieldRows()
function reflowFieldColumns()
{
var cols = [];
var fields = [];
var visible = 0;
for (var i = 1, e; e = document.getElementById('bz_custom_column_'+i); i++)
{
cols.push(e);
for (var j = 0; j < e.childNodes.length; j++)
{
if (hasClass(e.childNodes[j], 'bug_field'))
{
var v = hasClass(e.childNodes[j], 'bz_hidden_field') ? 0 : 1;
fields.push([ e.childNodes[j], v ]);
visible += v;
}
}
}
var changed = false;
for (var cur_col = 0, j = 0, pushed = 0; cur_col < 4; cur_col++)
{
var per_col = Math.ceil((visible-pushed)/(4-cur_col));
var v = 0;
for (; j < fields.length; v += fields[j][1], j++)
{
if ((v + Math.ceil(fields[j][1]/2)) > per_col)
{
break;
}
if (changed || fields[j][0].parentNode != cols[cur_col])
{
cols[cur_col].appendChild(fields[j][0]);
changed = true;
}
}
pushed += v;
}
}

View File

@ -288,6 +288,12 @@ window.eventTarget = function(ev)
*/
window.addClass = function(obj, c)
{
if (obj instanceof Array)
{
for (var i = 0; i < obj.length; i++)
addClass(obj[i], c);
return;
}
if (typeof(obj) == 'string')
obj = document.getElementById(obj);
if (obj)
@ -295,6 +301,12 @@ window.addClass = function(obj, c)
};
window.removeClass = function(obj, c)
{
if (obj instanceof Array)
{
for (var i = 0; i < obj.length; i++)
removeClass(obj[i], c);
return;
}
if (typeof(obj) == 'string')
obj = document.getElementById(obj);
if (!obj)

View File

@ -79,6 +79,7 @@ body {
color: #404040;
margin: 0;
font-size: 16px; /* Base font size. NEVER hardcode absolute sizes anywhere except this place. */
-moz-text-size-adjust: none; /* Fix inconsistent font sizes in mobile Firefox */
}
body, td, th, input, select, option, optgroup, .text_input {
@ -479,7 +480,7 @@ u {
font-weight: normal;
}
table.edit_form {
.edit_form {
background: #fff;
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
@ -487,38 +488,24 @@ table.edit_form {
position: relative;
}
table.edit_form tbody {
width: 100%;
}
table.edit_form hr {
display: none;
.edit_form hr {
border-width: 0;
background: transparent;
margin: 0;
}
.field_label {
font-weight: bold !important;
color: #404040;
padding-right: 10px;
vertical-align: baseline;
white-space: nowrap;
}
.field_label a, .field_label b {
.field_label label a {
color: #404040;
font-weight: bold;
}
.field_value .text_input {
min-width: 0;
}
#product, #component {
width: 235px;
}
#bz_show_bug_column_1 tr:last-child span {
position: absolute;
left: 20px;
bottom: 20px;
.bug_field {
margin-bottom: 4px;
}
#commit_top {
@ -966,11 +953,21 @@ table.eventbox {
padding-bottom: 6px;
}
@media only screen and (max-width: 1365px) {
.bz_show_bug_column {
float: none;
width: 100%;
}
}
/* Smaller than standard 990 (devices and browsers) */
@media only screen and (max-width: 989px) {
#header .links {
float: none;
}
.flatten_table, .flatten_table > tbody, .flatten_table > tbody > tr, .flatten_table > tbody > tr > td {
display: block;
}
}
/* Tablet Portrait size to standard 990 */
@ -996,12 +993,9 @@ table.eventbox {
/* All Mobile Sizes */
@media only screen and (max-width: 767px) {
table.edit_form, table.edit_form > tbody > tr > td {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
display: block;
width: 100% !important;
.bz_show_bug_colpair {
float: none;
width: 100%;
}
#titles {
@ -1020,8 +1014,11 @@ table.eventbox {
}
.bz_column_spacer {
width: auto;
height: 20px;
display: none;
}
.bz_group_visibility_section {
margin: 0;
}
#summary_alias_container span {

View File

@ -29,6 +29,9 @@
color: #000;
background: #fff url("global/body-back.gif") repeat-x;
}
table {
border-collapse: collapse;
}
body, td, th, input, select {
font-family: Verdana, sans-serif;
font-size: small;
@ -118,6 +121,7 @@
/* titles (begin) */
#titles {
border-collapse: separate;
width: 100%;
background-color: #404D6C;
color: #fff;
@ -468,8 +472,25 @@ div.user_match {
.field_label {
text-align: left;
vertical-align: top;
}
.bug_field {
margin-bottom: 8px;
}
.bug_field label {
font-weight: bold;
}
.bug_field select, .bug_field textarea {
width: 98%;
}
.bug_field table select {
width: 100%;
}
.bug_field input[type=text], .bug_field input:not([type]) {
width: 98%;
}
.bug_field table input[type=text], .bug_field table input:not([type]) {
width: 100%;
}
form#Create th, form#Create td {
vertical-align: top;
@ -559,8 +580,6 @@ table.alcontent { width: 100%; }
#useful-links { margin-left: 0; }
#field_container_see_also #see_also { max-width: 500px; }
#visibility_values_td select { margin-bottom: 2px; }
.importxls_link { margin-left: 20px; }

View File

@ -7,16 +7,26 @@
font-weight: bold;
}
.bz_bug .edit_form {
width: 100%;
.bz_show_bug_colpair {
width: 50%;
float: left;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.bz_bug .edit_form table {
width: 100%;
.bz_show_bug_column {
width: 50%;
float: left;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.bz_bug .edit_form .text_input {
width: 100%;
min-width: 25em;
.edit_form hr {
clear: both;
}
.bz_bug #alias {
min-width: 0;
width: 10em;
@ -50,10 +60,6 @@ table#flags {
display: inline;
}
.bz_show_bug_column {
vertical-align: top;
}
.bz_section_spacer {
height: 1em;
}
@ -66,16 +72,13 @@ table#flags {
vertical-align: top;
}
.bz_group_visibility_section {
margin-left: 1em;
}
.bz_group_visibility_section .instructions {
font-style: italic;
margin: 8px 0;
}
#bz_restrict_group_visibility_help .instructions {
margin-top: 0;
margin: 0 0 8px 0;
}
#bz_enable_role_visibility_help { margin-bottom: 0.5em; }

View File

@ -67,93 +67,69 @@ document.changeform = document.[% cfname %];
<input type="hidden" name="token" value="[% issue_hash_token([bug.id, bug.delta_ts]) FILTER html %]">
<input type="hidden" name="force_work_time" value="1">
[% SET use_divs = 1 %]
[% SET no_tds = 1 %]
[% PROCESS section_title %]
<table class="edit_form">
<tr>
[%# 1st Column %]
<td id="bz_show_bug_column_1" class="bz_show_bug_column">
<table>
[%# *** ID, product, component, status, resolution, Hardware, and OS *** %]
<div class="edit_form" id="bz_show_bug_table">
<div class="bz_show_bug_colpair">
<div id="bz_show_bug_column_1" class="bz_show_bug_column">
[% PROCESS section_status %]
[% PROCESS section_spacer %]
[% PROCESS section_details1 %]
[% PROCESS section_spacer %]
[%# *** severity, priority, version and milestone *** %]
[% PROCESS section_details2 %]
[%# *** assigned to and qa contact *** %]
[% PROCESS section_people %]
[% PROCESS section_spacer %]
[% PROCESS section_url_keyword_whiteboard %]
[% PROCESS section_spacer %]
[%# *** Dependencies *** %]
[% PROCESS section_dependson_blocks %]
</table>
</td>
<td>
<div class="bz_column_spacer">&nbsp;</div>
</td>
[%# 2nd Column %]
<td id="bz_show_bug_column_2" class="bz_show_bug_column">
<table cellpadding="3" cellspacing="1">
[%# *** Reported and modified dates *** %]
</div>
<div id="bz_show_bug_column_2" class="bz_show_bug_column">
[% PROCESS section_details2 %]
[% PROCESS section_keyword_whiteboard %]
[% PROCESS section_url %]
</div>
<div style="clear: both"></div>
<div id="bz_custom_column_1" class="bz_show_bug_column">
[% PROCESS section_customfields part=1 %]
</div>
<div id="bz_custom_column_2" class="bz_show_bug_column">
[% PROCESS section_customfields part=2 %]
</div>
</div>
<div class="bz_show_bug_colpair">
<div id="bz_show_bug_column_3" class="bz_show_bug_column">
[% PROCESS section_dates %]
[% PROCESS section_cclist %]
[% PROCESS section_spacer %]
[% PROCESS section_see_also %]
[% PROCESS section_customfields %]
[% PROCESS section_spacer %]
[% Hook.process("after_custom_fields") %]
[% PROCESS section_dependson_blocks %]
</div>
<div id="bz_show_bug_column_4" class="bz_show_bug_column">
[% PROCESS section_cclist %]
[% PROCESS section_flags %]
</table>
</td>
</tr>
<tr>
<td colspan="3">
</div>
<div style="clear: both"></div>
<div id="bz_custom_column_3" class="bz_show_bug_column">
[% PROCESS section_customfields part=3 %]
</div>
<div id="bz_custom_column_4" class="bz_show_bug_column">
[% PROCESS section_customfields part=4 %]
[% Hook.process("after_custom_fields") %]
</div>
</div>
<hr id="bz_top_half_spacer" />
</td>
</tr>
</table>
</div>
<table id="bz_big_form_parts" cellspacing="0" cellpadding="0"><tr>
<td>
<div id="bz_big_form_parts">
<table class="flatten_table"><tr><td style="padding-right: 1em">
[% IF user.is_timetracker %]
[% PROCESS section_timetracking %]
[% END %]
[%# *** Attachments *** %]
[% PROCESS attachment/list.html.tmpl
attachments = bug.attachments
bugid = bug.bug_id
show_attachment_flags = bug.show_attachment_flags
%]
</td>
<td>
</td><td>
[% PROCESS section_restrict_visibility %]
[%# *** Check access to bug *** %]
<div class="bz_group_visibility_section">
<a href="check_access.cgi?id=[% bug.bug_id %]">List users who can see this bug</a>
</td></tr></table>
</div>
</td>
</tr></table>
[% PROCESS comment_box %]
[%# *** Additional Comments *** %]
@ -239,67 +215,25 @@ document.changeform = document.[% cfname %];
[% BLOCK section_details1 %]
[%#############%]
[%# PRODUCT #%]
[%#############%]
<tr id="field_row_product">
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.product,
desc_url = 'describecomponents.cgi', value = bug.product_id
editable = bug.check_can_change_field('product', 0, 1) %]
</tr>
[%###############%]
[%# Component #%]
[%###############%]
<tr id="field_row_component">
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.component,
value = bug.component_id,
editable = bug.check_can_change_field('component', 0, 1) %]
</tr>
<tr id="field_row_version">
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.version,
value = bug.version,
editable = bug.check_can_change_field('version', 0, 1) %]
</tr>
<script type="text/javascript">
assignToDefaultOnChange(['product', 'component']);
</script>
[%###################%]
[%# PLATFORM AND OS #%]
[%###################%]
[% IF (Bugzilla.get_field('rep_platform').enabled OR Bugzilla.get_field('op_sys').enabled) AND
(bug.check_can_change_field('rep_platform', 0, 1) || bug.check_can_change_field('op_sys', 0, 1) ||
bug.op_sys || bug.rep_platform) %]
<tr>
<td class="field_label">
<label for="rep_platform" accesskey="h"><b>OS/Platform</b></label>:
</td>
<td class="field_value">
[% IF Bugzilla.get_field('rep_platform').enabled %]
<span id="field_row_rep_platform">
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.rep_platform,
no_tds = 1, value = bug.rep_platform
editable = bug.check_can_change_field('rep_platform', 0, 1) %]
</span>
[% END %]
[% IF Bugzilla.get_field('op_sys').enabled %]
<span id="field_row_op_sys">
[%+ INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.op_sys,
no_tds = 1, value = bug.op_sys
editable = bug.check_can_change_field('op_sys', 0, 1) %]
</span>
[% END %]
</td>
</tr>
[% END %]
[% END %]
[%############################################################################%]
@ -307,11 +241,8 @@ document.changeform = document.[% cfname %];
[%############################################################################%]
[% BLOCK section_status %]
<tr>
<td class="field_label">
<b><a href="page.cgi?id=fields.html#status">Status</a></b>:
</td>
<td id="bz_field_status">
<div class="bug_field">
<label><a href="page.cgi?id=fields.html#status">Status</a>:</label><br />
<span id="static_bug_status">
[% bug.bug_status_obj.name FILTER html %]
[% IF bug.resolution %]
@ -325,8 +256,7 @@ document.changeform = document.[% cfname %];
onclick="window.setTimeout(function() { document.getElementById('bug_status').focus(); }, 10)">edit</a>)
[% END %]
</span>
</td>
</tr>
</div>
[% END %]
[%############################################################################%]
@ -338,24 +268,26 @@ document.changeform = document.[% cfname %];
[%###############################################################%]
[%# Importance (priority, severity and votes) #%]
[%###############################################################%]
<tr>
<td class="field_label">
<div class="bug_field">
<label for="priority" accesskey="i">
<b><a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a></b></label>:
</td>
<td>
<span id="field_row_priority">
<a href="page.cgi?id=fields.html#importance"><u>I</u>mportance</a>:</label>
<br />
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.priority,
no_tds = 1, value = bug.priority
value = bug.priority
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('priority', 0, 1) %]
</span>
<span id="field_row_bug_severity">
[%+ INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.bug_severity,
no_tds = 1, value = bug.bug_severity
value = bug.bug_severity
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('bug_severity', 0, 1) %]
</span>
<a href="buglist.cgi?query_format=advanced&product=[% bug.product | uri %]&bug_severity=[% bug.bug_severity_obj.name | uri %]"
target="_blank" id="search_link_bug_severity" class="search-link">(search)</a>
[% IF bug.use_votes %]
<span id="votes_container">
[% IF bug.votes %]
@ -371,16 +303,43 @@ document.changeform = document.[% cfname %];
(<a href="votes.cgi?action=show_user&amp;bug_id=[% bug.bug_id %]#vote_[% bug.bug_id %]">vote</a>)
</span>
[% END %]
</td>
</tr>
</div>
[%###################%]
[%# PLATFORM AND OS #%]
[%###################%]
[% IF (Bugzilla.get_field('rep_platform').enabled OR Bugzilla.get_field('op_sys').enabled) AND
(bug.check_can_change_field('rep_platform', 0, 1) || bug.check_can_change_field('op_sys', 0, 1) ||
bug.op_sys || bug.rep_platform) %]
<div class="bug_field">
<label for="rep_platform" accesskey="h">OS/Platform:</label>
<br />
[% IF Bugzilla.get_field('op_sys').enabled %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.op_sys,
value = bug.op_sys
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('op_sys', 0, 1) %]
[% END %]
[%+ IF Bugzilla.get_field('rep_platform').enabled %]
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.rep_platform,
value = bug.rep_platform
use_divs = 0
no_search_link = 1
style = "width: auto"
editable = bug.check_can_change_field('rep_platform', 0, 1) %]
[% END %]
</div>
[% END %]
[% IF Bugzilla.get_field('target_milestone').enabled %]
<tr id="field_row_target_milestone">
[% INCLUDE bug/field.html.tmpl
bug = bug, field = select_fields.target_milestone,
value = bug.target_milestone,
editable = bug.check_can_change_field('target_milestone', 0, 1) %]
</tr>
[% END %]
[% END %]
@ -391,11 +350,9 @@ document.changeform = document.[% cfname %];
[% BLOCK section_people %]
<tr>
<td class="field_label">
<b><a href="page.cgi?id=fields.html#assigned_to">Assigned To</a></b>:
</td>
<td>
<div class="bug_field" id="field_container_assigned_to">
<label for="assigned_to"><a href="page.cgi?id=fields.html#assigned_to">Assigned To</a>:</label>
<br />
[% IF bug.check_can_change_field("assigned_to", 0, 1) %]
<div id="bz_assignee_edit_container" class="bz_default_hidden">
<span>
@ -410,7 +367,7 @@ document.changeform = document.[% cfname %];
value => bug.assigned_to.login
size => 30
%]
<br>
<br />
<input type="checkbox" id="set_default_assignee" name="set_default_assignee" value="1">
<label id="set_default_assignee_label" for="set_default_assignee">Reset Assignee to default</label>
</div>
@ -425,15 +382,12 @@ document.changeform = document.[% cfname %];
[% ELSE %]
[% INCLUDE global/user.html.tmpl who = bug.assigned_to %]
[% END %]
</td>
</tr>
</div>
[% IF Bugzilla.get_field('qa_contact').enabled %]
<tr>
<td class="field_label">
<label for="qa_contact" accesskey="q"><b><u>Q</u>A Contact</b></label>:
</td>
<td>
<div class="bug_field" id="field_container_qa_contact">
<label for="qa_contact" accesskey="q"><u>Q</u>A Contact:</label>
<br />
[% IF bug.check_can_change_field("qa_contact", 0, 1) %]
[% IF bug.qa_contact != "" %]
<div id="bz_qa_contact_edit_container" class="bz_default_hidden">
@ -469,30 +423,28 @@ document.changeform = document.[% cfname %];
[% ELSE %]
[% INCLUDE global/user.html.tmpl who = bug.qa_contact %]
[% END %]
</td>
</tr>
</div>
[% END %]
[% END %]
[%############################################################################%]
[%# Block for URL Keyword and Whiteboard #%]
[%############################################################################%]
[% BLOCK section_url_keyword_whiteboard %]
[%# *** URL Whiteboard Keywords *** %]
[% BLOCK section_url %]
[% SET url_trimmed = bug.bug_file_loc.replace('^\s+|\s+$', '') %]
[% SET chg = bug.check_can_change_field("bug_file_loc", 0, 1) %]
[% IF chg OR url_trimmed != '' %]
<tr>
<td class="field_label">
<label for="bug_file_loc" accesskey="u"><b>
<div class="bug_field" id="field_container_bug_file_loc">
<label for="bug_file_loc" accesskey="u">
[% IF is_safe_url(url_trimmed) %]
<a href="[% url_trimmed FILTER html %]"><u>U</u>RL</a>
[% ELSE %]
<u>U</u>RL
[% END %]
[%%]</b></label>:
</td>
<td>
[% END %]:
</label>
<br />
[% IF chg %]
<span id="bz_url_edit_container" class="bz_default_hidden">
[% IF is_safe_url(url_trimmed) %]
@ -523,34 +475,33 @@ document.changeform = document.[% cfname %];
);
</script>
[% END %]
</td>
</tr>
</div>
[% END %]
[% END %]
[% BLOCK section_keyword_whiteboard %]
[% IF Bugzilla.get_field('status_whiteboard').enabled &&
(bug.status_whiteboard != '' OR bug.check_can_change_field('status_whiteboard', 0, 1)) %]
<tr>
<td class="field_label">
<label for="status_whiteboard" accesskey="w"><b><u>W</u>hiteboard</b></label>:
</td>
<div class="bug_field" id="field_container_status_whiteboard">
<label for="status_whiteboard" accesskey="w"><u>W</u>hiteboard:</label>
<br />
[% PROCESS input inputname => "status_whiteboard" size => "40" colspan => 2 %]
</tr>
</div>
[% END %]
[% IF use_keywords %]
[% val = bug.get_string('keywords') %]
[% chg = bug.check_can_change_field('keywords', 0, 1) %]
[% IF val != '' OR chg %]
<tr>
<td class="field_label">
<label for="keywords" accesskey="k"><b><a href="describekeywords.cgi"><u>K</u>eywords</a></b></label>:
</td>
<td colspan="2">
<div class="bug_field" id="field_container_keywords">
<label for="keywords" accesskey="k"><a href="describekeywords.cgi"><u>K</u>eywords</a>:</label>
<br />
[% IF chg %]
[% IF val != '' %]
[% FOREACH keyword = bug.keywords_obj %]
<a href="buglist.cgi?keywords=[% keyword.name FILTER uri %]&keywords_type=allwords&query_format=advanced"
target="_blank">[% keyword.name FILTER html %]</a>
<a href="buglist.cgi?keywords=[% keyword.name | uri %]&keywords_type=allwords&query_format=advanced"
target="_blank">[% keyword.name | html %]</a>
[% ',' UNLESS loop.last %]
[% END %]
(<a href="#" onclick="return toggle_keywords_field()">Edit</a>)
@ -567,10 +518,7 @@ document.changeform = document.[% cfname %];
</script>
<div id="keywords_field" style="display: none; margin-top: 3px;">
[% END %]
<input id="keywords" name="keywords" class="text_input"
value="[% val FILTER html %]"[% " size=\"$size\"" IF size %]
[% " maxlength=\"$maxlength\"" IF maxlength %]
[% " spellcheck=\"$spellcheck\"" IF spellcheck %]>
<input id="keywords" name="keywords" class="text_input" value="[% val | html %]" />
<script>
addKeywordsAutocomplete();
</script>
@ -579,37 +527,28 @@ document.changeform = document.[% cfname %];
[% END %]
<div id="keywords_description_container"></div>
[% ELSE %]
[% val FILTER html %]
[% val | html %]
[% END %]
</td>
</tr>
</div>
[% END %]
[% END %]
[% END %]
[%############################################################################%]
[%# Block for Depends On / Blocks #%]
[%############################################################################%]
[% BLOCK section_dependson_blocks %]
<tr>
[% PROCESS dependencies
dep = { title => "Depends&nbsp;on", fieldname => "dependson" } %]
</tr>
[% PROCESS dependencies dep = { title => "Depends&nbsp;on", fieldname => "dependson" } %]
[% IF bug.lastchangeddeps %]
<tr>
<td></td>
<td><font size="-2">Blockers completed <b>~[% bug.depscompletedpercent %]%</b>, last changed <b>[% bug.lastchangeddeps %]</b></font></td>
</tr>
<div>
<font size="-2">Blockers completed <b>~[% bug.depscompletedpercent %]%</b>, last changed <b>[% bug.lastchangeddeps %]</b></font>
</div>
[% END %]
<tr>
[% PROCESS dependencies accesskey = "b"
dep = { title => "<u>B</u>locks", fieldname => "blocked" } %]
[% PROCESS dependencies accesskey = "b" dep = { title => "<u>B</u>locks", fieldname => "blocked" } %]
<tr>
<th>&nbsp;</th>
<td colspan="2" align="left" id="show_dependency_tree_or_graph">
<div id="show_dependency_tree_or_graph">
Show dependency <a href="showdependencytree.cgi?id=[% bug.bug_id %]&amp;hide_resolved=1">tree</a>
[% IF Param('webdotbase') %]
@ -617,8 +556,7 @@ document.changeform = document.[% cfname %];
[% END %]
[% PROCESS scrum_cards %]
</td>
</tr>
</div>
[% END %]
@ -712,6 +650,11 @@ document.changeform = document.[% cfname %];
</p>
</div>
[% END %]
[%# *** Check access to bug *** %]
<p class="instructions">
<a href="check_access.cgi?id=[% bug.bug_id %]">List users who can see this bug</a>
</p>
</div> [%# bz_group_visibility_section %]
[% END %]
@ -720,68 +663,58 @@ document.changeform = document.[% cfname %];
[%############################################################################%]
[% BLOCK section_dates %]
<tr>
<td class="field_label" style="width: 100px">
<b>Reported</b>:
</td>
<td>
<div class="bug_field">
<label>Reported:</label>
<br />
[% bug.creation_ts FILTER time %] by [% INCLUDE global/user.html.tmpl who = bug.reporter %]
</td>
</tr>
</div>
<tr>
<td class="field_label">
<b> Modified</b>:
</td>
<td>
<div class="bug_field">
<label>Modified:</label>
<br />
[% bug.delta_ts FILTER time FILTER replace(':\d\d$', '') FILTER replace(':\d\d ', ' ')%]
(<a href="show_activity.cgi?id=[% bug.bug_id %]">[%# terms.Bug %]History</a>)
</td>
</tr>
</div>
[% END %]
[%############################################################################%]
[%# Block for CC LIST #%]
[%############################################################################%]
[% BLOCK section_cclist %]
<tr>
<td class="field_label">
<label for="newcc" accesskey="a"><b>CC List</b>:</label>
</td>
<td>
[% IF user.id && (NOT bug.cc || NOT bug.cc.contains(user.login)) %]
<div id="cc_edit_add_self">
[% has_role = bug.user.isreporter || bug.assigned_to.id == user.id ||
(Bugzilla.get_field('qa_contact').enabled && bug.qa_contact && bug.qa_contact.id == user.id) %]
<input type="checkbox" id="addselfcc" name="addselfcc"
[% " checked=\"checked\""
IF user.settings.state_addselfcc.value == 'always'
|| (!has_role
&& user.settings.state_addselfcc.value == 'cc_unless_role') %]>
<label for="addselfcc">Add me to CC list</label>
</div>
[% END %]
<div class="bug_field" id="field_container_cc">
<label for="newcc" accesskey="a">CC List:</label>
<br />
[% chg = bug.check_can_change_field('cc', 0, 1) %]
<div id="cc_edit_area_showhide_container"[% IF chg %] class="bz_default_hidden"[% END %]>
<div id="cc_list_num_users">
<span id="cc_list_num_users"[% IF chg %] class="bz_default_hidden"[% END %]>
[% bug.cc.size || 0 FILTER html %] [%+ bug.cc.size > 1 ? 'users' : 'user' %]
[% IF user.id AND bug.cc.contains(user.email) %] including you[% END %]
[%+ IF chg %](<a href="#" id="cc_edit_area_showhide">edit</a>)[% END %]
</div>
</span>
[% IF user.id && (NOT bug.cc || NOT bug.cc.contains(user.login)) %]
<span id="cc_edit_add_self">
[% has_role = bug.reporter_id == user.id || bug.assigned_to_id == user.id ||
(Bugzilla.get_field('qa_contact').enabled && bug.qa_contact_id && bug.qa_contact_id == user.id) %]
<input type="checkbox" id="addselfcc" name="addselfcc"
[% ' checked="checked"' IF user.settings.state_addselfcc.value == 'always'
|| (!has_role && user.settings.state_addselfcc.value == 'cc_unless_role') %] />
<label for="addselfcc" style="font-weight: normal">Add me to CC list</label>
</span>
[% END %]
<div id="cc_edit_area_showhide_container"[% IF chg %] class="bz_default_hidden"[% END %]>
[% IF bug.cc.size > 0 %]
<ul class="cc_list_display">
[% FOR c = bug.cc %]
<li>[% c FILTER email FILTER html %]</li>
[% END %]
</ul>
<div style="clear: both"></div>
[% END %]
</div>
[% IF chg %]
<div id="cc_edit_area">
[% IF user.id %]
<div>
<div><label for="cc"><b>Add</b>: </label>
<label for="cc"><b>Add</b>: </label>
[% INCLUDE global/userselect.html.tmpl
id => "newcc"
name => "newcc"
@ -790,33 +723,29 @@ document.changeform = document.[% cfname %];
multiple => 5
%]
</div>
</div>
[% END %]
[% IF bug.cc %]
<select id="cc" name="cc" multiple="multiple" size="5">
[% IF bug.cc.size %]
<select id="cc" name="cc" multiple="multiple" size="5" style="width: auto">
[% FOREACH c = bug.cc %]
<option value="[% c | email | html %]">[% c | email | html %]</option>
[% END %]
</select>
[% IF user.id %]
<br>
<input type="checkbox" id="removecc" name="removecc">
[%%]<label for="removecc">Remove selected CCs</label>
<br>
<br />
<input type="checkbox" id="removecc" name="removecc" /><label for="removecc">Remove selected CCs</label>
<br />
[% END %]
[% END %]
[% Hook.process('after_cc_list') %]
</div>
<script type="text/javascript">
hideEditableField( 'cc_edit_area_showhide_container',
'cc_edit_area',
'cc_edit_area_showhide',
'',
'');
hideEditableField(
[ 'cc_edit_area_showhide_container', 'cc_list_num_users' ],
'cc_edit_area', 'cc_edit_area_showhide', '', ''
);
</script>
[% END %]
</td>
</tr>
</div>
[% END %]
[%############################################################################%]
@ -824,13 +753,11 @@ document.changeform = document.[% cfname %];
[%############################################################################%]
[% BLOCK section_see_also %]
[% IF Bugzilla.get_field('see_also').enabled || bug.see_also.size %]
<tr id="field_row_see_also">
[% INCLUDE bug/field.html.tmpl
field = bug_fields.see_also
value = bug.see_also
editable = bug.check_can_change_field('see_also', 0, 1)
%]
</tr>
[% END %]
[% END %]
@ -848,16 +775,14 @@ document.changeform = document.[% cfname %];
[% END %]
[% END %]
[% IF show_bug_flags %]
<tr>
<td class="field_label" colspan="2">
<div class="bug_field">
[% IF bug.flag_types.size > 0 %]
[% PROCESS "flag/list.html.tmpl"
flag_types = bug.flag_types
any_flags_requesteeble = bug.any_flags_requesteeble
%]
[% END %]
</td>
</tr>
</div>
[% END %]
[% END %]
@ -866,26 +791,15 @@ document.changeform = document.[% cfname %];
[%############################################################################%]
[% BLOCK section_customfields %]
[% FOREACH field = Bugzilla.active_custom_fields %]
<tr id="field_row_[% field.name | html %]">
[% c = Bugzilla.active_custom_fields %]
[% FOREACH field = c.slice(c.size * (part - 1) / 4, c.size * part / 4 - 1) %]
[% INCLUDE bug/field.html.tmpl
value = bug.${field.name}
editable = bug.check_can_change_field(field.name, 0, 1)
value_span = 2 %]
</tr>
[% END %]
[% END %]
[%############################################################################%]
[%# Block for Section Spacer #%]
[%############################################################################%]
[% BLOCK section_spacer %]
<tr>
<td colspan="2" class="bz_section_spacer"></td>
</tr>
[% END %]
[%############################################################################%]
[%# Block for dependencies #%]
[%############################################################################%]
@ -895,11 +809,10 @@ document.changeform = document.[% cfname %];
[% chg = bug.check_can_change_field(dep.fieldname, 0, 1) %]
[% IF chg || bug.${dep.fieldname}.size %]
<th class="field_label">
<div class="bug_field" id="field_container_[% dep.fieldname %]">
<label for="[% dep.fieldname %]"[% " accesskey=\"$accesskey\"" IF accesskey %]>
[% dep.title %]</label>:
</th>
<td>
[% dep.title %]:</label>
<br />
<span id="[% dep.fieldname %]_input_area">
[% IF bug.check_can_change_field(dep.fieldname, 0, 1) %]
<input name="[% dep.fieldname %]" id="[% dep.fieldname %]"
@ -923,7 +836,7 @@ document.changeform = document.[% cfname %];
"[% bug.${dep.fieldname}.join(', ') %]");
</script>
[% END %]
</td>
</div>
[% END %]
[% accesskey = undef %]
@ -1048,7 +961,7 @@ document.changeform = document.[% cfname %];
<table class="status" cellspacing="0" cellpadding="0">
<tr>
<td class="field_label">
<b><a href="page.cgi?id=fields.html#status">Status</a></b>:
<label for="bug_status"><a href="page.cgi?id=fields.html#status">Status</a>:</label>
</td>
<td style="padding-left: 8px">
<a name="bug_status_bottom"></a>
@ -1076,15 +989,12 @@ document.changeform = document.[% cfname %];
[%############################################################################%]
[% BLOCK input %]
[% IF no_td != 1 %]
<td[% " colspan=\"$colspan\"" IF colspan %]>
[% END %]
[% val = bug.$inputname %]
[% IF bug.check_can_change_field(inputname, 0, 1) %]
<input id="[% inputname %]" name="[% inputname %]" class="text_input"
value="[% val FILTER html %]"[% " size=\"$size\"" IF size %]
[% " maxlength=\"$maxlength\"" IF maxlength %]
[% " spellcheck=\"$spellcheck\"" IF spellcheck %]>
[% " spellcheck=\"$spellcheck\"" IF spellcheck %] />
[% ELSE %]
[% IF size && val.length > size %]
<span title="[% val FILTER html %]">
@ -1094,9 +1004,6 @@ document.changeform = document.[% cfname %];
[% val FILTER html %]
[% END %]
[% END %]
[% IF no_td != 1 %]
</td>
[% END %]
[% no_td = 0 %]
[% maxlength = 0 %]
[% colspan = 0 %]

View File

@ -34,6 +34,8 @@
# A colspan for the table cell containing the field value.
# no_tds: boolean;
# If true, don't display the label <th> or the wrapping <td> for the field.
# use_divs: boolean;
# If true, display the wrapping label and the wrapping <div> for the field.
# custom_label: string;
# Label for this field. Default label is takes from the field description.
# desc_url: string;
@ -49,11 +51,20 @@
[% IF editable || bug && bug.get_string(field.name) != '' %]
[% SET show_search_link = !no_search_link &&
bug.id && field.type != constants.FIELD_TYPE_BUG_ID_REV &&
field.type != constants.FIELD_TYPE_MULTI_SELECT &&
field.type != constants.FIELD_TYPE_TEXTAREA &&
field.type != constants.FIELD_TYPE_BUG_URLS %]
[% IF NOT no_tds %]
<th class="field_label" id="field_label_[% field.name | html %]">
[% IF editable %]
<label for="[% field.name | html %]">
[% END %]
[% END %]
[% IF use_divs %]
<div class="bug_field" id="field_container_[% field.name | html %]">
[% END %]
[% IF NOT no_tds OR use_divs %]
<label [% IF editable %]for="[% field.name | html %]"[% END %]>
[% IF desc_url %]
<a href="[% desc_url | html %]">
[% ELSIF !field.custom %]
@ -61,12 +72,25 @@
[% END -%]
[% custom_label || field_descs.${field.name} || field.description | html %]:
[%- '</a>' IF desc_url || !field.custom %]
[% '</label>' IF editable %]
</label>
[% END %]
[% IF use_divs %]
<br />
[% END %]
[% IF NOT no_tds %]
</th>
<td class="field_value" id="field_container_[% field.name | html %]"
[% " colspan=\"$value_span\"" | none IF value_span %]>
[% END %]
[% IF NOT editable AND show_search_link %]
[% PROCESS search_link %]
[% END %]
[% IF editable %]
[% IF show_search_link %]
<table width="98%"><tr><td width="100%">
[% END %]
[% SWITCH field.type %]
[% CASE constants.FIELD_TYPE_FREETEXT %]
<input id="[% field.name | html %]" class="text_input"
@ -207,7 +231,7 @@
name = field.name
minrows = 4
maxrows = 8
cols = 60
cols = 30
defaultcontent = value
tabindex = tabindex %]
[% CASE constants.FIELD_TYPE_BUG_URLS %]
@ -225,9 +249,7 @@
[% '</ul>' IF value.size %]
[% IF editable && Bugzilla.get_field('see_also').enabled %]
<label for="[% field.name | html %]">
<strong>Add [% terms.Bug %] URLs:</strong>
</label><br>
<label for="[% field.name | html %]">Add [% terms.Bug %] URLs:</label><br />
<input type="text" id="[% field.name | html %]" size="40"
[% IF tabindex %] tabindex="[% tabindex | html %]"[% END %]
class="text_input" name="[% field.name | html %]" />
@ -241,27 +263,9 @@
[% END %]
[% END %]
[%#
# Custis Bug 129375 - Add search link for some custom fields
#%]
[% IF bug.id && field.name != 'priority' && field.name != 'bug_status' &&
field.name != 'resolution' && field.type != constants.FIELD_TYPE_BUG_ID_REV &&
field.type != constants.FIELD_TYPE_MULTI_SELECT &&
field.type != constants.FIELD_TYPE_TEXTAREA &&
field.type != constants.FIELD_TYPE_BUG_URLS %]
&nbsp;(<a href="buglist.cgi?query_format=advanced&product=[% bug.product | uri %]
[%- IF field.name != 'product' %]&
[%- IF field.type == constants.FIELD_TYPE_DATETIME -%]
type0-1-0=greaterthaneq&field0-1-0=[% field.name %]&field0-0-0=[% field.name %]&value0-1-0=[% bug.${field.name}.substr(0,10) | uri -%]
+00%3A00%3A00&type0-0-0=lessthaneq&value0-0-0=[% bug.${field.name}.substr(0,10) | uri %]+23%3A59%3A59
[%- ELSIF field.type == constants.FIELD_TYPE_BUG_ID_REV -%]
[%- field.name %]=[% bug.${field.name}.join(' ') | uri -%]
[%- ELSIF field.type == constants.FIELD_TYPE_SINGLE_SELECT -%]
[%- field.name %]=[% bug.get_object(field.name).name | uri -%]
[%- ELSE -%]
[%- field.name %]=[% bug.${field.name} | uri -%]
[%- END -%]
[%- END -%]" target="_blank" id="search_link_[% field.name %]" class="search-link">search</a>)
[%# CustIS Bug 129375 - Add search link for some fields %]
[% IF show_search_link %]
</td><td style="padding-left: 5px">[% PROCESS search_link %](search)</a></td></tr></table>
[% END %]
[% ELSIF field.type == constants.FIELD_TYPE_TEXTAREA %]
<div class="uneditable_textarea">[% value | html | wrap_comment %]</div>
@ -276,12 +280,30 @@
[% f = field.name _ '_obj' %]
[% bug.$f.name | html %]
[% END %]
[% ELSIF field.type == constants.FIELD_TYPE_MULTI_SELECT %]
[% f = field.name _ '_obj' %]
[% bug.$f.name.join(', ') | html %]
[% ELSIF field.type == constants.FIELD_TYPE_MULTI_SELECT || field.type == constants.FIELD_TYPE_BUG_ID_REV %]
[% bug.get_string(field.name) | html %]
[% ELSE %]
[% value.join(', ') | html %]
[% END %]
[% '</td>' IF NOT no_tds %]
[% IF NOT editable AND show_search_link %]
</a>
[% END %]
[% '</td>' IF NOT no_tds %]
[% '</div>' IF use_divs %]
[% END %]
[% BLOCK search_link %]
<a href="buglist.cgi?query_format=advanced&product=[% bug.product | uri %]
[%- IF field.name != 'product' %]&
[%- IF field.type == constants.FIELD_TYPE_DATETIME -%]
type0-1-0=greaterthaneq&field0-1-0=[% field.name %]&field0-0-0=[% field.name %]&value0-1-0=[% bug.${field.name}.substr(0,10) | uri -%]
+00%3A00%3A00&type0-0-0=lessthaneq&value0-0-0=[% bug.${field.name}.substr(0,10) | uri %]+23%3A59%3A59
[%- ELSIF field.type == constants.FIELD_TYPE_BUG_ID_REV -%]
[%- field.name %]=[% bug.${field.name}.join(' ') | uri -%]
[%- ELSIF field.type == constants.FIELD_TYPE_SINGLE_SELECT -%]
[%- field.name %]=[% bug.get_object(field.name).name | uri -%]
[%- ELSE -%]
[%- field.name %]=[% bug.${field.name} | uri -%]
[%- END -%]
[%- END -%]" target="_blank" id="search_link_[% field.name %]" class="search-link">
[% END %]

View File

@ -24,6 +24,8 @@
<div id="status">
[% INCLUDE bug/field.html.tmpl
no_tds = 1
no_search_link = 1
use_divs = 0
field = bug_fields.bug_status
value = bug.bug_status
override_legal_values = bug.statuses_available
@ -37,6 +39,8 @@
<span id="resolution_settings">
[% INCLUDE bug/field.html.tmpl
no_tds = 1
no_search_link = 1
use_divs = 0
field = bug_fields.resolution
value = bug.resolution
editable = bug.check_can_change_field('resolution', bug.resolution, 1)

View File

@ -53,8 +53,8 @@
[% FOREACH flag = type.flags %]
<tr>
<td>
<a href="#[% flag.creation_date | timestamp %]">[% flag.setter.nick | html %]</a>:
<label title="[% type.description | html %]" for="flag-[% flag.id %]" style="white-space: nowrap">[%- type.name | html -%]</label>
<a href="#[% flag.creation_date | timestamp %]">[% flag.setter.nick | html %]</a>:&nbsp;
[%%]<label title="[% type.description | html %]" for="flag-[% flag.id %]" style="white-space: nowrap">[%- type.name | html -%]</label>
</td>
<td>
<select id="flag-[% flag.id %]" name="flag-[% flag.id %]"
@ -67,12 +67,13 @@
</select>
</td>
[% IF any_flags_requesteeble %]
<td>
<td width="100%">
[% IF (type.is_active && type.is_requestable && type.is_requesteeble) || flag.requestee %]
<span style="white-space: nowrap;">
[% INCLUDE "global/userselect.html.tmpl"
name => "requestee-$flag.id"
size => 40
size => 20
style => "width: 100%"
id => "requestee-$flag.id"
value => flag.requestee.login
emptyok => 1
@ -135,13 +136,14 @@
</select>
</td>
[% IF any_flags_requesteeble %]
<td>
<td width="100%">
[% IF type.is_requestable && type.is_requesteeble %]
<span style="white-space: nowrap;">
[% INCLUDE "global/userselect.html.tmpl"
name => "requestee_type-$type.id"
id => "requestee_type-$type.id"
size => 40
size => 20
style => "width: 100%"
value => type.default_requestee
multiple => type.is_multiplicable
emptyok => !type.is_multiplicable