koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha/opac opac-main.pl [rel_2_2]


From: Joshua Ferraro
Subject: [Koha-cvs] koha/opac opac-main.pl [rel_2_2]
Date: Wed, 08 Mar 2006 18:55:04 +0000

CVSROOT:        /sources/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Joshua Ferraro <address@hidden> 06/03/08 18:55:04

Modified files:
        opac           : opac-main.pl 

Log message:
        adds support for branch selection to opac-main.pl (for recent 
acquisitions
        search).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-main.pl.diff?only_with_tag=rel_2_2&tr1=1.16.2.7&tr2=1.16.2.8&r1=text&r2=text

Patches:
Index: koha/opac/opac-main.pl
diff -u koha/opac/opac-main.pl:1.16.2.7 koha/opac/opac-main.pl:1.16.2.8
--- koha/opac/opac-main.pl:1.16.2.7     Wed Mar  8 13:15:05 2006
+++ koha/opac/opac-main.pl      Wed Mar  8 18:55:04 2006
@@ -17,6 +17,8 @@
 $sth->execute;
 my  @itemtype;
 my %itemtypes;
+push @itemtype, "";
+$itemtypes{''}="Any Document Type";
 while (my ($value,$lib) = $sth->fetchrow_array) {
        push @itemtype, $value;
        $itemtypes{$value}=$lib;
@@ -29,6 +31,20 @@
                        -multiple => 0 );
 $sth->finish;
 
+my @branches;
+my @select_branch;
+my %select_branches;
+my $branches = getallbranches();
+my @branchloop;
+foreach my $thisbranch (keys %$branches) {
+        my $selected = 1 if (C4::Context->userenv && ($thisbranch eq 
C4::Context->userenv->{branch}));
+        my %row =(value => $thisbranch,
+                                selected => $selected,
+                                branchname => 
$branches->{$thisbranch}->{'branchname'},
+                        );
+        push @branchloop, \%row;
+}
+
 my ($template, $borrowernumber, $cookie)
     = get_template_and_user({template_name => "opac-main.tmpl",
                             type => "opac",
@@ -55,7 +71,7 @@
                $template->param(languages => address@hidden);
 }
 $template->param(CGIitemtype => $CGIitemtype,
-                               
+                               branchloop=>address@hidden,
                                suggestion => 
C4::Context->preference("suggestion"),
                                virtualshelves => 
C4::Context->preference("virtualshelves"),
                                textmessaging => $borrower->{textmessaging},




reply via email to

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