Bug 29990: Show authority appropriate heading use on search results
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / searchresultlist.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% SET footerjs = 1 %]
5 [% PROCESS 'authorities-search-results.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Authority search results &rsaquo; Authorities &rsaquo; Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/addbiblio.css") | $raw %]
10 <style>
11 .usefor {
12     padding: 0;
13     margin: 0;
14 }
15 .usefor li {
16     list-style-type: none;
17 }
18 </style>
19 </head>
20
21 <body id="auth_searchresultlist" class="auth">
22 [% INCLUDE 'header.inc' %]
23 [% INCLUDE 'authorities-search.inc' %]
24
25 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
26     <ol>
27         <li>
28             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
29         </li>
30         <li>
31             <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
32         </li>
33         <li>
34             <a href="#" aria-current="page">
35                 Authority search results
36             </a>
37         </li>
38     </ol>
39 </nav>
40
41 <div class="main container-fluid">
42     <div class="row">
43         <div class="col-md-8 col-md-offset-2">
44
45     [% INCLUDE 'authorities-toolbar.inc' %]
46 <h1>Authority search results</h1>
47
48 <div id="merge_in_progress"></div>
49 [% IF ( total ) %]
50 <div class="pages">[% pagination_bar | $raw %]</div>
51
52 <p id="authorities_searchresultlist_current_page_info">
53   Results [% from | html %] to [% to | html %] of [% total | html %]
54 </p>
55
56 <div id="authorities_searchresultlist_results">
57   <table>
58       <tr>
59         <th>Summary</th>
60         <th>Heading type</th>
61         [% UNLESS ( isEDITORS ) %]
62           <th>Used in</th>
63         [% END %]
64         [% IF Koha.Preference('ShowHeadingUse') %]
65           <th>Heading use</th>
66         [% END %]
67         [% IF ( CAN_user_editauthorities ) %]
68           <th>&nbsp;</th>
69         [% END %]
70       </tr>
71     [% FOREACH resul IN result %]
72     <tr data-authid="[% resul.authid | html %]">
73       <td>
74         [% IF resul.html %]
75           [% resul.html | $raw %]
76         [% ELSE %]
77           [% PROCESS authresult summary=resul.summary authid=resul.authid %]
78         [% END %]
79       </td>
80       <td>[% resul.authtype | html %]</td>
81     [% UNLESS ( resul.isEDITORS ) %]
82       <td>
83       [% IF resul.used > 0 %]
84           <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&amp;op=do_search&amp;idx=an,phr&amp;q=[% resul.authid | uri %]" class="button">[% resul.used | html %] record(s)</a>
85       [% ELSE %]
86           0 records
87       [% END %]
88       </td>
89     [% END %]
90     [% IF Koha.Preference('ShowHeadingUse') %]
91         <td class="actions"><ul class="usefor">
92             <li>[% IF resul.main %]<i class="fa fa-check"></i>[% ELSE %]<i class="fa fa-times"></i>[% END %] Main/Added Entry</li>
93             <li>[% IF resul.subject %]<i class="fa fa-check"></i>[% ELSE %]<i class="fa fa-times"></i>[% END %] Subject</li>
94             <li>[% IF resul.series %]<i class="fa fa-check"></i>[% ELSE %]<i class="fa fa-times"></i>[% END %] Series Title</li>
95         </ul></td>
96     [% END %]
97     [% IF ( CAN_user_editauthorities ) %]
98       <td>
99       <div class="btn-group dropup">
100         <a class="btn btn-default btn-xs dropdown-toggle" id="authactions[% resul.authid | html %]" role="button" data-toggle="dropdown" href="#">
101         Actions <b class="caret"></b></a>
102         <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="authactions[% resul.authid | html %]">
103           <li><a href="/cgi-bin/koha/authorities/authorities.pl?authid=[% resul.authid | uri %]"><i class="fa fa-pencil"></i> Edit</a></li>
104           <li><a class="merge_auth" href="#merge"><i class="fa fa-compress"></i> Merge</a></li>
105           [% UNLESS ( resul.used ) %]
106             <li><a onclick='return confirm_deletion("[% resul.authid | html %]")'><i class="fa fa-trash"></i> Delete</a></li>
107           [% END %]
108           <li class="authority_preview">
109             <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>
110           </li>
111         </ul>
112       </div>
113       </td>
114     [% END %]
115     </tr>
116     [% END %]
117   </table>
118 </div>
119
120 [% INCLUDE 'authority-detail-modal.inc' %]
121
122 <div class="pages">[% pagination_bar | $raw %]</div>
123
124 [% ELSE %]
125   No results found
126 [% END %]
127 </div>
128 </div>
129
130 [% MACRO jsinclude BLOCK %]
131     [% INCLUDE 'authorities_js.inc' %]
132     [% Asset.js("js/authorities-detail-modal.js") | $raw %]
133 [% END %]
134
135 [% INCLUDE 'intranet-bottom.inc' %]