authorities : Adding sorting option to opac & sorting mainentry asc by default

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2007-10-16 16:02:43 -05:00 committed by Joshua Ferraro
parent 9d7a4829be
commit 64e2118e81
3 changed files with 14 additions and 9 deletions

View File

@ -85,7 +85,7 @@ function searchauthority() {
<div id="action">
<p><label>Order by :</label><select name="orderby">
<option value="">None</option>
<option value="HeadingAsc">Heading Ascendant</option>
<option value="HeadingAsc" selected="SELECTED">Heading Ascendant</option>
<option value="HeadingDsc">Heading Descendant</option>
</select>
<input type="submit" value="Start search">

View File

@ -58,7 +58,12 @@
<input type="hidden" name="and_or" value="and">
<input type="hidden" name="excluding" value="">
</p>
<p>(add % at the end of your word if you want to use right-truncation : <b>theor%</b> will find theory &amp; theories)</p>
<p><label>Order by :</label><select name="orderby">
<option value="">None</option>
<option value="HeadingAsc" selected="SELECTED">Heading Ascendant</option>
<option value="HeadingDsc">Heading Descendant</option>
</select>
</p>
<p>
<input type="submit" value="OK" class="submit">
</p>

View File

@ -55,12 +55,12 @@ foreach my $thisauthtype ( sort { $authtypes->{$a}{'authtypetext'} cmp $authtype
}
if ( $op eq "do_search" ) {
my @marclist = $query->param('marclist');
my @and_or = $query->param('and_or');
my @excluding = $query->param('excluding');
my @operator = $query->param('operator');
my $orderby = $query->param('orderby');
my @value = $query->param('value');
my @marclist = $query->param('marclist');
my @and_or = $query->param('and_or');
my @excluding = $query->param('excluding');
my @operator = $query->param('operator');
my $orderby = $query->param('orderby');
my @value = $query->param('value');
$resultsperpage = $query->param('resultsperpage');
$resultsperpage = 19 if ( !defined $resultsperpage );
@ -68,7 +68,7 @@ if ( $op eq "do_search" ) {
my ( $results, $total, @fields ) =
SearchAuthorities( \@marclist, \@and_or, \@excluding, \@operator,
\@value, $startfrom * $resultsperpage,
$resultsperpage, $authtypecode );
$resultsperpage, $authtypecode, $orderby );
( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
template_name => "opac-authoritiessearchresultlist.tmpl",