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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/authority-detail-modal.inc (+17 lines)
Line 0 Link Here
1
<!-- Authority details modal -->
2
<div class="modal" id="authorityDetail" tabindex="-1" role="dialog" aria-labelledby="authorityDetailLabel">
3
    <div class="modal-dialog" role="document">
4
        <div class="modal-content">
5
            <div class="modal-header">
6
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
7
                <h4 class="modal-title" id="authorityDetailLabel"></h4>
8
            </div>
9
            <div class="modal-body">
10
                <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" />
11
            </div>
12
            <div class="modal-footer">
13
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
14
            </div>
15
        </div>
16
    </div>
17
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt (-17 / +1 lines)
Lines 89-111 Link Here
89
        </div>[% END %]
89
        </div>[% END %]
90
    </div>
90
    </div>
91
91
92
<!-- Authority details modal -->
92
[% INCLUDE 'authority-detail-modal.inc' %]
93
<div class="modal" id="authorityDetail" tabindex="-1" role="dialog" aria-labelledby="authorityDetailLabel">
94
    <div class="modal-dialog" role="document">
95
        <div class="modal-content">
96
            <div class="modal-header">
97
                <button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
98
                <h4 class="modal-title" id="authorityDetailLabel"></h4>
99
            </div>
100
            <div class="modal-body">
101
                <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" />
102
            </div>
103
            <div class="modal-footer">
104
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
105
            </div>
106
        </div>
107
    </div>
108
</div>
109
93
110
[% MACRO jsinclude BLOCK %]
94
[% MACRO jsinclude BLOCK %]
111
    <script>
95
    <script>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist.tt (-1 / +28 lines)
Lines 1-9 Link Here
1
[% USE raw %]
1
[% USE raw %]
2
[% USE Asset %]
2
[% SET footerjs = 1 %]
3
[% SET footerjs = 1 %]
3
[% PROCESS 'authorities-search-results.inc' %]
4
[% PROCESS 'authorities-search-results.inc' %]
4
[% INCLUDE 'doc-head-open.inc' %]
5
[% INCLUDE 'doc-head-open.inc' %]
5
<title>Authority search results &rsaquo; Authorities &rsaquo; Koha</title>
6
<title>Authority search results &rsaquo; Authorities &rsaquo; Koha</title>
6
[% INCLUDE 'doc-head-close.inc' %]
7
[% INCLUDE 'doc-head-close.inc' %]
8
[% Asset.css("css/addbiblio.css") | $raw %]
7
</head>
9
</head>
8
10
9
<body id="auth_searchresultlist" class="auth">
11
<body id="auth_searchresultlist" class="auth">
Lines 77-82 Link Here
77
          [% UNLESS ( resul.used ) %]
79
          [% UNLESS ( resul.used ) %]
78
            <li><a onclick='return confirm_deletion("[% resul.authid | html %]")'><i class="fa fa-trash"></i> Delete</a></li>
80
            <li><a onclick='return confirm_deletion("[% resul.authid | html %]")'><i class="fa fa-trash"></i> Delete</a></li>
79
          [% END %]
81
          [% END %]
82
          <li class="authorizedheading">
83
            <a data-authid="[% resul.authid | html %]" href="/cgi-bin/koha/authorities/detail.pl?authid=[% resul.authid | uri %]"><i class="fa fa-eye"></i> MARC preview</a>
84
          </li>
80
        </ul>
85
        </ul>
81
      </div>
86
      </div>
82
      </td>
87
      </td>
Lines 86-91 Link Here
86
  </table>
91
  </table>
87
</div>
92
</div>
88
93
94
[% INCLUDE 'authority-detail-modal.inc' %]
95
89
<div class="pages">[% pagination_bar | $raw %]</div>
96
<div class="pages">[% pagination_bar | $raw %]</div>
90
97
91
[% ELSE %]
98
[% ELSE %]
Lines 96-101 Link Here
96
103
97
[% MACRO jsinclude BLOCK %]
104
[% MACRO jsinclude BLOCK %]
98
    [% INCLUDE 'authorities_js.inc' %]
105
    [% INCLUDE 'authorities_js.inc' %]
106
    <script>
107
        $(document).ready(function(){
108
            $(".authorizedheading a").on("click", function(e){
109
                e.preventDefault();
110
                var authid = $(this).data("authid");
111
112
                $.get("/cgi-bin/koha/authorities/detail.pl", { authid : authid }, function( data ){
113
                    var auth_detail = $(data).find("#authoritiestabs");
114
                    auth_detail.find("ul").remove();
115
                    $("#authorityDetail .modal-title").html(_("Authority") + " " + authid );
116
                    $("#authorityDetail .modal-body").html( auth_detail );
117
                });
118
119
                $("#authorityDetail").modal("show");
120
            });
121
            $("#authorityDetail").on("hidden.bs.modal", function(){
122
                $("#authorityDetail .modal-body, #authorityDetail .modal-title").html("");
123
                $("#authorityDetail .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /></div>");
124
            });
125
        });
126
    </script>
99
[% END %]
127
[% END %]
100
128
101
[% INCLUDE 'intranet-bottom.inc' %]
129
[% INCLUDE 'intranet-bottom.inc' %]
102
- 

Return to bug 29965