View | Details | Raw Unified | Return to bug 11175
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-4 / +9 lines)
Lines 269-275 Link Here
269
        </li>
269
        </li>
270
    [% END %]
270
    [% END %]
271
[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %]
271
[% IF ( MARCNOTES || notes ) %]<li><a href="#description">Descriptions ([% ( MARCNOTES.size || 1 ) | html %])</a></li>[% END %]
272
[% IF ( ComponentParts ) %]<li><a href="#components">Components ([% ( ComponentParts.size || 1 ) %])</a></li>[% END %]
272
[% IF ( ComponentParts ) %]<li id="components_tab"><a href="#components">Components ([% ( ComponentParts.size ) %])</a></li>[% END %]
273
[% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
273
[% IF ( subscriptionsnumber ) %]<li><a href="#subscriptions">Subscriptions</a></li>[% END %]
274
[% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
274
[% IF Koha.Preference('AcquisitionDetails') %]<li><a href="#acq_details">Acquisition details</a></li>[% END %]
275
[% IF suggestions.count %]<li><a href="#suggestion_details">Suggestion details</a></li>[% END %]
275
[% IF suggestions.count %]<li><a href="#suggestion_details">Suggestion details</a></li>[% END %]
Lines 1258-1266 Note that permanent location is a code, and location may be an authval. Link Here
1258
1258
1259
        $(document).ready(function() {
1259
        $(document).ready(function() {
1260
            $('#bibliodetails').tabs();
1260
            $('#bibliodetails').tabs();
1261
        [% IF count == 0 and ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) %]
1261
            // Pick details tab to display by default
1262
            $('#bibliodetails').tabs("option", "active", $('#media_tab').index() );
1262
            [% IF count == 0 %]
1263
        [% END %]
1263
                [% IF ( Koha.Preference('HTML5MediaEnabled') == 'staff' or Koha.Preference('HTML5MediaEnabled') == 'both' ) && HTML5MediaSets.size %]
1264
                    $('#bibliodetails').tabs("option", "active", $('#media_tab').index() );
1265
                [% ELSIF ComponentParts %]
1266
                    $('#bibliodetails').tabs("option", "active", $('#components_tab').index() );
1267
                [% END %]
1268
            [% END %]
1264
            $('#search-form').focus();
1269
            $('#search-form').focus();
1265
            $('.thumbnails > li > .remove').click(function() {
1270
            $('.thumbnails > li > .remove').click(function() {
1266
                var result = confirm(_("Are you sure you want to delete this cover image?"));
1271
                var result = confirm(_("Are you sure you want to delete this cover image?"));
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-1 / +9 lines)
Lines 402-408 Link Here
402
                            [% IF SYNDETICS_SUMMARY %][% SET title_notes_count = title_notes_count + 1 %][% END %]
402
                            [% IF SYNDETICS_SUMMARY %][% SET title_notes_count = title_notes_count + 1 %][% END %]
403
                            <li id="tab_descriptions"> <a href="#descriptions">Title notes ( [% title_notes_count | html %] )</a></li>
403
                            <li id="tab_descriptions"> <a href="#descriptions">Title notes ( [% title_notes_count | html %] )</a></li>
404
                        [% END %]
404
                        [% END %]
405
                        [% IF ( ComponentParts ) %]<li><a href="#components">Components ([% ( ComponentParts.size || 1 ) %])</a></li>[% END %]
405
                        [% IF ( ComponentParts ) %]
406
                            [% IF defaulttab == 'components' %]
407
                            <li id="tab_components" class="ui-tabs-active">
408
                            [% ELSE %]
409
                            <li id="tab_components">
410
                            [% END %]
411
                                <a href="#components">Components ([% ( ComponentParts.size || 1 ) %])</a>
412
                            </li>
413
                        [% END %]
406
                        [% IF ( SYNDETICS_TOC ) %]
414
                        [% IF ( SYNDETICS_TOC ) %]
407
                            <li id="tab_toc"> <a href="#toc">TOC</a></li>
415
                            <li id="tab_toc"> <a href="#toc">TOC</a></li>
408
                        [% END %]
416
                        [% END %]
(-)a/opac/opac-detail.pl (-2 / +3 lines)
Lines 659-667 my $max_items_to_display = C4::Context->preference('OpacMaxItemsToDisplay') // 5 Link Here
659
659
660
# Get component parts details
660
# Get component parts details
661
my $showcomp = C4::Context->preference('ShowComponentRecords');
661
my $showcomp = C4::Context->preference('ShowComponentRecords');
662
my $parts;
662
if ( $showcomp eq 'both' || $showcomp eq 'opac' ) {
663
if ( $showcomp eq 'both' || $showcomp eq 'opac' ) {
663
    if ( my $components = $biblio->get_marc_components(300) ) {
664
    if ( my $components = $biblio->get_marc_components(300) ) {
664
        my $parts;
665
        for my $part ( @{$components} ) {
665
        for my $part ( @{$components} ) {
666
            $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
666
            $part = C4::Search::new_record_from_zebra( 'biblioserver', $part );
667
667
Lines 1207-1212 my $defaulttab = Link Here
1207
        ? 'serialcollection' :
1207
        ? 'serialcollection' :
1208
    $opac_serial_default eq 'holdings' && scalar (@itemloop) > 0
1208
    $opac_serial_default eq 'holdings' && scalar (@itemloop) > 0
1209
        ? 'holdings' :
1209
        ? 'holdings' :
1210
    ( $showcomp eq 'both' || $showcomp eq 'opac' ) && scalar (@itemloop) == 0 && $parts
1211
        ? 'components' :
1210
    scalar (@itemloop) == 0
1212
    scalar (@itemloop) == 0
1211
        ? 'media' :
1213
        ? 'media' :
1212
    $subscriptionsnumber
1214
    $subscriptionsnumber
1213
- 

Return to bug 11175