return $libraries;
}
+sub InIndependentBranchesMode {
+ my ( $self ) = @_;
+ return ( not C4::Context->preference("IndependentBranches") or C4::Context::IsSuperLibrarian );
+}
+
1;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
output_html_with_http_headers $input, $cookie, $template->output;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
output_html_with_http_headers $query, $cookie, $template->output;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
$template->{'VARS'}->{'AllowOfflineCirculation'} = C4::Context->preference('AllowOfflineCirculation');
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
my $pending_onsite_checkouts = C4::Circulation::GetPendingOnSiteCheckouts();
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
output_html_with_http_headers( $cgi, $cookie, $template->output );
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
# actually print the page!
output_html_with_http_headers $query, $cookie, $template->output;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
output_html_with_http_headers $query, $cookie, $template->output;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
output_html_with_http_headers $input, $cookie, $template->output;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
# writing the template
output_html_with_http_headers $query, $cookie, $template->output;
# Checking if there is a Fast Cataloging Framework
$template->param( fast_cataloging => 1 ) if Koha::BiblioFrameworks->find( 'FA' );
-# Checking if the transfer page needs to be displayed
-$template->param( display_transfer => 1 ) if ( ($flags->{'superlibrarian'} == 1) || (C4::Context->preference("IndependentBranches") == 0) );
-
if ($item && $tab eq 'holdsover' && !@cancel_result) {
print $input->redirect("/cgi-bin/koha/circ/waitingreserves.pl#holdsover");
} elsif ($cancelall) {
+[% USE Branches %]
<script type="text/javascript">//<![CDATA[
$(document).ready(function() {
var path = location.pathname.substring(1);
<li><a href="/cgi-bin/koha/circ/circulation.pl">Check out</a></li>
<li><a href="/cgi-bin/koha/circ/returns.pl">Check in</a></li>
<li><a href="/cgi-bin/koha/circ/renew.pl">Renew</a></li>
- [% IF ( display_transfer ) %]
+ [% IF Branches.InIndependentBranchesMode %]
<li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
[% END %]
[% IF ( AutoLocation ) %][% ELSE %][% IF ( IndependentBranches ) %][% ELSE %]
[% USE Koha %]
+[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Circulation</title>
[% INCLUDE 'doc-head-close.inc' %]
<li><a href="/cgi-bin/koha/circ/circulation.pl">Check out</a></li>
<li><a href="/cgi-bin/koha/circ/returns.pl">Check in</a></li>
<li><a href="/cgi-bin/koha/circ/renew.pl">Renew</a></li>
- [% IF ( display_transfer ) %]
+ [% IF Branches.InIndependentBranchesMode %]
<li><a href="/cgi-bin/koha/circ/branchtransfers.pl">Transfer</a></li>
[% END %]
[% UNLESS IndependentBranches %]<li><a href="/cgi-bin/koha/circ/selectbranchprinter.pl">Set library</a></li>[% END %]