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