Skip to content

Commit

Permalink
CSS fixes to table formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mantis committed Oct 9, 2013
1 parent 6d6f093 commit e5091b5
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 74 deletions.
1 change: 0 additions & 1 deletion adm_config_report.php
Expand Up @@ -330,7 +330,6 @@ function print_option_list_from_array( $p_array, $p_filter_value ) {
<div>
<div id="adm-config-div" class="table-container" style="display: table">
<h2><?php echo lang_get( 'database_configuration' ) ?></h2>
<!-- <table cellspacing="1" cellpadding="5" border="1"> -->
<table cellspacing="1" width="100%">
<tr class="row-category">
<th><?php echo lang_get( 'username' ) ?></th>
Expand Down
7 changes: 3 additions & 4 deletions adm_permissions_report.php
Expand Up @@ -53,7 +53,8 @@
function get_section_begin_apr( $p_section_name ) {
$t_access_levels = MantisEnum::getValues( config_get( 'access_levels_enum_string' ) );

$t_output = '<table class="width100">';
$t_output = '<div class="table-container">';
$t_output .= '<table class="width100">';
$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>';

Expand Down Expand Up @@ -86,12 +87,10 @@ function get_capability_row( $p_caption, $p_access_level ) {
}

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

echo '<br /><br />';

# News
echo get_section_begin_apr( lang_get( 'news' ) );
echo get_capability_row( lang_get( 'view_private_news' ), config_get( 'private_news_threshold' ) );
Expand Down
8 changes: 4 additions & 4 deletions bug_report_page.php
Expand Up @@ -224,10 +224,10 @@
print_recently_visited();
?>
<br />
<div>
<form name="report_bug_form" method="post" <?php if ( $tpl_show_attachments ) { echo 'enctype="multipart/form-data"'; } ?> action="bug_report.php">
<?php echo form_security_field( 'bug_report' ) ?>
<table class="width90" cellspacing="1">
<div class="table-container">
<table cellspacing="1">
<tr>
<td class="form-title" colspan="2">
<input type="hidden" name="m_id" value="<?php echo $f_master_bug_id ?>" />
Expand Down Expand Up @@ -358,7 +358,7 @@
<?php if( ON == config_get( 'use_javascript' ) ) { ?>
<?php collapse_open( 'profile' ); collapse_icon('profile'); ?>
<?php echo lang_get( 'or_fill_in' ); ?>
<table class="width90" cellspacing="0">
<table class="width100" cellspacing="0">
<?php } else { ?>
<?php echo lang_get( 'or_fill_in' ); ?>
<?php } ?>
Expand Down Expand Up @@ -667,7 +667,7 @@
</td>
</tr>
</table>
</form>
</div>
</form>
<?php
html_page_bottom();
35 changes: 16 additions & 19 deletions css/default.css
Expand Up @@ -6,7 +6,7 @@ body {
margin: 6px 4px;
}

p { font-family: Verdana, Arial, Helvetica, sans-serif; }
p { font-family: Verdana, Arial, Helvetica, sans-serif; }

pre { margin-top: 0px; margin-bottom: 0px; }

Expand Down Expand Up @@ -34,11 +34,6 @@ span.small { font-size: 8pt; font-weight: normal; }
span.pagetitle { font-size: 12pt; font-weight: bold; text-align: center }
span.bracket-link { white-space: nowrap; }

span.dependency_dated { color: maroon; }
span.dependency_met { color: green; }
span.dependency_unmet { color: red; }
span.dependency_upgrade { color: orange; }

table { border: none; }
table td, table th { border: none; border-spacing: 0px; }
table.hide { width: 100%; border: solid 0px #ffffff; }
Expand All @@ -54,7 +49,7 @@ td.left { text-align: left; }
td.right { text-align: right; }
td.category, th.category { background-color: #c8c8e8; color: #000000; font-weight: bold; vertical-align : top; }
td.overdue { background-color: #ff0000; color: #000000; font-weight: bold; }

td.width30 { width: 30%; }
td.col-1 { background-color: #d8d8d8; color: #000000; }
td.col-2 { background-color: #e8e8e8; color: #000000; }
td.form-title { background-color: #ffffff; color: #000000; font-weight: bold; text-align: left; }
Expand Down Expand Up @@ -113,11 +108,7 @@ tr.bugnote .time-tracked,
#project-selector select{ font-size: small; line-height: 1em; }
#project-selector select{ font-size: small; line-height: 1em; }
#project-selector .button { font-size: small; line-height: 1em; padding: 0; margin: 0; }
#rss-feed { float: right; width: 16px; z-index: 0; padding: .5em 0; margin: 0; }

td.login-info-left { width: 33%; padding: 0px; text-align: left; }
td.login-info-middle { width: 33%; padding: 0px; text-align: center; }
td.login-info-right { width: 33%; padding: 0px; text-align: right; white-space: nowrap; }
#rss-feed { float: right; width: 16px; z-index: 0; margin: 0; }

.bug-jump { clear: both; display:block; float: right; padding: .25em; margin: 0; position: relative; top: .3em; z-index: 100; border: none; }
.main-menu { float: right; width:100%; margin: 0; padding: 0; overflow: hidden; font-size: 1em; position: relative; top: -2em; border: 1px solid #999; background-color: #e8e8e8; z-index: 99; }
Expand Down Expand Up @@ -353,9 +344,9 @@ td.tainted input[type="text"], td.tainted select { background-color: #ffffff; co
select.tainted { background-color: #ffffff; color: red; }

#filter_open, #filter_closed { position: relative; border: 1px solid #000; padding: 0; margin: 0; }
#filter_open_link, #filter_closed_link { float: left; position: relative; top: 1em; padding: 0 .5em; margin: 0; }
#filter_open_link, #filter_closed_link { float: left; position: relative; top: 0.5em; padding: 0 .5em; margin: 0; }
.search-box { float: left; position: relative; padding: 0; margin: 0; }
.search-box, .save-query, .submit-query, .stored-queries, .manage-queries { top: .3em; }
.manage-queries, .reset-query, .save-query, .search-box, .stored-queries, .submit-query { top: .3em; }
.submit-query, .save-query { float: left; position: relative; padding: 0 .5em; margin: 0; font-size: 1em; }
.filter-links, .stored-queries, .manage-queries, .reset-query { float: right; position: relative; padding: 0 .5em; margin: 0; z-index: 100; }
.save-query { float: right; }
Expand Down Expand Up @@ -512,15 +503,20 @@ div.form-container fieldset label.required:before {
}
fieldset > .field-container:nth-child(2n+1),
form > table > tr:nth-child(2n+1),
div.table-container > table > tbody > tr:nth-child(2n+1),
table#manage-overview-table > tr:nth-child(2n+1),
div.form-container > table > tr:nth-child(2n+2),
div.form-container > table > tbody > tr:nth-child(2n+2),
div.table-container > table > tbody > tr:nth-child(2n+2),
div.table-container > table > tr:nth-child(2n+2) {
background-color: #d8d8d8;
}
fieldset > .field-container:nth-child(2n),
form > table > tr:nth-child(2n+2),
table#manage-overview-table > tr:nth-child(2n),
div.form-container > table > tr:nth-child(2n+3),
div.form-container > table > tbody > tr:nth-child(2n+3),
div.table-container > table > tbody > tr:nth-child(2n+3),
div.table-container > table > tr:nth-child(2n+3) {
background-color: #e8e8e8;
}
Expand Down Expand Up @@ -650,11 +646,7 @@ div.important-msg ul li {
margin-left: 2em;
background-color: #fceded;
}
.continue-link {
clear: both;
display: block;
text-align: center;
}

ul.project-list { list-style: none; margin: .5em 0em 2em 0em; padding: 0em .5em; }
ul.project-list li { margin: 0em; line-height: 1.25em; clear: both; min-width: 30em; }
ul.project-list li span.access-level:before { content: ' ['; }
Expand All @@ -674,3 +666,8 @@ tr.bugnote-private td.bugnote-meta { background-color: #e8e8e8; }

div#mantis.centered_page div#banner { text-align: center; }

/* manage_plugin_page.php */
span.dependency_dated { color: maroon; }
span.dependency_met { color: green; }
span.dependency_unmet { color: red; }
span.dependency_upgrade { color: orange; }
8 changes: 0 additions & 8 deletions css/rtl.css
Expand Up @@ -34,14 +34,6 @@ tr.row-category-history td {
text-align: right;
}

td.login-info-left {
text-align: right;
}

td.login-info-right {
text-align: left;
}

td.news-heading-public {
text-align: right;
}
Expand Down
3 changes: 2 additions & 1 deletion manage_config_email_page.php
Expand Up @@ -162,6 +162,7 @@ function show_notify_threshold( $p_access, $p_action ) {
function get_section_begin_for_email( $p_section_name ) {
global $t_project;
$t_access_levels = MantisEnum::getValues( config_get( 'access_levels_enum_string' ) );
echo '<div class="form-container">'. "\n";
echo '<table class="width100">';
echo '<tr><td class="form-title-caps" colspan="' . ( count( $t_access_levels ) + 7 ) . '">' . $p_section_name . '</td></tr>' . "\n";
echo '<tr><td class="form-title" width="30%" rowspan="2">' . lang_get( 'message' ) . '</td>';
Expand Down Expand Up @@ -195,7 +196,7 @@ function get_capability_row_for_email( $p_caption, $p_message_type ) {
}

function get_section_end_for_email() {
echo '</table><br />' . "\n";
echo '</table></div><br />' . "\n";
}


Expand Down
3 changes: 2 additions & 1 deletion manage_config_work_threshold_page.php
Expand Up @@ -77,6 +77,7 @@ function set_overrides( $p_config ) {
function get_section_begin_mcwt( $p_section_name ) {
global $t_access_levels;

echo '<div class="form-container">'. "\n";
echo '<table class="width100">';
echo '<tr><td class="form-title" colspan="' . ( count( $t_access_levels ) + 2 ) . '">' . $p_section_name . '</td></tr>' . "\n";
echo '<tr><td class="form-title" width="40%" rowspan="2">' . lang_get( 'perm_rpt_capability' ) . '</td>';
Expand Down Expand Up @@ -290,7 +291,7 @@ function get_capability_enum( $p_caption, $p_threshold, $p_enum, $p_all_projects
}

function get_section_end() {
echo '</table><br />' . "\n";
echo '</table></div><br />' . "\n";
}


Expand Down
77 changes: 41 additions & 36 deletions manage_config_workflow_page.php
Expand Up @@ -136,26 +136,27 @@ function show_flag( $p_from_status_id, $p_to_status_id ) {

function section_begin( $p_section_name ) {
$t_enum_statuses = MantisEnum::getValues( config_get( 'status_enum_string' ) );
echo '<table class="width100">';
echo '<tr><td class="form-title-caps" colspan="' . ( count( $t_enum_statuses ) + 2 ) . '">'
. $p_section_name . '</td></tr>' . "\n";
echo '<tr><td class="form-title" width="30%" rowspan="2">' . lang_get( 'current_status' ) . '</td>';
echo '<td class="form-title" style="text-align:center" colspan="' . ( count( $t_enum_statuses ) + 1 ) . '">'
. lang_get( 'next_status' ) . '</td></tr>';
echo "\n<tr>";
echo '<div class="form-container">'. "\n";
echo "\t" . '<table class="width100">'. "\n";
echo "\t\t" . '<tr>' . "\n\t\t\t" . '<td class="form-title-caps" colspan="' . ( count( $t_enum_statuses ) + 2 ) . '">'
. $p_section_name . '</td>' . "\n\t\t" . '</tr>' . "\n";
echo "\t\t" . '<tr>' . "\n\t\t\t" . '<td class="form-title width30" rowspan="2">' . lang_get( 'current_status' ) . '</td>'. "\n";
echo "\t\t\t" . '<td class="form-title" style="text-align:center" colspan="' . ( count( $t_enum_statuses ) + 1 ) . '">'
. lang_get( 'next_status' ) . '</td>' . "\n\t\t" . '</tr>'. "\n";
echo "\t\t<tr>". "\n";

foreach( $t_enum_statuses as $t_status ) {
echo '<td class="form-title" style="text-align:center">&#160;' . string_no_break( MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_status ) ) . '&#160;</td>';
echo "\t\t\t" . '<td class="form-title" style="text-align:center">&#160;' . string_no_break( MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_status ) ) . '&#160;</td>' ."\n";
}

echo '<td class="form-title" style="text-align:center">' . lang_get( 'custom_field_default_value' ) . '</td>';
echo '</tr>' . "\n";
echo "\t\t\t" . '<td class="form-title" style="text-align:center">' . lang_get( 'custom_field_default_value' ) . '</td>' . "\n";
echo "\t\t" . '</tr>' . "\n";
}

function capability_row( $p_from_status ) {
global $t_file_workflow, $t_global_workflow, $t_project_workflow, $t_can_change_workflow;
$t_enum_status = MantisEnum::getAssocArrayIndexedByValues( config_get( 'status_enum_string' ) );
echo '<tr><td>' . string_no_break( MantisEnum::getLabel( lang_get( 'status_enum_string' ), $p_from_status ) ) . '</td>';
echo "\t\t" .'<tr><td>' . string_no_break( MantisEnum::getLabel( lang_get( 'status_enum_string' ), $p_from_status ) ) . '</td>' . "\n";
foreach ( $t_enum_status as $t_to_status_id => $t_to_status_label ) {
echo show_flag( $p_from_status, $t_to_status_id );
}
Expand All @@ -168,28 +169,29 @@ function capability_row( $p_from_status ) {
if ( $t_can_change_workflow && $t_colour != '' ) {
set_overrides( 'status_enum_workflow' );
}
echo '<td class="center"' . $t_colour . '>';
echo "\t\t\t" . '<td class="center"' . $t_colour . '>';
if ( $t_can_change_workflow ) {
echo '<select name="default_' . $p_from_status . '">';
print_enum_string_option_list( 'status', $t_project );
echo '</select>';
} else {
echo MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_project );
}
echo ' </td>';
echo '</tr>' . "\n";
echo ' </td>' . "\n";
echo "\t\t" . '</tr>' . "\n";
}

function section_end() {
echo '</table><br />' . "\n";
echo '</table></div><br />' . "\n";
}

function threshold_begin( $p_section_name ) {
echo '<div class="form-container">';
echo '<table class="width100">';
echo '<tr><td class="form-title" colspan="3">' . $p_section_name . '</td></tr>' . "\n";
echo '<tr><td class="form-title" width="30%">' . lang_get( 'threshold' ) . '</td>';
echo '<td class="form-title" >' . lang_get( 'status_level' ) . '</td>';
echo '<td class="form-title" >' . lang_get( 'alter_level' ) . '</td></tr>';
echo "\t" . '<tr><td class="form-title" colspan="3">' . $p_section_name . '</td></tr>' . "\n";
echo "\t" . '<tr><td class="form-title width30">' . lang_get( 'threshold' ) . '</td>' . "\n";
echo "\t\t" . '<td class="form-title" >' . lang_get( 'status_level' ) . '</td>' . "\n";
echo "\t\t" . '<td class="form-title" >' . lang_get( 'alter_level' ) . '</td></tr>' . "\n";
echo "\n";
}

Expand All @@ -206,32 +208,32 @@ function threshold_row( $p_threshold ) {
set_overrides( $p_threshold );
}

echo '<tr><td>' . lang_get( 'desc_' . $p_threshold ) . '</td>';
echo '<tr><td>' . lang_get( 'desc_' . $p_threshold ) . '</td>' . "\n";
if ( $t_can_change_threshold ) {
echo '<td' . $t_colour . '><select name="threshold_' . $p_threshold . '">';
print_enum_string_option_list( 'status', $t_project );
echo '</select> </td>';
echo '</select> </td>' . "\n";
echo '<td><select name="access_' . $p_threshold . '">';
print_enum_string_option_list( 'access_levels', config_get_access( $p_threshold ) );
echo '</select> </td>';
echo '</select> </td>' . "\n";
$t_can_change_flags = true;
} else {
echo '<td' . $t_colour . '>' . MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_project ) . '&#160;</td>';
echo '<td>' . MantisEnum::getLabel( lang_get( 'access_levels_enum_string' ), config_get_access( $p_threshold ) ) . '&#160;</td>';
echo '<td' . $t_colour . '>' . MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_project ) . '&#160;</td>' . "\n";
echo '<td>' . MantisEnum::getLabel( lang_get( 'access_levels_enum_string' ), config_get_access( $p_threshold ) ) . '&#160;</td>' . "\n";
}

echo '</tr>' . "\n";
}

function threshold_end() {
echo '</table><br />' . "\n";
echo '</table></div><br />' . "\n";
}

function access_begin( $p_section_name ) {
echo '<div class="form-container">';
echo '<table class="width100">';
echo '<tr><td class="form-title" colspan="2">'
. $p_section_name . '</td></tr>' . "\n";
echo '<tr><td class="form-title" colspan="2">' . lang_get( 'access_change' ) . '</td></tr>';
echo "\t\t" . '<tr><td class="form-title" colspan="2">' . $p_section_name . '</td></tr>' . "\n";
echo "\t\t" . '<tr><td class="form-title" colspan="2">' . lang_get( 'access_change' ) . '</td></tr>' . "\n";
}

function access_row() {
Expand All @@ -252,9 +254,8 @@ function access_row() {
# Print the table rows
foreach( $t_enum_status as $t_status => $t_status_label ) {

echo '<tr><td width="30%">'
. string_no_break( MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_status ) )
. '</td>';
echo "\t\t" . '<tr><td class="width30">'
. string_no_break( MantisEnum::getLabel( lang_get( 'status_enum_string' ), $t_status ) ) . '</td>' . "\n";

if( $t_status == $t_submit_status ) {
# 'NEW' status
Expand Down Expand Up @@ -286,20 +287,24 @@ function access_row() {
}

if ( $t_can_change ) {
echo '<td' . $t_colour . '><select name="access_change_' . $t_status . '">';
echo '<td' . $t_colour . '><select name="access_change_' . $t_status . '">' . "\n";
print_enum_string_option_list( 'access_levels', $t_level_project );
echo '</select> </td>';
echo '</select> </td>' . "\n";
$t_can_change_flags = true;
} else {
echo '<td class="center"' . $t_colour . '>'
. MantisEnum::getLabel( lang_get( 'access_levels_enum_string' ), $t_level_project )
. '</td>';
. '</td>' . "\n";
}

echo '</tr>' . "\n";
}
} # end function access_row

function access_end() {
echo '</table></div><br />' . "\n";
}

echo '<br /><br />';

# count arcs in and out of each status
Expand Down Expand Up @@ -383,7 +388,7 @@ function access_row() {
if ( '' <> $t_validation_result ) {
echo '<table class="width100">';
echo '<tr><td class="form-title" colspan="3">' . lang_get( 'validation' ) . '</td></tr>' . "\n";
echo '<tr><td class="form-title" width="30%">' . lang_get( 'status' ) . '</td>';
echo '<tr><td class="form-title width30">' . lang_get( 'status' ) . '</td>';
echo '<td class="form-title" >' . lang_get( 'comment' ) . '</td></tr>';
echo "\n";
echo $t_validation_result;
Expand Down Expand Up @@ -412,7 +417,7 @@ function access_row() {
# display the access levels required to move an issue
access_begin( lang_get( 'access_levels' ) );
access_row();
section_end();
access_end();

if ( $t_access >= config_get_access( 'set_status_threshold' ) ) {
echo '<p>' . lang_get( 'access_change_access_label' );
Expand Down

0 comments on commit e5091b5

Please sign in to comment.