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,13 +1,16 @@
<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 { ?>
<div class="pgboxtitle"> <form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'>
<span class='f3'><?php print __("Package Listing") ?></span> <div class="pgbox">
</div> <div class="pgboxtitle">
<span class='f3'><?php print __("Package Listing") ?></span>
</div>
<table width='100%' cellspacing='0' cellpadding='2'> <table width='100%' cellspacing='0' cellpadding='2'>
<tr> <tr>
@ -79,59 +82,52 @@ 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'> <span class='f3'><?php echo __('Legend') ?></span>
<div id="legend"> <span class="outofdate"><?php print __('Out of Date') ?></span>
<span class='f3'><?php echo __('Legend') ?></span> </div>
<span class="outofdate"><?php print __('Out of Date') ?></span> <?php if ($SID): ?>
</div> <div>
<?php if ($SID): ?> <select name='action'>
<div> <option><?php print __("Actions") ?></option>
<select name='action'> <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option>
<option><?php print __("Actions") ?></option> <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option>
<option value='do_Flag'><?php print __("Flag Out-of-date") ?></option> <option value='do_Adopt'><?php print __("Adopt Packages") ?></option>
<option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option> <option value='do_Disown'><?php print __("Disown Packages") ?></option>
<option value='do_Adopt'><?php print __("Adopt Packages") ?></option> <?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
<option value='do_Disown'><?php print __("Disown Packages") ?></option> <option value='do_Delete'><?php print __("Delete Packages") ?></option>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?> <?php endif; ?>
<option value='do_Delete'><?php print __("Delete Packages") ?></option> <option value='do_Notify'><?php print __("Notify") ?></option>
<?php endif; ?> <option value='do_UnNotify'><?php print __("UnNotify") ?></option>
<option value='do_Notify'><?php print __("Notify") ?></option> </select>
<option value='do_UnNotify'><?php print __("UnNotify") ?></option> <?php if ($atype == "Trusted User" || $atype == "Developer"): ?>
</select> <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?>
<?php if ($atype == "Trusted User" || $atype == "Developer"): ?> <?php endif; ?>
<input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' />
<?php endif; ?> </div>
<input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' /> <?php endif; # if ($SID) ?>
</div> </div> <!-- .legend_and_actions -->
<?php endif; ?> <div class="page_links">
</td> <div class="f4 blue">
<?php print __("Showing results %s - %s of %s", $first, $last, $total) ?>
<td align='right'> </div>
<div class="f4 blue"> <div class="page_nav">
<?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> <?php foreach($templ_pages as $pagenr => $pagestart) { ?>
</div> <?php if ($pagestart === false) { ?>
<div class="page_nav"> <?php echo $pagenr ?>
<?php foreach($templ_pages as $pagenr => $pagestart) { ?> <?php } else if ($pagestart + 1 == $first) { ?>
<?php if ($pagestart === false) { ?> <span class="page_sel"><?php echo $pagenr ?></span>
<?php echo $pagenr ?> <?php } else { ?>
<?php } else if ($pagestart + 1 == $first) { ?> <a class="page_num" href="packages.php?<?php print mkurl('O=' . ( $pagestart)) ?>"><?php echo $pagenr ?></a>
<span class="page_sel"><?php echo $pagenr ?></span> <?php } ?>
<?php } else { ?>
<a class="page_num" href="packages.php?<?php print mkurl('O=' . ( $pagestart)) ?>"><?php echo $pagenr ?></a>
<?php } ?> <?php } ?>
<?php } ?> </div>
</div> </div> <!-- .page_links -->
</td> </div> <!-- .pgbox .pkg_search_results_footer -->
</tr> </form>
<?php } # search was successful and returned multiple results ?>
<?php } ?>
</table>
</div>
</form>