bug 4131 have subscription so edit routing if one exists
authorNicole Engard <nengard@bywatersolutions.com>
Tue, 11 Jan 2011 07:33:51 +0000 (02:33 -0500)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 11 Jan 2011 23:13:34 +0000 (12:13 +1300)
Changes the template variable checked in serials-menu.inc for determining where to
show 'Create Routing List' or 'Edit Routing List' to hasRouting.

Also adds the $hasRouting variable to serials/routing.pl and serials/routing-preview.pl,
for completeness.

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc
serials/routing-preview.pl
serials/routing.pl

index 88e32e3..db3cb51 100644 (file)
@@ -2,11 +2,11 @@
 <ul>
 <li><a href="serials-collection.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Serial Collection</a></li>
        <!-- TMPL_IF NAME="CAN_user_serials_routing" -->
-           <!-- TMPL_IF NAME="routing" -->
-               <li><a href="routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->">Edit Routing List</a></li>
-           <!-- TMPL_ELSE -->
-               <li><a href="routing.pl?subscriptionid=<!-- TMPL_VAR NAME="subscriptionid" -->&amp;op=new">Create Routing List</a></li>
-           <!-- /TMPL_IF -->
+        <!--TMPL_IF Name="hasRouting"-->
+             <li><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->">Edit Routing List</a></li>
+        <!-- TMPL_ELSE -->
+                       <li><a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=<!-- TMPL_VAR name="subscriptionid" -->&amp;op=new">Create Routing List</a></li>
+               <!--/TMPL_IF-->
        <!-- /TMPL_IF -->
 </ul>
 <!-- /TMPL_IF -->
index 477ae81..5d57c13 100755 (executable)
@@ -136,6 +136,7 @@ $template->param(
     subscriptionid => $subscriptionid,
     memberloop => \@results,
     routingnotes => $routingnotes,
+    hasRouting => check_routing($subscriptionid),
     );
 
 output_html_with_http_headers $query, $cookie, $template->output;
index 18519e3..2bd7d69 100755 (executable)
@@ -144,6 +144,7 @@ $template->param(
     op => $new,
     dates => $dates,
     routingnotes => $serials[0]->{'routingnotes'},
+    hasRouting => check_routing($subscriptionid),
     );
 
         output_html_with_http_headers $query, $cookie, $template->output;