Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / searchresultlist-auth.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% PROCESS 'authorities-search-results.inc' %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha &rsaquo; Cataloging authority plugin</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="auth_searchresultlist_auth" class="auth">
11     <div class="container-fluid">
12
13         <h1>Authority search results</h1>
14         [% INCLUDE 'auth-finder-search.inc' %]
15         [% IF ( total ) %]<div class="resultnumber">
16             [% IF ( displayprev ) %]
17                     <a href="auth_finder.pl?startfrom=[% startfromprev | html %]&amp;authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&amp;[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index | html %]&amp;tagid=[% tagid | html %]&amp;orderby=[% orderby | html %]">
18                         &lt;&lt;
19                     </a>
20                 [% END %]
21                 [% FOREACH number IN numbers %]
22                     [% IF ( number.highlight ) %]
23                         [% number.number | html %]
24                     [% ELSE %]
25                         <a href="auth_finder.pl?startfrom=[% number.startfrom | html %]&amp;authtypecode=[% authtypecode | html %][% FOREACH searchdat IN number.searchdata %]&amp;[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index | html %]&amp;tagid=[% tagid | html %]&amp;orderby=[% orderby | html %]">
26                             [% number.number | html %]</a>
27                     [% END %]
28                 [% END %]
29                 [% IF ( displaynext ) %]
30                     <a href="auth_finder.pl?startfrom=[% startfromnext | html %]&amp;authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&amp;[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index | html %]&amp;tagid=[% tagid | html %]&amp;orderby=[% orderby | html %]">
31                         &gt;&gt;</a>
32                 [% END %]
33             <div>
34                 
35                     <p><b>Results [% from | html %] to [% to | html %] of [% total | html %]</b></p>
36                 [% ELSE %]
37                     
38                 
39             </div><p>No results found</p>[% END %]
40         </div>
41         [% IF ( result ) %]<div id="resultlist">
42             <table>
43                 <tr>
44                     <th>Summary</th>
45                     <th>Used</th>
46                     <th>Get it!</th>
47                     <th>Other action</th>
48                 </tr>
49                 [% FOREACH resul IN result %]
50                     <tr>
51                         <td>[% PROCESS authresult summary=resul.summary %]</td>
52                         <td>[% resul.used | html %] times</td>
53                         <td>
54                             [% IF resul.summary && resul.summary.authorized && resul.summary.authorized.size > 1 %]
55                                 [% FOREACH authorized IN resul.summary.authorized %]
56                                     <a href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '[% loop.count | html %]')" title="[% authorized.heading | html %]">[% loop.count | html %]</a>
57                                 [% END %]
58                           [% ELSE %]
59                                 <a class="btn btn-xs btn-default" href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
60                           [% END %]
61                         </td>
62                         <td><a class="btn btn-xs btn-default" href="authorities.pl?authid=[% resul.authid | html %]"><i class="fa fa-pencil"></i> Edit authority</a></td>
63                     </tr>
64                 [% END %]
65             </table>
66     
67         </div>
68         <div class="resultnumber">
69             [% IF ( displayprev ) %]
70                     <a href="auth_finder.pl?startfrom=[% startfromprev | html %]&amp;authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&amp;[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&amp;op=do_search&amp;type=intranetamp;&amp;index=[% index | html %]&amp;tagid=[% tagid | html %]&amp;orderby=[% orderby | html %]">
71                         &lt;&lt;
72                     </a>
73                 [% END %]
74                 [% FOREACH number IN numbers %]
75                     [% IF ( number.highlight ) %]
76                         [% number.number | html %]
77                     [% ELSE %]
78                         <a href="auth_finder.pl?startfrom=[% number.startfrom | html %]&amp;authtypecode=[% authtypecode | html %][% FOREACH searchdat IN number.searchdata %]&amp;[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index | html %]&amp;tagid=[% tagid | html %]&amp;orderby=[% orderby | html %]">
79                             [% number.number | html %]</a>
80                     [% END %]
81                 [% END %]
82                 [% IF ( displaynext ) %]
83                     <a href="auth_finder.pl?startfrom=[% startfromnext | html %]&amp;authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&amp;[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&amp;op=do_search&amp;type=intranet&amp;index=[% index | html %]&amp;tagid=[% tagid | html %]&amp;orderby=[% orderby | html %]">
84                         &gt;&gt;</a>
85                 [% END %]
86         </div>[% END %]
87     </div>
88
89 [% MACRO jsinclude BLOCK %]
90     <script type="text/javascript">
91         var index = "[% index | html %]";
92         var authtypecode = "[% authtypecode | html %]";
93     </script>
94     [% Asset.js("js/auth-finder-search.js") | $raw %]
95     <script type="text/javascript">
96
97         function jumpfull(page){
98             window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top');
99         }
100
101         function doauth(authid, index, repet){
102             [% IF source == 'auth' %]
103                 var e = document.getElementById("relationship");
104                 var relationship = e.options[e.selectedIndex].value;
105
106                 jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet + '&relationship=' + relationship);
107             [% ELSE %]
108                 jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet);
109             [% END %]
110         }
111     </script>
112 [% END %]
113
114 [% INCLUDE 'intranet-bottom.inc' popup_window = 1 %]