diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
index c226da6dd0..70df935b51 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
@@ -1195,17 +1195,21 @@
[% END %]
[% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
-
+ |
-
- [% IF ( ITEM_RESULT.branchurl ) %]
- [% ITEM_RESULT.branchname | html %]
- [% ELSE %]
- [% ITEM_RESULT.branchname | html %]
- [% END %]
-
- [% ITEM_RESULT.holding_branch_opac_info | $raw %]
+
+ [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
+
+ [% ITEM_RESULT.branchname | html %]
+
+ [% ELSIF ( ITEM_RESULT.branchurl ) %]
+
+ [% ITEM_RESULT.branchname | html %]
+
+ [% ELSE %]
+ [% ITEM_RESULT.branchname | html %]
+ [% END %]
[% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
[% ITEM_RESULT.location_description | html %]
@@ -1218,19 +1222,18 @@
|
-
- [% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
- [% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
- [% IF ( home_branch_url ) %]
- [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
- [% ELSE %]
- [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
- [% END %]
- [% ELSE %]
- [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
- [% END %]
-
- [% ITEM_RESULT.home_branch_opac_info | $raw %]
+
+ [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
+
+ [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
+
+ [% ELSIF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
+
+ [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
+
+ [% ELSE %]
+ [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
+ [% END %]
[% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
[% ITEM_RESULT.location_description | html %]
@@ -1351,6 +1354,27 @@
[% END %][%# end of items_table block %]
+
+
+
[% BLOCK jsinclude %]
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'columns_settings.inc' %]
@@ -1596,15 +1620,6 @@
[% END # /IF OPACDetailQRCode %]
$('#bibliodescriptions').tabs();
- $(".branch-info-tooltip-trigger").uitooltip({
- position: { my: "left+15 center", at: "right center" },
- show: 50,
- hide: 50,
- content: function(){
- var element = $(this).next("div");
- return element.html();
- }
- });
[% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]
$(".l_Results").show();
@@ -1908,6 +1923,37 @@
multiSearchRequest();
});
} /* if( OPACPopupAuthorsSearch == "1" ) */
+
+ $(".library_info").on("click", function(e){
+ e.preventDefault();
+ var branchcode = $(this).data("branchcode");
+ var url = $(this).attr("href");
+ $.ajax({
+ url: "/api/v1/libraries/" + branchcode,
+ type: 'GET',
+ dataType: 'json',
+ success: function(result) {
+ $("#libraryInfoModalLabel").html( result.name );
+ $("#libraryInfo").html( result.opac_info );
+ if( result.url ){
+ $("#libraryInfoLink").attr("href", result.url );
+ $("#libraryInfoLink").show();
+ } else {
+ $("#libraryInfoLink").hide();
+ }
+ $("#libraryInfoModal").modal("show");
+ },
+ error: function(xhr, status, error) {
+ if( url ){
+ location.href = url;
+ }
+ }
+ });
+ });
+ $("#libraryInfoModal").on("hide.bs.modal", function(){
+ $("#libraryInfoModalLabel, #libraryInfo").html("");
+ $("#libraryInfoLink").attr("href", "");
+ });
});
function multiSearchRequest(){
|