koha-cvs
[Top][All Lists]
Advanced

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

[Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/overdue... [rel_2_2]


From: Henri-Damien LAURENT
Subject: [Koha-cvs] koha koha-tmpl/intranet-tmpl/default/en/overdue... [rel_2_2]
Date: Wed, 04 Jan 2006 09:29:34 +0000

CVSROOT:        /cvsroot/koha
Module name:    koha
Branch:         rel_2_2
Changes by:     Henri-Damien LAURENT <address@hidden>   06/01/04 09:29:34

Modified files:
        koha-tmpl/intranet-tmpl/default/en: overdue.tmpl 
        .              : overdue.pl 

Log message:
        Bugfixing : sorting by patron now taken into account.
        All selection boxes, apart from flags selection box, was changed in 
order to be more "multi lingual" compliant and to keep filter parameters.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl.diff?only_with_tag=rel_2_2&tr1=1.6.2.2&tr2=1.6.2.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/overdue.pl.diff?only_with_tag=rel_2_2&tr1=1.9.2.3&tr2=1.9.2.4&r1=text&r2=text

Patches:
Index: koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl
diff -u koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl:1.6.2.2 
koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl:1.6.2.3
--- koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl:1.6.2.2        Wed Nov 
30 18:14:38 2005
+++ koha/koha-tmpl/intranet-tmpl/default/en/overdue.tmpl        Wed Jan  4 
09:29:34 2006
@@ -4,19 +4,37 @@
        <form method="post" action="/cgi-bin/koha/overdue.pl">
        <p>Filter on :<br />
                <div class="label100">Name or cardnumber :</div> <input 
type="text" name="borname" value="<!--TMPL_VAR Name="borname"-->"><br />
-               <div class="label100">Borrower categorycode :</div><!--TMPL_VAR 
Name="CGIcatcodes" --><br />
+               <div class="label100">Borrower categorycode :</div><select 
name="borcat" id="borcat"><option value="">Any</option>
+                       <!-- TMPL_LOOP name="borcatloop" -->
+                               <option value="<!-- TMPL_VAR name="value" -->" 
<!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR 
name="catname" --></option>
+                       <!-- /TMPL_LOOP -->
+                       </select><br />
                <div class="label100">Borrower Flags :</div><!--TMPL_VAR 
Name="CGIflags" --><br />
-               <div class="label100">Itemtype :</div><!--TMPL_VAR 
Name="CGIitemtypes" --><br />
-               <div class="label100">branch :</div><!--TMPL_VAR 
Name="CGIbranches" --><br />
-               <div class="label100">Show any items currently 
issued:</div><input type="checkbox" name="showall" value="show" <!--TMPL_IF 
Name="showall"-->checked="checked"<!--/TMPL_IF-->><br />
+               <div class="label100">Itemtype :</div><select name="itemtype" 
id="itemtype"><option value="">Any</option>
+                       <!-- TMPL_LOOP name="itemtypeloop" -->
+                               <option value="<!-- TMPL_VAR name="value" -->" 
<!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR 
name="itemtypename" --></option>
+                       <!-- /TMPL_LOOP -->
+                       </select><br />
+               <div class="label100">branch :</div><select name="branch" 
id="branch">
+                               <option value="">Any</option>
+                       <!-- TMPL_LOOP name="branchloop" -->
+                               <option value="<!-- TMPL_VAR name="value" -->" 
<!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR 
name="branchname" --></option>
+                       <!-- /TMPL_LOOP -->
+                       </select>
+<br />
+               <div class="label100">Show any items currently 
issued:</div><input type="checkbox" name="showall" value="show" <!--TMPL_IF 
Name="showall"-->checked="checked"<!--/TMPL_IF-->><br /><br />
+               <div class="label100">Sort By</div><select name="order" 
tabindex="0" size="1" id="order">
+<option <!--TMPL_UNLESS name="order"-->selected<!-- /TMPL_UNLESS--> 
value="">Due Date</option>
+<option <!--TMPL_IF name="order"-->selected<!-- /TMPL_IF--> 
value="borrower">Borrower</option>
+</select><br />
                        <input TYPE="submit" value="Apply Filter" class="button 
reports">
        </form>
        </p>
        
        <table>
        <tr>
-               <th class="reports">Due Date <a 
href="/cgi-bin/koha/overdue.pl?order=date&amp;type=intranet">Sort</a> </th>
-               <th class="reports">Patron <a 
href="/cgi-bin/koha/overdue.pl?order=borrower&amp;type=intranet">Sort</a></th>
+               <th class="reports">Due Date </th>
+               <th class="reports">Patron </th>
                <th class="reports">Phone</th>
                <th class="reports">Title</th>
                <th class="reports">Author</th>
Index: koha/overdue.pl
diff -u koha/overdue.pl:1.9.2.3 koha/overdue.pl:1.9.2.4
--- koha/overdue.pl:1.9.2.3     Wed Dec 14 15:35:40 2005
+++ koha/overdue.pl     Wed Jan  4 09:29:34 2006
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: overdue.pl,v 1.9.2.3 2005/12/14 15:35:40 tipaul Exp $
+# $Id: overdue.pl,v 1.9.2.4 2006/01/04 09:29:34 hdl Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -51,51 +51,39 @@
 my $req;
 $req = $dbh->prepare( "select categorycode, description from categories order 
by description");
 $req->execute;
-my %select_catcode;
-my @select_catcode;
-push @select_catcode,"";
-$select_catcode{""} = "";
+my @borcatloop;
 while (my ($catcode, $description) =$req->fetchrow) {
-       push @select_catcode, $catcode;
-       $select_catcode{$catcode} = $description
+       my $selected = 1 if $catcode eq $borcatfilter;
+       my %row =(value => $catcode,
+                               selected => $selected,
+                               catname => $description,
+                       );
+       push @borcatloop, \%row;
 }
-my $CGIcatcode=CGI::scrolling_list( -name     => 'borcat',
-                       -id => 'borcat',
-                       -values   => address@hidden,
-                       -labels   => \%select_catcode,
-                       -size     => 1,
-                       -multiple => 0 );
+
 $req = $dbh->prepare( "select itemtype, description from itemtypes order by 
description");
 $req->execute;
-my %select_itemtype;
-my @select_itemtype;
-push @select_itemtype,"";
-$select_itemtype{""} = "";
+my @itemtypeloop;
 while (my ($itemtype, $description) =$req->fetchrow) {
-       push @select_itemtype, $itemtype;
-       $select_itemtype{$itemtype} = $description
+       my $selected = 1 if $itemtype eq $itemtypefilter;
+       my %row =(value => $itemtype,
+                               selected => $selected,
+                               itemtypename => $description,
+                       );
+       push @itemtypeloop, \%row;
 }
-my $CGIitemtype=CGI::scrolling_list( -name     => 'itemtype',
-                       -id => 'itemtype',
-                       -values   => address@hidden,
-                       -labels   => \%select_itemtype,
-                       -size     => 1,
-                       -multiple => 0 );
-my @branches;
-my @select_branch;
-my %select_branches;
-my ($count2,@branches)=branches();
-push @select_branch,"";
-$select_branches{''}='';
-for (my $i=0;$i<$count2;$i++){
-               push @select_branch, $branches[$i]->{'branchcode'};#
-               $select_branches{$branches[$i]->{'branchcode'}} = 
$branches[$i]->{'branchname'};
+
+my $branches=getbranches();
+my @branchloop;
+foreach my $thisbranch (keys %$branches) {
+       my $selected = 1 if $thisbranch eq $branchfilter;
+       my %row =(value => $thisbranch,
+                               selected => $selected,
+                               branchname => 
$branches->{$thisbranch}->{'branchname'},
+                       );
+       push @branchloop, \%row;
 }
-my $CGIbranch=CGI::scrolling_list( -name     => 'branch',
-                                               -values   => address@hidden,
-                                               -labels   => \%select_branches,
-                                               -size     => 1,
-                                               -multiple => 0 );
+
 my @selectflags;
 push @selectflags, " ";#
 push @selectflags,"gonenoaddress";#
@@ -104,14 +92,14 @@
 my $CGIflags=CGI::scrolling_list( -name     => 'borflags',
                                                -id =>'borflags',
                                                -values   => address@hidden,
-#                                              -labels   => \%selectflags,
                                                -size     => 1,
                                                -multiple => 0 );
-$template->param(CGIcatcodes        => $CGIcatcode,
-                                       CGIitemtypes    => $CGIitemtype,
-                                       CGIbranches     => $CGIbranch,
+$template->param(borcatloop=> address@hidden,
+                                       itemtypeloop => address@hidden,
+                                       branchloop=> address@hidden,
                                        CGIflags     => $CGIflags,
                                        borname => $bornamefilter,
+                                       order => $order,
                                        showall => $showall);
 
 my $duedate;




reply via email to

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