Bug 7720: (follow-up) fix issues in Bootstrap theme
authorGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 02:48:41 +0000 (02:48 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 26 May 2014 02:51:45 +0000 (02:51 +0000)
- Fix breakage of tablesorting when OpacLocationBranchToDisplay
  is set to both.
- When displaying the home library, ensure that its correct
  name and URL are displayed
- Remove the attempt to display the "opac_info" tooltip for
  the home library, as it is not currently retrieved.

RM NOTE: Rather than add a GetOpacInfo function or the like
to the TT Branches plugin, simpler would be adding a
plugin function that fetches a DBIC result object for
a given branchcode, thereby allowing any column in the
branches table to be fetched into the template.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt

index c3f38dd..5b671b2 100644 (file)
                                 <link property="itemOffered" href="#record" />
                                 <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
                                 <div class="[% ITEM_RESULT.branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]">
-                                    [% IF ( ITEM_RESULT.branchurl ) %]
+                                    [% 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>
                                             [% Branches.GetName( ITEM_RESULT.homebranch ) %]
                                         [% END %]
                                     [% ELSE %]
-                                        <span title="">[% ITEM_RESULT.branchname %]</span>
+                                        <span title="">[% Branches.GetName( ITEM_RESULT.homebranch ) %]</span>
                                     [% END %]
                                 </div>
 
                                     <span class="shelvingloc">[% ITEM_RESULT.location_description %]</span>
                                 [% END %]
 
-                                <div class="branch-info-tooltip">[% ITEM_RESULT.branch_opac_info %]</div>
                             </td>
                         [% END %]
 
             "aoColumns": [
                 [% IF ( item_level_itypes ) %]null,[% END %]
                 null,
+                [% IF ( OpacLocationBranchToDisplay == 'both' ) %]null,[% END %]
                 [% IF ( itemdata_ccode ) %]null,[% END %]
                 null,
                 [% IF ( itemdata_enumchron ) %]null,[% END %]