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>
<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 -->
subscriptionid => $subscriptionid,
memberloop => \@results,
routingnotes => $routingnotes,
+ hasRouting => check_routing($subscriptionid),
);
output_html_with_http_headers $query, $cookie, $template->output;
op => $new,
dates => $dates,
routingnotes => $serials[0]->{'routingnotes'},
+ hasRouting => check_routing($subscriptionid),
);
output_html_with_http_headers $query, $cookie, $template->output;