Skip to content

Commit

Permalink
Use floating spans to better position page links
Browse files Browse the repository at this point in the history
When adding custom columns, the old method of using colspan to place
page links on the right side breaks down, often resulting in page links
broken over multiple lines, with plenty of whitespace to the left.

Rather than trying to add an intelligint column counting algorithm, the
colspan was replaced with a span floated to the right side.  We'll leave
it up to the browser to handle overflow.
  • Loading branch information
amyreese committed Oct 30, 2009
1 parent 6bd0c4e commit 06c9ea2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 2 additions & 0 deletions css/default.css
Expand Up @@ -137,6 +137,8 @@ div.quick-summary-right { width: 49%; padding: 2px; text-align: right; float: ri
.center { text-align: center; }
.left { text-align: left; }
.right { text-align: right; }
.floatright { float: right; }
.floatleft { float: left; }
.small { font-size: 8pt; }
.small-normal { font-size: 8pt; font-weight: normal; }
.small-subprojects { font-size: 8pt; width: 200px; }
Expand Down
21 changes: 9 additions & 12 deletions view_all_inc.php
Expand Up @@ -111,7 +111,8 @@
<?php # CSRF protection not required here - form does not result in modifications ?>
<table id="buglist" class="width100" cellspacing="1">
<tr>
<td class="form-title" colspan="<?php echo $col_count - 2; ?>">
<td class="form-title" colspan="<?php echo $col_count; ?>">
<span class="floatleft">
<?php
# -- Viewing range info --

Expand All @@ -125,9 +126,9 @@

echo lang_get( 'viewing_bugs_title' );
echo " ($v_start - $v_end / $t_bug_count)";
?>
?> </span>

<span class="small"> <?php
<span class="floatleft small"> <?php
# -- Print and Export links --
print_bracket_link( 'print_all_bug_page.php', lang_get( 'print_all_bug_page_link' ) );
echo '&nbsp;';
Expand All @@ -149,10 +150,8 @@
}
}
?> </span>
</td>

<td class="right" colspan="2">
<span class="small"> <?php
<span class="floatright small"><?php
# -- Page number links --
$f_filter = gpc_get_int( 'filter', 0);
print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
Expand Down Expand Up @@ -219,7 +218,8 @@ function write_bug_rows ( $p_rows )
# -- ====================== MASS BUG MANIPULATION =================== --
?>
<tr>
<td class="left" colspan="<?php echo $col_count-2; ?>">
<td class="left" colspan="<?php echo $col_count; ?>">
<span class="floatleft">
<?php
if ( $t_checkboxes_exist && ON == config_get( 'use_javascript' ) ) {
echo "<input type=\"checkbox\" name=\"all_bugs\" value=\"all\" onclick=\"checkall('bug_action', this.form.all_bugs.checked)\" /><span class=\"small\">" . lang_get( 'select_all' ) . '</span>';
Expand All @@ -235,11 +235,8 @@ function write_bug_rows ( $p_rows )
} else {
echo '&nbsp;';
}
?>
</td>
<?php # -- Page number links -- ?>
<td class="right" colspan="2">
<span class="small">
?> </span>
<span class="floatright small">
<?php
$f_filter = gpc_get_int( 'filter', 0);
print_page_links( 'view_all_bug_page.php', 1, $t_page_count, (int)$f_page_number, $f_filter );
Expand Down

0 comments on commit 06c9ea2

Please sign in to comment.