[Koha-patches] [PATCH] [SIGNED-OFF] bug 4131 have subscription so edit routing if one exists
Ian Walls
ian.walls at bywatersolutions.com
Tue Jan 11 08:33:51 CET 2011
From: Nicole Engard <nengard at bywatersolutions.com>
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 at bywatersolutions.com>
---
.../prog/en/includes/serials-menu.inc | 10 +++++-----
serials/routing-preview.pl | 1 +
serials/routing.pl | 1 +
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc
index 88e32e3..db3cb51 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/serials-menu.inc
@@ -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" -->&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" -->&op=new">Create Routing List</a></li>
+ <!--/TMPL_IF-->
<!-- /TMPL_IF -->
</ul>
<!-- /TMPL_IF -->
diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl
index 477ae81..5d57c13 100755
--- a/serials/routing-preview.pl
+++ b/serials/routing-preview.pl
@@ -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;
diff --git a/serials/routing.pl b/serials/routing.pl
index 18519e3..2bd7d69 100755
--- a/serials/routing.pl
+++ b/serials/routing.pl
@@ -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;
--
1.5.6.5
More information about the Koha-patches
mailing list