[Koha-patches] [PATCH] Made changes to add sorting on the catalouging screen in the intranet section.

satyanarayana holenarsipur satyanarayana.holenarsipur at osslabs.biz
Thu Jul 2 09:29:14 CEST 2009


I also want to show the drop down for sorting, so that the user selects his
option from the dropdown for sorting. Will this solution help with also? or
it will just sort by title and keywords?

Regards,
Satya

On Thu, Jul 2, 2009 at 12:39 PM, Mason James <mason.loves.sushi at gmail.com>wrote:

>
> On 2009/07/2, at 6:49 PM, satyanarayana holenarsipur wrote:
>
>  Hi Joe,
>>
>> Thanks for the quick response.
>>
>> Yes. It is very similar to main search code. I wanted a sorting feature
>> very similar to what we have now was the search results page. The sort
>> dropdown comes right next to the results table. But I faced a lot of
>> problems while doing this.
>>
>> The search.pl uses 'getRecords' function to get the records, store it and
>> pas it to the templates.
>> The addbooks.pl uses 'SimpleSearch' function to get the records, store it
>> and pass it to the templates.
>>
>> SimpleSearch has 'offset' as its parameter, but it is only used for
>> pagination function. and cannot be used for sorting the result set.
>>
>
>
> hiya Satyanarayana
>
> i too recently made a sorting change to addbooks.pl
> by simply giving SimpleSearch() a better query.
>
>
> +    my $ti_query =  qq|ti,rt,wrdl,r3="$query"|;
> +
>     # find results
> -    my ( $error, $marcresults, $total_hits ) = SimpleSearch($query,
> $results_per_page * ($page - 1), $results_per_page);
> +    my ( $error, $marcresults, $total_hits ) = SimpleSearch($ti_query,
> $results_per_page * ($page - 1), $results_per_page);
>
>
> this cleaner method is adequate for your addbooks.pl sorting needs, surely?
>
>
>


-- 
Regards,
Satyanarayana H.S.
Development Head (www.osslabs.biz)
-- 
"A small group of determined spirits, with an unquenchable thirst for their
mission, can alter the course of history." -Mahatma Gandhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20090702/19e858e4/attachment-0002.htm>


More information about the Koha-patches mailing list