[Koha-cvs] koha koha-tmpl/intranet-tmpl/prog/en/serials/se... [rel_3_0]

Antoine Farnault antoine at koha-fr.org
Thu Dec 21 15:59:48 CET 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_3_0
Changes by:	Antoine Farnault <toins>	06/12/21 14:59:48

Modified files:
	koha-tmpl/intranet-tmpl/prog/en/serials: serials-home.tmpl 
	serials        : serials-home.pl 

Log message:
	display search results only if a search has been made.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.5.2.3&r2=1.5.2.4
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serials-home.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.5.2.4&r2=1.5.2.5

Patches:
Index: koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl
===================================================================
RCS file: /sources/koha/koha/koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
diff -u -b -r1.5.2.3 -r1.5.2.4
--- koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl	6 Dec 2006 08:11:38 -0000	1.5.2.3
+++ koha-tmpl/intranet-tmpl/prog/en/serials/serials-home.tmpl	21 Dec 2006 14:59:48 -0000	1.5.2.4
@@ -16,7 +16,7 @@
             <th>Title</th>
             <th>
                 Note
-            </td>
+            </th>
             <!-- TMPL_IF NAME="routing" -->
               <th colspan=3>&nbsp;</th>
             <!-- TMPL_ELSE -->
@@ -24,7 +24,7 @@
             <!-- /TMPL_IF -->
         </tr>
         <tr>
-            <form action="serials-home.pl" method="post">
+            <form action="/cgi-bin/koha/serials/serials-home.pl" method="get">
             <!-- TMPL_IF NAME="routing" -->
                 <input type="hidden" name="routing" value="<!-- TMPL_VAR NAME="routing" -->" />
             <!-- /TMPL_IF -->
@@ -33,7 +33,7 @@
                 <input type="text" size=10 maxlength=11 name="ISSN_filter" value="<!-- TMPL_VAR name="ISSN_filter" -->" title="type ISSN here to filter subscription">
             </td>
             <td>
-                <input type="text" size=40 maxlength=40 name="title_filter" value="<!-- TMPL_VAR name="title_filter" -->" title="type a title -complete or partial- to filter subscription">
+                <input type="text" size=40 maxlength=40 name="title_filter" value="<!-- TMPL_VAR name="title_filter" -->" title="type a title -complete or partial- to filter subscription" />
             </td>
             <td>
                 &nbsp;
@@ -42,6 +42,7 @@
                 <input type="submit" value="filter" class="button serial" title="set a filter on ISSN / title">
             </td>
         </tr>
+        <!-- TMPL_IF NAME="done_searched"-->
         <!-- TMPL_LOOP name="subscriptions" -->
             <tr>
                 <!-- TMPL_IF name="toggle" -->
@@ -50,8 +51,7 @@
                     <td>
                 <!-- /TMPL_IF -->
                 <!-- TMPL_IF name="issn" -->
-                    <a href="serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" class="button serial"
-title="Issues history"><!-- TMPL_VAR name="issn" --></a>
+                    <a href="/cgi-bin/koha/serials/serial-issues.pl?biblionumber=<!-- TMPL_VAR name="biblionumber" -->" title="Issues history"><!-- TMPL_VAR name="issn" --></a>
                 <!-- /TMPL_IF -->
                 </td>
                 <!-- TMPL_IF name="toggle" -->
@@ -78,7 +78,7 @@
                     <!-- TMPL_ELSE -->
                         <td>
                     <!-- /TMPL_IF -->
-                        <a href="routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" --><!-- TMPL_UNLESS NAME="routingedit" -->&op=new<!-- /TMPL_UNLESS -->">Routing List</a>
+                        <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" --><!-- TMPL_UNLESS NAME="routingedit" -->&op=new<!-- /TMPL_UNLESS -->">Routing List</a>
                     </td>
                 <!-- /TMPL_IF -->
                 <!-- TMPL_IF name="toggle" -->
@@ -86,17 +86,18 @@
                 <!-- TMPL_ELSE -->
                     <td>
                 <!-- /TMPL_IF -->
-                    <a href="subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="subscription detail">Detail</a>
+                    <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->" class="button serial" title="subscription detail">Detail</a>
                 </td>
                 <!-- TMPL_IF name="toggle" -->
                     <td class="hilighted">
                 <!-- TMPL_ELSE -->
                     <td>
                 <!-- /TMPL_IF -->
-                  <a href="serials-edit.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&amp;serstatus=1">Receive</a>
+                  <a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&amp;serstatus=1">Receive</a>
                 </td>
             </tr>
         <!-- /TMPL_LOOP -->
+        <!-- /TMPL_IF -->
     </table>
     
     <!-- TMPL_IF NAME="routing" -->

Index: serials/serials-home.pl
===================================================================
RCS file: /sources/koha/koha/serials/serials-home.pl,v
retrieving revision 1.5.2.4
retrieving revision 1.5.2.5
diff -u -b -r1.5.2.4 -r1.5.2.5
--- serials/serials-home.pl	18 Dec 2006 16:35:19 -0000	1.5.2.4
+++ serials/serials-home.pl	21 Dec 2006 14:59:48 -0000	1.5.2.5
@@ -17,7 +17,7 @@
 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
 # Suite 330, Boston, MA  02111-1307 USA
 
-# $Id: serials-home.pl,v 1.5.2.4 2006/12/18 16:35:19 toins Exp $
+# $Id: serials-home.pl,v 1.5.2.5 2006/12/21 14:59:48 toins Exp $
 
 =head1 NAME
 
@@ -55,20 +55,28 @@
 my $routing = $query->param('routing');
 my $searched = $query->param('searched');
 my $biblionumber = $query->param('biblionumber');
-my @subscriptions =GetSubscriptions($title,$ISSN,$biblionumber);
-my ($template, $loggedinuser, $cookie)
-= get_template_and_user({template_name => "serials/serials-home.tmpl",
+
+my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
+    {
+        template_name   => "serials/serials-home.tmpl",
 				query => $query,
 				type => "intranet",
 				authnotrequired => 0,
-				flagsrequired => {serials => 1},
+        flagsrequired   => { serials => 1 },
 				debug => 1,
-				});
+    }
+);
+
+my @subscriptions;
+if ($searched){
+    @subscriptions = GetSubscriptions( $title, $ISSN, $biblionumber );
+}
 
 # to toggle between create or edit routing list options
-if($routing){
-    for(my $i=0;$i<@subscriptions;$i++){
-		my $checkrouting = check_routing($subscriptions[$i]->{'subscriptionid'});
+if ($routing) {
+    for ( my $i = 0 ; $i < @subscriptions ; $i++ ) {
+        my $checkrouting =
+          check_routing( $subscriptions[$i]->{'subscriptionid'} );
 		$subscriptions[$i]->{'routingedit'} = $checkrouting;
     }
 }
@@ -79,5 +87,5 @@
 	ISSN_filter => $ISSN,
     done_searched => $searched,
     routing => $routing,
-	);
+);
 output_html_with_http_headers $query, $cookie, $template->output;





More information about the Koha-cvs mailing list