From 43b137f10e7ab457be8542b8c7f211c2b2f3ff7c Mon Sep 17 00:00:00 2001 From: hdl Date: Mon, 2 May 2005 15:39:24 +0000 Subject: [PATCH] Improving output: Should be a good start point for choosing what to display. --- .../default/en/search.marc/dictionary.tmpl | 66 ++++++++++++++----- search.marc/dictionary.pl | 17 ++++- 2 files changed, 65 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/search.marc/dictionary.tmpl b/koha-tmpl/intranet-tmpl/default/en/search.marc/dictionary.tmpl index 56e5a74771..de875df427 100644 --- a/koha-tmpl/intranet-tmpl/default/en/search.marc/dictionary.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/search.marc/dictionary.tmpl @@ -66,10 +66,32 @@ a.catalogue:hover {

Dictionary Search results

+ +
- + @@ -78,26 +100,17 @@ a.catalogue:hover { - +
AuthoritiesAuthorities
Summary
times + &operator==&value=&and_or=and&excluding=" class="button authority"> biblio(s) +
+ +

No results in Authorities

+
-

- &marclist=&search=&resultsperpage=&type=intranet&op=do_search"><<Previous - - - - - - &marclist=&search=&resultsperpage=&type=intranet&op=do_search"> - - - - &marclist=&search=&resultsperpage=&type=intranet&op=do_search">Next>> - -

Results to of No results found. @@ -157,6 +170,25 @@ a.catalogue:hover { + + + class="hilighted"> + + &marclist=&operator=contains&op=do_search&and_or=and&value=''&excluding="> + + "> + + class="hilighted"> + + + class="hilighted"> +   + + class="hilighted"> +   + + +

@@ -182,7 +214,7 @@ a.catalogue:hover {
- + diff --git a/search.marc/dictionary.pl b/search.marc/dictionary.pl index 379b6ef370..6eb2043df9 100755 --- a/search.marc/dictionary.pl +++ b/search.marc/dictionary.pl @@ -92,7 +92,21 @@ if ($op eq "do_search") { my ($results,$total) = catalogsearch($dbh,\@tags ,\@and_or, \@excluding, \@operator, \@value, $startfrom*$resultsperpage, $resultsperpage,$orderby); - + my %seen = (); + + foreach my $item (@$results) { + my $display; + $display="author" if ($field=~/author/); + $display="title" if ($field=~/title/); + $display="subject" if ($field=~/subject/); + $display="publishercode" if ($field=~/publisher/); + $seen{$item->{$display}}++; + } + my @catresults; + foreach my $name (keys %seen){ + push @catresults, { value => $name , count => $seen{$name}} + } + my $strsth="Select distinct authtypecode from marc_subfield_structure where "; my $strtagfields="tagfield in ("; my $strtagsubfields=" and tagsubfield in ("; @@ -172,6 +186,7 @@ if ($op eq "do_search") { $to = (($startfrom+1)*$resultsperpage); } $template->param(result => $results, + catresult=> \@catresults, search => $search[0], marclist =>$field, authresult => \@authresults, -- 2.39.5