@@ -, +, @@ - Delete selected items: redirect to batch items deletion - Modify selected items: redirect to batch items modification --- catalogue/detail.pl | 21 +++++++- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 11 ++++ .../intranet-tmpl/prog/en/includes/cat-toolbar.inc | 2 - .../en/modules/admin/preferences/staff_client.pref | 6 ++ .../prog/en/modules/catalogue/detail.tt | 60 ++++++++++++++++++++ .../prog/en/modules/tools/batchMod-del.tt | 4 +- .../prog/en/modules/tools/batchMod-edit.tt | 4 +- 8 files changed, 102 insertions(+), 7 deletions(-) --- a/catalogue/detail.pl +++ a/catalogue/detail.pl @@ -48,7 +48,7 @@ my $query = CGI->new(); my $analyze = $query->param('analyze'); -my ( $template, $borrowernumber, $cookie ) = get_template_and_user( +my ( $template, $borrowernumber, $cookie, $flags ) = get_template_and_user( { template_name => 'catalogue/detail.tmpl', query => $query, @@ -399,4 +399,23 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref 'sort'=>'-weight', limit=>$tag_quantity})); } +my $StaffDetailItemSelection = C4::Context->preference('StaffDetailItemSelection'); +if ($StaffDetailItemSelection) { + # Only enable item selection if user can execute at least one action + if ( + $flags->{superlibrarian} + || ( + ref $flags->{tools} eq 'HASH' && ( + $flags->{tools}->{items_batchmod} # Modify selected items + || $flags->{tools}->{items_batchdel} # Delete selected items + ) + ) + || ( ref $flags->{tools} eq '' && $flags->{tools} ) + ) + { + $template->param( + StaffDetailItemSelection => $StaffDetailItemSelection ); + } +} + output_html_with_http_headers $query, $cookie, $template->output; --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -406,3 +406,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('NotesBlacklist','','List of notes fields that should not appear in the title notes/description separator of details',NULL,'free'); INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('SCOUserCSS', '', NULL, 'Add CSS to be included in the SCO module in an embedded