merging opac details only for items with the same branch+location+itemcallnumber...
authortipaul <tipaul>
Mon, 28 May 2007 16:28:43 +0000 (16:28 +0000)
committertipaul <tipaul>
Mon, 28 May 2007 16:28:43 +0000 (16:28 +0000)
C4/Search.pm
catalogue/search.pl
koha-tmpl/opac-tmpl/prog/en/includes/opac.css
koha-tmpl/opac-tmpl/prog/en/opac-results.tmpl
misc/zebra/record_biblios_unimarc.abs
opac/opac-search.pl

index b5b76eb..a74c9b8 100755 (executable)
@@ -957,25 +957,24 @@ sub searchResults {
             else {
                 $norequests = 0;
                 if ( $item->{'homebranch'} ) {
-                    $items->{ $item->{'homebranch'} }->{count}++;
+                    $items->{ $item->{'homebranch'}.'--'.$item->{'itemcallnumber'} }->{count}++;
                 }
 
                 # Last resort
                 elsif ( $item->{'holdingbranch'} ) {
                     $items->{ $item->{'homebranch'} }->{count}++;
                 }
-                $items->{ $item->{homebranch} }->{itemcallnumber} =
-                $item->{itemcallnumber};
-                $items->{ $item->{homebranch} }->{location} =
-                $item->{location};
+                $items->{ $item->{'homebranch'}.'--'.$item->{'itemcallnumber'} }->{itemcallnumber} =                $item->{itemcallnumber};
+                $items->{ $item->{'homebranch'}.'--'.$item->{'itemcallnumber'} }->{location} =                $item->{location};
+                $items->{ $item->{'homebranch'}.'--'.$item->{'itemcallnumber'} }->{branchcode} =               $item->{homebranch};
             }
         }    # notforloan, item level and biblioitem level
         for my $key ( keys %$items ) {
 
             #warn "key: $key";
             my $this_item = {
-                branchname     => $branches{$key},
-                branchcode     => $key,
+                branchname     => $branches{$items->{$key}->{branchcode}},
+                branchcode     => $items->{$key}->{branchcode},
                 count          => $items->{$key}->{count},
                 itemcallnumber => $items->{$key}->{itemcallnumber},
                 location => $items->{$key}->{location},
index 89f3f43..4d7e755 100755 (executable)
@@ -226,7 +226,7 @@ my @itemtypesloop;
 my $selected=1;
 my $cnt;
 my $imgdir = getitemtypeimagesrc();
-foreach my $thisitemtype (sort keys %$itemtypes) {
+foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
     my %row =(  number=>$cnt++,
                 imageurl=> $itemtypes->{$thisitemtype}->{'imageurl'}?($imgdir."/".$itemtypes->{$thisitemtype}->{'imageurl'}):"",
                 code => $thisitemtype,
index faa5c27..8295291 100644 (file)
@@ -348,11 +348,12 @@ color:#384b73;
 }
 
 .available {
-    background-color: white;
+    font-size:0.75em;
 }
 
 .unavailable {
     background-color: #FFED3D;
+    font-size:0.75em;
 }
 
 /* style for search terms in catalogsearch */
index 3eb7d1a..8acc3a6 100644 (file)
@@ -227,8 +227,8 @@ Error :
                             <!-- TMPL_ELSE -->
                             &nbsp;
                             <!-- /TMPL_IF -->
-                            <!-- TMPL_IF name="publicationyear" --> - <!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF -->
                             <!-- TMPL_IF name="publishercode" -->- <!-- TMPL_VAR name="publishercode" --><!-- /TMPL_IF -->
+                            <!-- TMPL_IF name="publicationyear" --> - <!-- TMPL_VAR name="publicationyear" --><!-- /TMPL_IF -->
                             <!-- TMPL_IF name="place" --> ; <!-- TMPL_VAR name="place" --><!-- /TMPL_IF -->
                             <!-- TMPL_IF name="pages" --> - <!-- TMPL_VAR name="pages" --><!-- /TMPL_IF -->
                             <!-- TMPL_IF name="notes" --> : <!-- TMPL_VAR name="notes" --><!-- /TMPL_IF -->
@@ -242,13 +242,15 @@ Error :
                         <span class="available">
                             <!-- TMPL_LOOP NAME="items_loop" -->
                                 <!-- TMPL_VAR NAME="count" --> <!-- TMPL_VAR NAME="branchname" -->
-                                <!-- TMPL_IF name="itemcallnumber" --> <i>(<!-- TMPL_VAR name="itemcallnumber" -->)</i><!-- /TMPL_IF -->
-                                <!-- TMPL_IF name="location" --> <i>(<!-- TMPL_VAR name="location" -->)</i><!-- /TMPL_IF -->
+                                <i>
+                                <!-- TMPL_IF name="location" --> <!-- TMPL_VAR name="location" --><!-- /TMPL_IF -->
+                                <!-- TMPL_IF name="itemcallnumber" --> <!-- TMPL_VAR name="itemcallnumber" --><!-- /TMPL_IF -->
                                 <!-- TMPL_IF name="classification" -->
-                                    <i>(<a href="/cgi-bin/koha/opac-search.pl?q=callnum:<!-- TMPL_VAR NAME="classification" ESCAPE="URL" -->">
+                                    <a href="/cgi-bin/koha/opac-search.pl?q=callnum:<!-- TMPL_VAR NAME="classification" ESCAPE="URL" -->">
                                         <!-- TMPL_VAR NAME="classification" -->
-                                    </a>)</i>
+                                    </a>
                                 <!-- /TMPL_IF -->
+                                </i>
                                 <br />
                             <!-- /TMPL_LOOP -->
                         </span>
index ca13a68..ab23a2f 100644 (file)
@@ -364,9 +364,9 @@ melm 995$k          Local-classification
 
 #melm 952$a            Local-classification
 #melm 995$a            Record-source
-melm 995$a             Host-item
-melm 995$c             Record-Source
-melm 995$d             Record-Source
+melm 995$a             Branch,Host-item
+melm 995$c             Branch,Record-Source
+melm 995$d             Branch,Record-Source
 melm 995$f             Stock-number
 melm 995$s      popularity:n,popularity:s
 #melm 952$v            Date-of-acquisition,Date-of-acquisition:d,Date-of-acquisition:s
index 9cdf699..902cccb 100755 (executable)
@@ -235,7 +235,7 @@ my @itemtypesloop;
 my $selected = 1;
 my $cnt;
 my $imgdir = getitemtypeimagesrc();
-foreach my $thisitemtype ( sort keys %$itemtypes ) {
+foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) {
     my %row = (
         number   => $cnt++,
         imageurl => $imgdir . "/" . $itemtypes->{$thisitemtype}->{'imageurl'},