@@ -, +, @@
holdings
---
.../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
@@ -274,7 +274,7 @@
[% END %]
[% IF ( MARCNOTES || notes ) %]
Descriptions ([% ( MARCNOTES.size || 1 ) | html %])[% END %]
-[% IF ( ComponentParts ) %]Components ([% ( ComponentParts.size || 1 ) %])[% END %]
+[% IF ( ComponentParts ) %]Components ([% ( ComponentParts.size ) %])[% END %]
[% IF ( subscriptionsnumber ) %]Subscriptions[% END %]
[% IF Koha.Preference('AcquisitionDetails') %]Acquisition details[% END %]
[% IF suggestions.count %]Suggestion details[% END %]
@@ -1265,9 +1265,14 @@ Note that permanent location is a code, and location may be an authval.
$(document).ready(function() {
$('#bibliodetails').tabs();
- [% IF count == 0 and ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) %]
+ // Pick details tab to display by default
+ [% IF count == 0 %]
+ [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
$('#bibliodetails').tabs("option", "active", $('#media_tab').index() );
- [% END %]
+ [% ELSIF ComponentParts %]
+ $('#bibliodetails').tabs("option", "active", $('#components_tab').index() );
+ [% END %]
+ [% END %]
$('#search-form').focus();
$('.thumbnails > li > .remove').click(function() {
var result = confirm(_("Are you sure you want to delete this cover image?"));
--