Bug 18019: [QA Follow-up] Also catch the delete from authorities detail
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / detail.tt
index 7a712c8..e150232 100644 (file)
@@ -9,7 +9,7 @@
 </title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% IF ( displayhierarchy ) %]
-<script language="javascript" type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.jstree.js"></script>
+<script type="text/javascript" src="/intranet-tmpl/lib/jquery/plugins/jquery.jstree.js"></script>
 [% END %]
 <script type="text/javascript">
 
         });
 
 function confirm_deletion() {
-       var is_confirmed = confirm('Are you sure you want to delete this authority?');
-       if (is_confirmed) {
-               window.location="authorities-home.pl?op=delete&authid=[% authid %]";
-       }
+    var is_confirmed = confirm(_("Are you sure you want to delete this authority?"));
+    if (is_confirmed) {
+        window.location="authorities-home.pl?op=delete&authid=[% authid %]&csrf_token=[% csrf_token %]";
+    }
 }
 function Dopop(link) {
        newin=window.open(link,'width=500,height=400,toolbar=false,scrollbars=yes');
@@ -90,9 +90,11 @@ function searchauthority() {
 <h1>Authority #[% authid %] ([% authtypetext %])</h1>
 
 <div id="action">
-    
-    
-    Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&amp;op=do_search&amp;q=an=[% authid %]">[% count %] record(s)</a>
+    [% IF count > 0 %]
+        Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&amp;op=do_search&amp;q=an=[% authid %]">[% count %] record(s)</a>
+    [% ELSE %]
+        This authority is not used in any records.
+    [% END %]
 </div>
 
 <div id="authoritiestabs" class="toptabs numbered">
@@ -123,7 +125,7 @@ function searchauthority() {
                 [% subfiel.marc_value %]
                 [% IF ( subfiel.link ) %]
                     <a href="/cgi-bin/koha/catalogue/search.pl?op=do_search&amp;marclist=[% subfiel.link %]&amp;operator==&amp;type=intranet&amp;value=[% subfiel.marc_value |url %]">
-                        <img border="0" src="[% interface %]/[% theme %]/images/filefind.png" height="15" title="Search on [% subfiel.marc_value %]">
+                        <img src="[% interface %]/[% theme %]/images/filefind.png" height="15" title="Search on [% subfiel.marc_value %]">
                     </a>
                 [% END %]
                 [% IF ( subfiel.authority ) %]