Merge remote-tracking branch 'origin/new/bug_8408'
[srvgit] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / searchresultlist-auth.tt
index 7a118c9..415185a 100644 (file)
@@ -1,5 +1,6 @@
+[% PROCESS 'authorities-search-results.inc' %]
 [% INCLUDE 'doc-head-open.inc' %]
-<title>Koha &rsaquo; Cataloging Authority Plugin</title>
+<title>Koha &rsaquo; Cataloging authority plugin</title>
 [% INCLUDE 'doc-head-close.inc' %]
 <style type="text/css">
 #custom-doc { width:51.46em;*width:50.17em;min-width:675px; margin:auto; text-align:left; } 
@@ -10,9 +11,21 @@ function jumpfull(page)
 {      
     window.open(page,'','fullscreen,scrollbars');
 }
+
+function doauth(authid, index, repet)
+{
+[% IF source == 'auth' %]
+    var e = document.getElementById("relationship");
+    var relationship = e.options[e.selectedIndex].value;
+
+    jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet + '&relationship=' + relationship);
+[% ELSE %]
+    jumpfull('blinddetail-biblio-search.pl?authid=' + authid + '&index=' + index + '&repet=' + repet);
+[% END %]
+}
 </script>
 </head>
-<body>
+<body id="auth_searchresultlist_auth" class="auth">
 <div id="custom-doc" class="yui-t7">
 
    <div id="bd">
@@ -52,30 +65,20 @@ function jumpfull(page)
                 <tr>
                     <th>Summary</th>
                     <th>Used</th>
-                    <th>Get It!</th>
+                    <th>Get it!</th>
                     <th>Other action</th>
                 </tr>
-                <tr>
-                    <td>&nbsp;</td>
-                    <td>&nbsp;</td>
-                    <td>
-                        <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=0&amp;index=[% index %]')" class="button">
-                            Clear
-                        </a>
-                    </td>
-                    <td>&nbsp;</td>
-                </tr>
                 [% FOREACH resul IN result %]
                     <tr>
-                        <td>[% resul.summary %]</td>
+                        <td>[% PROCESS authresult summary=resul.summary %]</td>
                         <td>[% resul.used %] times</td>
                         <td>
-                          [% IF ( resul.repets ) %]
+                          [% IF resul.repets %]
                             [% FOREACH repet IN resul.repets %]
-                              <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% repet.index %]&amp;repet=[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
+                            <a href="javascript:doauth('[% resul.authid %]', '[% repet.index %]', '[% repet.repet %]')" title="[% repet.value %]">[% repet.repet %]</a>
                             [% END %]
                           [% ELSE %]
-                            <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% index %]')">choose</a>
+                            <a href="javascript:doauth('[% resul.authid %]', '[% index %]', '')">choose</a>
                           [% END %]
                         </td>
                         <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>