koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha koha-tmpl/opac-tmpl/css/en/opac-recacquisi... [rel_2_2]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha koha-tmpl/opac-tmpl/css/en/opac-recacquisi... [rel_2_2]
Date: Fri, 03 Feb 2006 16:31:54 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Henri-Damien LAURENT <address@hidden>   06/02/03 16:31:54

Added files:
        koha-tmpl/opac-tmpl/css/en: opac-recacquisitions.tmpl 
        opac           : opac-recacquisitions.pl 

Log message:
        Recent Acuiqisition page with branch selection.
        BEWARE !!!
        One CANNOT list ALL recent acquisitions in ALL branches.
        You MUST select One criterium (either branch or doctype)
        No Answer when choosing no criteria

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/opac-tmpl/css/en/opac-recacquisitions.tmpl?only_with_tag=rel_2_2&rev=1.1.2.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha/opac/opac-recacquisitions.pl?only_with_tag=rel_2_2&rev=1.1.2.1

Patches:
Index: koha/koha-tmpl/opac-tmpl/css/en/opac-recacquisitions.tmpl
diff -u /dev/null 
koha/koha-tmpl/opac-tmpl/css/en/opac-recacquisitions.tmpl:1.1.2.1
--- /dev/null   Fri Feb  3 16:31:54 2006
+++ koha/koha-tmpl/opac-tmpl/css/en/opac-recacquisitions.tmpl   Fri Feb  3 
16:31:54 2006
@@ -0,0 +1,33 @@
+    <!-- TMPL_INCLUDE NAME="opac-top.inc" -->
+<div id="mainbloc">
+
+<h1 class="catalogue">Recent Acquisitions</h1>
+
+<form name="f" method="post" action="/cgi-bin/koha/opac-search.pl">
+       
+       <div id="bloc60">
+                       <!-- TMPL_VAR name="CGIbranch" --> 
+                       <input type="hidden" name="marclist" 
value="items.homebranch" />
+                       <input type="hidden" name="and_or" value="and" />
+                       <input type="hidden" name="excluding" value="" />
+                       <input type="hidden" name="operator" value="=" />
+                       <input type="hidden" name="op" value="do_search" />
+                       <input type="hidden" name="type" value="opac" />
+                       <!-- TMPL_VAR name="CGIitemtype" --> 
+                       <input type="hidden" name="marclist" 
value="biblioitems.itemtype" />
+                       <input type="hidden" name="and_or" value="and" />
+                       <input type="hidden" name="excluding" value="" />
+                       <input type="hidden" name="operator" value="=" />
+                       <input type="hidden" name="op" value="do_search" />
+                       <input type="hidden" name="type" value="opac" />
+                       acquired in the last
+                       <input type="text" name="desc_or_asc" size="3" />
+                       days
+                       <input type="hidden" name="orderby" 
value="biblio.timestamp" />
+                       <input type="submit" value="OK" class="button" />
+       </div>
+       
+</form>
+</form>
+</div>
+<!-- TMPL_INCLUDE NAME="opac-bottom.inc" -->
Index: koha/opac/opac-recacquisitions.pl
diff -u /dev/null koha/opac/opac-recacquisitions.pl:1.1.2.1
--- /dev/null   Fri Feb  3 16:31:54 2006
+++ koha/opac/opac-recacquisitions.pl   Fri Feb  3 16:31:54 2006
@@ -0,0 +1,62 @@
+#!/usr/bin/perl
+use strict;
+require Exporter;
+use CGI;
+use HTML::Template;
+
+use C4::Auth;       # get_template_and_user
+use C4::Acquisition;       # get_template_and_user
+use C4::Interface::CGI::Output;
+use C4::Koha;
+
+my $input = new CGI;
+my $dbh = C4::Context->dbh;
+my $query="Select itemtype,description from itemtypes order by description";
+my $sth=$dbh->prepare($query);
+$sth->execute;
+my  @itemtype;
+my %itemtypes;
+while (my ($value,$lib) = $sth->fetchrow_array) {
+       push @itemtype, $value;
+       $itemtypes{$value}=$lib;
+}
+
+my $CGIitemtype=CGI::scrolling_list( -name     => 'value',
+                       -values   => address@hidden,
+                       -labels   => \%itemtypes,
+                       -size     => 1,
+                       -multiple => 0 );
+$sth->finish;
+
+my @branches;
+my @select_branch;
+my %select_branches;
+my ($count2,@branches)=branches();
+push @select_branch, "";
+$select_branches{''} = "";
+for (my $i=0;$i<$count2;$i++){
+               push @select_branch, $branches[$i]->{'branchcode'};#
+               $select_branches{$branches[$i]->{'branchcode'}} = 
$branches[$i]->{'branchname'};
+}
+my $CGIbranch=CGI::scrolling_list( -name     => 'value',
+                                               -values   => address@hidden,
+                                               -labels   => \%select_branches,
+                                               -size     => 1,
+                                               -multiple => 0 );
+$sth->finish;
+
+
+my ($template, $borrowernumber, $cookie)
+    = get_template_and_user({template_name => "opac-recacquisitions.tmpl",
+                            type => "opac",
+                            query => $input,
+                            authnotrequired => 1,
+                            flagsrequired => {borrow => 1},
+                        });
+my $borrower = getmember('',$borrowernumber);
+my @options;
+my $counter=0;
+$template->param(CGIitemtype => $CGIitemtype,
+                               CGIbranch=>$CGIbranch
+);
+output_html_with_http_headers $input, $cookie, $template->output;




reply via email to

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