Bug 17277: Always display location and *branch item info - opac detail
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 12 Jul 2017 12:32:24 +0000 (09:32 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Oct 2017 15:14:40 +0000 (12:14 -0300)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

index f450d0e..8d0fae1 100644 (file)
         <thead>
             <tr>
                 [% IF ( item_level_itypes ) %]<th id="item_itemtype" class="itype">Item type</th>[% END %]
-                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]
+                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
                     <th id="item_current_location" class="item_location">Current location</th>
                 [% END %]
-                [% UNLESS ( singleBranchMode ) %]
-                    [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
-                        <th id="item_home_location" class="item_location">Home library</th>
-                    [% END %]
+                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
+                    <th id="item_home_location" class="item_location">Home library</th>
                 [% END %]
                 [% IF ( itemdata_ccode ) %]<th id="item_ccode" class="collection">Collection</th>[% END %]
                 <th id="item_callnumber" class="call_no">Call number</th>
                             [% ITEM_RESULT.description %]
                         </td>
                     [% END %]
-                    [% UNLESS singleBranchMode %]
-                        [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
-                            <td class="location" property="seller">
-                                <link property="itemOffered" href="#record" />
-                                <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
-                                <span class="[% ITEM_RESULT.holding_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
-                                    [% IF ( ITEM_RESULT.branchurl ) %]
-                                        <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
-                                    [% ELSE %]
-                                        <span>[% ITEM_RESULT.branchname %]</span>
-                                    [% END %]
-                                </span>
-                                <div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info %]</div>
-
-                                [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
-                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
+                    [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
+                        <td class="location" property="seller">
+                            <link property="itemOffered" href="#record" />
+                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
+                            <span class="[% ITEM_RESULT.holding_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
+                                [% IF ( ITEM_RESULT.branchurl ) %]
+                                    <a href="[% ITEM_RESULT.branchurl %]">[% ITEM_RESULT.branchname %]</a>
+                                [% ELSE %]
+                                    <span>[% ITEM_RESULT.branchname %]</span>
                                 [% END %]
+                            </span>
+                            <div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info %]</div>
 
-                            </td>
-                        [% END %]
+                            [% IF ( OpacLocationBranchToDisplayShelving == 'holding' || OpacLocationBranchToDisplayShelving == 'both' ) %]
+                                <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
+                            [% END %]
 
-                        [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
-                            <td class="location" property="seller">
-                                <link property="itemOffered" href="#record" />
-                                <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
-                                <span class="[% ITEM_RESULT.home_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
-                                    [% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
-                                        [% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
-                                        [% IF ( home_branch_url ) %]
-                                             <a href="[% home_branch_url %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
-                                        [% ELSE %]
-                                            <span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
-                                        [% END %]
+                        </td>
+                    [% END %]
+
+                    [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]
+                        <td class="location" property="seller">
+                            <link property="itemOffered" href="#record" />
+                            <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
+                            <span class="[% ITEM_RESULT.home_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
+                                [% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
+                                    [% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
+                                    [% IF ( home_branch_url ) %]
+                                         <a href="[% home_branch_url %]">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</a>
                                     [% ELSE %]
                                         <span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
                                     [% END %]
-                                </span>
-                                <div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info %]</div>
-
-                                [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
-                                    <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
+                                [% ELSE %]
+                                    <span>[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
                                 [% END %]
+                            </span>
+                            <div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info %]</div>
 
-                            </td>
-                        [% END %]
+                            [% IF ( OpacLocationBranchToDisplayShelving == 'home' || OpacLocationBranchToDisplayShelving == 'both' ) %]
+                                <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
+                            [% END %]
 
-                    [% ELSE %]
-                         <td class="location"><span class="shelvingloc">[% ITEM_RESULT.location_description %]</span></td>
+                        </td>
                     [% END %]
 
                     [% IF ( itemdata_ccode ) %]
         $(".holdingst").dataTable($.extend(true, {}, dataTablesDefaults, {
             "aoColumns": [
                 [% IF ( item_level_itypes ) %]null,[% END %]
-                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' || singleBranchMode ) %]null,[% END %]
-                [% UNLESS ( singleBranchMode ) %]
-                    [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]null,[% END %]
-                [% END %]
+                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]null,[% END %]
+                [% IF ( OpacLocationBranchToDisplay == 'home' || OpacLocationBranchToDisplay == 'both' ) %]null,[% END %]
                 [% IF ( itemdata_ccode ) %]null,[% END %]
                 null,
                 [% IF ( itemdata_enumchron ) %]null,[% END %]