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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt (-32 / +77 lines)
Lines 1195-1211 Link Here
1195
                    </td>
1195
                    </td>
1196
                [% END %]
1196
                [% END %]
1197
                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1197
                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1198
                    <td class="location" property="seller">
1198
                    <td class="location" property="seller" data-order="[% ITEM_RESULT.branchname| html %]">
1199
                        <link property="itemOffered" href="#record" />
1199
                        <link property="itemOffered" href="#record" />
1200
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1200
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1201
                        <span class="[% ITEM_RESULT.holding_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
1201
1202
                            [% IF ( ITEM_RESULT.branchurl ) %]
1202
                        [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
1203
                                <a href="[% ITEM_RESULT.branchurl | url %]">[% ITEM_RESULT.branchname | html %]</a>
1203
                            <a href="[% ITEM_RESULT.branchurl | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.branchcode | html %]">
1204
                            [% ELSE %]
1204
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% ITEM_RESULT.branchname | html %]
1205
                                <span>[% ITEM_RESULT.branchname | html %]</span>
1205
                            </a>
1206
                            [% END %]
1206
                        [% ELSIF ( ITEM_RESULT.branchurl ) %]
1207
                        </span>
1207
                            <a href="[% ITEM_RESULT.branchurl | url %]">
1208
                        <div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info | $raw %]</div>
1208
                                [% ITEM_RESULT.branchname | html %]
1209
                            </a>
1210
                        [% ELSE %]
1211
                            <span>[% ITEM_RESULT.branchname | html %]</span>
1212
                        [% END %]
1209
1213
1210
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1214
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1211
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
1215
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
Lines 1218-1236 Link Here
1218
                    <td class="location" property="seller">
1222
                    <td class="location" property="seller">
1219
                        <link property="itemOffered" href="#record" />
1223
                        <link property="itemOffered" href="#record" />
1220
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1224
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1221
                        <span class="[% ITEM_RESULT.home_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
1225
1222
                            [% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
1226
                        [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
1223
                                [% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
1227
                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.homebranch | html %]">
1224
                                [% IF ( home_branch_url ) %]
1228
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
1225
                                     <a href="[% home_branch_url | url %]">[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</a>
1229
                            </a>
1226
                                [% ELSE %]
1230
                        [% ELSIF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
1227
                                    <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1231
                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) | url %]">
1228
                                [% END %]
1232
                                [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
1229
                            [% ELSE %]
1233
                            </a>
1230
                                <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1234
                        [% ELSE %]
1231
                            [% END %]
1235
                            <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1232
                        </span>
1236
                        [% END %]
1233
                        <div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info | $raw %]</div>
1234
1237
1235
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1238
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1236
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
1239
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
Lines 1351-1356 Link Here
1351
    </table>
1354
    </table>
1352
[% END %][%# end of items_table block %]
1355
[% END %][%# end of items_table block %]
1353
1356
1357
<!-- Library Info Modal -->
1358
<div class="modal" id="libraryInfoModal" tabindex="-1" aria-labelledby="libraryInfoModalLabel" aria-hidden="true">
1359
    <div class="modal-dialog">
1360
        <div class="modal-content">
1361
            <div class="modal-header">
1362
                <h5 class="modal-title" id="libraryInfoModalLabel"></h5>
1363
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
1364
                    <span aria-hidden="true">&times;</span>
1365
                </button>
1366
            </div>
1367
            <div class="modal-body">
1368
                <div id="libraryInfo"></div>
1369
            </div>
1370
            <div class="modal-footer">
1371
                <a id="libraryInfoLink" href="" class="btn btn-primary">Visit web site</a>
1372
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
1373
            </div>
1374
        </div> <!-- /.modal-content -->
1375
    </div> <!-- /.modal-dialog -->
1376
</div> <!-- /.modal -->
1377
1354
[% BLOCK jsinclude %]
1378
[% BLOCK jsinclude %]
1355
    [% INCLUDE 'datatables.inc' %]
1379
    [% INCLUDE 'datatables.inc' %]
1356
    [% INCLUDE 'columns_settings.inc' %]
1380
    [% INCLUDE 'columns_settings.inc' %]
Lines 1596-1610 Link Here
1596
            [% END # /IF OPACDetailQRCode %]
1620
            [% END # /IF OPACDetailQRCode %]
1597
1621
1598
            $('#bibliodescriptions').tabs();
1622
            $('#bibliodescriptions').tabs();
1599
            $(".branch-info-tooltip-trigger").uitooltip({
1600
                position: { my: "left+15 center", at: "right center" },
1601
                show: 50,
1602
                hide: 50,
1603
                content: function(){
1604
                    var element = $(this).next("div");
1605
                    return element.html();
1606
                }
1607
            });
1608
1623
1609
            [% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]
1624
            [% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]
1610
                $(".l_Results").show();
1625
                $(".l_Results").show();
Lines 1908-1913 Link Here
1908
                    multiSearchRequest();
1923
                    multiSearchRequest();
1909
                });
1924
                });
1910
            } /* if( OPACPopupAuthorsSearch == "1" ) */
1925
            } /* if( OPACPopupAuthorsSearch == "1" ) */
1926
1927
            $(".library_info").on("click", function(e){
1928
                e.preventDefault();
1929
                var branchcode = $(this).data("branchcode");
1930
                var url = $(this).attr("href");
1931
                $.ajax({
1932
                    url: "/api/v1/libraries/" + branchcode,
1933
                    type: 'GET',
1934
                    dataType: 'json',
1935
                    success: function(result) {
1936
                        $("#libraryInfoModalLabel").html( result.name );
1937
                        $("#libraryInfo").html( result.opac_info );
1938
                        if( result.url ){
1939
                            $("#libraryInfoLink").attr("href", result.url );
1940
                            $("#libraryInfoLink").show();
1941
                        } else {
1942
                            $("#libraryInfoLink").hide();
1943
                        }
1944
                        $("#libraryInfoModal").modal("show");
1945
                    },
1946
                    error: function(xhr, status, error) {
1947
                        if( url ){
1948
                            location.href = url;
1949
                        }
1950
                    }
1951
                });
1952
            });
1953
            $("#libraryInfoModal").on("hide.bs.modal", function(){
1954
                $("#libraryInfoModalLabel, #libraryInfo").html("");
1955
                $("#libraryInfoLink").attr("href", "");
1956
            });
1911
        });
1957
        });
1912
1958
1913
        function multiSearchRequest(){
1959
        function multiSearchRequest(){
1914
- 

Return to bug 29616