Skip to content

Commit

Permalink
Fix various pages for new alternate even/odd rows CSS
Browse files Browse the repository at this point in the history
Fixes #16472
  • Loading branch information
dregad committed Oct 12, 2013
2 parents 0783cd6 + 6e04042 commit ce494fd
Show file tree
Hide file tree
Showing 21 changed files with 902 additions and 669 deletions.
8 changes: 6 additions & 2 deletions account_prof_menu_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,17 @@
<span class="input"><input id="action-edit" type="radio" name="action" value="edit" /></span>
<span class="label-style"></span>
</div>
<?php
if ( !$g_global_profiles ) {
?>
<div class="field-container">
<?php if ( !$g_global_profiles ) { ?>
<label for="action-default"><span><?php echo lang_get( 'make_default' ) ?></span></label>
<span class="input"><input id="action-default" type="radio" name="action" value="make_default" /></span>
<?php } ?>
<span class="label-style"></span>
</div>
<?php
}
?>
<div class="field-container">
<label for="action-delete"><span><?php echo lang_get( 'delete_profile' ) ?></span></label>
<span class="input"><input id="action-delete" type="radio" name="action" value="delete" /></span>
Expand Down
10 changes: 7 additions & 3 deletions adm_permissions_report.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ function get_section_begin_apr( $p_section_name ) {

$t_output = '<div class="table-container">';
$t_output .= '<table>';
$t_output .= '<thead>';
$t_output .= '<tr><td class="form-title-caps" colspan="' . ( count( $t_access_levels ) + 1 ) . '">' . $p_section_name . '</td></tr>' . "\n";
$t_output .= '<tr><td class="form-title">' . lang_get( 'perm_rpt_capability' ) . '</td>';
$t_output .= '<tr class="row-category2">';
$t_output .= '<th class="form-title">' . lang_get( 'perm_rpt_capability' ) . '</th>';

foreach( $t_access_levels as $t_access_level ) {
$t_output .= '<td class="form-title" style="text-align:center">&#160;' . MantisEnum::getLabel( lang_get( 'access_levels_enum_string' ), $t_access_level ) . '&#160;</td>';
$t_output .= '<th class="form-title" style="text-align:center">&#160;' . MantisEnum::getLabel( lang_get( 'access_levels_enum_string' ), $t_access_level ) . '&#160;</th>';
}

$t_output .= '</tr>' . "\n";
$t_output .= '</thead>';
$t_output .= '<tbody>';

return $t_output;
}
Expand All @@ -87,7 +91,7 @@ function get_capability_row( $p_caption, $p_access_level ) {
}

function get_section_end() {
$t_output = '</table></div><br />' . "\n";
$t_output = '</tbody></table></div><br />' . "\n";
return $t_output;
}

Expand Down
228 changes: 117 additions & 111 deletions bug_change_status_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,22 @@
?>

<br />
<div>
<div id="bug-change-status-div" class="form-container">

<form id="bug-change-status-form" name="bug_change_status_form" method="post" action="bug_update.php">
<?php echo form_security_field( 'bug_update' ) ?>
<table class="width75" cellspacing="1">

<!-- Title -->
<tr>
<td class="form-title" colspan="2">
<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
<input type="hidden" name="status" value="<?php echo $f_new_status ?>" />
<?php echo lang_get( $t_status_label . '_bug_title' ) ?>
</td>
</tr>

<?php echo form_security_field( 'bug_update' ) ?>
<table>

<thead>
<!-- Title -->
<tr>
<td class="form-title" colspan="2">
<input type="hidden" name="bug_id" value="<?php echo $f_bug_id ?>" />
<input type="hidden" name="status" value="<?php echo $f_new_status ?>" />
<?php echo lang_get( $t_status_label . '_bug_title' ) ?>
</td>
</tr>

<?php
if ( $f_new_status >= $t_resolved ) {
Expand All @@ -158,18 +161,19 @@
}
}
?>

</thead>
<tbody>
<?php
$t_current_resolution = $t_bug->resolution;
$t_bug_is_open = $t_current_resolution < $t_resolved;
if ( ( $f_new_status >= $t_resolved ) && ( ( $f_new_status < $t_closed ) || ( $t_bug_is_open ) ) ) { ?>
<!-- Resolution -->
<tr>
<th class="category">
<?php echo lang_get( 'resolution' ) ?>
</th>
<td>
<select name="resolution">
<tr>
<th class="category">
<?php echo lang_get( 'resolution' ) ?>
</th>
<td>
<select name="resolution">
<?php
$t_resolution = $t_bug_is_open ? config_get( 'bug_resolution_fixed_threshold' ) : $t_current_resolution;

Expand All @@ -183,24 +187,24 @@

print_enum_string_option_list( 'resolution', $t_resolution );
?>
</select>
</td>
</tr>
</select>
</td>
</tr>
<?php } ?>

<?php
if ( $f_new_status >= $t_resolved
&& $f_new_status < $t_closed
&& $t_resolution != config_get( 'bug_duplicate_resolution' ) ) { ?>
<!-- Duplicate ID -->
<tr>
<th class="category">
<?php echo lang_get( 'duplicate_id' ) ?>
</th>
<td>
<input type="text" name="duplicate_id" maxlength="10" />
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get( 'duplicate_id' ) ?>
</th>
<td>
<input type="text" name="duplicate_id" maxlength="10" />
</td>
</tr>
<?php } ?>

<?php
Expand All @@ -212,17 +216,17 @@
}
?>
<!-- Assigned To -->
<tr>
<th class="category">
<?php echo lang_get( 'assigned_to' ) ?>
</th>
<td>
<select name="handler_id">
<option value="0"></option>
<?php print_assign_to_option_list( $t_suggested_handler_id, $t_bug->project_id ) ?>
</select>
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get( 'assigned_to' ) ?>
</th>
<td>
<select name="handler_id">
<option value="0"></option>
<?php print_assign_to_option_list( $t_suggested_handler_id, $t_bug->project_id ) ?>
</select>
</td>
</tr>
<?php } ?>

<?php if ( $t_can_update_due_date ) {
Expand All @@ -232,14 +236,14 @@
}
?>
<!-- Due date -->
<tr>
<th class="category">
<?php print_documentation_link( 'due_date' ) ?>
</th>
<td>
<?php echo "<input " . helper_get_tab_index() . " type=\"text\" id=\"due_date\" name=\"due_date\" class=\"datetime\" size=\"20\" maxlength=\"16\" value=\"" . $t_date_to_display . "\" />" ?>
</td>
</tr>
<tr>
<th class="category">
<?php print_documentation_link( 'due_date' ) ?>
</th>
<td>
<?php echo "<input " . helper_get_tab_index() . " type=\"text\" id=\"due_date\" name=\"due_date\" class=\"datetime\" size=\"20\" maxlength=\"16\" value=\"" . $t_date_to_display . "\" />" ?>
</td>
</tr>
<?php } ?>

<!-- Custom Fields -->
Expand All @@ -266,35 +270,35 @@
$t_require = $t_def['require_' . $t_custom_status_label];

if ( ( "update" == $t_custom_status_label ) && ( !$t_require ) ) {
continue;
continue;
}
if ( in_array( $t_custom_status_label, array( "resolved", "closed" ) ) && !( $t_display || $t_require ) ) {
continue;
continue;
}
if ( custom_field_has_write_access( $t_id, $f_bug_id ) ) {
?>
<tr>
<th class="category">
<?php if ( $t_require ) {?><span class="required">*</span><?php } echo lang_get_defaulted( $t_def['name'] ) ?>
</th>
<td>
<?php
print_custom_field_input( $t_def, $f_bug_id );
?>
</td>
</tr>
<tr>
<th class="category">
<?php if ( $t_require ) {?><span class="required">*</span><?php } echo lang_get_defaulted( $t_def['name'] ) ?>
</th>
<td>
<?php
print_custom_field_input( $t_def, $f_bug_id );
?>
</td>
</tr>
<?php
} # custom_field_has_write_access( $t_id, $f_bug_id ) )
else if ( custom_field_has_read_access( $t_id, $f_bug_id ) ) {
?>
<tr>
<th class="category">
<?php echo lang_get_defaulted( $t_def['name'] ) ?>
</th>
<td>
<?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?>
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get_defaulted( $t_def['name'] ) ?>
</th>
<td>
<?php print_custom_field_value( $t_def, $t_id, $f_bug_id ); ?>
</td>
</tr>
<?php
} # custom_field_has_read_access( $t_id, $f_bug_id ) )
} # foreach( $t_related_custom_field_ids as $t_id )
Expand All @@ -307,17 +311,17 @@
&& access_has_bug_level( config_get( 'update_bug_threshold' ), $f_bug_id )
) {
?>
<!-- Fixed in Version -->
<tr>
<th class="category">
<?php echo lang_get( 'fixed_in_version' ) ?>
</th>
<td>
<select name="fixed_in_version">
<?php print_version_option_list( $t_bug->fixed_in_version, $t_bug->project_id, VERSION_ALL ) ?>
</select>
</td>
</tr>
<!-- Fixed in Version -->
<tr>
<th class="category">
<?php echo lang_get( 'fixed_in_version' ) ?>
</th>
<td>
<select name="fixed_in_version">
<?php print_version_option_list( $t_bug->fixed_in_version, $t_bug->project_id, VERSION_ALL ) ?>
</select>
</td>
</tr>
<?php
}
}
Expand All @@ -332,21 +336,21 @@
}
?>

<!-- Bugnote -->
<tr id="bug-change-status-note">
<th class="category">
<?php echo lang_get( 'add_bugnote_title' ) ?>
</th>
<td class="center">
<textarea name="bugnote_text" cols="80" rows="10"></textarea>
</td>
</tr>
<!-- Bugnote -->
<tr id="bug-change-status-note">
<th class="category">
<?php echo lang_get( 'add_bugnote_title' ) ?>
</th>
<td class="center">
<textarea name="bugnote_text" cols="80" rows="10"></textarea>
</td>
</tr>
<?php if ( access_has_bug_level( config_get( 'private_bugnote_threshold' ), $f_bug_id ) ) { ?>
<tr>
<th class="category">
<?php echo lang_get( 'view_status' ) ?>
</th>
<td>
<tr>
<th class="category">
<?php echo lang_get( 'view_status' ) ?>
</th>
<td>
<?php
$t_default_bugnote_view_status = config_get( 'default_bugnote_view_status' );
if ( access_has_bug_level( config_get( 'set_view_status_threshold' ), $f_bug_id ) ) {
Expand All @@ -358,37 +362,39 @@
echo get_enum_element( 'project_view_state', $t_default_bugnote_view_status );
}
?>
</td>
</tr>
</td>
</tr>
<?php } ?>

<?php if ( config_get('time_tracking_enabled') ) { ?>
<?php if ( access_has_bug_level( config_get( 'private_bugnote_threshold' ), $f_bug_id ) ) { ?>
<?php if ( access_has_bug_level( config_get( 'time_tracking_edit_threshold' ), $f_bug_id ) ) { ?>
<tr>
<th class="category">
<?php echo lang_get( 'time_tracking' ) ?>
</th>
<td>
<input type="text" name="time_tracking" size="5" placeholder="hh:mm" />
</td>
</tr>
<tr>
<th class="category">
<?php echo lang_get( 'time_tracking' ) ?>
</th>
<td>
<input type="text" name="time_tracking" size="5" placeholder="hh:mm" />
</td>
</tr>
<?php } ?>
<?php } ?>
<?php } ?>

<?php event_signal( 'EVENT_BUGNOTE_ADD_FORM', array( $f_bug_id ) ); ?>

<!-- Submit Button -->
<tr>
<td class="center" colspan="2">
<input type="submit" class="button" value="<?php echo lang_get( $t_status_label . '_bug_button' ) ?>" />
</td>
</tr>
<!-- Submit Button -->
<tr>
<td class="center" colspan="2">
<input type="submit" class="button" value="<?php echo lang_get( $t_status_label . '_bug_button' ) ?>" />
</td>
</tr>

</tbody>

</table>
</table>
</form>

</div>
<br />
<?php
Expand Down

0 comments on commit ce494fd

Please sign in to comment.