little bugfixes for opac templated.
Need "use HTML::Template" at the beginning of every script. Note : opac-reserve does not work at all. Could katipo/finlay check why ?
This commit is contained in:
parent
781b82eddd
commit
747a71aa67
|
|
@ -9,9 +9,10 @@ use CGI;
|
|||
use C4::Search;
|
||||
use C4::Circulation::Circ2;
|
||||
use C4::Auth;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
= get_template_and_user({template_name => "opac-account.tmpl",
|
||||
query => $query,
|
||||
type => "opac",
|
||||
|
|
@ -30,7 +31,7 @@ $template->param( BORROWER_INFO => \@bordat );
|
|||
|
||||
|
||||
#get account details
|
||||
my ($numaccts,$accts,$total) = getboracctrecord(undef,$borr);
|
||||
my ($numaccts,$accts,$total) = getboracctrecord(undef,$borr);
|
||||
|
||||
for (my $i=0;$i<$numaccts;$i++){
|
||||
$accts->[$i]{'amount'}+=0.00;
|
||||
|
|
@ -53,4 +54,6 @@ $template->param( ACCOUNT_LINES => $accts );
|
|||
|
||||
$template->param( total => $total );
|
||||
|
||||
print $query->header(-cookie => $cookie), $template->output;
|
||||
#$template->param(loggeninuser => $loggedinuser);
|
||||
print $query->header(-cookie => $cookie), $template->output;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ require Exporter;
|
|||
use CGI;
|
||||
use C4::Search;
|
||||
use C4::Auth;
|
||||
use HTML::Template;
|
||||
|
||||
my $query=new CGI;
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
use CGI;
|
||||
use C4::Context;
|
||||
use C4::Output;
|
||||
use HTML::Template;
|
||||
|
||||
my $query=new CGI;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
use strict;
|
||||
require Exporter;
|
||||
use CGI;
|
||||
|
||||
use C4::Auth; # get_template_and_user
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use C4::Koha;
|
|||
use C4::Output;
|
||||
use C4::Acquisitions;
|
||||
use C4::Biblio;
|
||||
use HTML::Template;
|
||||
|
||||
use CGI;
|
||||
my $input = new CGI;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use C4::Auth;
|
|||
use C4::Koha;
|
||||
use C4::Circulation::Circ2;
|
||||
use C4::Search;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ use C4::Auth; # checkauth, getborrowernumber.
|
|||
use C4::Koha;
|
||||
use C4::Circulation::Circ2;
|
||||
use C4::Reserves2;
|
||||
use HTML::Template;
|
||||
|
||||
my $MAXIMUM_NUMBER_OF_RESERVES = 5;
|
||||
|
||||
my $query = new CGI;
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
|
|
@ -41,11 +44,13 @@ foreach my $res (@$reserves) {
|
|||
$rank--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$rank++;
|
||||
$template->param(rank => $rank);
|
||||
|
||||
|
||||
|
||||
# pass the pickup branch along....
|
||||
my $branch = $query->param('branch');
|
||||
$template->param(branch => $branch);
|
||||
|
|
@ -195,7 +200,7 @@ if ($query->param('item_types_selected')) {
|
|||
$noreserves = 1;
|
||||
$template->param(too_much_oweing => $amount);
|
||||
}
|
||||
my ($resnum, $reserves) = FindReserves(undef, $borrowernumber);
|
||||
my ($resnum, $reserves) = FindReserves(undef, $borrowernumber);
|
||||
$template->param(RESERVES => $reserves);
|
||||
if ($resnum >= $MAXIMUM_NUMBER_OF_RESERVES) {
|
||||
$template->param(message => 1);
|
||||
|
|
|
|||
|
|
@ -3,12 +3,14 @@ use strict;
|
|||
require Exporter;
|
||||
|
||||
use C4::Auth;
|
||||
use C4::Context;
|
||||
use CGI;
|
||||
use C4::Database;
|
||||
use HTML::Template;
|
||||
|
||||
my $classlist='';
|
||||
|
||||
my $dbh=C4Connect;
|
||||
my $dbh=C4::Context->dbh;
|
||||
my $sth=$dbh->prepare("select groupname,itemtypes from itemtypesearchgroups order by groupname");
|
||||
$sth->execute;
|
||||
while (my ($groupname,$itemtypes) = $sth->fetchrow) {
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ require Exporter;
|
|||
use CGI;
|
||||
use C4::Search;
|
||||
use C4::Auth;
|
||||
use HTML::Template;
|
||||
|
||||
my $query=new CGI;
|
||||
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
= get_template_and_user({template_name => "opac-searchresults.tmpl",
|
||||
query => $query,
|
||||
type => "opac",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ require Exporter;
|
|||
use CGI;
|
||||
|
||||
use C4::Auth; # get_template_and_user
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use C4::Circulation::Circ2;
|
|||
use C4::Circulation::Renewals2;
|
||||
use C4::Reserves2;
|
||||
use C4::Search;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use C4::Auth;
|
|||
use C4::Koha;
|
||||
use C4::Circulation::Circ2;
|
||||
use C4::Search;
|
||||
use HTML::Template;
|
||||
|
||||
my $query = new CGI;
|
||||
my ($template, $borrowernumber, $cookie)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Mail::Sendmail;
|
|||
use C4::Auth; # checkauth, getborrowernumber.
|
||||
use C4::Koha;
|
||||
use C4::Circulation::Circ2;
|
||||
use HTML::Template;
|
||||
|
||||
|
||||
my $query = new CGI;
|
||||
|
|
|
|||
Loading…
Reference in New Issue