diff options
author | PyroPeter <abi1789@googlemail.com> | 2011-02-17 19:52:10 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-18 13:52:35 +0100 |
commit | 346e82716bf52dec37e7b8c1a62ad30585a8aa58 (patch) | |
tree | 60dc42abbf52fdafa3408b0d76d8429c587ee4b3 | |
parent | 1fdecbd5a45ef631562a11937d870e4c8cf619b0 (diff) | |
download | aur-346e82716bf52dec37e7b8c1a62ad30585a8aa58.tar.gz aur-346e82716bf52dec37e7b8c1a62ad30585a8aa58.tar.xz |
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>
-rw-r--r-- | web/html/css/arch.css | 15 | ||||
-rw-r--r-- | web/html/css/containers.css | 2 | ||||
-rw-r--r-- | web/template/pkg_search_results.php | 116 |
3 files changed, 72 insertions, 61 deletions
diff --git a/web/html/css/arch.css b/web/html/css/arch.css index 09b22407..5da56d28 100644 --- a/web/html/css/arch.css +++ b/web/html/css/arch.css @@ -284,6 +284,21 @@ blockquote.code { color: #333; 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 */ .pgbox { diff --git a/web/html/css/containers.css b/web/html/css/containers.css index 12362f60..67fd8c7d 100644 --- a/web/html/css/containers.css +++ b/web/html/css/containers.css @@ -153,7 +153,7 @@ td.data2 { padding-left: .3em; text-align: left; } -#legend span { +.legend span { padding: 1px; margin-left: .3em; border: solid 1px #888; diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index 68ba89a4..a0968628 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -1,13 +1,16 @@ -<form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'> -<div class="pgbox"> <?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) { ?> -<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 { ?> - <div class="pgboxtitle"> - <span class='f3'><?php print __("Package Listing") ?></span> - </div> + <form action='packages.php?<?php echo htmlentities($_SERVER['QUERY_STRING']) ?>' method='post'> + <div class="pgbox"> + <div class="pgboxtitle"> + <span class='f3'><?php print __("Package Listing") ?></span> + </div> + + + <table width='100%' cellspacing='0' cellpadding='2'> <tr> @@ -79,59 +82,52 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { <?php } ?> </table> -</div> +</div> <!-- .pgbox ??! --> -<div class="pgbox"> - <table width='100%'> - <tr> - <td align='left'> - <div id="legend"> - <span class='f3'><?php echo __('Legend') ?></span> - <span class="outofdate"><?php print __('Out of Date') ?></span> - </div> - <?php if ($SID): ?> - <div> - <select name='action'> - <option><?php print __("Actions") ?></option> - <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option> - <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option> - <option value='do_Adopt'><?php print __("Adopt Packages") ?></option> - <option value='do_Disown'><?php print __("Disown Packages") ?></option> - <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> - <option value='do_Delete'><?php print __("Delete Packages") ?></option> - <?php endif; ?> - <option value='do_Notify'><?php print __("Notify") ?></option> - <option value='do_UnNotify'><?php print __("UnNotify") ?></option> - </select> - <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> - <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> - <?php endif; ?> - <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' /> - </div> - <?php endif; ?> - </td> - - <td align='right'> - <div class="f4 blue"> - <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> - </div> - <div class="page_nav"> - <?php foreach($templ_pages as $pagenr => $pagestart) { ?> - <?php if ($pagestart === false) { ?> - <?php echo $pagenr ?> - <?php } else if ($pagestart + 1 == $first) { ?> - <span class="page_sel"><?php echo $pagenr ?></span> - <?php } else { ?> - <a class="page_num" href="packages.php?<?php print mkurl('O=' . ( $pagestart)) ?>"><?php echo $pagenr ?></a> + <div class="pgbox pkg_search_results_footer"> + <div class="legend_and_actions"> + <div class="legend"> + <span class='f3'><?php echo __('Legend') ?></span> + <span class="outofdate"><?php print __('Out of Date') ?></span> + </div> + <?php if ($SID): ?> + <div> + <select name='action'> + <option><?php print __("Actions") ?></option> + <option value='do_Flag'><?php print __("Flag Out-of-date") ?></option> + <option value='do_UnFlag'><?php print __("Unflag Out-of-date") ?></option> + <option value='do_Adopt'><?php print __("Adopt Packages") ?></option> + <option value='do_Disown'><?php print __("Disown Packages") ?></option> + <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> + <option value='do_Delete'><?php print __("Delete Packages") ?></option> + <?php endif; ?> + <option value='do_Notify'><?php print __("Notify") ?></option> + <option value='do_UnNotify'><?php print __("UnNotify") ?></option> + </select> + <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> + <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> + <?php endif; ?> + <input type='submit' class='button' style='width: 80px' value='<?php print __("Go") ?>' /> + </div> + <?php endif; # if ($SID) ?> + </div> <!-- .legend_and_actions --> + <div class="page_links"> + <div class="f4 blue"> + <?php print __("Showing results %s - %s of %s", $first, $last, $total) ?> + </div> + <div class="page_nav"> + <?php foreach($templ_pages as $pagenr => $pagestart) { ?> + <?php if ($pagestart === false) { ?> + <?php echo $pagenr ?> + <?php } else if ($pagestart + 1 == $first) { ?> + <span class="page_sel"><?php echo $pagenr ?></span> + <?php } else { ?> + <a class="page_num" href="packages.php?<?php print mkurl('O=' . ( $pagestart)) ?>"><?php echo $pagenr ?></a> + <?php } ?> <?php } ?> - <?php } ?> - </div> - </td> - </tr> - -<?php } ?> - </table> -</div> -</form> - + </div> + </div> <!-- .page_links --> + </div> <!-- .pgbox .pkg_search_results_footer --> + </form> +<?php } # search was successful and returned multiple results ?> |