diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 72258fda3c..60ac611325 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -49,7 +49,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, @@ -411,5 +411,23 @@ if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->pref my ( $holdcount, $holds ) = C4::Reserves::GetReservesFromBiblionumber($biblionumber,1); $template->param( holdcount => $holdcount, holds => $holds ); +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; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 6271f5ab4d..5acf25978d 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -350,6 +350,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SpineLabelShowPrintOnBibDetails','0','','If turned on, a \"Print Label\" link will appear for each item on the bib details page in the staff interface.','YesNo'), ('StaffAuthorisedValueImages','1',NULL,'','YesNo'), ('staffClientBaseURL','',NULL,'Specify the base URL of the staff client','free'), +('StaffDetailItemSelection', '0', NULL, 'Enable item selection in record detail page', 'YesNo'); ('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the Staff client','Integer'), ('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'), ('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 6c351d2005..de313c24d4 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -7146,7 +7146,6 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } - $DBversion = "3.13.00.022"; if ( CheckVersion($DBversion) ) { $dbh->do("DELETE from auth_tag_structure WHERE tagfield IN ('68a','68b')"); @@ -7627,6 +7626,16 @@ INSERT IGNORE INTO systempreferences (variable,value,explanation,type) VALUES SetVersion($DBversion); } +$DBversion = "XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(qq{ + INSERT INTO systempreferences (variable, value, explanation, options, type) + VALUES ('StaffDetailItemSelection', '0', 'Enable item selection in record detail page', NULL, 'YesNo') + }); + print "Upgrade to $DBversion done (Add system preference StaffDetailItemSelection)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc index 553d9ae744..2daacd325a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc @@ -145,10 +145,6 @@ CAN_user_serials_create_subscription ) %]
[% END %] [% IF ( item_level_itypes ) %] | Item type | [% END %]Current location | Home library | @@ -427,6 +481,11 @@ function verify_images() {
---|---|---|---|
+ + | + [% END %] [% IF ( item_level_itypes ) %]
[% IF !noItemTypeImages && item.imageurl %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
index 292b81f65c..615582a306 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
@@ -180,8 +180,8 @@ for( x=0; x |