[Koha-patches] [PATCH] Bug 4525: Invalid XHTML in currency.tmpl.

2010-05-18 Thread Garry Collum
---
 .../prog/en/modules/admin/currency.tmpl|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl
index 97f6399..e19e5e2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/currency.tmpl
@@ -202,7 +202,7 @@
 /tr
 !-- /TMPL_LOOP --
 /table
-br
+br /
 
 !-- TMPL_IF NAME=offsetgtzero --
 a href=!-- TMPL_VAR NAME=script_name --?offset=!-- TMPL_VAR 
NAME=prevpage --lt;lt; Previous/a
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3883: Fixes blank line in routing list.

2010-05-01 Thread Garry Collum
The blank line was being caused by the SELECT statement in the getroutinglist 
fuction of C4::Serials.  The LEFT join in the select statement was creating a 
single row result of NULL.  Changed the LEFT join to an INNER join.
---
 C4/Serials.pm |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Serials.pm b/C4/Serials.pm
index 6cef7ef..bca9fc8 100644
--- a/C4/Serials.pm
+++ b/C4/Serials.pm
@@ -2008,7 +2008,7 @@ sub getroutinglist {
 my $sth  = $dbh-prepare(
 SELECT routingid, borrowernumber, ranking, biblionumber 
 FROM subscription 
-LEFT JOIN subscriptionroutinglist ON subscription.subscriptionid = 
subscriptionroutinglist.subscriptionid
+JOIN subscriptionroutinglist ON subscription.subscriptionid = 
subscriptionroutinglist.subscriptionid
 WHERE subscription.subscriptionid = ? ORDER BY ranking ASC
   
 );
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4432: Fixes XHTML in serials-edit.tmpl.

2010-05-01 Thread Garry Collum
Replaces a reference to an undefined variable, num, with a defined variable to 
create unique ids.

Also adds zebra striping to the table.
---
 .../prog/en/modules/serials/serials-edit.tmpl  |   12 
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tmpl
index 5549987..6548174 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tmpl
@@ -193,7 +193,11 @@ function CloneSubfield(index){
thNotes/th
/tr
 !-- TMPL_LOOP name=serialslist --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 td
 input type=hidden name=serialid value=!-- TMPL_VAR 
name=serialid -- /
 input type=hidden name=subscriptionid value=!-- TMPL_VAR 
name=subscriptionid -- /
@@ -210,13 +214,13 @@ function CloneSubfield(index){
 /td
 td
 !--TMPL_IF name=editdisable--
-  input type=hidden name=status id=status!-- TMPL_VAR 
NAME=num -- value=1
+  input type=hidden name=status id=status!-- TMPL_VAR 
NAME=serialid -- value=1
   select name=status size=1  disabled=disabled
 !--TMPL_ELSE--
   !--TMPL_IF Name=serialsadditems--
-  select name=status size=1 id=status!-- TMPL_VAR 
NAME=num -- onchange=if (this.value==2){unHideItems('items'+!-- TMPL_VAR 
NAME=subscriptionid --+!-- TMPL_VAR NAME=serialid --,'label!-- TMPL_VAR 
NAME=subscriptionid --!--TMPL_VAR Name=serialid--', '!--TMPL_VAR 
Name=serialid--')} else { HideItems('items'+!-- TMPL_VAR 
NAME=subscriptionid --+!-- TMPL_VAR NAME=serialid --,'label!-- TMPL_VAR 
NAME=subscriptionid --!--TMPL_VAR Name=serialid--')} 
+  select name=status size=1 id=status!-- TMPL_VAR 
NAME=serialid -- onchange=if (this.value==2){unHideItems('items'+!-- 
TMPL_VAR NAME=subscriptionid --+!-- TMPL_VAR NAME=serialid --,'label!-- 
TMPL_VAR NAME=subscriptionid --!--TMPL_VAR Name=serialid--', 
'!--TMPL_VAR Name=serialid--')} else { HideItems('items'+!-- TMPL_VAR 
NAME=subscriptionid --+!-- TMPL_VAR NAME=serialid --,'label!-- TMPL_VAR 
NAME=subscriptionid --!--TMPL_VAR Name=serialid--')} 
!--TMPL_ELSE --
-  select name=status size=1 id=status!-- TMPL_VAR 
NAME=num -- 
+  select name=status size=1 id=status!-- TMPL_VAR 
NAME=serialid -- 
!--/TMPL_IF-- 
 !--/TMPL_IF--
   !--TMPL_IF name=status1 --
@@ -322,7 +326,7 @@ function CloneSubfield(index){
 input type=text name=planneddate value=!-- TMPL_VAR 
name=planneddate -- size=10 maxlength=15 /
 /td
 td
-select name=status size=1 id=addstatus!-- TMPL_VAR 
NAME=num --
+select name=status size=1 id=addstatus!-- TMPL_VAR 
NAME=serialid --
 option value=/option
   !--TMPL_IF name=status1 --
 option value=1 selected=selectedExpected/option
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4307: Sorts library locations in inventory drop-down list.

2010-04-23 Thread Garry Collum
Replacement patch for previous patch submitted.
---
 .../prog/en/modules/tools/inventory.tmpl   |1 +
 tools/inventory.pl |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl
index d521761..0b35000 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tmpl
@@ -77,6 +77,7 @@ $(document).ready(function(){
 legendSelect items you want to check/legend
 olli
 label for=branchloopLibrary/labelselect id=branchloop 
name=branchcode style=width:12em;
+option value=All Locations/option
 !-- TMPL_LOOP NAME=branchloop --
 !-- TMPL_IF name=selected --
 option value=!-- TMPL_VAR NAME=value -- 
selected=selected!-- TMPL_VAR NAME=branchname --/option
diff --git a/tools/inventory.pl b/tools/inventory.pl
index 56f0bcb..c87a7e9 100755
--- a/tools/inventory.pl
+++ b/tools/inventory.pl
@@ -65,13 +65,13 @@ my ($template, $borrowernumber, $cookie)
 
 my $branches = GetBranches();
 my @branch_loop;
-push @branch_loop, {value = , branchname = All Locations, };
 for my $branch_hash (keys %$branches) {
push @branch_loop, {value = $branch_hash,
   branchname = 
$branches-{$branch_hash}-{'branchname'}, 
   selected = ($branch_hash eq $branchcode?1:0)};  
 }
 
+...@branch_loop = sort {$a-{branchname} cmp $b-{branchname}} @branch_loop;
 my @authorised_value_list;
 my $authorisedvalue_categories;
 
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


Re: [Koha-patches] [PATCH] Bug 4307: Fixes branch order in inventory form.

2010-04-08 Thread Garry Collum
Thanks Galen,

I'll resubmit the patch this weekend.

Garry


On Wed, Apr 7, 2010 at 11:46 AM, Galen Charlton gmcha...@gmail.com wrote:
 Hi Garry,

 On Sat, Mar 20, 2010 at 10:02 AM, Garry Collum gcol...@gmail.com wrote:
 +...@branch_loop = sort {$a-{branchname} cmp $b-{branchname}} @branch_loop;
 +unshift @branch_loop, {value = , branchname = All Locations, };
 +

 This approach for sorting the branch names is OK, but the handling of
 the 'all locations' option is not - it introduces text that the
 translation system can't get at.  Whenever a default option is needed
 for a drop-down list, the default should be specified in the template,
 not the code.

 Regards,

 Galen
 --
 Galen Charlton
 gmcha...@gmail.com

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4307: Fixes branch order in inventory form.

2010-03-20 Thread Garry Collum
Sorts branch drop-down alphabetically.
---
 tools/inventory.pl |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/tools/inventory.pl b/tools/inventory.pl
index 56f0bcb..dafba4f 100755
--- a/tools/inventory.pl
+++ b/tools/inventory.pl
@@ -65,12 +65,14 @@ my ($template, $borrowernumber, $cookie)
 
 my $branches = GetBranches();
 my @branch_loop;
-push @branch_loop, {value = , branchname = All Locations, };
 for my $branch_hash (keys %$branches) {
push @branch_loop, {value = $branch_hash,
   branchname = 
$branches-{$branch_hash}-{'branchname'}, 
   selected = ($branch_hash eq $branchcode?1:0)};  
 }
+...@branch_loop = sort {$a-{branchname} cmp $b-{branchname}} @branch_loop;
+unshift @branch_loop, {value = , branchname = All Locations, };
+ 
 
 my @authorised_value_list;
 my $authorisedvalue_categories;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4276: Proposed fix for Related Subjects links in Opac.

2010-03-19 Thread Garry Collum
Adds fields other than 'a' to the links for subject headings in the Opac 
details page.

Also adds subfield b of a Corporate Author (710) to the appropriate link.  
Otherwise you may have a link with United States instead of United States. 
Public Works Adminstration

Another patch needs to be sent for the Intranet.
---
 .../prog/en/xslt/MARC21slim2OPACDetail.xsl |   18 --
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl 
b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
index 795856e..6f5f53b 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
@@ -130,7 +130,14 @@
 xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
 /xsl:when
 xsl:otherwise
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute  
+xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?idx=auamp;q=xsl:call-template 
name=chopPunctuation
+   xsl:with-param name=chopString
+   xsl:call-template name=subfieldSelect
+   xsl:with-param name=codesab/xsl:with-param
+   /xsl:call-template
+/xsl:with-param
+   /xsl:call-template
+   /xsl:attribute  
 /xsl:otherwise
 /xsl:choose
 xsl:call-template name=nameABCDN//a
@@ -375,7 +382,14 @@
 xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
 /xsl:when
 xsl:otherwise
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=su:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?idc=suamp;q=xsl:call-template 
name=chopPunctuation
+   xsl:with-param name=chopString
+   xsl:call-template name=subfieldSelect
+   xsl:with-param 
name=codesabcdvxyz/xsl:with-param
+   /xsl:call-template
+   /xsl:with-param
+/xsl:call-template
+/xsl:attribute
 /xsl:otherwise
 /xsl:choose
 xsl:call-template name=chopPunctuation
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4316: Fixes leading and trailing spaces in barcode for cki.

2010-03-13 Thread Garry Collum
Copies the regexp from circulation.pl to strip leading and trailing spaces from 
barcodes to returns.pl.
---
 circ/returns.pl |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/circ/returns.pl b/circ/returns.pl
index adec8f6..9e79bbe 100755
--- a/circ/returns.pl
+++ b/circ/returns.pl
@@ -105,6 +105,7 @@ foreach ( $query-param ) {
 $counter++;
 
 # decode barcode## Didn't we already decode them before passing them 
back last time??
+$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
 $barcode = barcodedecode($barcode) 
if(C4::Context-preference('itemBarcodeInputFilter'));
 
 ##
@@ -184,6 +185,7 @@ if ($dotransfer){
 
 # actually return book and prepare item table.
 if ($barcode) {
+$barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace
 $barcode = barcodedecode($barcode) if 
C4::Context-preference('itemBarcodeInputFilter');
 $itemnumber = GetItemnumberFromBarcode($barcode);
 
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4285: Intranet bib display links to opac-search.pl, instead of catalogue/search.pl

2010-02-28 Thread Garry Collum
---
 .../prog/en/xslt/MARC21slim2intranetDetail.xsl |   24 ++--
 .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl|2 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl 
b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
index 0156f99..c5c4b73 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
@@ -111,10 +111,10 @@
 a
 xsl:choose
 xsl:when test=marc:subfie...@code=9]
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
 /xsl:when
 xsl:otherwise
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
 /xsl:otherwise
 /xsl:choose
 xsl:call-template name=nameABCDQ//a
@@ -126,10 +126,10 @@
 a
 xsl:choose
 xsl:when test=marc:subfie...@code=9]
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
 /xsl:when
 xsl:otherwise
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute  
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute  
 /xsl:otherwise
 /xsl:choose
 xsl:call-template name=nameABCDN//a
@@ -140,10 +140,10 @@
 a
 xsl:choose
 xsl:when test=marc:subfie...@code=9]
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
 /xsl:when
 xsl:otherwise
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=au:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
 /xsl:otherwise
 /xsl:choose
 xsl:call-template name=nameACDEQ//a
@@ -177,7 +177,7 @@
 xsl:if test=marc:datafie...@tag=440 or @tag=490]
 span class=results_summaryspan class=labelSeries: /span
 xsl:for-each select=marc:datafie...@tag=440]
- a 
href=/cgi-bin/koha/opac-search.pl?q=se:{marc:subfie...@code='a']}
+ a 
href=/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfie...@code='a']}
 xsl:call-template name=chopPunctuation
 xsl:with-param name=chopString
 xsl:call-template name=subfieldSelect
@@ -191,7 +191,7 @@
 /xsl:for-each
 
 xsl:for-each select=marc:datafie...@tag=490][@ind1=0]
- a 
href=/cgi-bin/koha/opac-search.pl?q=se:{marc:subfie...@code='a']}
+ a 
href=/cgi-bin/koha/catalogue/search.pl?q=se:{marc:subfie...@code='a']}
 xsl:call-template name=chopPunctuation
 xsl:with-param name=chopString
 xsl:call-template name=subfieldSelect
@@ -365,10 +365,10 @@
 a
 xsl:choose
 xsl:when test=marc:subfie...@code=9]
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=an:xsl:value-of 
select=marc:subfie...@code=9]//xsl:attribute
 /xsl:when
 xsl:otherwise
-xsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=su:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
+xsl:attribute 
name=href/cgi-bin/koha/catalogue/search.pl?q=su:xsl:value-of 
select=marc:subfie...@code='a']//xsl:attribute
 /xsl:otherwise
 /xsl:choose
 xsl:call-template name=chopPunctuation
@@ -510,7 +510,7 @@
 xsl:with-param name=codesat/xsl:with-param
 /xsl:call-template
 /xsl:variable
- axsl:attribute 
name=href/cgi-bin/koha/opac-search.pl?q=xsl:value-of 

[Koha-patches] [PATCH] Bug 4248: Fixes zip code in cities town pull down list.

2010-02-23 Thread Garry Collum
Adds zip code to the GetCities function.  This function is only used in 
memberentry.pl.
---
 C4/Members.pm |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Members.pm b/C4/Members.pm
index 98adc27..10b365a 100644
--- a/C4/Members.pm
+++ b/C4/Members.pm
@@ -1570,7 +1570,7 @@ sub GetCities {
 $city{} = ;
 while ( my $data = $sth-fetchrow_hashref ) {
 push @id, $data-{'city_zipcode'}.|.$data-{'city_name'};
-$city{ $data-{'city_zipcode'}.|.$data-{'city_name'} } = 
$data-{'city_name'};
+$city{ $data-{'city_zipcode'}.|.$data-{'city_name'} } = 
$data-{'city_name'} .   . $data-{'city_zipcode'};
 }
 
 #test to know if the table contain some records if no the function return 
nothing
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2655: Partial fix for Items on hold shelf showing as available.

2010-02-20 Thread Garry Collum
Fixes the opac results (opac-search.pl), if using xsl to transform data.  I 
have no way to test UNIMARC results, if someone could test it for me.
---
 C4/XSLT.pm |   10 --
 .../prog/en/xslt/MARC21slim2OPACResults.xsl|6 ++
 .../prog/en/xslt/UNIMARCslim2OPACResults.xsl   |7 +++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/C4/XSLT.pm b/C4/XSLT.pm
index a5cf211..8dd7840 100644
--- a/C4/XSLT.pm
+++ b/C4/XSLT.pm
@@ -26,6 +26,7 @@ use C4::Items;
 use C4::Koha;
 use C4::Biblio;
 use C4::Circulation;
+use C4::Reserves;
 use Encode;
 use XML::LibXML;
 use XML::LibXSLT;
@@ -173,8 +174,10 @@ sub buildKohaItemsNamespace {
 
 my ( $transfertwhen, $transfertfrom, $transfertto ) = 
C4::Circulation::GetTransfers($item-{itemnumber});
 
-if ( $itemtypes-{ $item-{itype} }-{notforloan} || 
$item-{notforloan} || $item-{onloan} || $item-{wthdrawn} || 
$item-{itemlost} || $item-{damaged} ||
- (defined $transfertwhen  $transfertwhen ne '') || 
$item-{itemnotforloan} ) {
+   my ( $reservestatus, $reserveitem ) = 
C4::Reserves::CheckReserves($item-{itemnumber});
+
+if ( $itemtypes-{ $item-{itype} }-{notforloan} || 
$item-{notforloan} || $item-{onloan} || $item-{wthdrawn} || 
$item-{itemlost} || $item-{damaged} || 
+ (defined $transfertwhen  $transfertwhen ne '') || 
$item-{itemnotforloan} || (defined $reservestatus  $reservestatus eq 
Waiting) ){ 
 if ( $item-{notforloan}  0) {
 $status = On order;
 } 
@@ -196,6 +199,9 @@ sub buildKohaItemsNamespace {
 if (defined $transfertwhen  $transfertwhen ne '') {
 $status = 'In transit';
 }
+if (defined $reservestatus  $reservestatus eq Waiting) {
+$status = 'Waiting';
+}
 } else {
 $status = available;
 }
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl 
b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
index 0ee5a73..f146aba 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACResults.xsl
@@ -1010,6 +1010,12 @@
xsl:value-of select=count(key('item-by-status', 'In 
transit'))/
xsl:text). /xsl:text   /span
/xsl:if
+xsl:if test=count(key('item-by-status', 'Waiting'))0
+   span class=unavailable
+   xsl:textOn hold (/xsl:text
+   xsl:value-of select=count(key('item-by-status', 
'Waiting'))/
+   xsl:text). /xsl:text   /span
+   /xsl:if
/span
 /xsl:template
 
diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl 
b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
index 612295e..6917ca2 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/UNIMARCslim2OPACResults.xsl
@@ -189,6 +189,13 @@
 xsl:text). /xsl:text
   /span
 /xsl:if
+xsl:if test=count(key('item-by-status', 'Waiting'))0
+  span class=unavailable
+xsl:textOn hold (/xsl:text
+xsl:value-of select=count(key('item-by-status', 'Waiting'))/
+xsl:text). /xsl:text
+  /span
+/xsl:if
   /span
 
 /xsl:template
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2655: Fixes availabilty counts if items are on hold shelf. Patch (2/2)

2010-02-20 Thread Garry Collum
This fixes the opac results - non xsl transformed - and the intranet result 
lists.

Also fixes opac-detail which was showing all items 'on hold' if there was a bib 
level request, whether items were on the hold shelf or not.
---
 C4/Search.pm   |   11 +++
 .../prog/en/modules/catalogue/results.tmpl |1 +
 .../opac-tmpl/prog/en/modules/opac-detail.tmpl |2 +-
 .../opac-tmpl/prog/en/modules/opac-results.tmpl|1 +
 4 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 6ae9827..554174c 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -27,6 +27,7 @@ use XML::Simple;
 use C4::Dates qw(format_date);
 use C4::XSLT;
 use C4::Branch;
+use C4::Reserves;# CheckReserves
 use C4::Debug;
 use YAML;
 use URI::Escape;
@@ -1516,6 +1517,7 @@ sub searchResults {
 my $itemdamaged_count = 0;
 my $item_in_transit_count = 0;
 my $can_place_holds   = 0;
+   my $item_onhold_count = 0;
 my $items_count   = scalar(@fields);
 my $maxitems =
   ( C4::Context-preference('maxItemsinSearchResults') )
@@ -1573,6 +1575,10 @@ sub searchResults {
 my $transfertwhen = '';
 my ($transfertfrom, $transfertto);
 
+# is item on the reserve shelf?
+   my $reservestatus = 0;
+   my $reserveitem;
+
 unless ($item-{wthdrawn}
 || $item-{itemlost}
 || $item-{damaged}
@@ -1592,6 +1598,7 @@ sub searchResults {
 #should map transit status to record indexed in 
Zebra.
 #
 ($transfertwhen, $transfertfrom, $transfertto) = 
C4::Circulation::GetTransfers($item-{itemnumber});
+   ($reservestatus, $reserveitem) = 
C4::Reserves::CheckReserves($item-{itemnumber});
 }
 
 # item is withdrawn, lost or damaged
@@ -1599,12 +1606,14 @@ sub searchResults {
 || $item-{itemlost}
 || $item-{damaged}
 || $item-{notforloan}
+   || $reservestatus eq 'Waiting'
 || ($transfertwhen ne ''))
 {
 $wthdrawn_count++if $item-{wthdrawn};
 $itemlost_count++if $item-{itemlost};
 $itemdamaged_count++ if $item-{damaged};
 $item_in_transit_count++ if $transfertwhen ne '';
+   $item_onhold_count++ if $reservestatus eq 'Waiting';
 $item-{status} = $item-{wthdrawn} . - . 
$item-{itemlost} . - . $item-{damaged} . - . $item-{notforloan};
 $other_count++;
 
@@ -1613,6 +1622,7 @@ sub searchResults {
$other_items-{$key}-{$_} = $item-{$_};
}
 $other_items-{$key}-{intransit} = ($transfertwhen ne '') 
? 1 : 0;
+$other_items-{$key}-{onhold} = ($reservestatus) ? 1 : 0;
$other_items-{$key}-{notforloan} = 
GetAuthorisedValueDesc('','',$item-{notforloan},'','',$notforloan_authorised_value)
 if $notforloan_authorised_value;
$other_items-{$key}-{count}++ if 
$item-{$hbranch};
$other_items-{$key}-{location} = 
$shelflocations-{ $item-{location} };
@@ -1677,6 +1687,7 @@ sub searchResults {
 $oldbiblio-{itemlostcount}= $itemlost_count;
 $oldbiblio-{damagedcount} = $itemdamaged_count;
 $oldbiblio-{intransitcount}   = $item_in_transit_count;
+$oldbiblio-{onholdcount}  = $item_onhold_count;
 $oldbiblio-{orderedcount} = $ordered_count;
 $oldbiblio-{isbn} =~
   s/-//g;# deleting - in isbn to enable amazon content
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
index 09d6339..9dbfe4a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tmpl
@@ -515,6 +515,7 @@ function GetZ3950Terms(){
 !-- TMPL_IF NAME=itemlost 
--(Lost)!-- /TMPL_IF --
 !-- TMPL_IF NAME=damaged 
--(Damaged)!-- /TMPL_IF --
 !-- TMPL_IF NAME=intransit --(In 
transit)!-- /TMPL_IF --
+!-- TMPL_IF NAME=onhold --(On 
hold)!-- /TMPL_IF --
 !-- TMPL_IF NAME=notforloan --!-- 
TMPL_VAR name=notforloan --!-- /TMPL_IF --
 (!-- TMPL_VAR NAME=count --)/li
 !-- /TMPL_LOOP --/ul
diff --git 

[Koha-patches] [PATCH] Bug 4016: Fixes holds listing wrong pick up location.

2010-02-20 Thread Garry Collum
Removed 'SearchMyLibraryFirst' from C4::Branch.pm and was going to add it to 
opac-search.pl, but it was already there. Removing it from Branch.pm had no 
affect on SearchMyLibraryFirst and fixed the pickup locations for holds.
---
 C4/Branch.pm |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/C4/Branch.pm b/C4/Branch.pm
index a6b1a3a..103a14d 100644
--- a/C4/Branch.pm
+++ b/C4/Branch.pm
@@ -157,11 +157,10 @@ sub GetBranchesLoop (;$$) {  # since this is what most 
pages want anyway
 my $onlymine = @_ ? shift : onlymine();
 my $branches = GetBranches($onlymine);
 my @loop;
-my $searchMyLibraryFirst = 
C4::Context-preference(SearchMyLibraryFirst);;
 foreach (sort { $branches-{$a}-{branchname} cmp 
$branches-{$b}-{branchname} } keys %$branches) {
 push @loop, {
 value = $_,
-selected = (($_ eq $branch)  $searchMyLibraryFirst ) ? 1 : 0, 
+selected = ($_ eq $branch) ? 1 : 0, 
 branchname = $branches-{$_}-{branchname},
 };
 }
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4227: Removes unused opac-logout.pl.

2010-02-18 Thread Garry Collum
Performed a recursive grep on the entire file structure to confirm.
---
 opac/opac-logout.pl |   84 ---
 1 files changed, 0 insertions(+), 84 deletions(-)
 delete mode 100755 opac/opac-logout.pl

diff --git a/opac/opac-logout.pl b/opac/opac-logout.pl
deleted file mode 100755
index b8a5c75..000
--- a/opac/opac-logout.pl
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/perl
-
-# This file is part of Koha.
-#
-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
-#
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA  02111-1307 USA
-
-use CGI;
-use C4::Context;
-use C4::Auth qw/:DEFAULT get_session/;
-use C4::Output;
-use HTML::Template::Pro;
-use CGI::Session;
-
-my $query=new CGI;
-
-my $sessionID=$query-cookie('CGISESSID');
-
-if ($ENV{'REMOTE_USER'}) {
-print $query-header();
-print startpage();
-print startmenu('catalogue');
-print qq|
-h1Logout Feature Not Available/h1
-Your Koha server is configured to use a type of authentication called Basic
-Authentication instead of using a cookies-based authentication system.  With
-Basic Authentication, the only way to logout of Koha is by exiting your
-browser.
-|;
-print endmenu('catalogue');
-print endpage();
-exit;
-}
-
-my $sessions;
-open (S, /tmp/sessions);
-  # FIXME - Come up with a better logging mechanism
-while (my ($sid, $u, $lasttime) = split(/:/, S)) {
-chomp $lasttime;
-(next) unless ($sid);
-(next) if ($sid eq $sessionID);
-$sessions-{$sid}-{'userid'}=$u;
-$sessions-{$sid}-{'lasttime'}=$lasttime;
-}
-close S;
-open (S, /tmp/sessions);
-foreach (keys %$sessions) {
-my   $userid=$sessions-{$_}-{'userid'};
-my $lasttime=$sessions-{$_}-{'lasttime'};
-print S $_:$userid:$lasttime\n;
-}
-close S;
-
-my $dbh = C4::Context-dbh;
-# Check that this is the ip that created the session before deleting it
-# This script and function are apparently unfinished.  --atz (Dec 4 2007)
-my $session = get_session($sessionID);
-$session-flush;
-$session-delete;
-my $sth=$dbh-prepare(delete from sessions where sessionID=?);
-$sth-execute($sessionID);
-open L, /tmp/sessionlog;
-printf L %20s from %16s logged out at %30s (manual log out).\n, $userid, 
$ip, localtime; 
-   # where is $ip is 
coming from??
-close L;
-
-my $cookie=$query-cookie(-name = 'CGISESSID',
--value = '',
--expires = '+1y');
-
-# Should redirect to opac home page after logging out
-print $query-redirect(/cgi-bin/koha/opac-main.pl);
-exit;
-
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Add warnings to opac/maintenance.pl

2010-02-17 Thread Garry Collum
Added a FIXME for warning generated from C4/Context.pm.
---
 opac/maintenance.pl |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/opac/maintenance.pl b/opac/maintenance.pl
index 49b7491..3044c5d 100755
--- a/opac/maintenance.pl
+++ b/opac/maintenance.pl
@@ -17,6 +17,9 @@
 
 
 use strict;
+use warnings;
+# FIXME - Generates a warning from C4/Context.pm (uninitilized value).
+
 use CGI;
 use C4::Auth;
 use C4::Output;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4212: Adds license statement to opac-search.pl

2010-02-17 Thread Garry Collum
---
 opac/opac-search.pl |   18 ++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 344f168..2345783 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -1,4 +1,22 @@
 #!/usr/bin/perl
+
+# Copyright 2008 Garry Collum and the Koha Koha Development team
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA  02111-1307 USA
+
 # Script to perform searching
 # Mostly copied from search.pl, see POD there
 use strict;# always use
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3070: Fixes RSS feed for single result search.

2010-02-17 Thread Garry Collum
---
 opac/opac-search.pl |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 2345783..261f274 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -512,7 +512,8 @@ for (my $i=0;$i=...@servers;$i++) {
}
}
 ## If there's just one result, redirect to the detail page
-if ($total == 1) { 
+if ($total == 1  $format ne 'rss2'
+$format ne 'opensearchdescription'  $format ne 'atom') {   
 my $biblionumber=$newresults[0]-{biblionumber};
 if (C4::Context-preference('BiblioDefaultView') eq 'isbd') {
 print 
$cgi-redirect(/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=$biblionumber);
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3449: Fixes the perpetual error message that pops up when filtering by tag reviewer.

2010-02-15 Thread Garry Collum
Duplicates the code for searching by reviewer in the form that is used in 
searching via a link.

It looks like it was the intention of the original writer to filter by borrower 
number or by name.  Filtering by name was not implemented.  Added a FIXME 
reference to indicate this.
---
 tags/review.pl |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tags/review.pl b/tags/review.pl
index 0667f3d..d4db972 100755
--- a/tags/review.pl
+++ b/tags/review.pl
@@ -178,11 +178,12 @@ if ($filter = $input-param('to')) {
}
 }
 if ($filter = $input-param('approver')) { # name (or 
borrowernumber) from input box
-   if (($filter =~ /^\d+$/ and $filter  0) or
-   (1) ){  # $filter=get borrowernumber from name
+   if ($filter =~ /^\d+$/ and $filter  0) {
+   # $filter=get borrowernumber from name
+   # FIXME: get borrowernumber from name not implemented.
$template-param(filter_approver=$filter);
$filters{approved_by} = $filter;
-   # } else {
+   } else {
push @errors, {approver=$filter};
}
 }
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3090: Adds the report ID field to the saved reports page in the guided reports.

2010-02-15 Thread Garry Collum
Adds an ID field to the save reports table in guided reports to make running 
runreport.pl easier for users.

Also adds zebra striping to the data table.
---
 .../en/modules/reports/guided_reports_start.tmpl   |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl
index f5a94fb..5b3c569 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl
@@ -109,9 +109,11 @@ canned reports and writing custom SQL reports./p
 pChoose the report to run from the list/p
 form action=/cgi-bin/koha/reports/guided_reports.pl
 table
-trthReport Name/ththType/ththNotes/ththAuthor/ththCreation 
Date/ththSaved Results/ththSaved SQL/thth 
colspan=3nbsp;/th/tr
+trthID/ththReport 
Name/ththType/ththNotes/ththAuthor/ththCreation 
Date/ththSaved Results/ththSaved SQL/thth 
colspan=3nbsp;/th/tr
 !-- TMPL_LOOP NAME=savedreports --
-trtd!-- TMPL_VAR NAME=report_name --/td
+!-- TMPL_UNLESS NAME=__odd__ --tr class=highlight!-- TMPL_ELSE 
--tr!-- /TMPL_UNLESS --
+td!-- TMPL_VAR NAME=id --/td
+td!-- TMPL_VAR NAME=report_name --/td
 td!-- TMPL_VAR NAME=type --/td
 td!-- TMPL_VAR NAME=notes --/td
 td!-- TMPL_VAR NAME=borrowersurname --!-- TMPL_IF 
NAME=borrowerfirstname --, !-- TMPL_VAR NAME=borrowerfirstname --!-- 
/TMPL_IF -- (!-- TMPL_VAR NAME=borrowernumber --)/td
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enables warnings in opac-MARCdetail.pl and opac-authoritiesdetail.pl

2010-02-15 Thread Garry Collum
No resulting warnings after warnings were turned on.
---
 opac/opac-MARCdetail.pl|2 ++
 opac/opac-authoritiesdetail.pl |2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/opac/opac-MARCdetail.pl b/opac/opac-MARCdetail.pl
index 940104b..849c564 100755
--- a/opac/opac-MARCdetail.pl
+++ b/opac/opac-MARCdetail.pl
@@ -40,6 +40,8 @@ the items attached to the biblio
 =cut
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Context;
 use C4::Output;
diff --git a/opac/opac-authoritiesdetail.pl b/opac/opac-authoritiesdetail.pl
index 430f0f2..8df9d47 100755
--- a/opac/opac-authoritiesdetail.pl
+++ b/opac/opac-authoritiesdetail.pl
@@ -38,6 +38,8 @@ parameters tables.
 =cut
 
 use strict;
+use warnings;
+
 use C4::AuthoritiesMarc;
 use C4::Auth;
 use C4::Context;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4192: Fixes warnings generated by opac-account.pl.

2010-02-15 Thread Garry Collum
---
 opac/opac-account.pl |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opac/opac-account.pl b/opac/opac-account.pl
index 43a1e0c..22d83b8 100755
--- a/opac/opac-account.pl
+++ b/opac/opac-account.pl
@@ -51,12 +51,12 @@ my ( $total , $accts, $numaccts) = GetMemberAccountRecords( 
$borrowernumber );
 
 for ( my $i = 0 ; $i  $numaccts ; $i++ ) {
 $accts-[$i]{'date'} = format_date( $accts-[$i]{'date'} );
-$accts-[$i]{'amount'} = sprintf( %.2f, $accts-[$i]{'amount'} );
+$accts-[$i]{'amount'} = sprintf( %.2f, $accts-[$i]{'amount'} || 
'0.00');
 if ( $accts-[$i]{'amount'} = 0 ) {
 $accts-[$i]{'amountcredit'} = 1;
 }
 $accts-[$i]{'amountoutstanding'} =
-  sprintf( %.2f, $accts-[$i]{'amountoutstanding'} );
+  sprintf( %.2f, $accts-[$i]{'amountoutstanding'} || '0.00' );
 if ( $accts-[$i]{'amountoutstanding'} = 0 ) {
 $accts-[$i]{'amountoutstandingcredit'} = 1;
 }
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3652: Fixes XSS vulnerabilities and XTHML errors in opac-search-history.tmpl

2010-02-15 Thread Garry Collum
---
 .../prog/en/modules/opac-search-history.tmpl   |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
index 657ad14..f129925 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-search-history.tmpl
@@ -46,7 +46,7 @@
!-- TMPL_LOOP NAME=recentSearches --
tr
td!-- TMPL_VAR NAME=time --/td
-   tda href=/cgi-bin/koha/opac-search.pl?!-- TMPL_VAR 
NAME=query_cgi  --!-- TMPL_VAR NAME=query_desc ESCAPE=html 
--/a/td
+   tda href=/cgi-bin/koha/opac-search.pl?!-- TMPL_VAR 
NAME=query_cgi ESCAPE=html --!-- TMPL_VAR NAME=query_desc 
ESCAPE=html --/a/td
td!-- TMPL_VAR NAME=total --/td
/tr
!-- /TMPL_LOOP --
@@ -64,7 +64,7 @@
!-- TMPL_LOOP NAME=previousSearches --
tr
td!-- TMPL_VAR NAME=time --/td
-   tda href=/cgi-bin/koha/opac-search.pl?!-- TMPL_VAR 
NAME=query_cgi  --!-- TMPL_VAR NAME=query_desc --/a/td
+   tda href=/cgi-bin/koha/opac-search.pl?!-- TMPL_VAR 
NAME=query_cgi ESCAPE=html --!-- TMPL_VAR NAME=query_desc 
ESCAPE=html --/a/td
td!-- TMPL_VAR NAME=total --/td
/tr
!-- /TMPL_LOOP --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4180: Fixes unclose TMPL_IF in supplier.tmpl

2010-02-13 Thread Garry Collum
Also fixes a minor XHTML error.
---
 .../prog/en/modules/acqui/supplier.tmpl|4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl
index 61e1d25..a5d5f56 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tmpl
@@ -123,7 +123,7 @@ if (f.company.value == ) {
 label for=invoice_gstyesInclude tax/label input 
type=radio id=invoice_gstyes name=invoice_gst value=1 checked=checked 
/
 label for=invoice_gstnoDon't include tax/label 
input type=radio id=invoice_gstno name=invoice_gst value=0 /
 !-- TMPL_ELSE --
-label for=invoice_gstyesInclude tax/label input 
type=radio id=invoice_gstyes name=invoice_gst value=1
+label for=invoice_gstyesInclude tax/label input 
type=radio id=invoice_gstyes name=invoice_gst value=1 /
 label for=invoice_gstnoDon't include tax/label 
input type=radio id=invoice_gstno name=invoice_gst value=0 
checked=checked /
 !-- /TMPL_IF --/li!-- /TMPL_IF --
 /ol
@@ -197,7 +197,7 @@ if (f.company.value == ) {
 !-- TMPL_IF name= invoiceincgst 
--Yes!--TMPL_ELSE--No!-- /TMPL_IF --/p!-- /TMPL_IF --
 pstrongDiscount: /strong
 !-- TMPL_VAR NAME=discount -- %/p
-!-- TMPL_IF NAME=GST --pstrongTax rate: /strong
+!-- TMPL_IF NAME=GST --pstrongTax rate: /strong
 !-- TMPL_VAR name=GST --%/p!-- /TMPL_IF --
 !-- TMPL_IF NAME=notes --pstrongNotes: /strong
 !-- TMPL_VAR NAME=notes --/p!-- /TMPL_IF --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enables warnings in matching-rules.pl.

2010-02-10 Thread Garry Collum
---
 admin/matching-rules.pl |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/admin/matching-rules.pl b/admin/matching-rules.pl
index a7d45d2..5d88c46 100755
--- a/admin/matching-rules.pl
+++ b/admin/matching-rules.pl
@@ -19,6 +19,8 @@
 #
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Context;
@@ -29,7 +31,7 @@ use C4::Matcher;
 my $script_name = /cgi-bin/koha/admin/matching-rules.pl;
 
 my $input = new CGI;
-my $op = $input-param('op');
+my $op = $input-param('op') || '';
 
 
 my ($template, $loggedinuser, $cookie)
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4142: Fixes XHTML errors in aqbudgetperiod.tmpl.

2010-02-08 Thread Garry Collum
---
 .../prog/en/modules/admin/aqbudgetperiods.tmpl |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
index a63fdcc..8599f6b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
@@ -145,9 +145,9 @@
 input type=hidden name=budget_period_id value=!-- TMPL_VAR 
name=budget_period_id -- /
 ol
 li
-label for=datefromStart date/label
+label for=budget_period_startdateStart date/label
 input type=text size=10 id=budget_period_startdate 
name=budget_period_startdate   value=!-- TMPL_VAR 
NAME=budget_period_startdate --  /
-img src=/intranet-tmpl/prog/en/lib/calendar/cal.gif border=0 
id=openCalendarFrom style=cursor: pointer; valign=top /
+img src=/intranet-tmpl/prog/en/lib/calendar/cal.gif border=0 
id=openCalendarFrom style=cursor: pointer; alt=Show start date calendar /
 script type=text/javascript
 Calendar.setup({
 inputField :budget_period_startdate,
@@ -163,7 +163,7 @@
 
 label for=budget_period_enddateEnd date/label
 input type=text size=10 id=budget_period_enddate 
name=budget_period_enddate value=!-- TMPL_VAR NAME=budget_period_enddate 
-- /
-img src=/intranet-tmpl/prog/en/lib/calendar/cal.gif border=0 
id=openCalendarTo style=cursor: pointer; valign=top /
+img src=/intranet-tmpl/prog/en/lib/calendar/cal.gif border=0 
id=openCalendarTo style=cursor: pointer; alt=Show end date calendar /
 
 script type=text/javascript
 Calendar.setup({
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3662: Invalid XHTML in update-child.tmpl - resubmission.

2010-02-07 Thread Garry Collum
Missing /td closing tag.
---
 .../prog/en/modules/members/update-child.tmpl  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl
index 5cc059a..1d0d7fc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl
@@ -50,7 +50,7 @@ window.close();
 !-- TMPL_LOOP NAME=CAT_LOOP --
 tr
 td
-input type=radio id=catcode!-- TMPL_VAR NAME=catcode -- 
name=catcode value=!-- TMPL_VAR NAME=catcode -- /
+input type=radio id=catcode!-- TMPL_VAR NAME=catcode -- 
name=catcode value=!-- TMPL_VAR NAME=catcode -- //td
 td!-- TMPL_VAR NAME=catcode --/td
 tdlabel for=catcode!-- TMPL_VAR NAME=catcode --strong!-- TMPL_VAR 
NAME=catdesc --/strong/label/td 
 /tr
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4114: Follow-up patch for duplicate id in opac-detail.

2010-02-05 Thread Garry Collum
Adds the id back in body.  Renames the id in div.

The only reference to this id was in sanop.css, to which opac-detail.tmpl does 
not link.
---
 .../opac-tmpl/prog/en/modules/opac-detail.tmpl |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
index 7d7fb6d..2ae4318 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl
@@ -57,14 +57,14 @@ YAHOO.util.Event.onContentReady(furtherm, function () {
 !-- /TMPL_IF --
 
 /head
-body
+body id=opac-detail
 div id=doc3 class=yui-t7
div id=bd
 !--TMPL_INCLUDE NAME=masthead.inc --
 
 
 div id=yui-main
-div class=yui-bdiv id=opac-detail class=yui-ge
+div class=yui-bdiv id=opac-detail-yui-ge class=yui-ge
 div class=yui-u first
 div class=container
 div id=catalogue_detail_biblio
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug: 4124 - Submit button in csv-profile.tmpl floats to the right.

2010-02-05 Thread Garry Collum
Typo - class='actin' should be class='action' in the form tag.
---
 .../prog/en/modules/tools/csv-profiles.tmpl|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tmpl
index 982f991..7ca532f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tmpl
@@ -108,7 +108,7 @@ function reloadPage(p) {
/li
/ol
/fieldset
-   fieldset class=actininput 
type=hidden name=action value=create /
+   fieldset class=actioninput 
type=hidden name=action value=create /
input type=submit 
value=Submit //fieldset
/form
br style=clear:both; /
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enables warnings in the opac error pages.

2010-02-02 Thread Garry Collum
No warnings were generated in the logs, except that the template for 402 does 
not exist.  I will follow this up with another patch.
---
 opac/errors/400.pl |2 ++
 opac/errors/401.pl |2 ++
 opac/errors/402.pl |2 ++
 opac/errors/403.pl |2 ++
 opac/errors/404.pl |2 ++
 opac/errors/500.pl |2 ++
 6 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/opac/errors/400.pl b/opac/errors/400.pl
index 16c169c..b48917e 100755
--- a/opac/errors/400.pl
+++ b/opac/errors/400.pl
@@ -17,6 +17,8 @@
 
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
diff --git a/opac/errors/401.pl b/opac/errors/401.pl
index c6573f4..ec1b8c2 100755
--- a/opac/errors/401.pl
+++ b/opac/errors/401.pl
@@ -17,6 +17,8 @@
 
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
diff --git a/opac/errors/402.pl b/opac/errors/402.pl
index 8620f88..595928b 100755
--- a/opac/errors/402.pl
+++ b/opac/errors/402.pl
@@ -17,6 +17,8 @@
 
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
diff --git a/opac/errors/403.pl b/opac/errors/403.pl
index d223ffb..e4de04c 100755
--- a/opac/errors/403.pl
+++ b/opac/errors/403.pl
@@ -17,6 +17,8 @@
 
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
diff --git a/opac/errors/404.pl b/opac/errors/404.pl
index 0c5408c..2edfdbf 100755
--- a/opac/errors/404.pl
+++ b/opac/errors/404.pl
@@ -17,6 +17,8 @@
 
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
diff --git a/opac/errors/500.pl b/opac/errors/500.pl
index d3c5ce1..227dd37 100755
--- a/opac/errors/500.pl
+++ b/opac/errors/500.pl
@@ -17,6 +17,8 @@
 
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 4098: Fixes missing error templates.

2010-02-02 Thread Garry Collum
Adds the missing 402.tmpl.
Fixes the h4 element in 400, 401, 403, and 500, all of which displayed 404.
---
 .../opac-tmpl/prog/en/modules/errors/400.tmpl  |2 +-
 .../opac-tmpl/prog/en/modules/errors/401.tmpl  |2 +-
 .../opac-tmpl/prog/en/modules/errors/402.tmpl  |   29 
 .../opac-tmpl/prog/en/modules/errors/403.tmpl  |2 +-
 .../opac-tmpl/prog/en/modules/errors/500.tmpl  |2 +-
 5 files changed, 33 insertions(+), 4 deletions(-)
 create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl
index b4a0c90..49fd9e6 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/400.tmpl
@@ -10,7 +10,7 @@
 div id=yui-main
 div class=yui-bdiv class=yui-g
 h3An Error has Occurred/h3
-h4Error 404/h4
+h4Error 400/h4
 ul
 liThis error means that the Koha is pointed an invalid 
link./li
 liTo report this error, you can 
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl
index 7d70c01..73ed72b 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/401.tmpl
@@ -10,7 +10,7 @@
 div id=yui-main
 div class=yui-bdiv class=yui-g
 h3An Error has Occurred/h3
-h4Error 404/h4
+h4Error 401/h4
 ul
 liThis error means that the you are trying to access a link 
that you're not authorized to see./li
 liTry logging in to the catalog/li
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl
new file mode 100644
index 000..13eb795
--- /dev/null
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/402.tmpl
@@ -0,0 +1,29 @@
+!-- TMPL_INCLUDE NAME=doc-head-open.inc --!-- TMPL_IF 
NAME=LibraryNameTitle --!-- TMPL_VAR NAME=LibraryNameTitle --!-- 
TMPL_ELSE --Koha Online!-- /TMPL_IF -- Catalog rsaquo;  An Error Has 
Occurred
+!-- TMPL_INCLUDE NAME=doc-head-close.inc --
+/head
+body
+!--TMPL_INCLUDE NAME=masthead.inc --
+!--TMPL_INCLUDE NAME=navigation.inc --
+
+div id=doc3 class=yui-t1
+   div id=bd
+div id=yui-main
+div class=yui-bdiv class=yui-g
+h3An Error has Occurred/h3
+h4Error 402/h4
+ul
+liThis error means that the Koha is pointed an invalid 
link./li
+liTo report this error, you can 
+a href=mailto:!-- TMPL_VAR NAME=admin --email 
the Koha Administrator/a./li
+liUse top menu bar to navigate to another part of Koha./li
+/ul
+/div
+/div
+/div
+/div
+/div
+
+!-- div id=main --
+!-- /div --
+/body
+/html
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl
index d8fc6b2..81b15da 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/403.tmpl
@@ -10,7 +10,7 @@
 div id=yui-main
 div class=yui-bdiv class=yui-g
 h3An Error has Occurred/h3
-h4Error 404/h4
+h4Error 403/h4
 ul
 liThis error means that you are forbidden for some reason to 
see this page./li
 liTo report this error, you can 
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl
index 27121ff..f96e407 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/errors/500.tmpl
@@ -10,7 +10,7 @@
 div id=yui-main
 div class=yui-bdiv class=yui-g
 h3An Error has Occurred/h3
-h4Error 404/h4
+h4Error 500/h4
 ul
 liAn error occurred while try to process your request./li
 liTo report this error, you can 
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Adds warnings to opac-ics.pl and opac-search-history.pl

2010-02-02 Thread Garry Collum
No warnings generated from opac-ics.pl
Fixes warnings for opac-search-history.pl
---
 opac/opac-ics.pl|2 ++
 opac/opac-search-history.pl |4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/opac/opac-ics.pl b/opac/opac-ics.pl
index 9206e8b..2b06517 100755
--- a/opac/opac-ics.pl
+++ b/opac/opac-ics.pl
@@ -20,6 +20,8 @@
 # This script builds an ICalendar file (rfc 2445) for use in programs such as 
Ical
 
 use strict;
+use warnings;
+
 use CGI;
 use Data::ICal;
 use Data::ICal::Entry::Event;
diff --git a/opac/opac-search-history.pl b/opac/opac-search-history.pl
index 97db2d5..8c461d2 100755
--- a/opac/opac-search-history.pl
+++ b/opac/opac-search-history.pl
@@ -18,6 +18,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use C4::Auth qw(:DEFAULT get_session);
 use CGI;
 use Storable qw(freeze thaw);
@@ -46,7 +48,7 @@ my ($template, $loggedinuser, $cookie)
 $template-param(dateformat = C4::Context-preference(dateformat));
 
 # If the user is not logged in, we deal with the cookie
-if ($loggedinuser == '') {
+if (!$loggedinuser) {
 
 # Deleting search history
 if ($cgi-param('action')  $cgi-param('action') eq 'delete') {
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3856: Tools Menu in Alpha Order - resubmission.

2010-01-27 Thread Garry Collum
This patch gathers the links on the tools menu and places them in categories 
similar to the Administration menu - Patrons and circulation, Catalog, 
Additional Tools. It also adds these categories to the tools sidebar menu.
---
 .../intranet-tmpl/prog/en/includes/tools-menu.inc  |   80 +++-
 .../prog/en/modules/tools/tools-home.tmpl  |  135 ++--
 2 files changed, 116 insertions(+), 99 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
index 087e1cd..3a9376b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
@@ -9,64 +9,78 @@
});
 //]]
 /script
-div id=navmenuul id=navmenulist
+div id=navmenu
+div id=navmenulist
+ul
lia href=/cgi-bin/koha/tools/tools-home.plTools Home/a/li
-!-- TMPL_IF NAME=CAN_user_tools_edit_news --
-   lia href=/cgi-bin/koha/tools/koha-news.plNews/a/li
-!-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_label_creator --
-   lia href=/cgi-bin/koha/labels/label-home.plLabel creator/a/li
-   lia href=/cgi-bin/koha/labels/spinelabel-home.plQuick spine label 
creator/a/li
+/ul
+h5Patrons and circulation/h5
+ul
+!-- TMPL_IF NAME=CAN_user_tools_moderate_comments --
+   lia href=/cgi-bin/koha/reviews/reviewswaiting.plComments/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_edit_calendar --
-   lia href=/cgi-bin/koha/tools/holidays.plCalendar/a/li
+!-- TMPL_IF NAME=CAN_user_tools_import_patrons --
+   lia href=/cgi-bin/koha/tools/import_borrowers.plImport 
patrons/a/li
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_edit_notices --
lia href=/cgi-bin/koha/tools/letter.plNotices/a/li
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_edit_notice_status_triggers --
-   lia href=/cgi-bin/koha/tools/overduerules.plNotice/status 
triggers/a/li
+   lia href=/cgi-bin/koha/tools/overduerules.plOverdue notice/status 
triggers/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_moderate_comments --
-   lia href=/cgi-bin/koha/reviews/reviewswaiting.plModerate OPAC 
comments/a/li
-!-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_moderate_tags --
-lia href=/cgi-bin/koha/tags/review.plModerate patron tags/a/li
+!-- TMPL_IF NAME=CAN_user_tools_label_creator --
+lia href=/cgi-bin/koha/patroncards/home.plPatron card 
creator/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_manage_csv_profiles --
-   lia href=/cgi-bin/koha/tools/csv-profiles.plCSV Profiles/a/li
+!-- TMPL_IF NAME=CAN_user_tools_delete_anonymize_patrons --
+lia href=/cgi-bin/koha/tools/cleanborrowers.plPatrons (anonymize, 
bulk-delete)/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_view_system_logs --
-   lia href=/cgi-bin/koha/tools/viewlog.plLog viewer/a/li
+!-- TMPL_IF NAME=CAN_user_tools_moderate_tags --
+lia href=/cgi-bin/koha/tags/review.plTag moderation/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_inventory --
-   lia 
href=/cgi-bin/koha/tools/inventory.plInventory/stocktaking/a/li
+!-- TMPL_IF NAME=CAN_user_tools_batch_upload_patron_images --
+   lia href=/cgi-bin/koha/tools/picture-upload.plUpload patron 
images/a/li
 !-- /TMPL_IF --
+/ul
+h5Catalog/h5
+ul
 !-- TMPL_IF NAME=CAN_user_tools_batchdel --
lia href=/cgi-bin/koha/tools/batchMod.pl?del=1Batch deletion of 
items/a/li
 !--/TMPL_IF--
 !-- TMPL_IF NAME=CAN_user_tools_batchmod --
lia href=/cgi-bin/koha/tools/batchMod.plBatch modification of 
items/a/li
 !--/TMPL_IF--
+!-- TMPL_IF NAME=CAN_user_tools_export_catalog --
+   lia href=/cgi-bin/koha/tools/export.plExport 
bibs/holdings/a/li
+!-- /TMPL_IF --
+!-- TMPL_IF NAME=CAN_user_tools_inventory --
+   lia 
href=/cgi-bin/koha/tools/inventory.plInventory/stocktaking/a/li
+!-- /TMPL_IF --
+!-- TMPL_IF NAME=CAN_user_tools_label_creator --
+   lia href=/cgi-bin/koha/labels/label-home.plLabel creator/a/li
+   lia href=/cgi-bin/koha/labels/spinelabel-home.plQuick spine label 
creator/a/li
+!-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_stage_marc_import --
-   lia href=/cgi-bin/koha/tools/stage-marc-import.plMARC Import 
(staging)/a/li
+   lia href=/cgi-bin/koha/tools/stage-marc-import.plStage MARC for 
import/a/li
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_manage_staged_marc --
-   lia href=/cgi-bin/koha/tools/manage-marc-import.plMARC Import 
(managing batches)/a/li
+   lia href=/cgi-bin/koha/tools/manage-marc-import.plStaged MARC 
management/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_export_catalog --
-   lia href=/cgi-bin/koha/tools/export.plExport 
bibs/holdings/a/li
+/ul
+h5Additional Tools/h5
+ul
+!-- TMPL_IF NAME=CAN_user_tools_edit_calendar --
+   lia 

[Koha-patches] [PATCH] Bug 4056: Fixes invalid xhtml in opac-messaging.tmpl if SMS is disabled.

2010-01-21 Thread Garry Collum
There is a /td tag which is outside of the block of code which defines checks 
to see if SMS is enabled.  If SMS is disabled it causes several extra /td 
tags.
---
 .../opac-tmpl/prog/en/modules/opac-messaging.tmpl  |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
index f1532e2..0e0543c 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-messaging.tmpl
@@ -56,8 +56,7 @@
   !-- TMPL_IF NAME=SMSSendDriver --tdinput type=checkbox
  id=sms!-- TMPL_VAR NAME=message_attribute_id --
  name=!-- TMPL_VAR NAME=message_attribute_id --
- value=sms !-- TMPL_VAR NAME=transport-sms   -- onclick 
= document.opacmessaging.none!-- TMPL_VAR NAME=message_attribute_id 
--.checked=false; /!-- /TMPL_IF --
-  /td
+ value=sms !-- TMPL_VAR NAME=transport-sms   -- onclick 
= document.opacmessaging.none!-- TMPL_VAR NAME=message_attribute_id 
--.checked=false; //td!-- /TMPL_IF --
   !-- TMPL_ELSE --
   td-/td
   !-- /TMPL_IF --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3964: Fixes several XHMTL errors in aqplan.tmpl.

2009-12-19 Thread Garry Collum
aqplan.tmpl still contains some errors after this patch, mainly id elements 
that start with an numeric value.  But I need to examine the code more 
throughly before these are fixed.
---
 .../prog/en/modules/admin/aqplan.tmpl  |   46 +---
 1 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl
index 8bef092..0f669f9 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl
@@ -2,19 +2,18 @@
 title
 Budget planning
 /title
-head
 !-- TMPL_INCLUDE NAME=doc-head-close.inc --
 !-- TMPL_INCLUDE NAME=calendar.inc --
+link href=!-- TMPL_VAR NAME=yuipath --/reset/reset.css rel=stylesheet 
type=text/css /
+link href=!-- TMPL_VAR NAME=yuipath --/fonts/fonts.css rel=stylesheet 
type=text/css /
+link href=!-- TMPL_VAR NAME=yuipath --/menu/assets/menu.css 
rel=stylesheet type=text/css /
+link href=!-- TMPL_VAR NAME=yuipath 
--/container/assets/skins/sam/container.css  rel=stylesheet type=text/css 
/
+
 /head
 body
 !-- TMPL_INCLUDE NAME=header.inc --
 !-- TMPL_INCLUDE NAME=budgets-admin-search.inc --
 
-link href=!-- TMPL_VAR NAME=yuipath --/reset/reset.css rel=stylesheet 
type=text/css /
-link href=!-- TMPL_VAR NAME=yuipath --/fonts/fonts.css rel=stylesheet 
type=text/css /
-link href=!-- TMPL_VAR NAME=yuipath --/menu/assets/menu.css 
rel=stylesheet type=text/css /
-link href=!-- TMPL_VAR NAME=yuipath -- 
/container/assets/skins/sam/container.css  rel=stylesheet type=text/css /
-
 script  src=!-- TMPL_VAR NAME=yuipath --/yahoo/yahoo.js 
type=text/javascript/script
 script  src=!-- TMPL_VAR NAME=yuipath --/event/event.js 
type=text/javascript/script
 script  src=!-- TMPL_VAR NAME=yuipath --/dom/dom.js 
type=text/javascript/script
@@ -91,7 +90,7 @@ YAHOO.util.Event.onAvailable(popmenu, function () {
 a href=/cgi-bin/koha/mainpage.plHome/a rsaquo;
 a href=/cgi-bin/koha/admin/admin-home.plAdministration/a rsaquo;
 a href=/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=!-- TMPL_VAR 
NAME=budget_period_id --Budgets/a rsaquo;
-a href=/cgi-bin/koha/admin/aqplan.pl?budget_period_id=   !-- TMPL_VAR 
NAME=budget_period_id --Planning/a rsaquo;
+a href=/cgi-bin/koha/admin/aqplan.pl?budget_period_id=!-- TMPL_VAR 
NAME=budget_period_id --Planning/a rsaquo;
 /div
 
 div id=doc3 class=yui-t2
@@ -102,7 +101,7 @@ YAHOO.util.Event.onAvailable(popmenu, function () {
 
 !-- TMPL_INCLUDE NAME=budgets-admin.inc --
 
-br
+br /
 
 form method=post id='Aform' name=Aform  
action=/cgi-bin/koha/admin/aqplan.pl
 
@@ -150,16 +149,12 @@ YAHOO.util.Event.onAvailable(popmenu, function () {
 /td
 /tr
 !-- /TMPL_UNLESS --
-
-br
-
-/td/tr
 /table
 /fieldset
 
-br
+br /
 
-!-- - --
+!-- Budget Lines --
 
 !-- TMPL_IF NAME=budget_lines --
 
@@ -171,11 +166,11 @@ YAHOO.util.Event.onAvailable(popmenu, function () {
 
 !-- TMPL_LOOP NAME=authvals_row --
  !-- TMPL_IF NAME=display --
-th id=!-- TMPL_VAR NAME=code --   style=text-align: center;
+th id=!-- TMPL_VAR NAME=code --   style=text-align: 
center;
 class=!-- TMPL_VAR NAME='colnum' -- 
 !-- TMPL_ELSE --
 th id=!-- TMPL_VAR NAME=code --   style=text-align: center;
-display:none;
+display:none; 
 class=!-- TMPL_VAR NAME='colnum' -- 
 !-- /TMPL_IF --
 
@@ -199,10 +194,10 @@ YAHOO.util.Event.onAvailable(popmenu, function () {
 !--/TMPL_IF --
 
 td align='left'!-- TMPL_VAR NAME=budget_name_indent--/td
-td align='right'span id='budget_tot_formatted --'!-- TMPL_VAR 
NAME=budget_amount_formatted--nbsp;/span/td
+td align='right'span id='budget_tot_formatted --'!-- TMPL_VAR 
NAME=budget_amount_formatted--nbsp;/span
 
 !-- NEXT DIV ELEMENT IS USED BY JS FOR CALC-ING AUTO-FILL AND 
ESTIMATED AMOUNTS --
-div style=display:none; id='budget_tot_!-- TMPL_VAR 
NAME=budget_id --'!-- TMPL_VAR NAME=budget_amount--/div
+div style=display:none; id='budget_tot_!-- TMPL_VAR 
NAME=budget_id --'!-- TMPL_VAR NAME=budget_amount--/div/td
 
 !-- TMPL_LOOP NAME=lines--
 td 
@@ -217,9 +212,9 @@ YAHOO.util.Event.onAvailable(popmenu, function () {
 
 !--TMPL_IF  Name=budget_lock --
 !-- TMPL_VAR NAME=estimated_amount --nbsp;
-input type=hidden style=text-align: right;  
name='!-- TMPL_VAR NAME=cell_name--' value=!-- TMPL_VAR 
NAME=estimated_amount --   
+input type=hidden style=text-align: right;  
name='!-- TMPL_VAR NAME=cell_name--' value=!-- TMPL_VAR 
NAME=estimated_amount --   /
 !--TMPL_ELSE --
-input type=text style=text-align: right;  

[Koha-patches] [PATCH] Bug 3856: Tools Menu in Alpha Order

2009-12-19 Thread Garry Collum
This patch gathers the links on the tools menu and places them in categories 
similar to the Adminstration menu -  Patrons and circulation, Catalog, 
Additional Tools.  It also adds these categories and rearranges the links in 
the sidebar menu.  Two links were also added to the sidebar menu that were 
missing.
---
 .../intranet-tmpl/prog/en/includes/tools-menu.inc  |   78 -
 .../prog/en/modules/tools/tools-home.tmpl  |  119 ++--
 2 files changed, 110 insertions(+), 87 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
index 31ac754..7324406 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc
@@ -9,59 +9,77 @@
});
 //]]
 /script
-div id=navmenuul id=navmenulist
+div id=navmenu
+div id=navmenulist
+h5Tools Home/h5
+ul
lia href=/cgi-bin/koha/tools/tools-home.plTools Home/a/li
-!-- TMPL_IF NAME=CAN_user_tools_edit_news --
-   lia href=/cgi-bin/koha/tools/koha-news.plNews/a/li
-!-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_label_creator --
-   lia href=/cgi-bin/koha/labels/label-home.plLabels (spine and 
barcode)/a/li
+/ul
+h5Patrons and circulation/h5
+ul
+!-- TMPL_IF NAME=CAN_user_tools_moderate_comments --
+   lia href=/cgi-bin/koha/reviews/reviewswaiting.plComments/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_edit_calendar --
-   lia href=/cgi-bin/koha/tools/holidays.plCalendar/a/li
+!-- TMPL_IF NAME=CAN_user_tools_import_patrons --
+   lia href=/cgi-bin/koha/tools/import_borrowers.plImport 
patrons/a/li
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_edit_notices --
lia href=/cgi-bin/koha/tools/letter.plNotices/a/li
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_edit_notice_status_triggers --
-   lia href=/cgi-bin/koha/tools/overduerules.plNotice/status 
triggers/a/li
-!-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_moderate_comments --
-   lia href=/cgi-bin/koha/reviews/reviewswaiting.plModerate OPAC 
comments/a/li
+   lia href=/cgi-bin/koha/tools/overduerules.plOverdue notice/status 
triggers/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_moderate_comments --!-- FIXME: Update 
here when Tag specific permission is created. --lia 
href=/cgi-bin/koha/tags/review.plModerate patron tags/a/li
+!-- TMPL_IF NAME=CAN_user_tools_delete_anonymize_patrons --
+   lia href=/cgi-bin/koha/tools/cleanborrowers.plPatrons (anonymize, 
bulk-delete)/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_view_system_logs --
-   lia href=/cgi-bin/koha/tools/viewlog.plLog viewer/a/li
+!-- TMPL_IF NAME=CAN_user_tools_moderate_comments --!-- FIXME: Update 
here when Tag specific permission is created. --lia 
href=/cgi-bin/koha/tags/review.plTags/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_inventory --
-   lia 
href=/cgi-bin/koha/tools/inventory.plInventory/stocktaking/a/li
+!-- TMPL_IF NAME=CAN_user_tools_batch_upload_patron_images --
+   lia href=/cgi-bin/koha/tools/picture-upload.plUpload Patron 
Images/a/li
 !-- /TMPL_IF --
+/ul
+h5Catalog/h5
+ul
 !-- TMPL_IF NAME=CAN_user_tools_batchdel --
-   lia href=/cgi-bin/koha/tools/batchMod.pl?del=1Batch deletion of 
items/a/li
+   lia href=/cgi-bin/koha/tools/batchMod.pl?del=1Batch item 
deletion/a/li
 !--/TMPL_IF--
 !-- TMPL_IF NAME=CAN_user_tools_batchmod --
-   lia href=/cgi-bin/koha/tools/batchMod.plBatch modification of 
items/a/li
+   lia href=/cgi-bin/koha/tools/batchMod.plBatch item 
modification/a/li
 !--/TMPL_IF--
+!-- TMPL_IF NAME=CAN_user_tools_export_catalog --
+   lia href=/cgi-bin/koha/tools/export.plExport 
bibs/holdings/a/li
+!-- /TMPL_IF --
+!-- TMPL_IF NAME=CAN_user_tools_inventory --
+   lia 
href=/cgi-bin/koha/tools/inventory.plInventory/stocktaking/a/li
+!-- /TMPL_IF --
+!-- TMPL_IF NAME=CAN_user_tools_label_creator --
+   lia href=/cgi-bin/koha/labels/label-home.plLabel creator/a/li
+!-- /TMPL_IF --
+!-- TMPL_IF NAME=CAN_user_tools_label_creator --
+   lia href=/cgi-bin/koha/labels/spinelabel-home.plQuick spine label 
creator/a/li
+!-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_stage_marc_import --
-   lia href=/cgi-bin/koha/tools/stage-marc-import.plMARC Import 
(staging)/a/li
+   lia href=/cgi-bin/koha/tools/stage-marc-import.plStage MARC 
records for import/a/li
 !-- /TMPL_IF --
 !-- TMPL_IF NAME=CAN_user_tools_manage_staged_marc --
-   lia href=/cgi-bin/koha/tools/manage-marc-import.plMARC Import 
(managing batches)/a/li
+   lia href=/cgi-bin/koha/tools/manage-marc-import.plStaged MARC 
record management/a/li
 !-- /TMPL_IF --
-!-- TMPL_IF NAME=CAN_user_tools_export_catalog --
-   lia href=/cgi-bin/koha/tools/export.plExport 

[Koha-patches] [PATCH] Bug 3955: Fixes leading space error in search.

2009-12-18 Thread Garry Collum
Leading spaces in a search term were causing an error to be thrown in a join 
operator when auto-truncations is turned on. This patch removes the leading 
spaces.
---
 C4/Search.pm |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 2fe57ed..e8903fc 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -932,8 +932,10 @@ sub buildQuery {
 }
 
 if ($auto_truncation){
-   $operand=~join( ,map{ $_* }split 
(/\s+/,$operand));
-   }
+   # join throws an error if there is a leading space
+   $operand =~ s/^\s+//;
+  $operand=~join( ,map{ $_* }split (/\s+/,$operand));
+}
 
 # Detect Truncation
 my $truncated_operand;
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3961: Fixes the missing body tag in aqbudget_owner_search.tmpl.

2009-12-18 Thread Garry Collum
---
 .../en/modules/admin/aqbudget_owner_search.tmpl|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget_owner_search.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget_owner_search.tmpl
index 0445304..93d5599 100755
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget_owner_search.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudget_owner_search.tmpl
@@ -20,7 +20,7 @@ function returnOwner(ownerId, ownerName){
 
 
 /head
-
+body
 div id=custom-doc class=yui-t7
div id=bd
div class=yui-g
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3962: Fixes XHTML errors in aqbudgets.tmpl.

2009-12-18 Thread Garry Collum
Fixes the DOCTYPE, title and other XHTML errors in aqbudgets.tmpl.
---
 .../prog/en/modules/admin/aqbudgets.tmpl   |9 -
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
index a7c64c9..ee8188f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
@@ -1,3 +1,5 @@
+!-- TMPL_INCLUDE NAME=doc-head-open.inc --
+title!--TMPL_IF NAME=budget_id --Modify!-- TMPL_ELSE --Add!-- 
/TMPL_IF -- Budget/title
 !-- TMPL_INCLUDE NAME=doc-head-close.inc --
 !-- TMPL_INCLUDE NAME=calendar.inc --
 script type=text/javascript src=!-- TMPL_VAR NAME='themelang' 
--/js/acq.js/script
@@ -306,11 +308,8 @@
 
 !-- FIXME: hardcoded button positions :/ --
 input style=position:absolute; left:600px; type=button 
id=patron_search value=Edit owner onclick=ownerPopup(); return false; /
-input style=position:absolute; left:680px;  type=button 
id=patron_search value=Remove owner onclick=ownerRemove(this.form); return 
false; /
+input style=position:absolute; left:680px;  type=button 
id=patron_removal value=Remove owner onclick=ownerRemove(this.form); 
return false; /
 /li
-/td
-/tr
-/table
 
 li
 label for=branchLibrary: /label
@@ -385,7 +384,7 @@
 div class=dialog alert h3Delete Budget !-- TMPL_VAR NAME=budget_name 
--?/h3
 table
 tr
-th scope=rowBudget Amount:/td
+td scope=rowBudget Amount:/td
 td!-- TMPL_VAR NAME=budget_amount --/td
 /tr
 /table
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3963: Invalid XHMTL in aqbudgetperiods.tmpl.

2009-12-18 Thread Garry Collum
Extra head element and a few other minor XHTML errors.
---
 .../prog/en/modules/admin/aqbudgetperiods.tmpl |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
index 376b79f..1e3d9d1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
@@ -75,7 +75,7 @@
 /title
 
 
-head/head
+/head
 
 body
 
@@ -299,14 +299,14 @@
td!-- TMPL_VAR name=budget_period_description --/td
td!-- TMPL_VAR name=budget_period_startdate --/td
td!-- TMPL_VAR name=budget_period_enddate --/td
-   td font COLOR=#00FF00   !-- TMPL_IF 
name=budget_period_active --✓!-- /TMPL_IF -- /font /td
-   td font COLOR=red   !-- TMPL_IF 
name=budget_period_locked --X!-- /TMPL_IF -- /font /td
+   td!-- TMPL_IF name=budget_period_active --font 
COLOR=#00FF00✓/font!-- /TMPL_IF -- /td
+   td !-- TMPL_IF name=budget_period_locked --font 
COLOR=red X /font!-- /TMPL_IF -- /td
td align='right'!-- TMPL_VAR NAME=budget_period_total 
--/td
td
a href=!-- TMPL_VAR name=script_name 
--?op=add_formamp;budget_period_id=!-- TMPL_VAR name=budget_period_id 
escape=HTML --Edit/a
a href=!-- TMPL_VAR 
name=script_name--?op=delete_confirmamp;budget_period_id=!-- TMPL_VAR 
name=budget_period_id --Delete/a
a 
href=/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=!-- TMPL_VAR 
name=budget_period_id --Budgets/a
-   a 
href=/cgi-bin/koha/admin/aqbudgets.pl?op=add_formbudget_period_id=!-- 
TMPL_VAR NAME=budget_period_id --Add Budget/a
+   a 
href=/cgi-bin/koha/admin/aqbudgets.pl?op=add_formamp;budget_period_id=!-- 
TMPL_VAR NAME=budget_period_id --Add Budget/a
/td
/tr
!-- /TMPL_LOOP --
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches

[Koha-patches] [PATCH] Bug 3963: Additional patch to fix XHTML.

2009-12-18 Thread Garry Collum
Found more errors in aqbudgetperiods.tmpl and one of its include files.
---
 .../intranet-tmpl/prog/en/includes/duplicates.inc  |2 +-
 .../prog/en/modules/admin/aqbudgetperiods.tmpl |4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/duplicates.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/duplicates.inc
index 3374c6a..a2a5bc3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/duplicates.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/duplicates.inc
@@ -16,7 +16,7 @@ function confirmnotdup(){
 pIs this a duplicate of 
ul!--TMPL_LOOP Name=duplicates--
lia href=!--TMPL_VAR Name=url--?!--TMPL_VAR 
Name=field_name--=!-- TMPL_VAR name=dupid -- 
onclick=openWindow('!--TMPL_VAR Name=url--?!--TMPL_VAR 
Name=field_name--=!-- TMPL_VAR name=dupid --amp;popup=1', 'Duplicate '; 
return false;)!-- TMPL_VAR name=duplicateinformation --/a?
-   form action=!--TMPL_VAR Name=action_dup_yes_url-- 
method=get
+   form action=!--TMPL_VAR Name=action_dup_yes_url-- 
method=get
input type=hidden name=!--TMPL_VAR 
Name=field_name-- value=!-- TMPL_VAR name=dupid -- /
input type=submit class=edit value=Yes: Edit 
existing /
/form
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
index 1e3d9d1..56e469a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl
@@ -161,8 +161,6 @@
 li
 
 label for=budget_period_enddateEnd date/label
-/th
-td
 input type=text size=10 id=budget_period_enddate 
name=budget_period_enddate value=!-- TMPL_VAR NAME=budget_period_enddate 
-- /
 img src=/intranet-tmpl/prog/en/lib/calendar/cal.gif border=0 
id=openCalendarTo style=cursor: pointer; valign=top /
 
@@ -196,7 +194,7 @@
 !-- ACTIVE --
 !-- ## --
 label for=budget_period_activeMake Budget Active/label
-!-- TMPL_IF NAME=budget_period_active --input type=checkbox 
checked=checked id=budget_period_active name=budget_period_active 
value=1 checked /!--TMPL_ELSE--  input type=checkbox 
id=budget_period_active name=budget_period_active value=1/ 
!--/TMPL_IF--
+!-- TMPL_IF NAME=budget_period_active --input type=checkbox 
checked=checked id=budget_period_active name=budget_period_active 
value=1 /!--TMPL_ELSE--  input type=checkbox id=budget_period_active 
name=budget_period_active value=1/ !--/TMPL_IF--
 /li
 
 li
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3962: Additional patch to fix XHTML errors in aqbudgets.tmpl.

2009-12-18 Thread Garry Collum
---
 .../prog/en/modules/admin/aqbudgets.tmpl   |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
index ee8188f..b6342f1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl
@@ -155,8 +155,8 @@
legendBudget filters/legend
ul
li
-   label for=filter_budgetbranchLibrary: /label
-   select name=filter_budgetbranch 
id=filter_budgetbranch style=width:10em;
+   label for=filter_budgetbranch_idLibrary: /label
+   select name=filter_budgetbranch 
id=filter_budgetbranch_id style=width:10em;
option value=/option
!-- TMPL_LOOP name=branchloop --
option value=!-- TMPL_VAR name=value -- !-- 
TMPL_IF name=selected --selected!-- /TMPL_IF --!-- TMPL_VAR 
name=branchname --/option
@@ -173,7 +173,7 @@
/li
/ul
 
-   input type=hidden name=show value=1  
+   input type=hidden name=show value=1  /
input type=hidden  name=budget_period_id value=!-- TMPL_VAR 
NAME=budget_period_id -- / 
input type=submit class=submit name=filter value=Select /
/fieldset
@@ -247,7 +247,7 @@
 /tfoot
 /table
 
-spanbCurrency = !-- TMPL_VAR NAME=cur -- !-- TMPL_VAR 
NAME=cur_format --/b/spanbr
+spanbCurrency = !-- TMPL_VAR NAME=cur -- !-- TMPL_VAR 
NAME=cur_format --/b/spanbr /
 div class=paginationBar!-- TMPL_VAR NAME=pagination_bar --/div
 !-- /TMPL_IF -- !-- else --
 
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3890: Nothing in Type Pull Down on Purchase Suggestions.

2009-12-14 Thread Garry Collum
This patch adds a description of the itype next to the image that i suppose to 
appear in the selection list.

Fixed the path of the image in opac-suggestions.pl, but I'm not sure if you can 
actually display an image in a SELECT list option.

Also removed an extra /label closing tag.
---
 .../prog/en/modules/opac-suggestions.tmpl  |4 ++--
 opac/opac-suggestions.pl   |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl
index a66a8ad..e03cd3d 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl
@@ -63,14 +63,14 @@ $.tablesorter.addParser({
 lilabel for=titleTitle:/labelinput type=text id=title 
name=title size=50 maxlength=80 //li
 lilabel for=authorAuthor:/labelinput type=text id=author 
name=author size=50 maxlength=80 //li
 lilabel for=copyrightdateCopyright date:/labelinput type=text 
id=copyrightdate name=copyrightdate size=4 maxlength=4 //li
-lilabel for=isbnISBN or ISSN or other standard 
number:/label/labelinput type=text id=isbn name=isbn size=50 
maxlength=80 //li
+lilabel for=isbnISBN or ISSN or other standard number:/labelinput 
type=text id=isbn name=isbn size=50 maxlength=80 //li
 lilabel for=publishercodePublisher:/labelinput type=text 
id=publishercode name=publishercode size=50 maxlength=80 //li
 lilabel for=collectiontitleCollection title:/labelinput 
type=text id=collectiontitle name=collectiontitle size=50 
maxlength=80 //li
 lilabel for=placePublication Place :/labelinput type=text 
id=place name=place size=50 maxlength=80 //li
 lilabel for=itemtypeDocument Type:/labelselect name=itemtype 
 option value=Default/option
 !-- TMPL_LOOP name=itemtypeloop --
-   !-- TMPL_IF name=selected --option value=!-- 
TMPL_VAR name=itemtype-- selected=selected !--TMPL_ELSE--option 
value=!-- TMPL_VAR name=itemtype -- !--/TMPL_IF-- !--TMPL_IF 
Name=imageurl--img alt=!-- TMPL_VAR name=description -- 
src=!--TMPL_VAR Name=imageurl--!--TMPL_ELSE--!-- TMPL_VAR 
name=description --!--/TMPL_IF--/option
+   !-- TMPL_IF name=selected --option value=!-- 
TMPL_VAR name=itemtype-- selected=selected !--TMPL_ELSE--option 
value=!-- TMPL_VAR name=itemtype -- !--/TMPL_IF-- !--TMPL_IF 
Name=imageurl--img alt=!-- TMPL_VAR name=description -- 
src=!--TMPL_VAR Name=imageurl-- /!-- TMPL_VAR name=description 
--!--TMPL_ELSE--!-- TMPL_VAR name=description --!--/TMPL_IF--/option
 !-- /TMPL_LOOP --
 /select /li
 lilabel for=noteNotes:/labeltextarea name=note id=note 
rows=5 cols=40/textarea/li
diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl
index 7c07c9f..8a43353 100755
--- a/opac/opac-suggestions.pl
+++ b/opac/opac-suggestions.pl
@@ -66,7 +66,7 @@ if ($allsuggestions){
 else {
$$suggestion{suggestedby} ||= $borrowernumber unless ($allsuggestions);
 }
-warn bornum:,$borrowernumber;
+# warn bornum:,$borrowernumber;
 use YAML;
 my $suggestions_loop =
   SearchSuggestion( $suggestion);
@@ -97,7 +97,7 @@ map{ 
$_-{'branchcodesuggestedby'}=GetBranchInfo($_-{'branchcodesuggestedby'})-
 my $supportlist=GetSupportList();  
 foreach my $support(@$supportlist){
if ($$support{'imageurl'}){
-   $$support{'imageurl'}= getitemtypeimagelocation( 'intranet', 
$$support{'imageurl'} );
+   $$support{'imageurl'}= getitemtypeimagelocation( 'opac', 
$$support{'imageurl'} );
}
else {
   delete $$support{'imageurl'}
-- 
1.6.0.4

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Added zebra striping to the table in dictionary.tmpl.

2009-10-12 Thread Garry Collum
Also fixed a couple of minor XHTML errors.
---
 .../prog/en/modules/reports/dictionary.tmpl|8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
index 11d8dce..c2a1f80 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/dictionary.tmpl
@@ -44,7 +44,11 @@ Filter by area select name=areas
 /tr
 !-- TMPL_IF NAME=definitions --
 !-- TMPL_LOOP NAME=definitions --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight valign=top
+!-- TMPL_ELSE --
 tr valign=top
+!-- /TMPL_UNLESS --
 td!-- TMPL_VAR NAME=name --/td
 td!-- TMPL_VAR NAME=description --/td
 td!-- TMPL_VAR NAME=areaname --/td
@@ -56,7 +60,7 @@ Filter by area select name=areas
 /form/td
 /tr
 !-- /TMPL_LOOP --
-!-- TMPL_ELSE --nbsp;!-- /TMPL_IF --
+!-- /TMPL_IF --
 /table
 !-- /TMPL_IF --
 
@@ -183,7 +187,6 @@ Filter by area select name=areas
 input type=hidden name=columnstring value=!-- TMPL_VAR 
NAME=columnstring -- /
 
 !-- TMPL_LOOP NAME=columns --
-p
 input type=hidden name=criteria_column value=!-- TMPL_VAR NAME=name 
-- /
 !-- TMPL_VAR NAME=name --
 !-- TMPL_IF NAME=distinct --
@@ -237,7 +240,6 @@ align  : Tl
 pSearch string matches input type=text size=13 name=!-- TMPL_VAR 
NAME=name --_value //p
 !-- /TMPL_IF --
 
-/p
 !-- /TMPL_LOOP --
 input type=hidden name=phase value=New Term step 5 /
 input type=submit name=submit value=Next /
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3691: Invalid XHTML in about.tmpl

2009-10-05 Thread Garry Collum
Fixes several missing closing html tags.
---
 koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl
index 3a64ef9..40bf1e3 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tmpl
@@ -58,6 +58,7 @@
 td!-- TMPL_VAR NAME=version --/td
 !-- TMPL_IF name=newrow --/tr!-- TMPL_UNLESS 
NAME=__last__ --tr!-- /TMPL_UNLESS --!-- /TMPL_IF --
 !-- /TMPL_LOOP --
+   /tr
 /table
 /div
 div id=team
@@ -81,7 +82,7 @@
   listronga 
href=https://www.ohloh.net/p/koha/contributors/6618544609030;Chris 
Cormack/a/strong (Koha 1.x Release Manager, Koha 3.2 Translation 
Manager)/li
   listronga 
href=https://www.ohloh.net/p/koha/contributors/6618544646984;Nicole C. 
Engard/a/strong (Koha 3.x Documentation Manager)/li
   listronga 
href=https://www.ohloh.net/p/koha/contributors/6618544609053;Joshua 
Ferraro/a/strong (Koha 3.0 Release Manager amp; Translation Manager)/li
-  listrongRachel Hamilton-Williams/strong (Kaitiaki from 
2004 to present)
+  listrongRachel Hamilton-Williams/strong (Kaitiaki from 
2004 to present)/li
   listronga 
href=https://www.ohloh.net/p/koha/contributors/6618544614275;Henri-Damien 
Laurent/a/strong (Koha 3.0 Release Maintainer)/li
   listronga 
href=https://www.ohloh.net/p/koha/contributors/6618544609147;Owen 
Leonard/a/strong (Koha 3.x Interface Design)/li
   listronga 
href=https://www.ohloh.net/p/koha/contributors/6618544612249;Paul 
Poulain/a/strong (Koha 2.0 Release Manager, Koha 2.2 Release 
Manager/Maintainer)/li
@@ -111,7 +112,7 @@
 liGarry Collum/li
 liVincent Danjean/li
 liKip DeGraaf/li
-lia 
href=https://www.ohloh.net/p/koha/contributors/6620692210484;Frédéric 
Demians/a
+lia 
href=https://www.ohloh.net/p/koha/contributors/6620692210484;Frédéric 
Demians/a/li
 liThomas Dukleth (MARC Frameworks Maintenance)/li
 liSebastiaan Durand/li
 liEcole des Mines de Saint Etienne, Philippe Jaillon 
(OAI-PMH support)/li
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches

[Koha-patches] [PATCH] Bug 2505: Added warnings to members/members-home.pl and members/setstatus.pl

2009-09-24 Thread Garry Collum
---
 members/members-home.pl |2 ++
 members/setstatus.pl|5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/members/members-home.pl b/members/members-home.pl
index 32531c2..2755452 100755
--- a/members/members-home.pl
+++ b/members/members-home.pl
@@ -16,6 +16,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
diff --git a/members/setstatus.pl b/members/setstatus.pl
index c2b7a38..fc27c17 100755
--- a/members/setstatus.pl
+++ b/members/setstatus.pl
@@ -23,6 +23,7 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
 
 use CGI;
 use C4::Context;
@@ -36,11 +37,11 @@ my $flagsrequired;
 $flagsrequired-{borrowers}=1;
 my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired);
 
-my $destination = $input-param(destination);
+my $destination = $input-param(destination) || '';
 my $cardnumber = $input-param(cardnumber);
 my $borrowernumber=$input-param('borrowernumber');
 my $status = $input-param('status');
-my $reregistration = $input-param('reregistration');
+my $reregistration = $input-param('reregistration') || '';
 
 my $dbh = C4::Context-dbh;
 my $dateexpiry;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3662: Fixes invalid XHTML in update-child.tmpl

2009-09-24 Thread Garry Collum
---
 .../prog/en/modules/members/update-child.tmpl  |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl
index 5cc059a..1d0d7fc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/update-child.tmpl
@@ -50,7 +50,7 @@ window.close();
 !-- TMPL_LOOP NAME=CAT_LOOP --
 tr
 td
-input type=radio id=catcode!-- TMPL_VAR NAME=catcode -- 
name=catcode value=!-- TMPL_VAR NAME=catcode -- /
+input type=radio id=catcode!-- TMPL_VAR NAME=catcode -- 
name=catcode value=!-- TMPL_VAR NAME=catcode -- //td
 td!-- TMPL_VAR NAME=catcode --/td
 tdlabel for=catcode!-- TMPL_VAR NAME=catcode --strong!-- TMPL_VAR 
NAME=catdesc --/strong/label/td 
 /tr
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enables warnings in members/mancredit.pl and maninvoice.pl

2009-09-24 Thread Garry Collum
Fixes resulting warnings.

Also corrects a couple of minor typos.
---
 members/mancredit.pl  |6 --
 members/maninvoice.pl |4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/members/mancredit.pl b/members/mancredit.pl
index c2b49bd..f122ea8 100755
--- a/members/mancredit.pl
+++ b/members/mancredit.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-#wrriten 11/1/2000 by ch...@katipo.oc.nz
+#written 11/1/2000 by ch...@katipo.oc.nz
 #script to display borrowers account details
 
 
@@ -22,6 +22,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Output;
 use CGI;
@@ -43,7 +45,7 @@ if ($add){
 my $barcode=$input-param('barcode');
 my $itemnum = GetItemnumberFromBarcode($barcode) if $barcode;
 my $desc=$input-param('desc');
-my $amount=$input-param('amount');
+my $amount=$input-param('amount') || 0;
 $amount = -$amount;
 my $type=$input-param('type');
 manualinvoice($borrowernumber,$itemnum,$desc,$type,$amount);
diff --git a/members/maninvoice.pl b/members/maninvoice.pl
index ff0b9ff..34c2349 100755
--- a/members/maninvoice.pl
+++ b/members/maninvoice.pl
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-#wrriten 11/1/2000 by ch...@katipo.oc.nz
+#written 11/1/2000 by ch...@katipo.oc.nz
 #script to display borrowers account details
 
 
@@ -22,6 +22,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Output;
 use CGI;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enables warnings in member-flags.pl, member-password.pl, and member-picupload.pl.

2009-09-24 Thread Garry Collum
No warnings were generated in testing after warnings were enabled.
---
 members/member-flags.pl |1 +
 members/member-password.pl  |2 ++
 members/member-picupload.pl |2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/members/member-flags.pl b/members/member-flags.pl
index b71d704..749cecc 100755
--- a/members/member-flags.pl
+++ b/members/member-flags.pl
@@ -5,6 +5,7 @@
 # July 26, 2002 (my birthday!)
 
 use strict;
+use warnings;
 
 use CGI;
 use C4::Output;
diff --git a/members/member-password.pl b/members/member-password.pl
index 696a436..17416d7 100755
--- a/members/member-password.pl
+++ b/members/member-password.pl
@@ -5,6 +5,8 @@
 #converted to using templates 3/16/03 by mwhan...@hmc.edu
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Output;
 use C4::Context;
diff --git a/members/member-picupload.pl b/members/member-picupload.pl
index c6f6afc..7e541c0 100755
--- a/members/member-picupload.pl
+++ b/members/member-picupload.pl
@@ -25,6 +25,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Context;
 use C4::Output;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bugs 3646 and 2651: Changes the output of compact.xsl from html to xhtml.

2009-09-18 Thread Garry Collum
Changes the output of compact.xsl to XHTML for 
catalogue/showmarc.pl?viewas=card.

Adds title element in head.
Removes link to nonexistent css file (bug 2651).
---
 koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl 
b/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl
index 0916cda..43d7f53 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl
@@ -4,13 +4,13 @@
   xmlns=http://www.w3.org/1999/xhtml;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:marc=http://www.loc.gov/MARC21/slim; 
+  exclude-result-prefixes=xsi marc
   version=1.0
-  xsl:output method=html doctype-public=-//W3C/DTD HTML 4.01 
Transitional//EN doctype-system=http://www.w3.org/TR/html4/strict.dtd; /
+  xsl:output method=xml version=1.0 encoding=UTF-8 
doctype-public=-//W3C//DTD XHTML 1.0 Transitional//EN 
doctype-system=http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; /
   xsl:template match=/
 html
   head
-meta http-equiv=Content-Type content=text/html 
charset=utf-8/
-link href=/koha-tmpl/opac-tmpl/prog/en/css/xsl.css 
rel=stylesheet type=text/css /
+   titleMARC Card View/title
   /head
   body
xsl:apply-templates/
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3604: Fixes invalid XHTML in manage-marc-import.tmpl.

2009-09-13 Thread Garry Collum
Also adds zebra striping to table
---
 .../prog/en/modules/tools/manage-marc-import.tmpl  |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
index efc2827..4928d2c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tmpl
@@ -207,7 +207,7 @@ Page
 thAction/th
   /tr
   !-- TMPL_LOOP name=batch_list --
-  tr
+  !-- TMPL_UNLESS NAME=__odd__ --tr class=highlight!-- TMPL_ELSE 
--tr!-- /TMPL_UNLESS --
 td!-- TMPL_VAR name=import_batch_id --/td
 tda href=!-- TMPL_VAR name=script_name --?import_batch_id=!-- 
TMPL_VAR name=import_batch_id --!-- TMPL_VAR name=file_name --/a/td
 td!-- TMPL_VAR name=comments --/td
@@ -216,7 +216,7 @@ Page
 td!-- TMPL_VAR name=num_biblios --/td
 td!-- TMPL_VAR name=num_items --!-- TMPL_IF NAME=num_items -- a 
href=!-- TMPL_VAR name=script_name --?import_batch_id=!-- TMPL_VAR 
name=import_batch_id --amp;op=create_labels(Create Label Batch)/a!-- 
/TMPL_IF --/td
 td!-- TMPL_IF name=can_clean --
-  form method=POST action=!-- TMPL_VAR name=script_name -- 
name=clean_batch_!-- TMPL_VAR name='import_batch_id'-- id=clean_batch_!-- 
TMPL_VAR name='import_batch_id'-- 
+  form method=post action=!-- TMPL_VAR name=script_name -- 
name=clean_batch_!-- TMPL_VAR name='import_batch_id'-- id=clean_batch_!-- 
TMPL_VAR name='import_batch_id'-- 
 input type=hidden name=import_batch_id value=!-- TMPL_VAR 
name=import_batch_id -- /
 input type=hidden name=op value=clean-batch /
 input type=submit class=button value=Clean onclick=return 
confirm(_('Clear all reservoir records staged in this batch?  This cannot be 
undone.')); /
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enabled warnings in tools-home.pl, holidays.pl, exceptionHolidays.pl, and newHolidays.pl

2009-09-11 Thread Garry Collum
Tested for warnings after addition of 'use warnings.' No warnings were 
generated.
---
 tools/exceptionHolidays.pl |2 ++
 tools/holidays.pl  |2 ++
 tools/newHolidays.pl   |2 ++
 tools/tools-home.pl|2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tools/exceptionHolidays.pl b/tools/exceptionHolidays.pl
index c820a92..64a4860 100755
--- a/tools/exceptionHolidays.pl
+++ b/tools/exceptionHolidays.pl
@@ -1,6 +1,8 @@
 #!/usr/bin/perl
 
 use strict;
+use warnings;
+
 use CGI;
 
 use C4::Auth;
diff --git a/tools/holidays.pl b/tools/holidays.pl
index 047f226..a6afcaa 100755
--- a/tools/holidays.pl
+++ b/tools/holidays.pl
@@ -17,6 +17,8 @@
 
 #Sets holiday periods for each branch. Datedues will be extended if branch 
is closed -TG
 use strict;
+use warnings;
+
 use CGI;
 
 use C4::Auth;
diff --git a/tools/newHolidays.pl b/tools/newHolidays.pl
index 08cb7dd..34469d8 100755
--- a/tools/newHolidays.pl
+++ b/tools/newHolidays.pl
@@ -1,6 +1,8 @@
 #!/usr/bin/perl
 
 use strict;
+use warnings;
+
 use CGI;
 
 use C4::Auth;
diff --git a/tools/tools-home.pl b/tools/tools-home.pl
index c49d2e7..7028358 100755
--- a/tools/tools-home.pl
+++ b/tools/tools-home.pl
@@ -16,6 +16,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3420: Revised follow-up patch for 'patrons with no checkouts'

2009-08-20 Thread Garry Collum
Comments out all warnings that were used for debugging.

Enables warnigns and fixes the resulting warnings.

This patch replaces the previous follow-up patch for bug 3420.
---
 reports/borrowers_out.pl |   33 -
 1 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl
index 2bd831b..ff5e782 100755
--- a/reports/borrowers_out.pl
+++ b/reports/borrowers_out.pl
@@ -18,6 +18,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Context;
@@ -47,7 +49,7 @@ my @filters = $input-param(Filter);
 my $output = $input-param(output);
 my $basename = $input-param(basename);
 my $mime = $input-param(MIME);
-our $sep = $input-param(sep);
+our $sep = $input-param(sep) || '';
 $sep = \t if ($sep eq 'tabulation');
 my ($template, $borrowernumber, $cookie)
 = get_template_and_user({template_name = $fullreportname,
@@ -88,9 +90,10 @@ if ($do_it) {
 my $x = $line-{loopcell};
 print $line-{rowtitle}.$sep;
 foreach my $cell (@$x) {
-print $cell-{value}.$sep;
+my $cellvalue = defined $cell-{value} ? $cell-{value}.$sep : 
''.$sep;
+print $cellvalue;
 }
-print $line-{totalrow};
+#print $line-{totalrow};
 print \n;
 }
 # footer
@@ -190,7 +193,7 @@ sub calculate {
 }
 $strsth2 .= group by $colfield;
 $strsth2 .= order by $colorder;
-warn . $strsth2;
+# warn . $strsth2;
 
 my $sth2 = $dbh-prepare( $strsth2 );
 $sth2-execute;
@@ -213,10 +216,11 @@ sub calculate {
 my @table;
 
 #  warn init table;
-for (my $i=1;$i=$line;$i++) {
-foreach my $col ( @loopcol ) {
-#  warn  init table : $row-{rowtitle} / $col-{coltitle} 
;
-$table[$i]-{($col-{coltitle})?$col-{coltitle}:Global}=0;
+if($line) {
+for (my $i=1;$i=$line;$i++) {
+foreach my $col ( @loopcol ) {
+$table[$i]-{($col-{coltitle})?$col-{coltitle}:Global}=0;
+}
 }
 }
 
@@ -253,11 +257,13 @@ sub calculate {
 $strcalc .= , $colfield if ($column);
 $strcalc .=  order by $colfield  if ($colfield);
 my $max;
-if (@loopcol) {
-$max = $li...@loopcol;
-} else { $max=$line;}
-$strcalc .=  LIMIT 0,$max if ($line);
-warn SQL :. $strcalc;
+if ($line) {
+if (@loopcol) {
+$max = $li...@loopcol;
+} else { $max=$line;}
+$strcalc .=  LIMIT 0,$max;
+ } 
+#warn SQL :. $strcalc;
 
 my $dbcalc = $dbh-prepare($strcalc);
 $dbcalc-execute;
@@ -313,3 +319,4 @@ sub calculate {
 }
 
 1;
+__END__
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3420: Fixes 'Patrons with no checkouts' report.

2009-08-15 Thread Garry Collum
Fixed typo in SQL statement.  Commented out some unused SQL statements.

Removed limit for itemtype (column not available in results) and added limit 
for branchcode.
---
 .../prog/en/modules/reports/borrowers_out.tmpl |4 ++--
 reports/borrowers_out.pl   |   10 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
index ce7c4a9..4525103 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
@@ -88,8 +88,8 @@
 /select/li
lilabel for=criteriaBy: /labelselect 
name=Criteria id=criteria
 option value = selected=selectedNone/option
-option value =categorycodeCategorycode/option
-option value =itemtypeItemtype/option
+option value =categorycodePatron Category/option
+option value =branchcodeLibrary/option
 /select/li
/ol
/fieldset
diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl
index 3611021..2bd831b 100755
--- a/reports/borrowers_out.pl
+++ b/reports/borrowers_out.pl
@@ -172,7 +172,7 @@ sub calculate {
 my $colfield;
 my $colorder;
 if ($column){
-$column = borrowers..$column if $column=~/categorycode/;
+$column = borrowers..$column if $column=~/categorycode/ || 
$column=~/branchcode/;
 my @colfilter ;
 $colfilter[0] = @$filters[0] if ($column =~ /category/ )  ;
 #  $colfilter[0] = @$filters[11] if ($column =~ /sort2/ ) ;
@@ -183,7 +183,7 @@ sub calculate {
 $colorder .= $column;
 
 my $strsth2;
-$strsth2 .= select distinctrow $colfield FROM borrowers LEFT JOIN 
`old_issues` ON issues.borrowernumber=borrowers.borrowernumber;
+$strsth2 .= select distinctrow $colfield FROM borrowers LEFT JOIN 
`old_issues` ON old_issues.borrowernumber=borrowers.borrowernumber;
 if ($colfilter[0]) {
 $colfilter[0] =~ s/\*/%/g;
 $strsth2 .=  and $column LIKE '$colfilter[0]'  ;
@@ -233,7 +233,7 @@ sub calculate {
 $strcalc .=  AND borrowers.categorycode like ' . @$filters[0] .' if ( 
@$filters[0] );
 if (@$filters[1]){
 my $strqueryfilter=SELECT DISTINCT borrowernumber FROM old_issues 
where old_issues.timestamp @$filters[1] ;
-my $queryfilter = $dbh-prepare(SELECT DISTINCT borrowernumber FROM 
old_issues where old_issues.timestamp .format_date_in_iso(@$filters[1]));
+#my $queryfilter = $dbh-prepare(SELECT DISTINCT borrowernumber FROM 
old_issues where old_issues.timestamp .format_date_in_iso(@$filters[1]));
 $strcalc .=  AND borrowers.borrowernumber not in ($strqueryfilter);
 
 #  $queryfilter-execute(@$filters[1]);
@@ -242,8 +242,8 @@ sub calculate {
 #  }
 } else {
 my $strqueryfilter=SELECT DISTINCT borrowernumber FROM old_issues ;
-my $queryfilter = $dbh-prepare(SELECT DISTINCT borrowernumber FROM 
old_issues );
-$queryfilter-execute;
+#my $queryfilter = $dbh-prepare(SELECT DISTINCT borrowernumber FROM 
old_issues );
+#$queryfilter-execute;
 $strcalc .=  AND borrowers.borrowernumber not in ($strqueryfilter);
 #  while (my ($borrowernumber)=$queryfilter-fetchrow){
 #  $strcalc .=  AND borrowers.borrowernumber  
$borrowernumber ;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3420: Follow-up patch for 'patrons with no checkouts'

2009-08-15 Thread Garry Collum
Comments out all warnings that were used for debugging.

Enables warnings and fixes all resulting warnings.
---
 reports/borrowers_out.pl |   24 ++--
 1 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl
index 2bd831b..b441156 100755
--- a/reports/borrowers_out.pl
+++ b/reports/borrowers_out.pl
@@ -18,6 +18,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Context;
@@ -47,7 +49,7 @@ my @filters = $input-param(Filter);
 my $output = $input-param(output);
 my $basename = $input-param(basename);
 my $mime = $input-param(MIME);
-our $sep = $input-param(sep);
+our $sep = $input-param(sep) || '';
 $sep = \t if ($sep eq 'tabulation');
 my ($template, $borrowernumber, $cookie)
 = get_template_and_user({template_name = $fullreportname,
@@ -88,9 +90,9 @@ if ($do_it) {
 my $x = $line-{loopcell};
 print $line-{rowtitle}.$sep;
 foreach my $cell (@$x) {
-print $cell-{value}.$sep;
+print $cell-{value}.$sep if $cell-{value};
 }
-print $line-{totalrow};
+#print $line-{totalrow};
 print \n;
 }
 # footer
@@ -190,7 +192,7 @@ sub calculate {
 }
 $strsth2 .= group by $colfield;
 $strsth2 .= order by $colorder;
-warn . $strsth2;
+# warn . $strsth2;
 
 my $sth2 = $dbh-prepare( $strsth2 );
 $sth2-execute;
@@ -213,10 +215,11 @@ sub calculate {
 my @table;
 
 #  warn init table;
-for (my $i=1;$i=$line;$i++) {
-foreach my $col ( @loopcol ) {
-#  warn  init table : $row-{rowtitle} / $col-{coltitle} 
;
-$table[$i]-{($col-{coltitle})?$col-{coltitle}:Global}=0;
+if($line) {
+for (my $i=1;$i=$line;$i++) {
+foreach my $col ( @loopcol ) {
+$table[$i]-{($col-{coltitle})?$col-{coltitle}:Global}=0;
+}
 }
 }
 
@@ -254,10 +257,10 @@ sub calculate {
 $strcalc .=  order by $colfield  if ($colfield);
 my $max;
 if (@loopcol) {
-$max = $li...@loopcol;
+$max = $li...@loopcol if $line;
 } else { $max=$line;}
 $strcalc .=  LIMIT 0,$max if ($line);
-warn SQL :. $strcalc;
+#warn SQL :. $strcalc;
 
 my $dbcalc = $dbh-prepare($strcalc);
 $dbcalc-execute;
@@ -313,3 +316,4 @@ sub calculate {
 }
 
 1;
+__END__
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Alphabetizes library and itemtype dropdown lists in Lost Items report.

2009-08-14 Thread Garry Collum
Form - Fixes alphabetization of dropdowns.

Results - Fixes format of Date last seen to be the system date preference.  
Adds highlighting to the table.

Enables warnings. Pages generated no warnings.
---
 .../prog/en/modules/reports/itemslost.tmpl |4 +++
 reports/itemslost.pl   |   24 ---
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl
index acfbf91..01deccc 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl
@@ -42,7 +42,11 @@
 thNotes/th
 /tr
  !-- TMPL_LOOP NAME=itemsloop--
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 tda href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=!-- 
TMPL_VAR NAME=biblionumber-- title=!-- TMPL_VAR NAME=itemnotes--
  !-- TMPL_VAR NAME=title 
escape=html --
 /a/td
diff --git a/reports/itemslost.pl b/reports/itemslost.pl
index 406fbbf..adf231e 100755
--- a/reports/itemslost.pl
+++ b/reports/itemslost.pl
@@ -23,6 +23,8 @@ This script displays lost items.
 =cut
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Output;
@@ -30,6 +32,7 @@ use C4::Biblio;
 use C4::Items;
 use C4::Koha;  # GetItemTypes
 use C4::Branch; # GetBranches
+use C4::Dates qw/format_date/;
 
 my $query = new CGI;
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
@@ -62,6 +65,9 @@ if ( $get_items ) {
 $where{$itype}= $itemtypesfilter if defined $itemtypesfilter;
 
 my $items = GetLostItems( \%where, $orderbyfilter ); 
+foreach my $it (@$items) {
+$it-{'datelastseen'} = format_date($it-{'datelastseen'});
+}
 $template-param(
  total   = scalar @$items,
  itemsloop   = $items,
@@ -71,23 +77,13 @@ if ( $get_items ) {
 }
 
 # getting all branches.
-my $branches = GetBranches;
-my $branch   = C4::Context-userenv-{branchname};
-my @branchloop;
-foreach my $thisbranch ( keys %$branches ) {
-my $selected = 1 if $thisbranch eq $branch;
-my %row = (
-value  = $thisbranch,
-selected   = $selected,
-branchname = $branches-{$thisbranch}-{'branchname'},
-);
-push @branchloop, \%row;
-}
+#my $branches = GetBranches;
+#my $branch   = C4::Context-userenv-{branchname};
 
 # getting all itemtypes
 my $itemtypes = GetItemTypes();
 my @itemtypesloop;
-foreach my $thisitemtype ( sort keys %$itemtypes ) {
+foreach my $thisitemtype ( sort {$itemtypes-{$a}-{description} cmp 
$itemtypes-{$b}-{description}} keys %$itemtypes ) {
 my %row = (
 value   = $thisitemtype,
 description = $itemtypes-{$thisitemtype}-{'description'},
@@ -98,7 +94,7 @@ foreach my $thisitemtype ( sort keys %$itemtypes ) {
 # get lost statuses
 my $lost_status_loop = C4::Koha::GetAuthorisedValues( 'LOST' );
 
-$template-param( branchloop = \...@branchloop,
+$template-param( branchloop = 
GetBranchesLoop(C4::Context-userenv-{'branch'}),
   itemtypeloop   = \...@itemtypesloop,
   loststatusloop = $lost_status_loop,
 );
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enabled warnings in opac-topissues.pl

2009-08-13 Thread Garry Collum
Fixed resulting warnings and fixed a small bug with the timeLimit drop-down 
box.  It would not retain its value on subsequent pages if 'no Limit' was 
selected as an option.
---
 .../opac-tmpl/prog/en/modules/opac-topissues.tmpl  |   22 +++
 opac/opac-topissues.pl |   21 +++---
 2 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tmpl
index 3208fec..36ba710 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-topissues.tmpl
@@ -45,8 +45,8 @@ function Dopop(link) {
 at 
 !-- TMPL_VAR name=branch --
 !-- /TMPL_IF --
-!-- TMPL_IF name=timeLimit --
-in the past !-- TMPL_VAR name=timeLimit -- months
+!-- TMPL_IF name=timeLimitFinite --
+in the past !-- TMPL_VAR name=timeLimitFinite -- months
 !-- TMPL_ELSE -- of all time!-- /TMPL_IF --
 /caption
 theadtr
@@ -90,9 +90,11 @@ function Dopop(link) {
 select name=branch id=branch
 option value=All branches/option
 !-- TMPL_LOOP name=branchloop --
-!-- TMPL_IF EXPR=branch eq branchname --option 
value=!-- TMPL_VAR name=value -- selected=selected!-- TMPL_ELSE 
--option value=!-- TMPL_VAR name=value --!-- /TMPL_IF --
-!-- TMPL_VAR name=branchname --
-/option
+!-- TMPL_IF name=selected --
+option value=!-- TMPL_VAR name=value -- 
selected=selected!-- TMPL_VAR name=branchname --/option
+!-- TMPL_ELSE --
+option value=!-- TMPL_VAR name=value --!-- 
TMPL_VAR name=branchname --/option
+!-- /TMPL_IF --
 !-- /TMPL_LOOP --
 /select
 /li
@@ -100,9 +102,11 @@ function Dopop(link) {
 select name=itemtype id=itemtype
 option value=All item types/option
!-- TMPL_LOOP name=itemtypeloop --
-!-- TMPL_IF EXPR=itemtype eq description 
--option value=!-- TMPL_VAR name=value -- selected=selected!-- 
TMPL_ELSE --option value=!-- TMPL_VAR name=value --!-- /TMPL_IF --
-!-- TMPL_VAR name=description --
-/option
+   !-- TMPL_IF name=selected --
+   option value=!-- TMPL_VAR name=value -- 
selected=selected!-- TMPL_VAR name=description --/option
+   !-- TMPL_ELSE --
+   option value=!-- TMPL_VAR name=value 
--!-- TMPL_VAR name=description --/option
+   !-- /TMPL_IF --
 !-- /TMPL_LOOP --
 /select/li
li
@@ -129,4 +133,4 @@ function Dopop(link) {
 /div/div
 !-- /TMPL_IF --
 /div
-!-- TMPL_INCLUDE NAME=opac-bottom.inc --
\ No newline at end of file
+!-- TMPL_INCLUDE NAME=opac-bottom.inc --
diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl
index 6b71226..80c4f0b 100755
--- a/opac/opac-topissues.pl
+++ b/opac/opac-topissues.pl
@@ -19,6 +19,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Auth;
 use C4::Context;
@@ -52,14 +54,14 @@ my ($template, $borrowernumber, $cookie)
 my $dbh = C4::Context-dbh;
 # Displaying results
 my $limit = $input-param('limit') || 10;
-my $branch = $input-param('branch');
-my $itemtype = $input-param('itemtype');
+my $branch = $input-param('branch') || '';
+my $itemtype = $input-param('itemtype') || '';
 my $timeLimit = $input-param('timeLimit') || 3;
-my $whereclause;
+my $whereclause = '';
 $whereclause .= 'items.homebranch='.$dbh-quote($branch). AND  if ($branch);
 $whereclause .= 'biblioitems.itemtype='.$dbh-quote($itemtype). AND  if 
$itemtype;
 $whereclause .= ' TO_DAYS(NOW()) - TO_DAYS(biblio.datecreated) = 
'.($timeLimit*30).' AND ' if $timeLimit  999;
-$whereclause =~ s/ AND $//;
+$whereclause =~ s/ AND $// if $whereclause;
 $whereclause =  WHERE .$whereclause if $whereclause;
 
 my $query = SELECT datecreated, biblio.biblionumber, title, 
@@ -84,12 +86,13 @@ while (my $line= $sth-fetchrow_hashref) {
 push @results, $line;
 }
 
-if($timeLimit eq 999){ $timeLimit = 0 };
+my $timeLimitFinite = $timeLimit;
+if($timeLimit eq 999){ $timeLimitFinite = 0 };
 
 $template-param(do_it = 1,
 limit = $limit,
-branch = $branches-{$branch}-{branchname},
-itemtype = $itemtypes-{$itemtype}-{description},
+branch = $branches-{$branch}-{branchname} || 'all 
locations',
+itemtype = $itemtypes-{$itemtype}-{description} || 'item 
types',
 timeLimit = $timeLimit,
 results_loop = \...@results,
 

[Koha-patches] [PATCH] Bug 2505: Enabled warnings in opac-export.pl and opac-sendbasket.pl

2009-08-12 Thread Garry Collum
---
 opac/opac-export.pl |1 +
 opac/opac-sendbasket.pl |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opac/opac-export.pl b/opac/opac-export.pl
index 0093ce0..469ec85 100755
--- a/opac/opac-export.pl
+++ b/opac/opac-export.pl
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 use HTML::Template::Pro;
 use strict;
+use warnings;
 
 use C4::Record;
 use C4::Auth;
diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl
index f06230c..9efa237 100755
--- a/opac/opac-sendbasket.pl
+++ b/opac/opac-sendbasket.pl
@@ -16,6 +16,7 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
 
 use CGI;
 use Encode qw(encode);
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enable warnings in opac-passwd.pl an opac-renew.pl.

2009-08-12 Thread Garry Collum
Fixed resulting warnings in opac-renew.pl.
---
 opac/opac-passwd.pl |1 +
 opac/opac-renew.pl  |5 -
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/opac/opac-passwd.pl b/opac/opac-passwd.pl
index 491cce0..ca502ab 100755
--- a/opac/opac-passwd.pl
+++ b/opac/opac-passwd.pl
@@ -19,6 +19,7 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
 
 use CGI;
 
diff --git a/opac/opac-renew.pl b/opac/opac-renew.pl
index 88bbacb..205f48a 100755
--- a/opac/opac-renew.pl
+++ b/opac/opac-renew.pl
@@ -4,6 +4,9 @@
 # adapted for use in the hlt opac by fin...@katipo.co.nz 29/11/2002
 #script to renew items from the web
 
+use strict;
+use warnings;
+
 use CGI;
 use C4::Circulation;
 use C4::Auth;
@@ -21,7 +24,7 @@ my ( $template, $borrowernumber, $cookie ) = 
get_template_and_user(
}
 ); 
 my @items  = $query-param('item');
-my $borrowernumber = $query-param('borrowernumber') || 
$query-param('bornum');
+$borrowernumber = $query-param('borrowernumber') || $query-param('bornum');
 my $opacrenew = C4::Context-preference(OpacRenewalAllowed);
 
 for my $itemnumber ( @items ) {
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enabled warnings in opac-userupdate.pl

2009-08-11 Thread Garry Collum
Enabled warnings.  Corrected all resulting warnings by initializing variables.

Some fixes and enhancements possibly related to Bug: 1153 - Existing B_address 
now shows in the resulting email. Birthdate now appears in the email using the 
System's default format. If the patron changes data in the form data took place 
the FIELD name now appears as uppercase in the resulting email.
---
 opac/opac-userupdate.pl |   30 ++
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/opac/opac-userupdate.pl b/opac/opac-userupdate.pl
index ebfe619..8664316 100755
--- a/opac/opac-userupdate.pl
+++ b/opac/opac-userupdate.pl
@@ -18,6 +18,7 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
 
 use CGI;
 use Mail::Sendmail;
@@ -52,8 +53,8 @@ my $lib = GetBranchDetail($borr-{'branchcode'});
 # handle the new information
 # collect the form values and send an email.
 my @fields = (
-'surname',   'firstname','phone',
-'fax', 
'address','address2','city','zipcode','phone','mobile','fax','phonepro', 
'emailaddress','B_streetaddress','B_city','B_zipcode','dateofbirth','sex'
+'surname',   'firstname', 
+'address','address2','city','zipcode','phone','mobile','fax','phonepro', 
'emailaddress','B_streetaddress','B_city','B_zipcode','dateofbirth','sex'
 );
 my $update;
 my $updateemailaddress = $lib-{'branchemail'};
@@ -89,9 +90,30 @@ Borrower $borr-{'cardnumber'}
 has requested to change her/his personal details.
 Please check these new details and make the changes:
 EOF
+
+my $B_streetnumber = $borr-{'B_streetnumber'} || '';
+my $B_address = $borr-{'B_address'} || '';
+
 foreach my $field (@fields) {
-my $newfield = $query-param($field);
-$message .= $field : $borr-{$field}  --  $newfield\n;
+my $newfield = $query-param($field) || '';
+my $borrowerfield = '';
+if($borr-{$field}) {
+$borrowerfield = $borr-{$field};
+}
+# reconstruct the alternate address
+if($field eq B_streetaddress) {
+$borrowerfield = $B_streetnumber $B_address;
+}
+
+if($field eq dateofbirth) {
+   $borrowerfield  = format_date( $borr-{'dateofbirth'} ) || '';
+}
+
+if($borrowerfield eq $newfield) {
+$message .= $field : $borrowerfield  --  $newfield\n;
+} else {
+$message .= uc($field) .  : $borrowerfield  --  $newfield\n;
+}
 }
 $message .= \n\nThanks,\nKoha\n\n;
 my %mail = (
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3292: Fix to display Branch names instead of branch codes in opac serial's displays.

2009-08-09 Thread Garry Collum
Fixes display of branch name in opac-full-serial-issues.tmpl and 
opac-serial-issues.tmpl.  Also enables zebra striping in opac-serial-issues.
---
 C4/Serials.pm  |2 ++
 .../prog/en/modules/opac-full-serial-issues.tmpl   |8 ++--
 .../prog/en/modules/opac-serial-issues.tmpl|2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/C4/Serials.pm b/C4/Serials.pm
index 5f4b3ec..0745d3c 100644
--- a/C4/Serials.pm
+++ b/C4/Serials.pm
@@ -587,6 +587,7 @@ sub GetFullSubscriptionsFromBiblionumber {
 aqbudget.bookfundid,aqbooksellers.name as aqbooksellername,
 biblio.title as bibliotitle,
 subscription.branchcode AS branchcode,
+branches.branchname AS branchname,
 subscription.subscriptionid AS subscriptionid|;
  if (C4::Context-preference('IndependantBranches')  
 C4::Context-userenv  
@@ -601,6 +602,7 @@ sub GetFullSubscriptionsFromBiblionumber {
   (serial.subscriptionid=subscription.subscriptionid)
   LEFT JOIN aqbudget ON subscription.aqbudgetid=aqbudget.aqbudgetid 
   LEFT JOIN aqbooksellers on subscription.aqbooksellerid=aqbooksellers.id 
+  LEFT JOIN branches ON branches.branchcode=subscription.branchcode
   LEFT JOIN biblio on biblio.biblionumber=subscription.biblionumber 
   WHERE subscription.biblionumber = ? 
   ORDER BY year DESC,
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tmpl
index f8318b5..5858232 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-full-serial-issues.tmpl
@@ -41,11 +41,15 @@
 thStatus
 /th
 /tr
-!-- TMPL_LOOP Name=serials --
+!-- TMPL_LOOP Name=serials --
+!-- TMPL_UNLESS Name=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE -- 
 tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_VAR Name=publisheddate --
 /td
-td!-- TMPL_VAR name=branchcode --
+td!-- TMPL_VAR name=branchname --
 /td
 td!-- TMPL_VAR name=notes --
 /td
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tmpl
index 56b5cdb..1a71cf9 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-serial-issues.tmpl
@@ -83,7 +83,7 @@
 pThe subscription expired on !-- TMPl_VAR name=histenddate 
--/p
 !-- /TMPL_IF --
/p
-h2!-- TMPL_VAR name=branchcode -- !-- TMPL_VAR name=notes --/h2
+h2!-- TMPL_VAR name=branchname -- !-- TMPL_VAR name=notes --/h2
   !-- TMPL_IF name=recievedlist --
 h3Available Issues/h3
 p
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3450: RSS feed link for a tag search incorrect.

2009-08-08 Thread Garry Collum
Adds the tag parameter to the RSS feed link if the results of a query are 
retrieved from a tag in opac.
---
 opac/opac-search.pl |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 9b8b00c..176b7ad 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -369,6 +369,7 @@ my $results_hashref;
 my @coins;
 
 if ($tag) {
+   $query_cgi = tag= .$tag .  . $query_cgi;
my $taglist = get_tags({term=$tag, approved=1});
$results_hashref-{biblioserver}-{hits} = scalar (@$taglist);
my @biblist  = (map {GetBiblioData($_-{biblionumber})} @$taglist);
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2505: Enabled warnings in opac_ISBDdetail.pl, opac-modrequest.pl, and opac-tags_subject.pl.

2009-08-08 Thread Garry Collum
Enabling warnings in these files did not generate any warnings in the logs when 
tested.
---
 opac/opac-ISBDdetail.pl   |2 ++
 opac/opac-modrequest.pl   |2 ++
 opac/opac-tags_subject.pl |2 ++
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/opac/opac-ISBDdetail.pl b/opac/opac-ISBDdetail.pl
index d60f8fc..4706fde 100755
--- a/opac/opac-ISBDdetail.pl
+++ b/opac/opac-ISBDdetail.pl
@@ -42,6 +42,8 @@ the items attached to the biblio
 =cut
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Context;
 use C4::Output;
diff --git a/opac/opac-modrequest.pl b/opac/opac-modrequest.pl
index 01b45f1..bada04d 100755
--- a/opac/opac-modrequest.pl
+++ b/opac/opac-modrequest.pl
@@ -23,6 +23,8 @@
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use CGI;
 use C4::Output;
 use C4::Reserves;
diff --git a/opac/opac-tags_subject.pl b/opac/opac-tags_subject.pl
index 84e8fc3..5836f70 100755
--- a/opac/opac-tags_subject.pl
+++ b/opac/opac-tags_subject.pl
@@ -25,6 +25,8 @@ TODO :: Description here
 =cut
 
 use strict;
+use warnings;
+
 use C4::Auth;
 use C4::Context;
 use C4::Output;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3466: Fixes xhtml errors in shelves.tmpl.

2009-08-01 Thread Garry Collum
The errors show up when you are viewing the public tab of the lists page.
A closed form element (form /).
A table row not associated with a table.
---
 .../prog/en/modules/virtualshelves/shelves.tmpl|   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl
index b5b9afd..f00399a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl
@@ -309,8 +309,9 @@ function placeHold () {
!-- TMPL_ELSE --
div id=privateshelves class=ui-tabs-panel 
style=display:none;
!-- /TMPL_IF --
-!-- TMPL_IF NAME=shelveslooppriv --
+!-- TMPL_IF NAME=showprivateshelves --
!-- TMPL_VAR name='pagination_bar'--
+!-- TMPL_IF NAME=shelveslooppriv --
table
trthList Name/ththContents/ththSort 
by/ththType/ththOptions/th/tr
 !-- TMPL_LOOP NAME=shelveslooppriv --
@@ -346,10 +347,11 @@ function placeHold () {
/td
/tr
 !-- /TMPL_LOOP --
+/table
 !-- TMPL_ELSE --
-trtd colspan=4No Private Lists./td/tr
+No Private Lists.
 !-- /TMPL_IF --!-- /shelveslooppriv --
-/table
+!-- /TMPL_IF --!-- /showprivateshelves --
/div!-- /privateshelves --
 
 !-- TMPL_IF NAME=showpublicshelves --
@@ -362,7 +364,7 @@ function placeHold () {
 table
 trthList Name/ththContents/ththSort 
By/ththType/ththOptions/th/tr
 !-- TMPL_LOOP NAME=shelvesloop --
-!-- TMPL_UNLESS NAME=__odd__ --tr 
class=highlight!--TMPL_ELSE--tr!-- /TMPL_UNLESS --
+!-- TMPL_UNLESS NAME=__odd__ --tr class=highlight!-- 
TMPL_ELSE --tr!-- /TMPL_UNLESS --
tda href=shelves.pl?viewshelf=!-- TMPL_VAR NAME=shelf 
--!-- TMPL_VAR NAME=shelfname ESCAPE=html  --/a/td
td!-- TMPL_VAR NAME=count -- item(s)/td
 td!-- TMPL_VAR NAME=sortfield --/td
@@ -401,7 +403,7 @@ function placeHold () {
/div
 !-- /TMPL_UNLESS --
 
-form id=hold_form method=get action=/cgi-bin/koha/reserve/request.pl/
+form id=hold_form method=get action=/cgi-bin/koha/reserve/request.pl
 !-- Value will be set here by placeHold() --
 input id=hold_form_biblios type=hidden name=biblionumbers value= 
/
 input type=hidden name=multi_hold value=1/
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3466: Fixes xhtml errors in opac-shelves.tmpl.

2009-08-01 Thread Garry Collum
Addendum to bug 3466.  opac-shelves.tmpl contained the same xhtml error as 
shelves.tmpl, if the user is viewing the public list a orphaned table row 
(tr) is present.
---
 .../opac-tmpl/prog/en/modules/opac-shelves.tmpl|6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
index 84cff33..b0e1b73 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
@@ -338,6 +338,7 @@ $(function() {
 
   !-- TMPL_IF NAME=loggedinusername --
 a class=newshelf 
href=/cgi-bin/koha/opac-shelves.pl?shelves=1New List/a
+  !-- TMPL_IF NAME=showprivateshelves --
 !-- TMPL_IF NAME=shelveslooppriv --
   !-- TMPL_VAR name='pagination_bar'--
   table
@@ -386,10 +387,11 @@ $(function() {
 /td
   /tr
 !-- /TMPL_LOOP --
+  /table
 !-- TMPL_ELSE --
-  trtd colspan=4No Private Lists./td/tr
+ No Private Lists.
 !-- /TMPL_IF --!-- /shelveslooppriv --
-  /table
+  !-- /TMPL_IF --! -- /showprivateshelves --
   !-- TMPL_ELSE --!-- /loggedinusername --
   diva href=/cgi-bin/koha/opac-user.plLog in/a to 
create new Lists./div
   !-- /TMPL_IF --!-- /loggedinusername --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Alphabetizes branches and item-type drop-down lists in opac-topissues.pl.

2009-08-01 Thread Garry Collum
---
 opac/opac-topissues.pl |   16 ++--
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/opac/opac-topissues.pl b/opac/opac-topissues.pl
index 3371d1d..6b71226 100755
--- a/opac/opac-topissues.pl
+++ b/opac/opac-topissues.pl
@@ -94,24 +94,12 @@ $template-param(do_it = 1,
 results_loop = \...@results,
 );
 
-# load the branches## again??
-$branches = GetBranches();
-my @branch_loop;
-for my $branch_hash (sort keys %$branches ) {
-my $selected=(C4::Context-userenv  ($branch_hash eq 
C4::Context-userenv-{branch})) if 
(C4::Context-preference('SearchMyLibraryFirst'));
-push @branch_loop,
-  {
-value  = $branch_hash,
-branchname = $branches-{$branch_hash}-{'branchname'},
-selected = $selected
-  };
-}
-$template-param( branchloop = \...@branch_loop, 
mylibraryfirst=C4::Context-preference(SearchMyLibraryFirst));
+$template-param( branchloop = 
GetBranchesLoop(C4::Context-userenv-{'branch'}));
 
 #doctype
 $itemtypes = GetItemTypes;
 my @itemtypeloop;
-foreach my $thisitemtype (keys %$itemtypes) {
+foreach my $thisitemtype (sort {$itemtypes-{$a}-{'description'} cmp 
$itemtypes-{$b}-{'description'}} keys %$itemtypes) {
 my %row =(value = $thisitemtype,
 description = 
$itemtypes-{$thisitemtype}-{'description'},
 );
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3452: Additional patch that expands the branch name and category code in Suggestions Management.

2009-07-30 Thread Garry Collum
Displays the Branch name and Category description along with their codes in 
Suggestion Management.

Also since I joined to the branches table the 'map' function in 
opac-suggestions.pl to retrieve the branchname was no longer necessary.
---
 C4/Suggestions.pm  |   14 --
 .../prog/en/modules/suggestion/acceptorreject.tmpl |7 +++
 .../prog/en/modules/opac-suggestions.tmpl  |2 +-
 opac/opac-suggestions.pl   |1 -
 4 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm
index dceea5c..491739c 100644
--- a/C4/Suggestions.pm
+++ b/C4/Suggestions.pm
@@ -90,17 +90,23 @@ sub SearchSuggestion  {
 my $query = 
 SELECT suggestions.*,
 U1.branchcode   AS branchcodesuggestedby,
+B1.branchname AS branchnamesuggestedby,
 U1.surname   AS surnamesuggestedby,
 U1.firstname AS firstnamesuggestedby,
 U1.borrowernumber AS borrnumsuggestedby,
 U1.categorycode AS categorycodesuggestedby,
+C1.description AS categorydescriptionsuggestedby,
 U2.branchcode AS branchcodemanagedby,
+B2.branchname AS branchnamemanagedby,
 U2.surname   AS surnamemanagedby,
 U2.firstname AS firstnamemanagedby,
 U2.borrowernumber AS borrnummanagedby
 FROM suggestions
 LEFT JOIN borrowers AS U1 ON suggestedby=U1.borrowernumber
 LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber
+LEFT JOIN categories AS C1 ON C1.categorycode = U1.categorycode
+LEFT JOIN branches AS B1 ON B1.branchcode = U1.branchcode
+LEFT JOIN branches AS B2 ON B2.branchcode = U2.branchcode
 WHERE 1=1 ;
 
 my @sql_params;
@@ -226,15 +232,19 @@ sub GetSuggestionByStatus {
 my $query = qq(SELECT suggestions.*,
 U1.surname   AS surnamesuggestedby,
 U1.firstname AS firstnamesuggestedby,
-U1.branchcode AS branchcodesuggestedby,
+U1.branchcode AS branchcodesuggestedby,
+B1.branchname AS branchnamesuggestedby,
U1.borrowernumber AS borrnumsuggestedby,
U1.categorycode AS categorycodesuggestedby,
+C1.description AS categorydescriptionsuggestedby,
 U2.surname   AS surnamemanagedby,
 U2.firstname AS firstnamemanagedby,
-   U2.borrowernumber AS 
borrnummanagedby
+U2.borrowernumber AS borrnummanagedby
 FROM suggestions
 LEFT JOIN borrowers AS U1 ON 
suggestedby=U1.borrowernumber
 LEFT JOIN borrowers AS U2 ON 
managedby=U2.borrowernumber
+LEFT JOIN categories AS C1 ON 
C1.categorycode=U1.categorycode
+LEFT JOIN branches AS B1 on B1.branchcode = 
U1.branchcode
 WHERE status = ?);
 if (C4::Context-preference(IndependantBranches) || $branchcode) {
 my $userenv = C4::Context-userenv;
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
index c3aa93d..6cc5cbe 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
@@ -153,11 +153,10 @@
 !-- TMPL_IF name=isbn --; ISBN :i!-- TMPL_VAR 
name=isbn --/i !-- /TMPL_IF --!-- TMPL_IF name=publishercode --; 
Published by !-- TMPL_VAR name=publishercode -- !-- /TMPL_IF --!-- 
TMPL_IF name=publicationyear -- in i!-- TMPL_VAR name=publicationyear 
--/i !-- /TMPL_IF --!-- TMPL_IF name=place -- in i!-- TMPL_VAR 
name=place --/i !-- /TMPL_IF --br //td
td!-- TMPL_VAR NAME=note --/td
 td
-a 
href=/cgi-bin/koha/members/moremember.pl?borrowernumber=!-- TMPL_VAR 
NAME=borrnumsuggestedby --!-- TMPL_VAR name=surnamesuggestedby --
-!-- TMPL_IF name=firstnamesuggestedby --,!-- /TMPL_IF 
--
+a 
href=/cgi-bin/koha/members/moremember.pl?borrowernumber=!-- TMPL_VAR 
NAME=borrnumsuggestedby --!-- TMPL_VAR name=surnamesuggestedby --!-- 
TMPL_IF name=firstnamesuggestedby --,!-- /TMPL_IF --
 !-- TMPL_VAR name=firstnamesuggestedby --/abr /
-Branch: !-- TMPL_VAR name=branchcodesuggestedby --br 
/
-Category: !-- TMPL_VAR name=categorycodesuggestedby --
+!-- TMPL_VAR name=categorydescriptionsuggestedby -- 
(!-- TMPL_VAR name=categorycodesuggestedby --)br /
+!-- TMPL_VAR name=branchnamesuggestedby -- (!-- 
TMPL_VAR name=branchcodesuggestedby --)
 /td
 td
 !-- TMPL_VAR name=date --
diff --git 

[Koha-patches] [PATCH] Bug 1607: Fixes the delete checkboxes in purchase suggestions.

2009-07-29 Thread Garry Collum
If a user views suggestions of another user, syspref 
(OPACViewOthersSuggestions), a selection check box for deletion appeared next 
to all of the suggested titles whether the logged-in user owned them or not. - 
fixed

Also fixes the Clear all and Select all links which appeared for anonymouse 
users, if AnonSuggestions is turned on.
---
 .../prog/en/modules/opac-suggestions.tmpl  |6 --
 opac/opac-suggestions.pl   |9 +
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl
index aafe3b8..addc4ec 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl
@@ -101,8 +101,8 @@ $.tablesorter.addParser({
 /form!-- /TMPL_IF --
 form action=/cgi-bin/koha/opac-suggestions.pl method=post
 input type=hidden name=op value=delete_confirm /
-   divspan class=checkalla href=# 
id=CheckAllSelect All/a/span
-   span class=clearalla href=# id=CheckNoneClear 
All/a/span | !-- TMPL_IF NAME=loggedinusername --a class=new 
href=/cgi-bin/koha/opac-suggestions.pl?op=addNew purchase suggestion/a!-- 
TMPL_ELSE --!-- TMPL_IF NAME=AnonSuggestions --a class=new 
href=/cgi-bin/koha/opac-suggestions.pl?op=addNew purchase suggestion/a!-- 
/TMPL_IF --!-- /TMPL_IF --
+   div!-- TMPL_IF NAME=loggedinusername --span 
class=checkalla href=# id=CheckAllSelect All/a/span
+   span class=clearalla href=# id=CheckNoneClear 
All/a/span | a class=new 
href=/cgi-bin/koha/opac-suggestions.pl?op=addNew purchase suggestion/a!-- 
TMPL_ELSE --!-- TMPL_IF NAME=AnonSuggestions --a class=new 
href=/cgi-bin/koha/opac-suggestions.pl?op=addNew purchase suggestion/a!-- 
/TMPL_IF --!-- /TMPL_IF --
 /div
table id=suggestt class=checkboxed
theadtr
@@ -116,7 +116,9 @@ $.tablesorter.addParser({
 tbody!-- TMPL_LOOP NAME=suggestions_loop --
 !-- TMPL_IF name=even --tr!-- TMPL_ELSE --tr 
class=highlight!-- /TMPL_IF --
 !-- TMPL_IF NAME=loggedinusername --td
+!-- TMPL_IF NAME=showcheckbox --
 input type=checkbox name=delete_field 
value=!--TMPL_VAR name=suggestionid -- /
+!-- /TMPL_IF --
 /td!-- /TMPL_IF --
 td
 pstrong!-- TMPL_VAR NAME=title escape=html 
--/strong/p
diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl
index b739817..838cd05 100755
--- a/opac/opac-suggestions.pl
+++ b/opac/opac-suggestions.pl
@@ -98,6 +98,15 @@ my $suggestions_loop =
   SearchSuggestion( $borrowernumber, $author, $title, $publishercode, $status,
 $suggestedbyme );
 map{ 
$_-{'branchcodesuggestedby'}=GetBranchInfo($_-{'branchcodesuggestedby'})-[0]-{'branchname'}}
 @$suggestions_loop;  
+
+foreach my $suggestion(@$suggestions_loop) {
+if($suggestion-{'suggestedby'} == $borrowernumber) {
+$suggestion-{'showcheckbox'} = $borrowernumber;
+} else {
+$suggestion-{'showcheckbox'} = 0;
+}
+}
+
 $template-param(
 suggestions_loop = $suggestions_loop,
 title= $title,
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3452: Displays borrower category and adds links to Suggestions Management

2009-07-28 Thread Garry Collum
A couple of enhancments to Suggestions Management.

Adds a display of the borrower category of the suggesting patron for each item.

Adds links to the title and author displays so that the catalog can be quickly 
search for an existing bib.
---
 C4/Suggestions.pm  |6 --
 .../prog/en/modules/suggestion/acceptorreject.tmpl |7 ---
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm
index 1732540..dceea5c 100644
--- a/C4/Suggestions.pm
+++ b/C4/Suggestions.pm
@@ -93,7 +93,8 @@ sub SearchSuggestion  {
 U1.surname   AS surnamesuggestedby,
 U1.firstname AS firstnamesuggestedby,
 U1.borrowernumber AS borrnumsuggestedby,
-U1.branchcode AS branchcodesuggestedby,
+U1.categorycode AS categorycodesuggestedby,
+U2.branchcode AS branchcodemanagedby,
 U2.surname   AS surnamemanagedby,
 U2.firstname AS firstnamemanagedby,
 U2.borrowernumber AS borrnummanagedby
@@ -226,7 +227,8 @@ sub GetSuggestionByStatus {
 U1.surname   AS surnamesuggestedby,
 U1.firstname AS firstnamesuggestedby,
 U1.branchcode AS branchcodesuggestedby,
-   U1.borrowernumber AS 
borrnumsuggestedby,
+   U1.borrowernumber AS borrnumsuggestedby,
+   U1.categorycode AS categorycodesuggestedby,
 U2.surname   AS surnamemanagedby,
 U2.firstname AS firstnamemanagedby,
U2.borrowernumber AS 
borrnummanagedby
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
index e0cecbf..c3aa93d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/acceptorreject.tmpl
@@ -147,7 +147,7 @@
 tbody!-- TMPL_LOOP NAME=suggestions_loop --
 !-- TMPL_IF name=even --tr class=highlight!-- TMPL_ELSE 
--tr!-- /TMPL_IF --
 td
-!-- TMPL_VAR NAME=title escape=html --!-- TMPL_IF NAME=author 
--, by !-- TMPL_VAR NAME=author --!-- /TMPL_IF --br /
+!-- TMPL_IF NAME=title --a 
href=/cgi-bin/koha/catalogue/search.pl?q=!-- TMPL_VAR NAME=title 
ESCAPE=URL --!-- TMPL_VAR NAME=title escape=html --/a!-- /TMPL_IF 
--!-- TMPL_IF NAME=author --, by a 
href=/cgi-bin/koha/catalogue/search.pl?q=au:!-- TMPL_VAR NAME=author 
ESCAPE=URL --!-- TMPL_VAR NAME=author --/a!-- /TMPL_IF --br /
 !-- TMPL_IF name=copyrightdate --copy; !-- TMPL_VAR 
name=copyrightdate -- !-- /TMPL_IF --
 !-- TMPL_IF name=volumedesc --; Volume:i!-- 
TMPL_VAR name=volumedesc --/i !-- /TMPL_IF --
 !-- TMPL_IF name=isbn --; ISBN :i!-- TMPL_VAR 
name=isbn --/i !-- /TMPL_IF --!-- TMPL_IF name=publishercode --; 
Published by !-- TMPL_VAR name=publishercode -- !-- /TMPL_IF --!-- 
TMPL_IF name=publicationyear -- in i!-- TMPL_VAR name=publicationyear 
--/i !-- /TMPL_IF --!-- TMPL_IF name=place -- in i!-- TMPL_VAR 
name=place --/i !-- /TMPL_IF --br //td
@@ -155,8 +155,9 @@
 td
 a 
href=/cgi-bin/koha/members/moremember.pl?borrowernumber=!-- TMPL_VAR 
NAME=borrnumsuggestedby --!-- TMPL_VAR name=surnamesuggestedby --
 !-- TMPL_IF name=firstnamesuggestedby --,!-- /TMPL_IF 
--
-!-- TMPL_VAR name=firstnamesuggestedby --/a
-(!-- TMPL_VAR name=branchcodesuggestedby --)
+!-- TMPL_VAR name=firstnamesuggestedby --/abr /
+Branch: !-- TMPL_VAR name=branchcodesuggestedby --br 
/
+Category: !-- TMPL_VAR name=categorycodesuggestedby --
 /td
 td
 !-- TMPL_VAR name=date --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Additional patch for the branch drop-down in Existing Holds.

2009-07-22 Thread Garry Collum
Improves previous patch through the use of GetBranchesLoop. Also adds 
highlighting to the Existing holds table.
---
 .../prog/en/modules/reserve/request.tmpl   |6 +++---
 reserve/request.pl |   10 +-
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
index a98fefe..ea79fe6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl
@@ -505,7 +505,7 @@ function checkMultiHold() {
 thDetails/th
   /tr
   !-- TMPL_LOOP Name=reserveloop --
-  tr
+  !-- TMPL_UNLESS Name=__odd__ --tr class=highlight!-- TMPL_ELSE 
--tr!-- /TMPL_UNLESS --
 td
   input type=hidden name=borrowernumber value=!-- TMPL_VAR 
NAME=borrowernumber -- /
   input type=hidden name=biblionumber value=!-- TMPL_VAR 
NAME=biblionumber -- /
@@ -539,9 +539,9 @@ function checkMultiHold() {
   select name=pickup
   !-- TMPL_LOOP Name=branchloop --
 !-- TMPL_IF Name=selected --
-option value=!-- TMPL_VAR NAME=branch -- 
selected=selected
+option value=!-- TMPL_VAR NAME=value -- selected=selected
 !-- TMPL_ELSE --
-option value=!-- TMPL_VAR NAME=branch --
+option value=!-- TMPL_VAR NAME=value --
 !-- /TMPL_IF --
   !-- TMPL_VAR NAME=branchname --
 /option
diff --git a/reserve/request.pl b/reserve/request.pl
index b865c5c..a849d70 100755
--- a/reserve/request.pl
+++ b/reserve/request.pl
@@ -446,14 +446,6 @@ foreach my $biblionumber (@biblionumbers) {
  }
 );
 }
-my @branchloop;
-foreach my $br ( sort {$branches-{$a}-{'branchname'} cmp 
$branches-{$b}-{'branchname'}} keys %$branches ) {
-my %abranch;
-$abranch{'selected'}   = ( $br eq $res-{'branchcode'} );
-$abranch{'branch'} = $br;
-$abranch{'branchname'} = $branches-{$br}-{'branchname'};
-push( @branchloop, \%abranch );
-}
 
 if ( ( $res-{'found'} eq 'W' ) ) {
 my $item = $res-{'itemnumber'};
@@ -497,7 +489,7 @@ foreach my $biblionumber (@biblionumbers) {
 $reserve{'ccode'}   = $res-{'ccode'};
 $reserve{'barcode'} = $res-{'barcode'};
 $reserve{'priority'}= $res-{'priority'};
-$reserve{'branchloop'} = \...@branchloop;
+$reserve{'branchloop'} = GetBranchesLoop($res-{'branchcode'});
 $reserve{'optionloop'} = \...@optionloop;
 
 push( @reserveloop, \%reserve );
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Added highlighting to Serials Subscriptions table in serials-home.tmpl.

2009-07-22 Thread Garry Collum
Added highlighting to serials subscriptions table.  Cleaned up unused toggle 
variable code.
---
 .../prog/en/modules/serials/serials-home.tmpl  |   55 +---
 1 files changed, 13 insertions(+), 42 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tmpl
index eae9d99..451e91a 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tmpl
@@ -81,66 +81,37 @@ Serials updated :
 /tr
 
 !-- TMPL_LOOP name=subscriptions --
+!-- TMPL_UNLESS name=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
-!-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
-!-- /TMPL_IF --
+!-- /TMPL_UNLESS --
+td
 !-- TMPL_IF name=issn --!-- TMPL_VAR name=issn --
 !-- /TMPL_IF --
 /td
-!-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
-!-- /TMPL_IF --
-
-a 
href=/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=!-- TMPL_VAR 
name=subscriptionid -- class=button title=subscription detail!-- 
TMPL_IF name=title --!-- TMPL_VAR name=title escape=html --!-- 
TMPL_ELSE --
+tda 
href=/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=!-- TMPL_VAR 
name=subscriptionid -- class=button title=subscription detail!-- 
TMPL_IF name=title --!-- TMPL_VAR name=title escape=html --!-- 
TMPL_ELSE --
 ---
 !-- /TMPL_IF --/a
-
 /td
-!-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
-!-- /TMPL_IF --
-!-- TMPL_IF name=notes --(!-- TMPL_VAR name=notes 
--)!-- /TMPL_IF --
+td!-- TMPL_IF name=notes --(!-- TMPL_VAR name=notes 
--)!-- /TMPL_IF --
 /td
-!-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
-!-- /TMPL_IF --
+td
 !-- TMPL_IF name=branchcode --!-- TMPL_VAR 
name=branchcode --!-- /TMPL_IF --
 !-- TMPL_IF name=callnumber --(!-- TMPL_VAR 
name=callnumber --)!-- /TMPL_IF --
 /td
-  !-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
-!-- /TMPL_IF --
-   a 
href=/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=!-- TMPL_VAR 
name=subscriptionid --Issue History/a
-   /td
+tda 
href=/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=!-- TMPL_VAR 
name=subscriptionid --Issue History/a
+/td
 !-- TMPL_IF NAME=routing --
-!-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
-!-- /TMPL_IF --
+td
 !-- TMPL_IF NAME=cannotedit --
   nbsp;
 !-- TMPL_ELSE --
 a 
href=/cgi-bin/koha/serials/routing.pl?subscriptionid=!-- TMPL_VAR 
name=subscriptionid --!-- TMPL_UNLESS NAME=routingedit --amp;op=new!-- 
/TMPL_UNLESS --Routing List/a
 !-- /TMPL_IF --
-/td
-!-- /TMPL_IF --
-!-- TMPL_IF name=toggle --
-td class=hilighted
-!-- TMPL_ELSE --
-td
+/td
 !-- /TMPL_IF --
+td
 !-- TMPL_IF NAME=cannotedit --
   nbsp;
 !-- TMPL_ELSE --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from Serials vendor search.

2009-07-22 Thread Garry Collum
Removed toggle variable from acqui-search-result.pl.  Added highlighting using 
__odd__ to acqui-search-result.tmpl.
---
 .../en/modules/serials/acqui-search-result.tmpl|6 +-
 serials/acqui-search-result.pl |8 
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl
index 2e8717d..8ee1e13 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl
@@ -27,7 +27,11 @@ function GetIt(aqbooksellerid,name)
thSelect/th
/tr
!-- TMPL_LOOP name=loop_suppliers --
-   tr
+!-- TMPL_UNLESS name=__odd__
+tr class=highlight
+!-- TMPL_ELSE --
+tr
+!-- /TMPL_UNLESS --
td!-- TMPL_VAR name=name --/td
tda href=# onclick=GetIt(!-- TMPL_VAR 
NAME=aqbooksellerid --,'!--  TMPL_VAR escape=URL NAME=name 
--')Choose/a/td
/tr
diff --git a/serials/acqui-search-result.pl b/serials/acqui-search-result.pl
index 6066bdd..4f410bd 100755
--- a/serials/acqui-search-result.pl
+++ b/serials/acqui-search-result.pl
@@ -63,20 +63,12 @@ my @suppliers = GetBookSeller($supplier);
 my $count = scalar @suppliers;
 
 #build result page
-my $toggle=0;
 my @loop_suppliers;
 for (my $i=0; $i$count; $i++) {
 my $orders = GetPendingOrders($suppliers[$i]-{'id'});
 my $ordcount = scalar @$orders;
 
 my %line;
-if ($toggle==0){
-$line{even}=1;
-$toggle=1;
-} else {
-$line{even}=0;
-$toggle=0;
-}
 $line{aqbooksellerid} =$suppliers[$i]-{'id'};
 $line{name} = $suppliers[$i]-{'name'};
 $line{active} = $suppliers[$i]-{'active'};
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Alphabetization of branches in the catalogue stats report.

2009-07-21 Thread Garry Collum
Improvement on previous patch by using GetBranchesLoop.
---
 .../prog/en/modules/reports/catalogue_stats.tmpl   |2 +-
 reports/catalogue_stats.pl |   14 +-
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl
index c367cec..419193e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tmpl
@@ -157,7 +157,7 @@
tdselect name=Filter id=branch
option value= /option
!-- TMPL_LOOP NAME=CGIBranch --
-   !-- TMPL_IF NAME=selected --option 
value=!-- TMPL_VAR NAME=branchcode -- selected=selected!-- TMPL_VAR 
NAME=branchname --/option!-- TMPL_ELSE --option value=!-- TMPL_VAR 
NAME=branchcode --!-- TMPL_VAR NAME=branchname --/option!-- 
/TMPL_IF --
+   !-- TMPL_IF NAME=selected --option 
value=!-- TMPL_VAR NAME=value -- selected=selected!-- TMPL_VAR 
NAME=branchname --/option!-- TMPL_ELSE --option value=!-- TMPL_VAR 
NAME=value --!-- TMPL_VAR NAME=branchname --/option!-- /TMPL_IF --
!-- /TMPL_LOOP --
/select
/td
diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl
index 365065f..f3b92b3 100755
--- a/reports/catalogue_stats.pl
+++ b/reports/catalogue_stats.pl
@@ -153,18 +153,6 @@ if ($do_it) {
push @authvals, { code = $_, description = $authvals-{$_} };
}

-
-   my $branches=GetBranches();
-   my @branchloop;
-   foreach (sort {$branches-{$a}-{'branchname'} cmp 
$branches-{$b}-{'branchname'}} keys %$branches) {
-   my $thisbranch = ''; # FIXME: populate $thisbranch to preselect 
one
-   my %row = (branchcode = $_,
-   selected = ($thisbranch eq $_ ? 1 : 0),
-   branchname = $branches-{$_}-{'branchname'},
-   );
-   push @branchloop, \%row;
-   }
-
my $locations = GetKohaAuthorisedValues(items.location);
my @locations;
foreach (sort keys %$locations) {
@@ -177,7 +165,7 @@ if ($do_it) {
haslccn   = $haslccn,
hascote   = $hascote,
CGIItemType = $CGIitemtype,
-   CGIBranch= \...@branchloop,
+   CGIBranch= 
GetBranchesLoop(C4::Context-userenv-{'branch'}),
locationloop = \...@locations,
authvals = \...@authvals,
CGIextChoice = \...@mime,
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Alphabetization of branches in Checkout Statistics form.

2009-07-21 Thread Garry Collum
Improvement of previous patch through the use of GetBranchLoop.
---
 .../prog/en/modules/reports/issues_stats.tmpl  |2 +-
 reports/issues_stats.pl|   15 +--
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tmpl
index 5eb0101..6495a91 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tmpl
@@ -210,7 +210,7 @@
 tdselect name=Filter id=branch
option value= /option
!-- TMPL_LOOP NAME=branchloop --
-!-- TMPL_IF NAME=selected --option value=!-- TMPL_VAR NAME=code -- 
selected=selected!-- TMPL_VAR NAME=description --/option!-- TMPL_ELSE 
--option value=!-- TMPL_VAR NAME=code --!-- TMPL_VAR 
NAME=description --/option!-- /TMPL_IF --
+!-- TMPL_IF NAME=selected --option value=!-- TMPL_VAR NAME=value -- 
selected=selected!-- TMPL_VAR NAME=branchname --/option!-- TMPL_ELSE 
--option value=!-- TMPL_VAR NAME=value --!-- TMPL_VAR 
NAME=branchname --/option!-- /TMPL_IF --
!-- /TMPL_LOOP --
/select
  /td 
diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl
index 11ecc77..cd00424 100755
--- a/reports/issues_stats.pl
+++ b/reports/issues_stats.pl
@@ -137,19 +137,6 @@ for my $itype ( sort {$itemtypes-{$a}-{description} cmp 
$itemtypes-{$b}-{des
push @itemtypeloop, { code = $itype , description = 
$itemtypes-{$itype}-{description} } ;
 }
 
-my $branches=GetBranches();
-my @branchloop;
-foreach (sort {$branches-{$a}-{'branchname'} cmp 
$branches-{$b}-{'branchname'}} keys %$branches) {
-   my $thisbranch = ''; # FIXME 
-   my %row = (
-   branchcode = $_,
-   selected = ($thisbranch eq $_ ? 1 : 0),
-   code = $branches-{$_}-{'branchcode'},
-   description = $branches-{$_}-{'branchname'},
-   );
-   push @branchloop, \%row;
-}
-
 # location list
 my @locations;
 foreach (sort keys %$locations) {
@@ -178,7 +165,7 @@ $template-param(
itemtypeloop = \...@itemtypeloop,
locationloop = \...@locations,
   ccodeloop = \...@ccodes,
- branchloop = \...@branchloop,
+ branchloop = GetBranchesLoop(C4::Context-userenv-{'branch'}),
hassort1= $hassort1,
hassort2= $hassort2,
Bsort1 = $Bsort1,
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3428: Alphabetizes the collection codes in the Advanced Search.

2009-07-18 Thread Garry Collum
If the advancedSearchTypes = CCODE, the code descriptions are not alphabetized, 
as opposed to itemtypes, which are alphabetized.
---
 catalogue/search.pl |2 +-
 opac/opac-search.pl |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/catalogue/search.pl b/catalogue/search.pl
index 336e12f..33da2b0 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -239,7 +239,7 @@ if (!$advanced_search_types or $advanced_search_types eq 
'itemtypes') {
 $template-param(itemtypeloop = \...@itemtypesloop);
 } else {
 my $advsearchtypes = GetAuthorisedValues($advanced_search_types);
-for my $thisitemtype (@$advsearchtypes) {
+for my $thisitemtype (sort {$a-{'lib'} cmp $b-{'lib'}} @$advsearchtypes) 
{
 my %row =(
 number=$cnt++,
 ccl = $advanced_search_types,
diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 538ec9c..20d06f5 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -145,7 +145,7 @@ if (!$advanced_search_types or $advanced_search_types eq 
'itemtypes') {
}
 } else {
 my $advsearchtypes = GetAuthorisedValues($advanced_search_types);
-   for my $thisitemtype (@$advsearchtypes) {
+   for my $thisitemtype (sort {$a-{'lib'} cmp $b-{'lib'}} 
@$advsearchtypes) {
my %row =(
number=$cnt++,
ccl = $advanced_search_types,
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Fixes the location drop-down alphabetization for the catalog statistics report form.

2009-07-17 Thread Garry Collum
---
 reports/catalogue_stats.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl
index 34b649f..365065f 100755
--- a/reports/catalogue_stats.pl
+++ b/reports/catalogue_stats.pl
@@ -156,7 +156,7 @@ if ($do_it) {
 
my $branches=GetBranches();
my @branchloop;
-   foreach (keys %$branches) {
+   foreach (sort {$branches-{$a}-{'branchname'} cmp 
$branches-{$b}-{'branchname'}} keys %$branches) {
my $thisbranch = ''; # FIXME: populate $thisbranch to preselect 
one
my %row = (branchcode = $_,
selected = ($thisbranch eq $_ ? 1 : 0),
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3408: Tag cloud says login when logged in - fix.

2009-07-16 Thread Garry Collum
Changed the logic in the html form to have the login prompt only appear if a 
user is not logged in.  Separated the hidemylist functionality from the show 
tags from other users option.  Created a link for hide my tags or show my 
tags depending on context.

The user can now choose how many tags of other users to show, and can also 
choose whether to show their own tags or not.
---
 koha-tmpl/opac-tmpl/prog/en/css/opac.css   |4 
 koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl |   11 ++-
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css 
b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
index a87dc1f..7c03aed 100644
--- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css
+++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css
@@ -831,6 +831,10 @@ a.cancel {
padding-left : 1em;
 }
 
+a.hidemytags {
+   padding-left : 2em;
+}
+
 .resultscontrol, .resultscontrol select {
font-size: 90%;
 }
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl
index 7fd20d0..2f4aa9e 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl
@@ -79,8 +79,17 @@
form method=get action=opac-tags.pl
fieldsetShow up to input name=limit style=text-align: 
right; maxlength=4 size=4 value=!-- TMPL_VAR NAME=limit DEFAULT=100 
-- /
tags from other users.
+!-- TMPL_IF NAME=hidemytags --
input type=hidden name=hidemytags value=1 /
-   input type=submit value=OK / !-- TMPL_UNLESS 
NAME=MY_TAGS --a href=/cgi-bin/koha/opac-user.plLog in/a to see your 
own saved tags.!-- /TMPL_UNLESS --/fieldset
+!-- /TMPL_IF --
+   input type=submit value=OK /
+!-- TMPL_UNLESS NAME=loggedinusername --
+  a href=/cgi-bin/koha/opac-user.plLog in/a to 
see your own saved tags.
+!-- TMPL_ELSE --
+  !-- TMPL_IF NAME=hidemytags --a 
class=hidemytags href=/cgi-bin/koha/opac-tags.pl?limit=!-- TMPL_VAR 
NAME=limit DEFAULT=100 --Show my tags/a
+  !-- TMPL_ELSE --a class=hidemytags 
href=/cgi-bin/koha/opac-tags.pl?limit=!-- TMPL_VAR NAME=limit DEFAULT=100 
--amp;hidemytags=1Hide my tags/a
+  !-- /TMPL_IF --
+!-- /TMPL_UNLESS --/fieldset
/form

!-- TMPL_IF NAME=TAGLOOP --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2553: Fixes the alphabetization of the drop-down lists for the Most-Circulated items report.

2009-07-16 Thread Garry Collum
This patch alphabetizes the descriptions that appear in the  Library, Item 
type, and patron category drop-down lists of the Most-Circulated Items report 
form.
---
 reports/cat_issues_top.pl |   25 +
 1 files changed, 5 insertions(+), 20 deletions(-)

diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl
index f134b9a..12c8884 100755
--- a/reports/cat_issues_top.pl
+++ b/reports/cat_issues_top.pl
@@ -129,26 +129,13 @@ if ($do_it) {
 -multiple = 0 );
 
 my $CGIsepChoice=GetDelimiterChoices;
-#branch
-my $branches = GetBranches;
-my @branchloop;
-foreach my $thisbranch (keys %$branches) {
-#  my $selected = 1 if $thisbranch eq $branch;
-my %row =(value = $thisbranch,
-#  
selected = $selected,
-branchname = 
$branches-{$thisbranch}-{'branchname'},
-);
-push @branchloop, \%row;
-}
 
 #doctype
 my $itemtypes = GetItemTypes;
 my @itemtypeloop;
-foreach my $thisitemtype (keys %$itemtypes) {
-#  my $selected = 1 if $thisbranch eq $branch;
+foreach my $thisitemtype ( sort {$itemtypes-{$a}-{'description'} cmp 
$itemtypes-{$b}-{'description'}} keys %$itemtypes) {
 my %row =(value = $thisitemtype,
-#  
selected = $selected,
-description = 
$itemtypes-{$thisitemtype}-{'description'},
+  description = 
$itemtypes-{$thisitemtype}-{'description'},
 );
 push @itemtypeloop, \%row;
 }
@@ -156,11 +143,9 @@ if ($do_it) {
 #borcat
 my ($codes,$labels) = GetborCatFromCatType(undef,undef);
 my @borcatloop;
-foreach my $thisborcat (sort keys %$labels) {
-#  my $selected = 1 if $thisbranch eq $branch;
+foreach my $thisborcat (sort {$labels-{$a} cmp $labels-{$b}} keys 
%$labels) {
 my %row =(value = $thisborcat,
-#  
selected = $selected,
-description = $labels-{$thisborcat},
+  description = $labels-{$thisborcat},
 );
 push @borcatloop, \%row;
 }
@@ -170,7 +155,7 @@ if ($do_it) {
 $template-param(
 CGIextChoice = $CGIextChoice,
 CGIsepChoice = $CGIsepChoice,
-branchloop =\...@branchloop,
+branchloop = 
GetBranchesLoop(C4::Context-userenv-{'branch'}),
 itemtypeloop =\...@itemtypeloop,
 borcatloop =\...@borcatloop,
 );
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3418: Fixes the alpha order of the system preference tags.

2009-07-15 Thread Garry Collum
---
 .../prog/en/includes/sysprefs-menu.inc |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc 
b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc
index 5187edd..7709da5 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/sysprefs-menu.inc
@@ -2,10 +2,10 @@
 ul
 !-- TMPL_IF NAME=Admin --li class=active!-- TMPL_ELSE --li!-- 
/TMPL_IF --a title=Administration 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=AdminAdmin/a/li
 !-- TMPL_IF NAME=Acquisitions --li class=active!-- TMPL_ELSE 
--li!-- /TMPL_IF --a title=Acquisitions 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=AcquisitionsAcquisitions/a/li
-!-- TMPL_IF NAME=EnhancedContent --li class=active!-- TMPL_ELSE 
--li!-- /TMPL_IF --a title=Enhanced content settings 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=EnhancedContentEnhanced 
Content/a/li
 !-- TMPL_IF NAME=Authorities --li class=active!-- TMPL_ELSE 
--li!-- /TMPL_IF --a title=Authority Control 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=AuthoritiesAuthorities/a/li
 !-- TMPL_IF NAME=Cataloging --li class=active!-- TMPL_ELSE 
--li!-- /TMPL_IF --a title=Cataloging 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=CatalogingCataloging/a/li
 !-- TMPL_IF NAME=Circulation --li class=active!-- TMPL_ELSE 
--li!-- /TMPL_IF --a title=Circulation 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=CirculationCirculation/a/li
+!-- TMPL_IF NAME=EnhancedContent --li class=active!-- TMPL_ELSE 
--li!-- /TMPL_IF --a title=Enhanced content settings 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=EnhancedContentEnhanced 
Content/a/li
 !-- TMPL_IF NAME=I18N/L10N --li class=active!-- TMPL_ELSE --li!-- 
/TMPL_IF --a title=Internationalization and Localization 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=I18N/L10NI18N/L10N/a/li
 !-- TMPL_IF NAME=Logs --li class=active!-- TMPL_ELSE --li!-- 
/TMPL_IF --a title=Transaction Logs 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=LogsLogs/a/li
 !-- TMPL_IF NAME=OAI-PMH --li class=active!-- TMPL_ELSE --li!-- 
/TMPL_IF --a title=OAI-PMH 
href=/cgi-bin/koha/admin/systempreferences.pl?tab=OAI-PMHOAI-PMH/a/li
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3322: Fixes expandedSearchOption in opac. Makes fewer options possible.

2009-07-14 Thread Garry Collum
Copies the logic of catalogue/search.pl to fix the expanded search option in 
opac. When expanded search is the default, it was impossible to go to the 
fewer options.
---
 opac/opac-search.pl |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index e1e66a9..f22cb23 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -230,11 +230,11 @@ if ( $template_type  $template_type eq 'advsearch' ) {
   search_boxes_loop = \...@search_boxes_array);
 
 # use the global setting by default
-   if ( C4::Context-preference(expandedSearchOption) ) {
+   if ( C4::Context-preference(expandedSearchOption) == 1 ) {
$template-param( expanded_options = 
C4::Context-preference(expandedSearchOption) );
}
# but let the user override it
-   if ( $cgi-param(expanded_options)  
(($cgi-param('expanded_options') == 0) || ($cgi-param('expanded_options') == 
1 )) ) {
+   if ( ($cgi-param('expanded_options') == 0) || 
($cgi-param('expanded_options') == 1 ) ) {
$template-param( expanded_options = $cgi-param('expanded_options'));
}
 
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3414: Cleanup and xhthml correction of parcels.tmpl

2009-07-11 Thread Garry Collum
Fixes several xhtml in parcels.tmpl and enables highlighting within its data 
table.  Removes unnecessary variable from parcels.pl.
---
 acqui/parcels.pl   |3 --
 .../prog/en/modules/acqui/parcels.tmpl |   24 ++-
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/acqui/parcels.pl b/acqui/parcels.pl
index 30dc0a6..349be36 100755
--- a/acqui/parcels.pl
+++ b/acqui/parcels.pl
@@ -133,7 +133,6 @@ if ($count$resultsperpage){
 }
 my @loopres;
 
-my $hilighted=0;
 for (my 
$i=$startfrom;$i=($startfrom+$resultsperpage-1$count-1?$startfrom+$resultsperpage-1:$count-1);$i++){
 
 my %cell;
@@ -146,8 +145,6 @@ for (my 
$i=$startfrom;$i=($startfrom+$resultsperpage-1$count-1?$startfrom+$res
 $cell{bibcount}=$results[$i]-{biblio};
 $cell{reccount}=$results[$i]-{itemsreceived};
 $cell{itemcount}=$results[$i]-{itemsexpected};
-$cell{hilighted} = $hilighted%2;
-$hilighted++;
 push @loopres, \%cell;
 }
 $template-param(searchresults=\...@loopres, count=$count) if ($count);
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
index 09f8744..e839063 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
@@ -42,16 +42,16 @@
 table class=small
 tr
 th input type=hidden name=supplierid value=!-- TMPL_VAR 
NAME=supplierid -- //th
-thlabel for=filterInvoice / Code:/labelinput type=text 
size=20 name=filter value=!-- TMPL_VAR NAME=filter -- //th
+thlabel for=filterInvoice / Code:/labelinput type=text 
size=20 name=filter id=filter value=!-- TMPL_VAR NAME=filter -- 
//th
 thlabel for=datefromFrom:/labelinput type=text size=9 
id=datefrom name=datefrom value=!-- TMPL_VAR NAME=datefrom -- / 
-plabel for=datetoTo:/labelinput type=text size=9 
id=dateto name=dateto value=!-- TMPL_VAR NAME=dateto -- //th
+plabel for=datetoTo:/labelinput type=text size=9 
id=dateto name=dateto value=!-- TMPL_VAR NAME=dateto -- //p/th
 thlabel for=orderbySort by :/labelselect name=orderby 
id=orderby
 option value=aqorders.booksellerinvoicenumber Code/option
 option value=datereceived Date Received/option
 option value=datereceived desc Date Received 
reverse/option
 option value=aqorders.booksellerinvoicenumber desc Code 
reverse/option
 /selectbr /
-label for=resultsperpageResults per page :/labelselect 
name=resultsperpage value =!--TMPL_VAR Name=resultsperpage-- 
id=resultsperpage
+label for=resultsperpageResults per page :/labelselect 
name=resultsperpage id=resultsperpage
 option value=2020/option
 option value=3030/option
 option value=5050/option
@@ -71,27 +71,29 @@
 /tr
 !-- Actual Search Results --
 !-- TMPL_LOOP NAME=searchresults --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
-!-- TMPL_IF NAME=hilighted --td class=hilighted!-- TMPL_ELSE 
--td!-- /TMPL_IF --
+!-- /TMPL_UNLESS --
+td
 !-- TMPL_VAR NAME=number --
 /td
-!-- TMPL_IF NAME=hilighted --td class=hilighted number!-- 
TMPL_ELSE --td class=number
-!-- /TMPL_IF --
+td
 a 
href=/cgi-bin/koha/acqui/parcel.pl?type=intraamp;supplierid=!-- TMPL_VAR 
NAME=supplierid ESCAPE=URL --amp;datereceived=!-- TMPL_VAR 
NAME=raw_datereceived ESCAPE=URL --!--TMPL_IF 
Name=code--amp;invoice=!--TMPL_VAR Name=code ESCAPE=URL 
--!--/TMPL_IF--
 !-- TMPL_VAR NAME=datereceived --
 /a
 /td
-!-- TMPL_IF NAME=hilighted --td class=hilighted number!-- 
TMPL_ELSE --td class=number!-- /TMPL_IF --
+td
 !--TMPL_IF Name=code--!--TMPL_VAR Name=code 
--!--/TMPL_IF--
 /td
-!-- TMPL_IF NAME=hilighted --td class=hilighted number!-- 
TMPL_ELSE --td class=number
-!-- /TMPL_IF --
+td
 !-- TMPL_VAR NAME=reccount -- 
 /td
-!-- TMPL_IF NAME=hilighted --td class=hilighted number!-- 
TMPL_ELSE --td class=number!-- /TMPL_IF --
+td
 !-- TMPL_VAR NAME=bibcount --
 /td
-!-- TMPL_IF NAME=hilighted --td class=hilighted number!-- 
TMPL_ELSE --td class=number!-- /TMPL_IF --
+td
 !-- TMPL_VAR NAME=itemcount --
 /td
 /tr
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3415: Adds highlighting to tables in parcel.tmpl

2009-07-11 Thread Garry Collum
---
 .../prog/en/modules/acqui/parcel.tmpl  |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
index d6e5c2c..54525e4 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl
@@ -56,7 +56,11 @@
 thTOTAL/th
 /tr
 !-- TMPL_LOOP NAME=loop_received --
+   !-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_VAR NAME=quantityreceived --/td
 tda href=/cgi-bin/koha/acqui/basket.pl?basketno=!-- 
TMPL_VAR NAME=basketno --!-- TMPL_VAR NAME=basketno --/anbsp; / 
nbsp;!-- TMPL_VAR NAME=ordernumber --/td
 tda 
href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=!-- TMPL_VAR 
name=biblionumber --!-- TMPL_VAR NAME=title escape=html --/a
@@ -125,7 +129,11 @@
 thnbsp;/th
 /tr
 !-- TMPL_LOOP NAME=loop_orders --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 tda href=/cgi-bin/koha/acqui/basket.pl?basketno=!-- 
TMPL_VAR NAME=basketno --!-- TMPL_VAR NAME=basketno --/a/td
 td
   a href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=!-- 
TMPL_VAR name=biblionumber --!-- TMPL_VAR NAME=title escape=html 
--/a
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3416: Fixes filter on parcels.tmpl.

2009-07-11 Thread Garry Collum
Changes the action of the form on parcels.tmpl from post to get.  Otherwise 
the filter is not functional.
---
 .../prog/en/modules/acqui/parcels.tmpl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
index e839063..ce089f8 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcels.tmpl
@@ -38,7 +38,7 @@
 div id=resultlist
 !-- Search Results Table --
 !-- TMPL_IF NAME=count --
-form method=post action=parcels.pl
+form method=get action=parcels.pl
 table class=small
 tr
 th input type=hidden name=supplierid value=!-- TMPL_VAR 
NAME=supplierid -- //th
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Cleaning up toggle variables in readingrec.pl and tmpl.

2009-07-04 Thread Garry Collum
Removed toggle variable from readingrec.pl and readingrec.tmpl.  Used __odd__ 
variable instead.
---
 .../prog/en/modules/members/readingrec.tmpl|4 ++--
 members/readingrec.pl  |3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl
index ce7f190..cc5ad7d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tmpl
@@ -36,11 +36,11 @@
/th
 /tr
 !-- TMPL_LOOP name=loop_reading --
-!-- TMPL_IF NAME=toggle --
+!-- TMPL_UNLESS NAME=__odd__ --
 !-- TMPL_IF NAME=returndate --tr class=highlight!-- TMPL_ELSE 
--tr class=highlight onissue!-- /TMPL_IF --
 !-- TMPL_ELSE --
 !-- TMPL_IF NAME=returndate --tr!-- TMPL_ELSE --tr 
class=onissue!-- /TMPL_IF --
-!-- /TMPL_IF --
+!-- /TMPL_UNLESS --
 
 td
 a href=/cgi-bin/koha/catalogue/detail.pl?biblionumber=!-- 
TMPL_VAR NAME=biblionumber --
diff --git a/members/readingrec.pl b/members/readingrec.pl
index 21d4f3a..6107ef4 100755
--- a/members/readingrec.pl
+++ b/members/readingrec.pl
@@ -64,9 +64,6 @@ my @loop_reading;
 
 for (my $i=0;$i$count;$i++){
my %line;
-   if($i%2){
-   $line{'toggle'} = 1;
-   }
$line{biblionumber}=$issues-[$i]-{'biblionumber'};
$line{title}=$issues-[$i]-{'title'};
$line{author}=$issues-[$i]-{'author'};
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3391: Invalid xhtml in spent.tmpl.

2009-07-04 Thread Garry Collum
Missing quotes in an href.

This patch also removes a toggle variable in spent.pl and adds a __odd__ 
definition to spent.tmpl. (in reference to but 2889).
---
 acqui/spent.pl |8 
 .../intranet-tmpl/prog/en/modules/acqui/spent.tmpl |   10 +-
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/acqui/spent.pl b/acqui/spent.pl
index c9c13ea..59da082 100755
--- a/acqui/spent.pl
+++ b/acqui/spent.pl
@@ -54,7 +54,6 @@ my $sth = $dbh-prepare($query);
 $sth-execute( $bookfund, $start, $end );
 
 my $total = 0;
-my $toggle;
 my @spent_loop;
 while ( my $data = $sth-fetchrow_hashref ) {
 my $recv = $data-{'qrev'};
@@ -63,13 +62,6 @@ while ( my $data = $sth-fetchrow_hashref ) {
 $data-{'subtotal'} = $subtotal;
 $data-{'unitprice'} += 0;
 $total   += $subtotal;
-if ($toggle) {
-$toggle = 0;
-}
-else {
-$toggle = 1;
-}
-$data-{'toggle'} = $toggle;
 push @spent_loop, $data;
 }
 
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl
index 50b8455..7b069d1 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tmpl
@@ -33,17 +33,17 @@
 /tr
 
 !--TMPL_LOOP NAME=SPENTLOOP--
-   !--TMPL_IF name=toggle--
-   tr class=hilighted
+   !--TMPL_UNLESS name=__odd__--
+   tr class=highlight
!--TMPL_ELSE--
-   tr class=hilighted2
-   !--/TMPL_IF--
+   tr
+   !--/TMPL_UNLESS--

td!--TMPL_VAR NAME=title--/td
td
   a href=/cgi-bin/koha/acqui/acquire.pl?recieve=!-- 
TMPL_VAR NAME=ordnum--amp;biblio=!--TMPL_VAR 
NAME=biblionumber--amp;invoice=!--TMPL_VAR 
NAME=booksellerinvoicenumber--amp;supplierid=!--TMPL_VAR 
NAME=booksellerid--amp;catview=yes!-- TMPL_VAR NAME=ordnum--/a/td
td!--TMPL_VAR NAME=booksellerid-- /td
-   tda 
href=/cgi-bin/koha/acqui/receive.pl?invoice=!--TMPL_VAR 
NAME=booksellerinvoicenumber--amp;supplierid=!--TMPL_VAR 
NAME=booksellerid--!--TMPL_VAR NAME=booksellerinvoicenumber--/a/td
+   tda 
href=/cgi-bin/koha/acqui/receive.pl?invoice=!--TMPL_VAR 
NAME=booksellerinvoicenumber--amp;supplierid=!--TMPL_VAR 
NAME=booksellerid--!--TMPL_VAR NAME=booksellerinvoicenumber--/a/td
td!--TMPL_VAR NAME=itemtype-- /td
td!--TMPL_VAR NAME=qrev-- /td
td!--TMPL_VAR NAME=unitprice--/td
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Fixes toggle variables in basket.pl, basket.tmpl, and bookfund.tmpl.

2009-07-04 Thread Garry Collum
---
 acqui/basket.pl|1 -
 .../prog/en/modules/acqui/basket.tmpl  |2 +-
 .../prog/en/modules/acqui/bookfund.tmpl|6 +++---
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/acqui/basket.pl b/acqui/basket.pl
index 0e29473..9ac46a1 100755
--- a/acqui/basket.pl
+++ b/acqui/basket.pl
@@ -155,7 +155,6 @@ else {
 $sub_total += $line_total;
 $qty_total += $qty;
 my %line = %{ $results[$i] };
-   ($i%2) and $line{toggle} = 1;
 $line{order_received}= ( $qty eq $results[$i]-{'quantityreceived'} );
 $line{basketno}  = $basketno;
 $line{i} = $i;
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
index cee6d91..8948097 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl
@@ -82,7 +82,7 @@
 !-- /TMPL_IF --
 /tr
 !-- TMPL_LOOP NAME=books_loop --
- !-- TMPL_IF NAME=order_received --tr 
class=disabled!-- TMPL_ELSE --!-- TMPL_IF NAME=toggle --tr 
class=highlight!-- TMPL_ELSE --tr!-- /TMPL_IF --!-- /TMPL_IF --
+ !-- TMPL_IF NAME=order_received --tr 
class=disabled!-- TMPL_ELSE --!-- TMPL_UNLESS NAME=__odd__ --tr 
class=highlight!-- TMPL_ELSE --tr!-- /TMPL_IF --!-- /TMPL_UNLESS --
 td!-- TMPL_VAR NAME=ordernumber --
!-- TMPL_IF 
NAME=order_received -- (rcvd)!-- /TMPL_IF --/td
 td
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/bookfund.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/bookfund.tmpl
index 3dba4b2..a5d78b7 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/bookfund.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/bookfund.tmpl
@@ -27,11 +27,11 @@
 /tr
 
 !--TMPL_LOOP NAME=COMMITTEDLOOP--
-   !--TMPL_IF name=toggle--
-   tr class=hilighted
+   !--TMPL_UNLESS name=__odd__--
+   tr class=highlight
!--TMPL_ELSE--
tr
-   !--/TMPL_IF--
+   !--/TMPL_UNLESS--
td!--TMPL_VAR NAME=title--/td
tda 
href=/cgi-bin/koha/acqui/neworderempty.pl?ordnum=!--TMPL_VAR 
NAME=ordnum--amp;booksellerid=!--TMPL_VAR 
NAME=booksellerid--amp;basketno=!--TMPL_VAR 
NAME=basketno--!--TMPL_VAR NAME=ordnum--/a/td
td!--TMPL_VAR NAME=itemtype-- /td
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3392: Fixes highlighting in Patrons with no Checkouts report.

2009-07-04 Thread Garry Collum
Fixed class definition and moved the definition from the td tags to the tr 
tags.
---
 .../prog/en/modules/reports/borrowers_out.tmpl |   12 +++-
 reports/borrowers_out.pl   |3 ---
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
index 5528b31..ce7c4a9 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
@@ -33,12 +33,14 @@
 !-- /TMPL_LOOP --
 /tr
 !-- TMPL_LOOP NAME=looprow --
-tr
-!-- TMPL_IF NAME=hilighted --td 
class=hilighted!-- TMPL_ELSE --td!-- /TMPL_IF --
-!-- TMPL_VAR NAME=rowtitle --/td
+   !-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+   !-- TMPL_ELSE --
+   tr
+   !-- /TMPL_UNLESS --
+td!-- TMPL_VAR NAME=rowtitle --/td
 !-- TMPL_LOOP NAME=loopcell --
-!-- TMPL_IF NAME=hilighted --td 
class=hilighted!-- TMPL_ELSE --td !-- /TMPL_IF --
-!-- TMPL_IF NAME=value --!-- TMPL_VAR 
NAME=value --!-- /TMPL_IF --
+td!-- TMPL_IF NAME=value --!-- TMPL_VAR 
NAME=value --!-- /TMPL_IF --
 /td
 !-- /TMPL_LOOP --
 /tr
diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl
index 939e673..3611021 100755
--- a/reports/borrowers_out.pl
+++ b/reports/borrowers_out.pl
@@ -208,7 +208,6 @@ sub calculate {
 
 my $i=0;
 #  my @totalcol;
-my $hilighted=-1;
 
 #Initialization of cell values.
 my @table;
@@ -294,9 +293,7 @@ sub calculate {
 }
 push @looprow,{ 'rowtitle' = $i ,
 'loopcell' = \...@loopcell,
-'hilighted' = ($hilighted 0),
 };
-$hilighted = -$hilighted;
 }
 
 
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Cleaned up toggle variable in opac-readingrecord.tmpl

2009-06-25 Thread Garry Collum
Removed toggle variable from opac-readingrecord.pl and tmpl and used the 
__odd__ variable instead.
---
 .../prog/en/modules/opac-readingrecord.tmpl|2 +-
 opac/opac-readingrecord.pl |3 ---
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
index 632ec76..140c4c8 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-readingrecord.tmpl
@@ -47,7 +47,7 @@ TMPL_ELSE --Title!-- /TMPL_UNLESS --/th
 
 !-- TMPL_LOOP NAME=READING_RECORD --
 
-!-- TMPL_IF NAME=toggle --tr!-- TMPL_ELSE --tr class=highlight!-- 
/TMPL_IF --
+!-- TMPL_UNLESS NAME=__odd__ --tr class=highlight!-- TMPL_ELSE 
--tr!-- /TMPL_IF --
 td
 !-- TMPL_IF NAME=OPACAmazonEnabled --!-- TMPL_IF 
NAME=OPACAmazonCoverImages --!-- TMPL_IF NAME=normalized_isbn --a 
href=http://www.amazon.com/gp/reader/!-- TMPL_VAR NAME=normalized_isbn 
--/ref=sib_dp_pt/002-7879865-0184864#reader-linkimg border=0 
src=http://images.amazon.com/images/P/!-- TMPL_VAR name=normalized_isbn 
--.01.THUMBZZZ.jpg alt=Cover Image //a!-- TMPL_ELSE --span 
class=no-imageNo cover image available/span!-- /TMPL_IF --!-- /TMPL_IF 
--!-- /TMPL_IF --
 
diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl
index 7377c76..595467b 100755
--- a/opac/opac-readingrecord.pl
+++ b/opac/opac-readingrecord.pl
@@ -82,9 +82,6 @@ my @loop_reading;
 
 for ( my $i = 0 ; $i  $count ; $i++ ) {
 my %line;
-if ( $i % 2 ) {
-$line{'toggle'} = 1;
-}

# XISBN Stuff
my $isbn = GetNormalizedISBN($issues-[$i]-{'isbn'});
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from z3950_search.pl.

2009-06-25 Thread Garry Collum
Removed unused toggle variable from z3959_search.pl.  Added __odd__ variable to 
table in z3950_search.tmpl for non-javascript users.
---
 cataloguing/z3950_search.pl|3 +--
 .../prog/en/modules/cataloguing/z3950_search.tmpl  |4 
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl
index 6f117f4..be18019 100755
--- a/cataloguing/z3950_search.pl
+++ b/cataloguing/z3950_search.pl
@@ -238,7 +238,6 @@ warn query .$query  if $DEBUG;
   )
   = ImportBreeding( $marcdata, 2, $serverhost[$k], 
$encoding[$k], $random, 'z3950' );
 my %row_data;
-$row_data{toggle}   = ($i % 2) ? 1 : 0;
 $row_data{server}   = $servername[$k];
 $row_data{isbn} = $oldbiblio-{isbn};
 $row_data{lccn} = $oldbiblio-{lccn};
@@ -251,7 +250,7 @@ warn query .$query  if $DEBUG;
 push( @breeding_loop, \%row_data );

 } else {
-push(@breeding_loop,{'toggle'=($i % 
2)?1:0,'server'=$servername[$k],'title'=join(': 
',$oConnection[$k]-error_x()),'breedingid'=-1,'biblionumber'=-1});
+
push(@breeding_loop,{'server'=$servername[$k],'title'=join(': 
',$oConnection[$k]-error_x()),'breedingid'=-1,'biblionumber'=-1});
 } # $rec
 }
 }#$numresults
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
index 4aac772..417daa6 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl
@@ -104,7 +104,11 @@ $(document).ready(function(){
 tbody!-- TMPL_LOOP name=breeding_loop --
 !-- TMPL_IF NAME=breedingid --

+   !-- TMPL_UNLESS NAME=__odd__ --
+   tr class=highlight
+   !-- TMPL_ELSE --
 tr
+   !-- /TMPL_UNLESS --
 td!-- TMPL_VAR name=server --/td
 td!-- TMPL_VAR NAME=title escape=html --/td
 td!-- TMPL_VAR NAME=author --/td
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3347: Follow-up patch. Added logic for non-loggedin user.

2009-06-20 Thread Garry Collum
Adds a login message, instead of a New List link, to the public list table, 
if a non-logged in user views the table.
---
 .../opac-tmpl/prog/en/modules/opac-shelves.tmpl|4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
index 643b478..c15bdc3 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl
@@ -386,7 +386,11 @@ $(document).ready(function(){
   !-- TMPL_ELSE --
 div id=publicshelves class=tab-container 
style=display:none;
   !-- /TMPL_IF --
+  !-- TMPL_IF NAME=loggedinusername --
   a class=newshelf 
href=/cgi-bin/koha/opac-shelves.pl?shelves=1New List/a
+  !-- TMPL_ELSE --
+  diva href=/cgi-bin/koha/opac-user.plLog in/a to 
create new Lists./div
+  !-- /TMPL_IF --
   !-- TMPL_IF NAME=shelvesloop --
 !-- TMPL_VAR name='pagination_bar'--
   table
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3338: Fix for missing closing brackets in authorities/detail.tmpl

2009-06-18 Thread Garry Collum
---
 .../prog/en/modules/authorities/detail.tmpl|1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tmpl
index 5980d9e..417581c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tmpl
@@ -18,6 +18,7 @@ function confirm_deletion() {
 function Dopop(link) {

newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
 }
+//]]
 /script
 !-- TMPL_IF Name=displayhierarchy--
 link rel=stylesheet type=text/css href=!-- TMPL_VAR NAME=themelang 
--/css/hierarchy.css /
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3317: Author displaying inconsistently or not at all. Revision to previous patch.

2009-06-16 Thread Garry Collum
Revision to previous patch for bug 3317.  Removes the EXPR command from 
opac-basket.tmpl, which was polluting the apache logs.

NTS: Don't use EXPR.
---
 .../opac-tmpl/prog/en/modules/opac-basket.tmpl |4 ++--
 opac/opac-basket.pl|6 ++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
index 84cfea1..3e537d0 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
@@ -168,8 +168,8 @@ function tagAdded() {
 td!-- TMPL_VAR NAME=isbn --/td
 /tr
 !-- /TMPL_IF --
-
-!-- TMPL_IF EXPR=MARCAUTHORS || author --
+
+!-- TMPL_IF HASAUTHORS --
 tr
 th scope=rowAuthor(s)/th
 td
diff --git a/opac/opac-basket.pl b/opac/opac-basket.pl
index 8edaf8a..a4383ab 100755
--- a/opac/opac-basket.pl
+++ b/opac/opac-basket.pl
@@ -68,6 +68,11 @@ foreach my $biblionumber ( @bibs ) {
 my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
 my $marcurlsarray= GetMarcUrls($record,$marcflavour);
 my @items= GetItemsInfo( $biblionumber, 'opac' );
+
+my $hasauthors = 0;
+if($dat-{'author'} || @$marcauthorsarray) {
+  $hasauthors = 1;
+}

 my $shelflocations 
=GetKohaAuthorisedValues('items.location',$dat-{'frameworkcode'});
 my $collections =  
GetKohaAuthorisedValues('items.ccode',$dat-{'frameworkcode'} );
@@ -96,6 +101,7 @@ foreach my $biblionumber ( @bibs ) {
 $dat-{MARCAUTHORS}= $marcauthorsarray;
 $dat-{MARCSERIES}  = $marcseriesarray;
 $dat-{MARCURLS}= $marcurlsarray;
+$dat-{HASAUTHORS}  = $hasauthors;
 
 if ( C4::Context-preference(BiblioDefaultView) eq normal ) {
 $dat-{dest} = opac-detail.pl;
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from member.pl and .tmpl

2009-06-14 Thread Garry Collum
Removed toggle variable from member.pl and member.tmpl.  Replaced with template 
variable __odd__.
---
 .../prog/en/modules/members/member.tmpl|4 ++--
 members/member.pl  |3 ---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl
index 52c37ef..0873983 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tmpl
@@ -68,11 +68,11 @@
 !-- TMPL_IF name=overdue --
 tr class=problem
 !-- TMPL_ELSE --
-!-- TMPL_IF name=toggle --
+!-- TMPL_UNLESS name=__odd__ --
 tr class=highlight
 !-- TMPL_ELSE --
 tr
-!-- /TMPL_IF --
+!-- /TMPL_UNLESS --
 !-- /TMPL_IF --
 td!-- TMPL_VAR NAME=cardnumber --/td
 td style=white-space: nowrap;a 
href=/cgi-bin/koha/members/moremember.pl?borrowernumber=!-- TMPL_VAR 
NAME=borrowernumber --!-- TMPL_VAR NAME=surname --, !-- TMPL_VAR 
NAME=firstname --/a br / !-- TMPL_VAR NAME=address --!-- TMPL_IF 
NAME=address2 --br /!-- TMPL_VAR NAME=address2 --!-- /TMPL_IF --!-- 
TMPL_IF NAME=city --br /!-- TMPL_VAR NAME=city --!-- /TMPL_IF --!-- 
TMPL_IF NAME=zipcode --  !-- TMPL_VAR NAME=zipcode --!-- /TMPL_IF 
--/td
diff --git a/members/member.pl b/members/member.pl
index 6d42b45..b43b30b 100755
--- a/members/member.pl
+++ b/members/member.pl
@@ -91,14 +91,12 @@ else
 
 
 my @resultsdata;
-my $toggle = 0;
 my $to=($count($startfrom*$resultsperpage)?$startfrom*$resultsperpage:$count);
 for (my $i=($startfrom-1)*$resultsperpage; $i  $to; $i++){
   #find out stats
   my 
($od,$issue,$fines)=GetMemberIssuesAndFines($results-[$i]{'borrowernumber'});
 
   my %row = (
-toggle = $toggle,
 count = $i+1,
 borrowernumber = $results-[$i]{'borrowernumber'},
 cardnumber = $results-[$i]{'cardnumber'},
@@ -121,7 +119,6 @@ for (my $i=($startfrom-1)*$resultsperpage; $i  $to; $i++){
 sort2 = $results-[$i]{'sort2'},
 dateexpiry = 
C4::Dates-new($results-[$i]{'dateexpiry'},'iso')-output('syspref'),
 );
-  if ( $toggle ) { $toggle = 0; } else {$toggle = 1; }
   push(@resultsdata, \%row);
 }
 my $base_url =
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 3317: Author displaying inconsistently or not at all in Cart.

2009-06-14 Thread Garry Collum
This patch fixes the author and added author fields for the 'More Details' view 
of opac-basket.tmpl.
---
 .../opac-tmpl/prog/en/modules/opac-basket.tmpl |   23 +++
 1 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl 
b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
index 3ab3689..84cfea1 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-basket.tmpl
@@ -151,10 +151,12 @@ function tagAdded() {
 !-- TMPL_IF NAME=print_basket --
 !-- TMPL_VAR NAME=title --
 !-- TMPL_IF name=subtitle -- !-- TMPL_VAR NAME=subtitle 
--!-- /TMPL_IF --
+!-- TMPL_IF name=author -- !-- TMPL_VAR NAME=author 
--!-- /TMPL_IF --
 !-- TMPL_ELSE --
 input type=checkbox value=!-- TMPL_VAR 
NAME=biblionumber -- name=bib!-- TMPL_VAR NAME=biblionumber -- 
id=bib!-- TMPL_VAR NAME=biblionumber -- 
onclick=selRecord(value,checked) /
 !-- TMPL_VAR NAME=title escape=html --
 !-- TMPL_IF name=subtitle -- !-- TMPL_VAR NAME=subtitle 
--!-- /TMPL_IF --
+!-- TMPL_IF name=author -- !-- TMPL_VAR NAME=author 
--!-- /TMPL_IF --
 !-- /TMPL_IF --
 /h3
!-- COinS / OpenURL --
@@ -167,12 +169,23 @@ function tagAdded() {
 /tr
 !-- /TMPL_IF --
 
-!-- TMPL_IF name=MARCAUTHORS --
+!-- TMPL_IF EXPR=MARCAUTHORS || author --
 tr
-th scope=rowAuthors/th
-td!-- TMPL_LOOP NAME=MARCAUTHORS --
-!-- TMPL_VAR NAME=value --
-!-- /TMPL_LOOP --/td
+th scope=rowAuthor(s)/th
+td
+   !-- TMPL_IF NAME=author --
+   p!-- TMPL_VAR NAME=author --/p
+   !-- /TMPL_IF --
+   !-- TMPL_IF NAME=MARCAUTHORS --
+   !-- TMPL_LOOP NAME=MARCAUTHORS --
+   p !-- TMPL_LOOP NAME=MARCAUTHOR_SUBFIELDS_LOOP --
+  !-- TMPL_VAR NAME=separator --
+  !-- TMPL_VAR NAME=value --
+   !-- /TMPL_LOOP --
+   /p
+   !-- /TMPL_LOOP --
+   !-- /TMPL_IF --
+   /td
 /tr
 !-- /TMPL_IF --
 
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from auth_tag_structure.pl and auth_subfields_structure.pl

2009-06-11 Thread Garry Collum
Removed toggle variable from auth_tag_structure.pl and .tmpl.  Used template 
__odd__ in auth_tag_structure.tmpl.

Removed toggle variable from auth_subfields_structure.pl and .tmpl. Use 
__odd__. Removed a type in the highlight class definition. Fixed a minor xhtml 
error.
---
 admin/auth_subfields_structure.pl  |   15 ---
 admin/auth_tag_structure.pl|7 ---
 .../en/modules/admin/auth_subfields_structure.tmpl |8 ++--
 .../prog/en/modules/admin/auth_tag_structure.tmpl  |6 +-
 4 files changed, 11 insertions(+), 25 deletions(-)

diff --git a/admin/auth_subfields_structure.pl 
b/admin/auth_subfields_structure.pl
index b166777..6c6f571 100755
--- a/admin/auth_subfields_structure.pl
+++ b/admin/auth_subfields_structure.pl
@@ -145,16 +145,10 @@ if ($op eq 'add_form') {
my $sth=$dbh-prepare(select * from auth_subfield_structure where 
tagfield=? and authtypecode=?); # and tagsubfield='$tagsubfield');
$sth-execute($tagfield,$authtypecode);
my @loop_data = ();
-   my $toggle=1;
my $i=0;
while ($data =$sth-fetchrow_hashref) {
 
my %row_data;  # get a fresh hash for the row data
-   if ($toggle eq 1){
-   $toggle=0;
-   } else {
-   $toggle=1;
-   }
$row_data{tab} = CGI::scrolling_list(-name='tab',
-id=tab$i,
 -values =
@@ -261,7 +255,6 @@ if ($op eq 'add_form') {
-value = 1,
-label = '');
$row_data{row} = $i;
-   $row_data{toggle} = $toggle;
push(@loop_data, \%row_data);
$i++;
}
@@ -376,7 +369,6 @@ if ($op eq 'add_form') {
-tabindex='',
-multiple=0,
);
-   $row_data{toggle} = $toggle;
$row_data{row} = $i;
push(@loop_data, \%row_data);
}
@@ -516,14 +508,8 @@ if ($op eq 'add_form') {
 ## DEFAULT ##
 } else { # DEFAULT
my ($count,$results)=string_search($tagfield,$authtypecode);
-   my $toggle=1;
my @loop_data = ();
for (my $i=$offset; $i  
($offset+$pagesize$count?$offset+$pagesize:$count); $i++){
-   if ($toggle eq 1){
-   $toggle=0;
-   } else {
-   $toggle=1;
-   }
my %row_data;  # get a fresh hash for the row data
$row_data{tagfield} = $results-[$i]{'tagfield'};
$row_data{tagsubfield} = $results-[$i]{'tagsubfield'};
@@ -539,7 +525,6 @@ if ($op eq 'add_form') {
$row_data{hidden}   = $results-[$i]{'hidden'} 
if($results-[$i]{'hidden'} gt 000) ;
$row_data{isurl}= $results-[$i]{'isurl'};
$row_data{delete} = 
$script_name?op=delete_confirmamp;tagfield=$tagfieldamp;tagsubfield=.$results-[$i]{'tagsubfield'}.amp;authtypecode=$authtypecode;
-   $row_data{toggle} = $toggle;
if ($row_data{tab} eq -1) {
$row_data{subfield_ignored} = 1;
}
diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl
index 279a10c..2bd5581 100755
--- a/admin/auth_tag_structure.pl
+++ b/admin/auth_tag_structure.pl
@@ -234,14 +234,8 @@ if ($op eq 'add_form') {
 $template-param(searchfield = $searchfield);
}
my ($count,$results)=StringSearch($searchfield,$authtypecode);
-   my $toggle=1;
my @loop_data = ();
for (my $i=$offset; $i  
($offset+$pagesize$count?$offset+$pagesize:$count); $i++){
-   if ($toggle eq 1){
-   $toggle=0;
-   } else {
-   $toggle=1;
-   }
my %row_data;  # get a fresh hash for the row data
$row_data{tagfield} = $results-[$i]{'tagfield'};
$row_data{liblibrarian} = $results-[$i]{'liblibrarian'};
@@ -251,7 +245,6 @@ if ($op eq 'add_form') {
$row_data{subfield_link} 
=auth_subfields_structure.pl?tagfield=.$results-[$i]{'tagfield'}.amp;authtypecode=.$authtypecode;
$row_data{edit} = 
$script_name?op=add_formamp;searchfield=.$results-[$i]{'tagfield'}.amp;authtypecode=.$authtypecode;
$row_data{delete} = 
$script_name?op=delete_confirmamp;searchfield=.$results-[$i]{'tagfield'}.amp;authtypecode=.$authtypecode;
-   $row_data{toggle} = $toggle;
push(@loop_data, \%row_data);
}
$template-param(loop = \...@loop_data,
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/auth_subfields_structure.tmpl 

[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from marctagstructure.pl and .tmpl.

2009-06-11 Thread Garry Collum
Removed toggle variable form marctagstructure.pl and its .tmpl. Used template 
__odd__ variable instead.
---
 admin/marctagstructure.pl  |   15 ---
 .../prog/en/modules/admin/marctagstructure.tmpl|   18 +++---
 2 files changed, 15 insertions(+), 18 deletions(-)

diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl
index b930271..b2728df 100755
--- a/admin/marctagstructure.pl
+++ b/admin/marctagstructure.pl
@@ -258,16 +258,10 @@ if ($op eq 'add_form') {
}
$sth-finish;

-   my $toggle=0;
my @loop_data = ();
my $j=1;
my $i=$offset;
while ($i  ($offset+$pagesize$cnt?$offset+$pagesize:$cnt)) {
-   if ($toggle eq 0){
-   $toggle=1;
-   } else {
-   $toggle=0;
-   }
my %row_data;  # get a fresh hash for the row data
$row_data{tagfield} = $results[$i]-{'mts_tagfield'};
$row_data{liblibrarian} = 
$results[$i]-{'mts_liblibrarian'};
@@ -277,7 +271,6 @@ if ($op eq 'add_form') {
$row_data{subfield_link} 
=marc_subfields_structure.pl?op=add_formamp;tagfield=.$results[$i]-{'mts_tagfield'}.amp;frameworkcode=.$frameworkcode;
$row_data{edit} = 
$script_name?op=add_formamp;searchfield=.$results[$i]-{'mts_tagfield'}.amp;frameworkcode=.$frameworkcode;
$row_data{delete} = 
$script_name?op=delete_confirmamp;searchfield=.$results[$i]-{'mts_tagfield'}.amp;frameworkcode=.$frameworkcode;
-   $row_data{toggle} = $toggle;
$j=$i;
my @internal_loop = ();
while 
(($results[$i]-{'tagfield'}==$results[$j]-{'tagfield'}) and ($j 
($offset+$pagesize$cnt?$offset+$pagesize:$cnt))) {
@@ -292,7 +285,6 @@ if ($op eq 'add_form') {
$subfield_data{authorised_value} = 
$results[$j]-{'authorised_value'};
$subfield_data{authtypecode}= 
$results[$j]-{'authtypecode'};
$subfield_data{value_builder}= 
$results[$j]-{'value_builder'};
-   $subfield_data{toggle}  = $toggle;
 #  warn tagfield :  
.$results[$j]-{'tagfield'}. tagsubfield :.$results[$j]-{'tagsubfield'};
push @internal_loop,\%subfield_data;
$j++;
@@ -310,14 +302,8 @@ if ($op eq 'add_form') {
#here, normal old style : display every tags
my ($count,$results)=StringSearch($searchfield,$frameworkcode);
$cnt = $count;
-   my $toggle=0;
my @loop_data = ();
for (my $i=$offset; $i  
($offset+$pagesize$count?$offset+$pagesize:$count); $i++){
-   if ($toggle eq 0){
-   $toggle=1;
-   } else {
-   $toggle=0;
-   }
my %row_data;  # get a fresh hash for the row data
$row_data{tagfield} = $results-[$i]{'tagfield'};
$row_data{liblibrarian} = 
$results-[$i]{'liblibrarian'};
@@ -327,7 +313,6 @@ if ($op eq 'add_form') {
$row_data{subfield_link} 
=marc_subfields_structure.pl?tagfield=.$results-[$i]{'tagfield'}.amp;frameworkcode=.$frameworkcode;
$row_data{edit} = 
$script_name?op=add_formamp;searchfield=.$results-[$i]{'tagfield'}.amp;frameworkcode=.$frameworkcode;
$row_data{delete} = 
$script_name?op=delete_confirmamp;searchfield=.$results-[$i]{'tagfield'}.amp;frameworkcode=.$frameworkcode;
-   $row_data{toggle} = $toggle;
push(@loop_data, \%row_data);
}
$template-param(loop = \...@loop_data);
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl
index dd88246..4b3c9d0 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marctagstructure.tmpl
@@ -200,7 +200,11 @@
 
 !-- TMPL_IF NAME=select_display --
 !-- TMPL_LOOP NAME=loop --
-!-- TMPL_IF NAME=toggle --tr!-- TMPL_ELSE --tr 
class=highlight!-- /TMPL_IF --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
+tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_VAR NAME=tagfield --/td
 td!-- TMPL_VAR NAME=liblibrarian --/td
 td!-- TMPL_IF NAME=repeatable --Yes!-- TMPL_ELSE --No!-- 
/TMPL_IF --/td
@@ -210,7 

[Koha-patches] [PATCH] Bug 2889: Removed toggle from marc_subfields_structure.pl and .tmpl

2009-06-11 Thread Garry Collum
Removed toggle variable from marc_subfields_structure.pl and 
marc_subfields_structure.tmpl.  Used template __odd__ variable instead.

Corrected a typo in the highlight class definition in .tmpl.

Corrected a readability issue with the description when deleting a subfield in 
.tmpl.
---
 admin/marc_subfields_structure.pl  |   17 -
 .../en/modules/admin/marc_subfields_structure.tmpl |8 ++--
 2 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/admin/marc_subfields_structure.pl 
b/admin/marc_subfields_structure.pl
index a4c0697..7bcd0dc 100755
--- a/admin/marc_subfields_structure.pl
+++ b/admin/marc_subfields_structure.pl
@@ -174,16 +174,9 @@ if ( $op eq 'add_form' ) {
   );# and tagsubfield='$tagsubfield');
 $sth-execute( $tagfield, $frameworkcode );
 my @loop_data = ();
-my $toggle= 1;
 my $i = 0;
 while ( $data = $sth-fetchrow_hashref ) {
 my %row_data;# get a fresh hash for the row data
-if ( $toggle eq 1 ) {
-$toggle = 0;
-}
-else {
-$toggle = 1;
-}
 $row_data{defaultvalue} = $data-{defaultvalue};
 $row_data{tab} = CGI::scrolling_list(
 -name   = 'tab',
@@ -273,7 +266,6 @@ if ( $op eq 'add_form' ) {
 -label= ''
 );
 $row_data{row}= $i;
-$row_data{toggle} = $toggle;
 $row_data{link}   = CGI::escapeHTML( $data-{'link'} ); 
 push( @loop_data, \%row_data );
 $i++;
@@ -368,7 +360,6 @@ if ( $op eq 'add_form' ) {
 -multiple = 0,
 );
 $row_data{link}   = CGI::escapeHTML( $data-{'link'} );
-$row_data{toggle} = $toggle;
 $row_data{row}= $j;
 push( @loop_data, \%row_data );
 }
@@ -538,7 +529,6 @@ elsif ( $op eq 'delete_confirmed' ) {
 }
 else {# DEFAULT
 my ( $count, $results ) = string_search( $tagfield, $frameworkcode );
-my $toggle= 1;
 my @loop_data = ();
 for (
 my $i = $offset ;
@@ -546,12 +536,6 @@ else {# DEFAULT
 $i++
   )
 {
-if ( $toggle eq 1 ) {
-$toggle = 0;
-}
-else {
-$toggle = 1;
-}
 my %row_data;# get a fresh hash for the row data
 $row_data{tagfield} = $results-[$i]{'tagfield'};
 $row_data{tagsubfield}  = $results-[$i]{'tagsubfield'};
@@ -571,7 +555,6 @@ else {# DEFAULT
 $script_name?op=delete_confirmamp;tagfield=$tagfieldamp;tagsubfield=
   . $results-[$i]{'tagsubfield'}
   . amp;frameworkcode=$frameworkcode;
-$row_data{toggle} = $toggle;
 
 if ( $row_data{tab} eq -1 ) {
 $row_data{subfield_ignored} = 1;
diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl
index 55b3a4b..2ea58de 100644
--- 
a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl
+++ 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl
@@ -135,7 +135,7 @@
 
 h3Confirm Deletion of Subfield !-- TMPL_VAR NAME=tagsubfield --?/h3
 pSubfield: !-- TMPL_VAR NAME=tagsubfield --/p
-pDescription!-- TMPL_VAR NAME=liblibrarian --/p
+pDescription: !-- TMPL_VAR NAME=liblibrarian --/p
 
 form action=!-- TMPL_VAR NAME=delete_link -- 
method=postinput type=hidden name=op value=delete_confirmed /
 input type=hidden name=searchfield value=!-- TMPL_VAR 
NAME=searchfield -- /
@@ -177,7 +177,11 @@
 thDelete/th
 /tr
 !-- TMPL_LOOP NAME=loop --
-!-- TMPL_IF NAME=toggle --tr class=highlighted!-- TMPL_ELSE 
--tr!-- /TMPL_IF --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
+tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_VAR NAME=tagsubfield --/td
 td
 !-- TMPL_IF NAME=subfield_ignored --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed unused toggle variable from pcard-member-search.pl. Added table highlighting to .tmpl.

2009-06-11 Thread Garry Collum
Removed unused toggle variable form pcard-member-search.pl.

Added highlighting to pcard-members-search.tmpl and fixed some XHMTL errors.
---
 .../en/modules/labels/pcard-members-search.tmpl|   10 +++---
 labels/pcard-member-search.pl  |3 ---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl
index 93972cc..8c15583 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/pcard-members-search.tmpl
@@ -85,9 +85,9 @@ function add_item3(borrowernumber){
 input type=hidden name=batch_id value=!-- TMPL_VAR NAME=batch_id -- 
/
 input type=hidden name=type value=!-- TMPL_VAR NAME=type -- /
 label for=memberName/label
-input name=member /
+input id=member name=member /
 label for=categoryCategory code/label
-input name=category /
+input id=category name=category /
 input type=submit value=Search //p
 /form
 
@@ -100,7 +100,7 @@ function add_item3(borrowernumber){
 
 table style=float: left; margin: .5em 0;
 tr
-thlabel for=patron!-- TMPL_VAR NAME=borrowernumber -- 
style=font-weight:bold;Select/label/th
+thlabel style=font-weight:bold;Select/label/th
 tha href=pcard-member-search.pl?member=!--TMPL_VAR Name=member 
--amp;category=!--TMPL_VAR Name=category_type --amp;batch_id=!-- 
TMPL_VAR NAME=batch_id --amp;type=!-- TMPL_VAR NAME=type 
--amp;orderby=cardnumberCard/a/th
 tha href=pcard-member-search.pl?member=!--TMPL_VAR Name=member 
--amp;category=!--TMPL_VAR Name=category_type --amp;batch_id=!-- 
TMPL_VAR NAME=batch_id --amp;type=!-- TMPL_VAR NAME=type 
--amp;orderby=surnameName/a/th
 tha href=pcard-member-search.pl?member=!--TMPL_VAR Name=member 
--amp;category=!--TMPL_VAR Name=category_type --amp;batch_id=!-- 
TMPL_VAR NAME=batch_id --amp;type=!-- TMPL_VAR NAME=type 
--amp;orderby=borrowers.categorycodeCategory/a/th
@@ -110,7 +110,11 @@ function add_item3(borrowernumber){
 th/th
 /tr
 !-- TMPL_LOOP NAME=resultsloop --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 td input type=checkbox name=borrowernumber id=patron!-- TMPL_VAR 
NAME=borrowernumber -- value=!-- TMPL_VAR NAME=borrowernumber -- /   
 /td
 td!-- TMPL_VAR NAME=cardnumber --/td
 td style=white-space: nowrap;a 
href=/cgi-bin/koha/members/morepcard-member-search.pl?borrowernumber=!-- 
TMPL_VAR NAME=borrowernumber --!-- TMPL_VAR NAME=surname --, !-- 
TMPL_VAR NAME=firstname --/a br / !-- TMPL_VAR NAME=address --!-- 
TMPL_IF NAME=address2 --br /!-- TMPL_VAR NAME=address2 --!-- /TMPL_IF 
--!-- TMPL_IF NAME=city --br /!-- TMPL_VAR NAME=city --!-- /TMPL_IF 
--/td
diff --git a/labels/pcard-member-search.pl b/labels/pcard-member-search.pl
index 5620a54..1ff5cf1 100755
--- a/labels/pcard-member-search.pl
+++ b/labels/pcard-member-search.pl
@@ -95,14 +95,12 @@ else
 
 
 my @resultsdata;
-my $toggle = 0;
 my $to=($count($startfrom*$resultsperpage)?$startfrom*$resultsperpage:$count);
 for (my $i=($startfrom-1)*$resultsperpage; $i  $to; $i++){
   #find out stats
   my 
($od,$issue,$fines)=GetMemberIssuesAndFines($results-[$i]{'borrowernumber'});
 
   my %row = (
-toggle = $toggle,
 count = $i+1,
 borrowernumber = $results-[$i]{'borrowernumber'},
 cardnumber = $results-[$i]{'cardnumber'},
@@ -125,7 +123,6 @@ for (my $i=($startfrom-1)*$resultsperpage; $i  $to; $i++){
 sort2 = $results-[$i]{'sort2'},
 dateexpiry = 
C4::Dates-new($results-[$i]{'dateexpiry'},'iso')-output('syspref'),
 );
-  if ( $toggle ) { $toggle = 0; } else {$toggle = 1; }
   push(@resultsdata, \%row);
 }
 my $base_url =
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Added highlighting to smart-rules.tmpl

2009-06-10 Thread Garry Collum
Removed unused toggle variable form smart-rules.pl and added highlighting to 
smart-rules.tmpl through template __odd__.
---
 admin/smart-rules.pl   |1 -
 .../prog/en/modules/admin/smart-rules.tmpl |   12 
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl
index ce7dc9d..40e9084 100755
--- a/admin/smart-rules.pl
+++ b/admin/smart-rules.pl
@@ -349,7 +349,6 @@ $sth-finish;
 $sth=$dbh-prepare(SELECT description,itemtype FROM itemtypes ORDER BY 
description);
 $sth-execute;
 # $i=0;
-my $toggle= 1;
 my @row_loop;
 my @itemtypes;
 while (my $row=$sth-fetchrow_hashref){
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl
index 383e979..166746e 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tmpl
@@ -71,7 +71,11 @@ $(document).ready(function() {
 thLoan Period/ththnbsp;/th
 /tr
 !-- TMPL_LOOP NAME=rules --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_IF NAME=default_humancategorycode --
 emDefault/em
 !-- TMPL_ELSE --
@@ -197,7 +201,11 @@ $(document).ready(function() {
 thnbsp;/th
 /tr
 !-- TMPL_LOOP NAME=branch_cat_rule_loop --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_IF NAME=default_humancategorycode --
 emDefault/em
 !-- TMPL_ELSE --
@@ -263,7 +271,11 @@ $(document).ready(function() {
 thnbsp;/th
 /tr
 !-- TMPL_LOOP NAME=branch_item_rule_loop --
+!-- TMPL_UNLESS NAME=__odd__ --
+tr class=highlight
+!-- TMPL_ELSE --
 tr
+!-- /TMPL_UNLESS --
 td!-- TMPL_IF NAME=default_humanitemtype --
 emDefault/em
 !-- TMPL_ELSE --
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from categorie.pl and categorie.tmpl.

2009-06-09 Thread Garry Collum
Removed toggle variable from categorie.pl and categorie.tmpl.  Used template 
__odd__variable in categorie.tmpl.
---
 admin/categorie.pl |   12 +---
 .../prog/en/modules/admin/categorie.tmpl   |6 +-
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/admin/categorie.pl b/admin/categorie.pl
index bc5f725..57e30d9 100755
--- a/admin/categorie.pl
+++ b/admin/categorie.pl
@@ -182,7 +182,6 @@ if ($op eq 'add_form') {
$template-param(else = 1);
my @loop;
my ($count,$results)=StringSearch($searchfield,'web');
-   my $toggle = 0;
for (my $i=0; $i  $count; $i++){
my %row = (categorycode = $results-[$i]{'categorycode'},
description = $results-[$i]{'description'},
@@ -194,21 +193,12 @@ if ($op eq 'add_form') {
issuelimit = $results-[$i]{'issuelimit'},
reservefee = 
sprintf(%.2f,$results-[$i]{'reservefee'}),
category_type = 
$results-[$i]{'category_type'},
-   type_.$results-[$i]{'category_type'} = 1,
-   toggle = $toggle );
+   type_.$results-[$i]{'category_type'} = 1);
 if (C4::Context-preference('EnhancedMessagingPreferences')) {
 my $brief_prefs = 
_get_brief_messaging_prefs($results-[$i]{'categorycode'});
 $row{messaging_prefs} = $brief_prefs if @$brief_prefs;
 }
push @loop, \%row;
-   if ( $toggle eq 0 )
-   {
-   $toggle = 1;
-   }
-   else
-   {
-   $toggle = 0;
-   }
}
$template-param(loop = \...@loop);
# check that I (institution) and C (child) exists. otherwise = warning 
to the user
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
index 167a7f1..e46b381 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categorie.tmpl
@@ -233,7 +233,11 @@ Confirm Deletion of Category !-- TMPL_VAR 
NAME=categorycode escape=html --
th scope=col colspan=2nbsp; /th
/tr
!-- TMPL_LOOP NAME=loop --
-   !-- TMPL_IF NAME=toggle --tr class=highlight!-- 
TMPL_ELSE --tr!-- /TMPL_IF --
+   !-- TMPL_UNLESS NAME=__odd__ --
+   tr class=highlight
+   !-- TMPL_ELSE --
+   tr
+   !-- /TMPL_UNLESS --
 td!-- TMPL_VAR NAME=categorycode escape=html 
--/td
 td
 a href=!-- TMPL_VAR NAME=script_name 
--?op=add_formamp;categorycode=!-- TMPL_VAR NAME=categorycode escape=url 
--!-- TMPL_VAR NAME=description escape=html --/a
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


[Koha-patches] [PATCH] Bug 2889: Removed toggle variable from aqbookfund.pl and aqbookfund.tmpl.

2009-06-09 Thread Garry Collum
Removed toggle variable from aqbookfund.pl and aqbookfund.tmpl. Used template 
__odd__ variable in aqbookfund.tmpl.
---
 admin/aqbookfund.pl|2 --
 .../prog/en/modules/admin/aqbookfund.tmpl  |4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/admin/aqbookfund.pl b/admin/aqbookfund.pl
index d5673c8..952e068 100755
--- a/admin/aqbookfund.pl
+++ b/admin/aqbookfund.pl
@@ -268,13 +268,11 @@ else { # DEFAULT
 scalar(@results) - 1,
 );
 
-my $toggle = 0;
 foreach my $result (@results[$first .. $last]) {
 push(
 @loop,
 {
 %{$result},
-toggle = $toggle++%2,
 branchname =
 $branches-{ $result-{branchcode} }-{branchname},
 has_budgets = defined $nb_budgets_of{ $result-{bookfundid} },
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl
index 9581f71..3403c69 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbookfund.tmpl
@@ -108,11 +108,11 @@
   /tr
 
 !-- TMPL_LOOP name=bookfund --
-  !-- TMPL_IF NAME=toggle --
+  !-- TMPL_UNLESS NAME=__odd__ --
   tr class=highlight
   !-- TMPL_ELSE --
   tr
-  !-- /TMPL_IF --
+  !-- /TMPL_UNLESS --
 td
   !-- TMPL_VAR name=bookfundid --
 /td
-- 
1.5.6.5

___
Koha-patches mailing list
Koha-patches@lists.koha.org
http://lists.koha.org/mailman/listinfo/koha-patches


  1   2   >