+[% USE raw %]
+[% USE Asset %]
+[% SET footerjs = 1 %]
+[% PROCESS 'authorities-search-results.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › 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; }
-</style>
-<script type="text/javascript">
-
-function jumpfull(page)
-{
- window.open(page,'','fullscreen,scrollbars');
-}
-</script>
</head>
-<body id="auth_searchresultlist_auth" class="auth">
-<div id="custom-doc" class="yui-t7">
- <div id="bd">
- <div id="yui-main">
- <div class="yui-b"><div class="yui-g">
+<body id="auth_searchresultlist_auth" class="auth">
+ <div class="container-fluid">
<h1>Authority search results</h1>
[% INCLUDE 'auth-finder-search.inc' %]
- [% IF ( total ) %]<div id="resultnumber">
+ [% IF ( total ) %]<div class="resultnumber">
[% IF ( displayprev ) %]
- <a href="auth_finder.pl?startfrom=[% startfromprev %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
+ <a href="auth_finder.pl?startfrom=[% startfromprev | html %]&authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&op=do_search&type=intranet&index=[% index | html %]&tagid=[% tagid | html %]&orderby=[% orderby | html %]">
<<
</a>
[% END %]
[% FOREACH number IN numbers %]
[% IF ( number.highlight ) %]
- [% number.number %]
+ [% number.number | html %]
[% ELSE %]
- <a href="auth_finder.pl?startfrom=[% number.startfrom %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN number.searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
- [% number.number %]</a>
+ <a href="auth_finder.pl?startfrom=[% number.startfrom | html %]&authtypecode=[% authtypecode | html %][% FOREACH searchdat IN number.searchdata %]&[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&op=do_search&type=intranet&index=[% index | html %]&tagid=[% tagid | html %]&orderby=[% orderby | html %]">
+ [% number.number | html %]</a>
[% END %]
[% END %]
[% IF ( displaynext ) %]
- <a href="auth_finder.pl?startfrom=[% startfromnext %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
+ <a href="auth_finder.pl?startfrom=[% startfromnext | html %]&authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&op=do_search&type=intranet&index=[% index | html %]&tagid=[% tagid | html %]&orderby=[% orderby | html %]">
>></a>
[% END %]
<div>
- <p><b>Results [% from %] to [% to %] of [% total %]</b></p>
+ <p><b>Results [% from | html %] to [% to | html %] of [% total | html %]</b></p>
[% ELSE %]
<th>Get it!</th>
<th>Other action</th>
</tr>
- <tr>
- <td> </td>
- <td> </td>
- <td>
- <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=0&index=[% index %]')" class="button">
- Clear
- </a>
- </td>
- <td> </td>
- </tr>
[% FOREACH resul IN result %]
<tr>
- <td>[% resul.summary %]</td>
- <td>[% resul.used %] times</td>
+ <td>[% PROCESS authresult summary=resul.summary %]</td>
+ <td>[% resul.used | html %] times</td>
<td>
- <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&index=[% index %]')">choose</a>
+ [% IF resul.summary && resul.summary.authorized && resul.summary.authorized.size > 1 %]
+ [% FOREACH authorized IN resul.summary.authorized %]
+ <a href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '[% loop.count | html %]')" title="[% authorized.heading | html %]">[% loop.count | html %]</a>
+ [% END %]
+ [% ELSE %]
+ <a class="btn btn-xs btn-default" href="javascript:doauth('[% resul.authid | html %]', '[% index | html %]', '')"><i class="fa fa-plus"></i> Choose</a>
+ [% END %]
</td>
- <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>
+ <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>
</tr>
[% END %]
</table>
</div>
- <div id="resultnumber">
+ <div class="resultnumber">
[% IF ( displayprev ) %]
- <a href="auth_finder.pl?startfrom=[% startfromprev %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranetamp;&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
+ <a href="auth_finder.pl?startfrom=[% startfromprev | html %]&authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&op=do_search&type=intranetamp;&index=[% index | html %]&tagid=[% tagid | html %]&orderby=[% orderby | html %]">
<<
</a>
[% END %]
[% FOREACH number IN numbers %]
[% IF ( number.highlight ) %]
- [% number.number %]
+ [% number.number | html %]
[% ELSE %]
- <a href="auth_finder.pl?startfrom=[% number.startfrom %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN number.searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
- [% number.number %]</a>
+ <a href="auth_finder.pl?startfrom=[% number.startfrom | html %]&authtypecode=[% authtypecode | html %][% FOREACH searchdat IN number.searchdata %]&[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&op=do_search&type=intranet&index=[% index | html %]&tagid=[% tagid | html %]&orderby=[% orderby | html %]">
+ [% number.number | html %]</a>
[% END %]
[% END %]
[% IF ( displaynext ) %]
- <a href="auth_finder.pl?startfrom=[% startfromnext %]&authtypecode=[% authtypecode %][% FOREACH searchdat IN searchdata %]&[% searchdat.term %]=[% searchdat.val %][% END %]&op=do_search&type=intranet&index=[% index %]&tagid=[% tagid %]&orderby=[% orderby %]">
+ <a href="auth_finder.pl?startfrom=[% startfromnext | html %]&authtypecode=[% authtypecode | html %][% FOREACH searchdat IN searchdata %]&[% searchdat.term | html %]=[% searchdat.val | html %][% END %]&op=do_search&type=intranet&index=[% index | html %]&tagid=[% tagid | html %]&orderby=[% orderby | html %]">
>></a>
[% END %]
</div>[% END %]
-</div>
-</div>
-</div>
-</div>
-</div>
-[% INCLUDE 'popup-bottom.inc' %]
+ </div>
+
+[% MACRO jsinclude BLOCK %]
+ <script type="text/javascript">
+ var index = "[% index | html %]";
+ var authtypecode = "[% authtypecode | html %]";
+ </script>
+ [% Asset.js("js/auth-finder-search.js") | $raw %]
+ <script type="text/javascript">
+
+ function jumpfull(page){
+ window.open(page,'','width=100,height=100,resizable=yes,toolbar=false,scrollbars=yes,top');
+ }
+
+ 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>
+[% END %]
+
+[% INCLUDE 'intranet-bottom.inc' popup_window = 1 %]