@@ -, +, @@ access. check for syspref. for syspref. check for syspref. --- catalogue/stockrotation.pl | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc | 4 +++- koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tt | 4 +++- tools/stockrotation.pl | 7 +++++++ 5 files changed, 20 insertions(+), 3 deletions(-) --- a/catalogue/stockrotation.pl +++ a/catalogue/stockrotation.pl @@ -39,6 +39,12 @@ use Koha::Util::StockRotation qw(:ALL); my $input = new CGI; +unless (C4::Context->preference('StockRotation')) { + # redirect to Intranet home if self-check is not enabled + print $input->redirect("/cgi-bin/koha/mainpage.pl"); + exit; +} + my %params = $input->Vars(); my $op = $params{op}; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc @@ -40,7 +40,7 @@ [% IF ( issuehistoryview ) %]
  • [% ELSE %]
  • [% END %] Checkout history
  • [% IF ( CAN_user_tools_view_system_logs ) %][% IF ( logview ) %]
  • [% ELSE %]
  • [% END %]Modification log
  • [% END %] -[% IF ( CAN_user_stockrotation_can_add_items_rotas ) %][% IF ( stockrotationview ) %]
  • [% ELSE %]
  • [% END %]Rota
  • [% END %] +[% IF ( CAN_user_stockrotation_can_add_items_rotas && Koha.Preference('StockRotation') ) %][% IF ( stockrotationview ) %]
  • [% ELSE %]
  • [% END %]Rota
  • [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -1,3 +1,5 @@ +[% USE Koha %] +