Bug 4198 - deleting an authority refreshes the page
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / searchresultlist.tt
1 [% PROCESS 'authorities-search-results.inc' %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Authorities &rsaquo; Authority search results</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript" >
6 //<![CDATA[
7 function confirm_deletion(id) {
8     
9     var is_confirmed = confirm('Are you sure you want to delete this authority?');
10     if (is_confirmed) {
11       window.location="authorities-home.pl?op=delete&amp;authid="
12           + id
13           + "&amp;marclist=[% marclist %]&amp;and_or=[% and_or %]&amp;excluding=[% excluding %]&amp;operator=[%operator%]&amp;orderby=[% orderby %]&amp;value=[% value %]&amp;startfrom=[% startfrom %]&amp;resultsperpage=[% resultsperpage %]";
14     }
15 }
16 function Help() {
17     newin=window.open("/cgi-bin/koha/help.pl","KohaHelp",'width=600,height=600,toolbar=false,scrollbars=yes');
18 }
19
20 function addauthority() {
21     X = document.forms[0].authtype.value;
22     window.location="/cgi-bin/koha/authorities/authorities.pl?authtypecode="+X;
23 }
24 function searchauthority() {
25     X = document.forms[0].authtype2.value;
26     Y = document.forms[0].value.value;
27     window.location="/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&authtypecode="+X+"&value="+Y+"&marclist=&and_or=and&excluding=&operator=contains";
28 }
29 //]]>
30 </script>
31 </head>
32 <body id="auth_searchresultlist" class="auth">
33 [% INCLUDE 'header.inc' %]
34 [% INCLUDE 'authorities-search.inc' %]
35
36 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a> &rsaquo; Authority search results</div>
37
38 <div id="doc" class="yui-t7">
39    
40    <div id="bd">
41     <div id="yui-main">
42     <div class="yui-g">
43     
44     [% INCLUDE 'authorities-toolbar.inc' %]
45 <h1>Authority search results</h1>
46
47 [% IF ( total ) %]
48 <div class="pages">[% pagination_bar %]</div>
49
50 <p id="authorities_searchresultlist_current_page_info">
51   Results [% from %] to [% to %] of [% total %]
52 </p>
53
54 <div id="authorities_searchresultlist_results">
55   <table>
56     <tr>
57       <th colspan="2">Summary</th>
58 [% UNLESS ( isEDITORS ) %]
59       <th>Used in</th>
60 [% END %]
61       <th>Delete</th>
62     </tr>
63 [% FOREACH resul IN result %]
64     [% UNLESS ( loop.odd ) %]
65     <tr class="highlight">
66     [% ELSE %]
67     <tr>
68     [% END %]
69       <td>[% PROCESS authresult summary=resul.summary %]</td>
70       <td><a href="detail.pl?authid=[% resul.authid %]">Details</a></td>
71   [% UNLESS ( resul.isEDITORS ) %]
72       <td>
73         <a href="../catalogue/search.pl?type=intranet&amp;op=do_search&amp;idx=an,phr&amp;q=[% resul.authid %]" class="button">[% resul.used %] biblio(s)</a>
74       </td>
75   [% END %]
76       <td>
77   [% UNLESS ( resul.used ) %]
78         <a href="javascript:confirm_deletion([% resul.authid %])">Delete</a>
79   [% END %]
80       </td>
81     </tr>
82 [% END %]
83   </table>
84 </div>
85
86 <div class="paginationBar">[% pagination_bar %]</div>
87
88 [% ELSE %]
89   No results found
90 [% END %]
91 </div>
92 </div>
93 </div>
94 [% INCLUDE 'intranet-bottom.inc' %]