From 3c9ed58cba8a1a6892988d7f3a735e4f52084a33 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Fri, 22 May 2009 14:35:35 -0500 Subject: [PATCH] Cleanup transferstoreceive.pl and .tmpl Removed unused variables. Replaced EXPR. Inserted hidden span to correct tablesorter behavior on title field. Without this patch because of the link href in the cell, the sort would end up being effectively on biblionumber, not title. Mostly whitespace edits in template. Signed-off-by: Galen Charlton --- circ/transferstoreceive.pl | 26 ++-- .../en/modules/circ/transferstoreceive.tmpl | 116 +++++++++--------- 2 files changed, 67 insertions(+), 75 deletions(-) diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index c070a171ea..88ae91d9ae 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -19,10 +19,11 @@ # Suite 330, Boston, MA 02111-1307 USA use strict; +use warnings; use CGI; use C4::Context; use C4::Output; -use C4::Branch; +use C4::Branch; # GetBranches use C4::Auth; use C4::Dates qw/format_date/; use C4::Biblio; @@ -38,8 +39,6 @@ use C4::Koha; use C4::Reserves; my $input = new CGI; - -my $theme = $input->param('theme'); # only used if allowthemeoverride is set my $itemnumber = $input->param('itemnumber'); my ( $template, $loggedinuser, $cookie ) = get_template_and_user( @@ -79,9 +78,8 @@ foreach my $br ( keys %$branches ) { C4::Context->preference('TransfersMaxDaysWarning')); my $calcDate = Date_to_Days( $sent_year, $sent_month, $sent_day ); my $today = Date_to_Days(&Today); - my $warning = ( $today > $calcDate ); - if ( $warning > 0 ) { + if ($today > $calcDate) { $getransf{'messcompa'} = 1; } my $gettitle = GetBiblioFromItemNumber( $num->{'itemnumber'} ); @@ -93,19 +91,15 @@ foreach my $br ( keys %$branches ) { $getransf{$_} = $gettitle->{$_}; } - # we check if we have a reserv for this transfer + # we check if we have a reserv for this transfer my @checkreserv = GetReservesFromItemnumber($num->{'itemnumber'} ); if ( $checkreserv[0] ) { - my $getborrower = - GetMemberDetails( $checkreserv[1] ); - $getransf{'borrowernum'} = $getborrower->{'borrowernumber'}; - $getransf{'borrowername'} = $getborrower->{'surname'}; + my $getborrower = GetMemberDetails( $checkreserv[1] ); + $getransf{'borrowernum'} = $getborrower->{'borrowernumber'}; + $getransf{'borrowername'} = $getborrower->{'surname'}; $getransf{'borrowerfirstname'} = $getborrower->{'firstname'}; - if ( $getborrower->{'emailaddress'} ) { - $getransf{'borrowermail'} = $getborrower->{'emailaddress'}; - } - $getransf{'borrowerphone'} = $getborrower->{'phone'}; - + $getransf{'borrowermail'} = $getborrower->{'emailaddress'} if $getborrower->{'emailaddress'}; + $getransf{'borrowerphone'} = $getborrower->{'phone'}; } push( @transferloop, \%getransf ); } @@ -119,7 +113,7 @@ foreach my $br ( keys %$branches ) { $template->param( branchesloop => \@branchesloop, show_date => format_date(C4::Dates->today('iso')), - dateformat => C4::Context->preference("dateformat"), + 'dateformat_' . (C4::Context->preference("dateformat") || '') => 1, ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl index e457b771d3..6a7e902d77 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tmpl @@ -2,7 +2,7 @@ Koha › Circulation › Transfers to your library - @@ -35,63 +35,61 @@ $.tablesorter.addParser({
-

Transfers made to your library on :

-

Your library is the destination for the following transfer(s)

-
- - - "> - - - - - - - - - - - - - - - + + + +
Coming from
Date of transferTitleReserved by Location

check this transfer
+

Your library is the destination for the following transfer(s)

+
+ + + "> + + + + + + + + + + + + + + + - + - - - -
Coming from
Date of transferTitleReserved by Location

check this transfer
+ "> "> "> -   ( ) -
Barcode : -
- "> -   +   () +
Barcode: +
+ "> +   + +

+ + ?subject=Reservation: "> + -

- - ?subject=Reservation: "> - - - + -

- None -

- -
- - -
- -

No transfers to receive

- +

None

+ +
+ + +
+ +

No transfers to receive

+
-- 2.39.5