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 e2271df2b5..12a4ad0c2f 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
@@ -82,10 +82,13 @@
return false;
}
} else {
- alert(_("This record has no items."));
+ alertNoItems();
return false;
}
}
+ function alertNoItems(){
+ alert(_("This record has no items."));
+ }
[% END %]
$(document).ready(function() {
$("#z3950copy").click(function(){
@@ -115,6 +118,13 @@
return false;
});
$("#export").remove(); // Hide embedded export form if JS menus available
+ $("#deletebiblio").tooltip();
+ $("#batchedit-disabled,#batchdelete-disabled,#deleteallitems-disabled")
+ .on("click",function(e){
+ e.preventDefault();
+ alertNoItems();
+ })
+ .tooltip();
});
//]]>
@@ -161,9 +171,21 @@ CAN_user_serials_create_subscription ) %]
Edit items
[% END %]
- [% IF ( CAN_user_tools_items_batchmod ) %]Edit items in batch[% END %]
+ [% IF ( CAN_user_tools_items_batchmod ) %]
+ [% IF ( count ) %]
+ Edit items in batch
+ [% ELSE %]
+ Edit items in batch
+ [% END %]
+ [% END %]
- [% IF ( CAN_user_tools_items_batchdel ) %]Delete items in a batch[% END %]
+ [% IF ( CAN_user_tools_items_batchdel ) %]
+ [% IF ( count ) %]
+ Delete items in a batch
+ [% ELSE %]
+ Delete items in a batch
+ [% END %]
+ [% END %]
[% IF ( CAN_user_editcatalogue_edit_items ) %]Attach item[% END %]
@@ -174,13 +196,19 @@ CAN_user_serials_create_subscription ) %]
Edit as new (duplicate)
Replace record via Z39.50
- [% IF ( count ) %][% ELSE %][% END %]
- Delete record
+ [% IF ( count ) %]
+ Delete record
+ [% ELSE %]
+ Delete record
+ [% END %]
[% END %]
[% IF ( CAN_user_editcatalogue_edit_items ) %]
- [% UNLESS ( count ) %][% ELSE %][% END %]
- Delete all items
+ [% IF ( count ) %]
+ Delete all items
+ [% ELSE %]
+ Delete all items
+ [% END %]
[% END %]