pkg_search_results: replace blind-table with floating divs

* I tried to remove errors in the sgml-structure
  e.g.: <div>
          <?php if (foo) { ?>
            </div>
          <?php } ?>
* I did not remove or add code (except the <table> and <div> stuff, of cause).
  I only changed the order of the html/php-tags.
* The bottom and top of the script are now properly indented.
  I did not indent the middle part (table of search results) because that would
  render the diff completely useless.

Signed-off-by: PyroPeter <abi1789@googlemail.com>
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
PyroPeter 2011-02-17 19:52:10 +01:00 committed by Lukas Fleischer
parent 1fdecbd5a4
commit 346e82716b
3 changed files with 72 additions and 61 deletions

View file

@ -284,6 +284,21 @@ blockquote.code {
color: #333; color: #333;
font-size: .95em; font-size: .95em;
} }
.pkg_search_results_footer {
overflow: auto;
}
.pkg_search_results_footer .legend_and_actions {
float: left;
}
.pkg_search_results_footer .legend {
margin-bottom: 3px;
}
.pkg_search_results_footer .page_links {
float: right;
margin: 0 0;
padding: 0 0;
}
/* AUR Styles */ /* AUR Styles */
.pgbox { .pgbox {

View file

@ -153,7 +153,7 @@ td.data2 {
padding-left: .3em; padding-left: .3em;
text-align: left; text-align: left;
} }
#legend span { .legend span {
padding: 1px; padding: 1px;
margin-left: .3em; margin-left: .3em;
border: solid 1px #888; border: solid 1px #888;

View file

@ -1,14 +1,17 @@
<form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'>
<div class="pgbox">
<?php if (!$result) { ?> <?php if (!$result) { ?>
<div class='pgboxbody'><?php print __("Error retrieving package list.") ?></div> <div class='pgboxbody'><?php print __("Error retrieving package list.") ?></div>
<?php } elseif ($total == 0) { ?> <?php } elseif ($total == 0) { ?>
<div class='pgboxbody'><?php print __("No packages matched your search criteria.") ?></div> <div class='pgboxbody'><?php print __("No packages matched your search criteria.") ?></div>
<?php } else { ?> <?php } else { ?>
<form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'>
<div class="pgbox">
<div class="pgboxtitle"> <div class="pgboxtitle">
<span class='f3'><?php print __("Package Listing") ?></span> <span class='f3'><?php print __("Package Listing") ?></span>
</div> </div>
<table width='100%' cellspacing='0' cellpadding='2'> <table width='100%' cellspacing='0' cellpadding='2'>
<tr> <tr>
<?php if ($SID): ?> <?php if ($SID): ?>
@ -79,14 +82,12 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<?php } ?> <?php } ?>
</table> </table>
</div> </div> <!-- .pgbox ??! -->
<div class="pgbox"> <div class="pgbox pkg_search_results_footer">
<table width='100%'> <div class="legend_and_actions">
<tr> <div class="legend">
<td align='left'>
<div id="legend">
<span class='f3'><?php echo __('Legend') ?></span> <span class='f3'><?php echo __('Legend') ?></span>
<span class="outofdate"><?php print __('Out of Date') ?></span> <span class="outofdate"><?php print __('Out of Date') ?></span>
</div> </div>
@ -109,10 +110,9 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<?php endif; ?> <?php endif; ?>
<input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' /> <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' />
</div> </div>
<?php endif; ?> <?php endif; # if ($SID) ?>
</td> </div> <!-- .legend_and_actions -->
<div class="page_links">
<td align='right'>
<div class="f4 blue"> <div class="f4 blue">
<?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?>
</div> </div>
@ -127,11 +127,7 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
<?php } ?> <?php } ?>
<?php } ?> <?php } ?>
</div> </div>
</td> </div> <!-- .page_links -->
</tr> </div> <!-- .pgbox .pkg_search_results_footer -->
<?php } ?>
</table>
</div>
</form> </form>
<?php } # search was successful and returned multiple results ?>