Skip to content

Commit

Permalink
Follow up to issue #10698: Refactor simple / advanced update pages fo…
Browse files Browse the repository at this point in the history
…r consistency.

1. Added attachments and due date to visible list.
2. Moved due date next to handler rather than reporter.
  • Loading branch information
vboctor committed Jul 14, 2009
1 parent 3b16135 commit cb7cc35
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 45 deletions.
61 changes: 34 additions & 27 deletions bug_update_advanced_page.php
Expand Up @@ -181,13 +181,13 @@
}

#
# Reporter, Due Date
# Reporter
#

if ( $tpl_show_reporter || $tpl_show_due_date ) {
if ( $tpl_show_reporter ) {
echo '<tr ', helper_alternate_class(), '>';

$t_spacer = 2;
$t_spacer = 4;

if ( $tpl_show_reporter ) {
# Reporter
Expand All @@ -208,6 +208,36 @@
$t_spacer += 2;
}

# spacer
echo '<td colspan="', $t_spacer, '">&nbsp;</td>';

echo '</tr>';
}

#
# Assigned To, Due Date
#

if ( $tpl_show_handler || $tpl_show_due_date ) {
echo '<tr ', helper_alternate_class(), '>';

$t_spacer = 2;

# Assigned To
echo '<td class="category">', lang_get( 'assigned_to' ), '</td>';
echo '<td>';

if ( access_has_project_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ) ) ) {
echo '<select ', helper_get_tab_index(), ' name="handler_id">';
echo '<option value="0"></option>';
print_assign_to_option_list( $tpl_bug->handler_id, $tpl_bug->project_id );
echo '</select>';
} else {
echo user_get_name( $tpl_bug->handler_id );
}

echo '</td>';

if ( $tpl_show_due_date ) {
# Due Date
echo '<td class="category">', lang_get( 'due_date' ), '</td>';
Expand Down Expand Up @@ -238,36 +268,13 @@
} else {
$t_spacer += 2;
}

# spacer
echo '<td colspan="', $t_spacer, '">&nbsp;</td>';

echo '</tr>';
}

#
# Assigned To
#

if ( $tpl_show_handler ) {
echo '<tr ', helper_alternate_class(), '>';

# Assigned To
echo '<td class="category">', lang_get( 'assigned_to' ), '</td>';
echo '<td colspan="5">';

if ( access_has_project_level( config_get( 'update_bug_assign_threshold', config_get( 'update_bug_threshold' ) ) ) ) {
echo '<select ', helper_get_tab_index(), ' name="handler_id">';
echo '<option value="0"></option>';
print_assign_to_option_list( $tpl_bug->handler_id, $tpl_bug->project_id );
echo '</select>';
} else {
echo user_get_name( $tpl_bug->handler_id );
}

echo '</td></tr>';
}

#
# Priority, Severity, Reproducibility
#
Expand Down
41 changes: 23 additions & 18 deletions bug_view_inc.php
Expand Up @@ -292,13 +292,13 @@
}

#
# Reporter, Due Date
# Reporter
#

if ( $tpl_show_reporter || $tpl_show_due_date ) {
if ( $tpl_show_reporter ) {
echo '<tr ', helper_alternate_class(), '>';

$t_spacer = 2;
$t_spacer = 4;

# Reporter
if ( $tpl_show_reporter ) {
Expand All @@ -310,6 +310,26 @@
$t_spacer += 2;
}

echo '<td colspan="', $t_spacer, '">&nbsp;</td>';

echo '</tr>';
}

#
# Handler, Due Date
#

if ( $tpl_show_handler || $tpl_show_due_date ) {
echo '<tr ', helper_alternate_class(), '>';

$t_spacer = 2;

# Handler
echo '<td class="category">', lang_get( 'assigned_to' ), '</td>';
echo '<td>';
print_user_with_subject( $tpl_bug->handler_id, $tpl_bug_id );
echo '</td>';

# Due Date
if ( $tpl_show_due_date ) {
echo '<td class="category">', lang_get( 'due_date' ), '</td>';
Expand All @@ -324,21 +344,6 @@
}

echo '<td colspan="', $t_spacer, '">&nbsp;</td>';

echo '</tr>';
}

#
# Handler
#

if ( $tpl_show_handler ) {
# Handler
echo '<tr ', helper_alternate_class(), '>';
echo '<td class="category">', lang_get( 'assigned_to' ), '</td>';
echo '<td colspan="5">';
print_user_with_subject( $tpl_bug->handler_id, $tpl_bug_id );
echo '</td>';
echo '</tr>';
}

Expand Down
6 changes: 6 additions & 0 deletions config_defaults_inc.php
Expand Up @@ -2033,6 +2033,8 @@
BUG_FIELD_ADDITIONAL_INFO,
BUG_FIELD_STEPS_TO_REPRODUCE,
BUG_FIELD_TAGS,
BUG_FIELD_ATTACHMENTS,
BUG_FIELD_DUE_DATE,
);

/**
Expand Down Expand Up @@ -2066,6 +2068,8 @@
BUG_FIELD_DESCRIPTION,
BUG_FIELD_ADDITIONAL_INFO,
BUG_FIELD_STEPS_TO_REPRODUCE,
BUG_FIELD_ATTACHMENTS,
BUG_FIELD_DUE_DATE,
);

/**
Expand Down Expand Up @@ -2100,6 +2104,8 @@
BUG_FIELD_ADDITIONAL_INFO,
BUG_FIELD_STEPS_TO_REPRODUCE,
BUG_FIELD_TAGS,
BUG_FIELD_ATTACHMENTS,
BUG_FIELD_DUE_DATE,
);

/**************************
Expand Down

0 comments on commit cb7cc35

Please sign in to comment.