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 1201-1217 Link Here
1201
                    </td>
1201
                    </td>
1202
                [% END %]
1202
                [% END %]
1203
                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1203
                [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]
1204
                    <td class="location" property="seller">
1204
                    <td class="location" property="seller" data-order="[% ITEM_RESULT.branchname| html %]">
1205
                        <link property="itemOffered" href="#record" />
1205
                        <link property="itemOffered" href="#record" />
1206
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1206
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1207
                        <span class="[% ITEM_RESULT.holding_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
1207
1208
                            [% IF ( ITEM_RESULT.branchurl ) %]
1208
                        [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
1209
                                <a href="[% ITEM_RESULT.branchurl | url %]">[% ITEM_RESULT.branchname | html %]</a>
1209
                            <a href="[% ITEM_RESULT.branchurl | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.branchcode | html %]">
1210
                            [% ELSE %]
1210
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% ITEM_RESULT.branchname | html %]
1211
                                <span>[% ITEM_RESULT.branchname | html %]</span>
1211
                            </a>
1212
                            [% END %]
1212
                        [% ELSIF ( ITEM_RESULT.branchurl ) %]
1213
                        </span>
1213
                            <a href="[% ITEM_RESULT.branchurl | url %]">
1214
                        <div class="branch-info-tooltip">[% ITEM_RESULT.holding_branch_opac_info | $raw %]</div>
1214
                                [% ITEM_RESULT.branchname | html %]
1215
                            </a>
1216
                        [% ELSE %]
1217
                            <span>[% ITEM_RESULT.branchname | html %]</span>
1218
                        [% END %]
1215
1219
1216
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1220
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'holding' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1217
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
1221
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
Lines 1224-1242 Link Here
1224
                    <td class="location" property="seller">
1228
                    <td class="location" property="seller">
1225
                        <link property="itemOffered" href="#record" />
1229
                        <link property="itemOffered" href="#record" />
1226
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1230
                        <link property="businessFunction" href="http://purl.org/goodrelations/v1#LeaseOut">
1227
                        <span class="[% ITEM_RESULT.home_branch_opac_info ? 'branch-info-tooltip-trigger' : '' %]" title="">
1231
1228
                            [% IF Branches.GetURL( ITEM_RESULT.homebranch ) %]
1232
                        [% IF ( ITEM_RESULT.holding_branch_opac_info ) %]
1229
                                [% home_branch_url = Branches.GetURL( ITEM_RESULT.homebranch ) %]
1233
                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) | url %]" class="library_info" data-branchcode="[% ITEM_RESULT.homebranch | html %]">
1230
                                [% IF ( home_branch_url ) %]
1234
                                <i class="fa fa-info-circle" aria-hidden="true"></i> [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
1231
                                     <a href="[% home_branch_url | url %]">[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</a>
1235
                            </a>
1232
                                [% ELSE %]
1236
                        [% ELSIF ( Branches.GetURL( ITEM_RESULT.homebranch ) ) %]
1233
                                    <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1237
                            <a href="[% Branches.GetURL( ITEM_RESULT.homebranch ) | url %]">
1234
                                [% END %]
1238
                                [% Branches.GetName( ITEM_RESULT.homebranch ) | html %]
1235
                            [% ELSE %]
1239
                            </a>
1236
                                <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1240
                        [% ELSE %]
1237
                            [% END %]
1241
                            <span>[% Branches.GetName( ITEM_RESULT.homebranch ) | html %]</span>
1238
                        </span>
1242
                        [% END %]
1239
                        <div class="branch-info-tooltip">[% ITEM_RESULT.home_branch_opac_info | $raw %]</div>
1240
1243
1241
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1244
                        [% IF ( Koha.Preference('OpacLocationOnDetail') == 'home' || Koha.Preference('OpacLocationOnDetail') == 'both' ) %]
1242
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
1245
                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
Lines 1357-1362 Link Here
1357
    </table>
1360
    </table>
1358
[% END %][%# end of items_table block %]
1361
[% END %][%# end of items_table block %]
1359
1362
1363
<!-- Library Info Modal -->
1364
<div class="modal" id="libraryInfoModal" tabindex="-1" aria-labelledby="libraryInfoModalLabel" aria-hidden="true">
1365
    <div class="modal-dialog">
1366
        <div class="modal-content">
1367
            <div class="modal-header">
1368
                <h5 class="modal-title" id="libraryInfoModalLabel"></h5>
1369
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">
1370
                    <span aria-hidden="true">&times;</span>
1371
                </button>
1372
            </div>
1373
            <div class="modal-body">
1374
                <div id="libraryInfo"></div>
1375
            </div>
1376
            <div class="modal-footer">
1377
                <a id="libraryInfoLink" href="" class="btn btn-primary">Visit web site</a>
1378
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
1379
            </div>
1380
        </div> <!-- /.modal-content -->
1381
    </div> <!-- /.modal-dialog -->
1382
</div> <!-- /.modal -->
1383
1360
[% BLOCK jsinclude %]
1384
[% BLOCK jsinclude %]
1361
    [% INCLUDE 'datatables.inc' %]
1385
    [% INCLUDE 'datatables.inc' %]
1362
    [% INCLUDE 'columns_settings.inc' %]
1386
    [% INCLUDE 'columns_settings.inc' %]
Lines 1602-1616 Link Here
1602
            [% END # /IF OPACDetailQRCode %]
1626
            [% END # /IF OPACDetailQRCode %]
1603
1627
1604
            $('#bibliodescriptions').tabs();
1628
            $('#bibliodescriptions').tabs();
1605
            $(".branch-info-tooltip-trigger").uitooltip({
1606
                position: { my: "left+15 center", at: "right center" },
1607
                show: 50,
1608
                hide: 50,
1609
                content: function(){
1610
                    var element = $(this).next("div");
1611
                    return element.html();
1612
                }
1613
            });
1614
1629
1615
            [% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]
1630
            [% IF ( Koha.Preference('OpacBrowseResults') && busc ) %]
1616
                $(".l_Results").show();
1631
                $(".l_Results").show();
Lines 1914-1919 Link Here
1914
                    multiSearchRequest();
1929
                    multiSearchRequest();
1915
                });
1930
                });
1916
            } /* if( OPACPopupAuthorsSearch == "1" ) */
1931
            } /* if( OPACPopupAuthorsSearch == "1" ) */
1932
1933
            $(".library_info").on("click", function(e){
1934
                e.preventDefault();
1935
                var branchcode = $(this).data("branchcode");
1936
                var url = $(this).attr("href");
1937
                $.ajax({
1938
                    url: "/api/v1/libraries/" + branchcode,
1939
                    type: 'GET',
1940
                    dataType: 'json',
1941
                    success: function(result) {
1942
                        $("#libraryInfoModalLabel").html( result.name );
1943
                        $("#libraryInfo").html( result.opac_info );
1944
                        if( result.url ){
1945
                            $("#libraryInfoLink").attr("href", result.url );
1946
                            $("#libraryInfoLink").show();
1947
                        } else {
1948
                            $("#libraryInfoLink").hide();
1949
                        }
1950
                        $("#libraryInfoModal").modal("show");
1951
                    },
1952
                    error: function(xhr, status, error) {
1953
                        if( url ){
1954
                            location.href = url;
1955
                        }
1956
                    }
1957
                });
1958
            });
1959
            $("#libraryInfoModal").on("hide.bs.modal", function(){
1960
                $("#libraryInfoModalLabel, #libraryInfo").html("");
1961
                $("#libraryInfoLink").attr("href", "");
1962
            });
1917
        });
1963
        });
1918
1964
1919
        function multiSearchRequest(){
1965
        function multiSearchRequest(){
1920
- 

Return to bug 29616