koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] koha/opac opac-shelves.pl [dev_week]


From: Owen Leonard
Subject: [Koha-cvs] koha/opac opac-shelves.pl [dev_week]
Date: Tue, 19 Sep 2006 20:37:58 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         dev_week
Changes by:     Owen Leonard <oleonard> 06/09/19 20:37:58

Modified files:
        opac           : opac-shelves.pl 

Log message:
        Changes to layout and presentation of virtual shelves, including 
separation of public and private shelves for clearer display. No more free 
shelves option.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/opac/opac-shelves.pl?cvsroot=koha&only_with_tag=dev_week&r1=1.3.2.8.2.3&r2=1.3.2.8.2.4

Patches:
Index: opac-shelves.pl
===================================================================
RCS file: /sources/koha/koha/opac/opac-shelves.pl,v
retrieving revision 1.3.2.8.2.3
retrieving revision 1.3.2.8.2.4
diff -u -b -r1.3.2.8.2.3 -r1.3.2.8.2.4
--- opac-shelves.pl     19 Sep 2006 04:46:31 -0000      1.3.2.8.2.3
+++ opac-shelves.pl     19 Sep 2006 20:37:58 -0000      1.3.2.8.2.4
@@ -2,7 +2,7 @@
 #script to provide bookshelf management
 # WARNING: This file uses 4-character tabs!
 #
-# $Header: /sources/koha/koha/opac/opac-shelves.pl,v 1.3.2.8.2.3 2006/09/19 
04:46:31 kados Exp $
+# $Header: /sources/koha/koha/opac/opac-shelves.pl,v 1.3.2.8.2.4 2006/09/19 
20:37:58 oleonard Exp $
 #
 # Copyright 2000-2002 Katipo Communications
 #
@@ -90,14 +90,24 @@
        }
 }
 
+       # set the default tab, etc.
+       my $shelf_type = $query->param('display');
+       if ((!$shelf_type) || ($shelf_type eq 'privateshelves'))  {
+               $template->param(showprivateshelves => 1);
+       } elsif ($shelf_type eq 'publicshelves') {
+               $template->param(showpublicshelves => 1);
+       }
+
 ($shelflist) = GetShelfList($loggedinuser,2); # rebuild shelflist in case a 
shelf has been added
 
 my $color='';
 my @shelvesloop;
+my @shelveslooppriv;
 foreach my $element (sort keys %$shelflist) {
                my %line;
-               if ($shelflist->{$element}->{'shelfname'}) {
+               my %linepriv;
                ($color eq 0) ? ($color=1) : ($color=0);
+               if ($shelflist->{$element}->{'category'} eq 2) {
                $line{'color'}= $color;
                $line{'shelf'}=$element;
                $line{'shelfname'}=$shelflist->{$element}->{'shelfname'};
@@ -107,10 +117,23 @@
                $line{'canmanage'} = 
ShelfPossibleAction($loggedinuser,$element,'manage');
                $line{'firstname'}=$shelflist->{$element}->{'firstname'} unless 
$shelflist->{$element}->{'owner'} eq $loggedinuser;
                $line{'surname'}=$shelflist->{$element}->{'surname'} unless 
$shelflist->{$element}->{'owner'} eq $loggedinuser;
+               
                push (@shelvesloop, \%line);
+               } elsif ($shelflist->{$element}->{'category'} eq 1) {
+               $linepriv{'color'}= $color;
+                $linepriv{'shelf'}=$element;
+                $linepriv{'shelfname'}=$shelflist->{$element}->{'shelfname'};
+                $linepriv{"category".$shelflist->{$element}->{'category'}} = 1;
+                $linepriv{'mine'} = 1 if $shelflist->{$element}->{'owner'} eq 
$loggedinuser;
+                $linepriv{'shelfbookcount'}=$shelflist->{$element}->{'count'};
+                $linepriv{'canmanage'} = 
ShelfPossibleAction($loggedinuser,$element,'manage');
+                $linepriv{'firstname'}=$shelflist->{$element}->{'firstname'} 
unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+                $linepriv{'surname'}=$shelflist->{$element}->{'surname'} 
unless $shelflist->{$element}->{'owner'} eq $loggedinuser;
+               push (@shelveslooppriv, \%linepriv);
                }
 }
-$template->param(shelvesloop => address@hidden);
+$template->param(shelveslooppriv => address@hidden,
+               shelvesloop => address@hidden);
 
 output_html_with_http_headers $query, $cookie, $template->output;
 
@@ -180,6 +203,11 @@
                $line{'isbn'}=$item->{'isbn'};
                $line{'subtitle'}=$item->{'subtitle'};
                $line{'author'}=$item->{'author'};
+               $line{'publicationyear'}=$item->{'publicationyear'};
+               $line{'publishercode'}=$item->{'publishercode'};
+               $line{'place'}=$item->{'place'};
+               $line{'notes'}=$item->{'notes'};
+               $line{'size'}=$item->{'size'};
                $line{'classification'}=$item->{'classification'};              
                $line{'itemtype'}=$item->{'itemtype'};          
                $line{'ccode'}=$item->{'ccode'};
@@ -197,6 +225,9 @@
 
 #
 # $Log: opac-shelves.pl,v $
+# Revision 1.3.2.8.2.4  2006/09/19 20:37:58  oleonard
+# Changes to layout and presentation of virtual shelves, including separation 
of public and private shelves for clearer display. No more free shelves option.
+#
 # Revision 1.3.2.8.2.3  2006/09/19 04:46:31  kados
 # Toins, this is what you've been waiting for. the 'search' file has the
 # new API defined (I hope clearly). Let me know if you have questions.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]