mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
New search bar, toggle advanced options new style
Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
520d1e2a35
commit
3288805d2d
3 changed files with 139 additions and 184 deletions
|
@ -452,4 +452,15 @@ textarea.vLargeTextField {
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
border-spacing: 0 15px;
|
border-spacing: 0 15px;
|
||||||
}
|
}
|
||||||
|
#search_box {
|
||||||
|
margin: 5px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
#advanced li {
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
list-style: none;
|
||||||
|
display: inline;
|
||||||
|
padding: 15px;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
|
@ -61,11 +61,11 @@ span.warning /* Content Text */
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
/* Font Attribute Change (#6c83b0)*/
|
/* Font Attribute Change (#6c83b0)*/
|
||||||
span.blue { color: #6c83b0; }
|
.blue { color: #6c83b0; }
|
||||||
span.white { color: #fff; }
|
.white { color: #fff; }
|
||||||
span.black { color: #000; }
|
.black { color: #000; }
|
||||||
span.green { color: #6db06d; }
|
.green { color: #6db06d; }
|
||||||
span.link
|
.link
|
||||||
{
|
{
|
||||||
color: #6c83b0;
|
color: #6c83b0;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<form action='packages.php' method='get'>
|
<form action='packages.php' method='get'>
|
||||||
<input type='hidden' name='O' value='0'>
|
<input type='hidden' name='O' value='0'>
|
||||||
|
|
||||||
<center>
|
<center>
|
||||||
|
|
||||||
<table cellspacing='3' class='boxSoft'>
|
<table cellspacing='3' class='boxSoft'>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='boxSoftTitle' align='right'>
|
<td class='boxSoftTitle' align='right'>
|
||||||
|
@ -11,177 +9,123 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class='boxSoft'>
|
<td class='boxSoft'>
|
||||||
<table style='width: 100%' align='center'>
|
<div id="search_box" class="blue">
|
||||||
<tr>
|
<label><?php print __("Keywords"); ?></label>
|
||||||
<td align='right'>
|
<input type='text' name='K' size='20' value="<?php print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); ?>" maxlength='35' />
|
||||||
<span class='f5'>
|
<?php if (!$_GET['detail']): ?><input type='submit' style='width:80px' class='button' name='do_Search' value='<?php print __("Go"); ?>' /><?php endif; ?>
|
||||||
<span class='blue'>
|
<a href="packages.php?<?php print mkurl('detail=' . (($_GET['detail']) ? 0 : 1) ) ?>">Advanced</a>
|
||||||
<?php print __("Location"); ?>
|
<?php if ($_GET['detail']): ?>
|
||||||
</span>
|
<div id="advanced">
|
||||||
</span>
|
<input type="hidden" name="detail" value="1" />
|
||||||
<br />
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label><?php print __("Location"); ?></label>
|
||||||
<select name='L'>
|
<select name='L'>
|
||||||
<option value=0><?php print __("Any"); ?></option>
|
<option value=0><?php print __("Any"); ?></option>
|
||||||
<?php
|
<?php
|
||||||
while (list($id, $loc) = each($locs)) {
|
while (list($id, $loc) = each($locs)):
|
||||||
if (intval($_REQUEST["L"]) == $id) {
|
if (intval($_REQUEST["L"]) == $id):
|
||||||
?>
|
?>
|
||||||
<option value="<?php print $id; ?>" selected="selected"><?php print $loc; ?></option>
|
<option value="<?php print $id; ?>" selected="selected"><?php print $loc; ?></option>
|
||||||
<?php } else { ?>
|
<?php else: ?>
|
||||||
<option value="<?php print $id; ?>"><?php print $loc; ?></option>
|
<option value="<?php print $id; ?>"><?php print $loc; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
endif;
|
||||||
}
|
endwhile;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</li>
|
||||||
<td align='right'>
|
<li>
|
||||||
<span class='f5'>
|
<label><?php print __("Category"); ?></label>
|
||||||
<span class='blue'>
|
|
||||||
<?php print __("Category"); ?>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<select name='C'>
|
<select name='C'>
|
||||||
<option value='0'><?php print __("Any"); ?></option>
|
<option value='0'><?php print __("Any"); ?></option>
|
||||||
<?php
|
<?php
|
||||||
while (list($id, $cat) = each($cats)) {
|
while (list($id, $cat) = each($cats)):
|
||||||
if (intval($_REQUEST["C"]) == $id) {
|
if (intval($_REQUEST["C"]) == $id):
|
||||||
?>
|
?>
|
||||||
<option value="<?php print $id ?>" selected="selected"><?php print $cat; ?></option>
|
<option value="<?php print $id ?>" selected="selected"><?php print $cat; ?></option>
|
||||||
<?php } else { ?>
|
<?php else: ?>
|
||||||
<option value="<?php print $id ?>"><?php print $cat; ?></option>
|
<option value="<?php print $id ?>"><?php print $cat; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
endif;
|
||||||
}
|
endwhile;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</li>
|
||||||
<td align='right'>
|
<li>
|
||||||
<span class='f5'>
|
<label><?php print __("Search by"); ?></label>
|
||||||
<span class='blue'>
|
|
||||||
<?php print __("Keywords"); ?>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<input type='text' name='K' size='20' value="<?php print stripslashes(trim(htmlspecialchars($_REQUEST["K"], ENT_QUOTES))); ?>" maxlength='35' />
|
|
||||||
</td>
|
|
||||||
<td align='right'>
|
|
||||||
<span class='f5'>
|
|
||||||
<span class='blue'>
|
|
||||||
<?php print __("Search by"); ?>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<select name='SeB'>
|
<select name='SeB'>
|
||||||
<?php
|
<?php
|
||||||
$searchby = array('nd' => 'Name'
|
$searchby = array('nd' => 'Name', 'm' => 'Maintainer', 's' => 'Submitter');
|
||||||
,'m' => 'Maintainer'
|
foreach ($searchby as $k => $v):
|
||||||
,'s' => 'Submitter'
|
if ($_REQUEST['SeB'] == $k):
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($searchby as $k => $v) {
|
|
||||||
if ($_REQUEST['SeB'] == $k) {
|
|
||||||
?>
|
?>
|
||||||
<option value="<?php print $k; ?>" selected="selected"><?php print __($v); ?></option>
|
<option value="<?php print $k; ?>" selected="selected"><?php print __($v); ?></option>
|
||||||
<?php } else { ?>
|
<?php else: ?>
|
||||||
<option value="<?php print $k; ?>"><?php print __($v); ?></option>
|
<option value="<?php print $k; ?>"><?php print __($v); ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
endif;
|
||||||
}
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</li>
|
||||||
<td align='right'>
|
<li>
|
||||||
<span class='f5'>
|
<label><?php print __("Sort by"); ?></label>
|
||||||
<span class='blue'>
|
|
||||||
<?php print __("Sort by"); ?>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<select name='SB'>
|
<select name='SB'>
|
||||||
<?php
|
<?php
|
||||||
$sortby = array('n' => 'Name'
|
$sortby = array('n' => 'Name', 'c' => 'Category', 'l' => 'Location', 'v' => 'Votes', 'm' => 'Maintainer', 'a' => 'Age');
|
||||||
,'c' => 'Category'
|
foreach ($sortby as $k => $v):
|
||||||
,'l' => 'Location'
|
if ($_REQUEST['SB'] == $k):
|
||||||
,'v' => 'Votes'
|
|
||||||
,'m' => 'Maintainer'
|
|
||||||
,'a' => 'Age'
|
|
||||||
);
|
|
||||||
|
|
||||||
foreach ($sortby as $k => $v) {
|
|
||||||
if ($_REQUEST['SB'] == $k) {
|
|
||||||
?>
|
?>
|
||||||
<option value='<?php print $k; ?>' selected="selected"><?php print __($v); ?></option>
|
<option value='<?php print $k; ?>' selected="selected"><?php print __($v); ?></option>
|
||||||
<?php } else { ?>
|
<?php else: ?>
|
||||||
<option value='<?php print $k; ?>'><?php print __($v); ?></option>
|
<option value='<?php print $k; ?>'><?php print __($v); ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
endif;
|
||||||
}
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</li>
|
||||||
<td align='right'>
|
<li>
|
||||||
<span class='f5'>
|
<label><?php print __("Sort order"); ?></label>
|
||||||
<span class='blue'>
|
|
||||||
<?php print __("Sort order"); ?>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<select name='SO'>
|
<select name='SO'>
|
||||||
<?php
|
<?php
|
||||||
$orderby = array('a' => 'Ascending'
|
$orderby = array('a' => 'Ascending', 'd' => 'Descending');
|
||||||
,'d' => 'Descending'
|
foreach ($orderby as $k => $v):
|
||||||
);
|
if ($_REQUEST['SO'] == $k):
|
||||||
|
|
||||||
foreach ($orderby as $k => $v) {
|
|
||||||
if ($_REQUEST['SO'] == $k) {
|
|
||||||
?>
|
?>
|
||||||
<option value='<?php print $k; ?>' selected="selected"><?php print __($v); ?></option>
|
<option value='<?php print $k; ?>' selected="selected"><?php print __($v); ?></option>
|
||||||
<?php } else { ?>
|
<?php else: ?>
|
||||||
<option value='<?php print $k; ?>'><?php print __($v); ?></option>
|
<option value='<?php print $k; ?>'><?php print __($v); ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
endif;
|
||||||
}
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</li>
|
||||||
<td align='right'>
|
<li>
|
||||||
<span class='f5'>
|
<label><?php print __("Per page"); ?></label>
|
||||||
<span class='blue'>
|
|
||||||
<?php print __("Per page"); ?>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<br />
|
|
||||||
<select name='PP'>
|
<select name='PP'>
|
||||||
<?php
|
<?php
|
||||||
$pages = array(25, 50, 75, 100);
|
$pages = array(25, 50, 75, 100);
|
||||||
foreach ($pages as $i) {
|
foreach ($pages as $i):
|
||||||
if ($PP == $i) {
|
if ($PP == $i):
|
||||||
?>
|
?>
|
||||||
<option value="<?php print $i; ?>" selected="selected"><?php print $i; ?></option>
|
<option value="<?php print $i; ?>" selected="selected"><?php print $i; ?></option>
|
||||||
<?php } else { ?>
|
<?php else: ?>
|
||||||
<option value="<?php print $i; ?>"><?php print $i; ?></option>
|
<option value="<?php print $i; ?>"><?php print $i; ?></option>
|
||||||
<?php
|
<?php
|
||||||
}
|
endif;
|
||||||
}
|
endforeach;
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</li>
|
||||||
</tr>
|
</ul>
|
||||||
</table>
|
|
||||||
<center>
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td align='right' valign='bottom'>
|
|
||||||
<input type='submit' style='width:80px' class='button' name='do_Search' value='<?php print __("Go"); ?>' />
|
<input type='submit' style='width:80px' class='button' name='do_Search' value='<?php print __("Go"); ?>' />
|
||||||
</td>
|
|
||||||
<td align='right' valign='bottom'>
|
|
||||||
<input type='submit' style='width:80px' class='button' name='do_Orphans' value='<?php print __("Orphans"); ?>' />
|
<input type='submit' style='width:80px' class='button' name='do_Orphans' value='<?php print __("Orphans"); ?>' />
|
||||||
</td>
|
</div>
|
||||||
</tr>
|
<?php endif; ?>
|
||||||
</table>
|
</div>
|
||||||
</center>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Add table
Reference in a new issue