Koha/koha-tmpl/opac-tmpl/prog/en/modules/opac-authoritiessearchresultlist.tt
Tomas Cohen Arazi ae7431608c Bug 10691: use authority ID in see-also links in authority search results (OPAC)
This patch changes the URL and data used to show the 'see also' links
on the OPAC's authority search results page.

Bonus points: makes some strings translatable.

To test:
- On your dev setup (master) create some authority records (I created
  personal name authorities).
- Pick one of them and link 400$a to another one, do the same with 500$a
- Add some other 400$a and 500$a without linking (i.e. plain text)
- Make sure zebra is running and changes got indexed.
- In the OPAC search for the authority that is linked to the others.
- Check the 'see also:' link points to an authority search
- Apply the patch
- Reload/re-do the search
- Check the 'see also:' link points to the authority id in the case
  of linked authorities, and to an authority search in the case of
  plain text headings.

Sponsored-by: Universidad Nacional de Cordoba
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Work as described. No errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-16 22:38:58 +00:00

101 lines
4.6 KiB
Text

[% USE Koha %]
[% PROCESS 'opac-authorities.inc' %]
[% PROCESS 'authorities-search-results.inc' %]
[% INCLUDE 'doc-head-open.inc' %][% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; [% IF ( total ) %]Authority search result[% ELSE %]No results found[% END %]
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="opac-authoritiesresultlist">
[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
<div id="bd">
[% INCLUDE 'masthead.inc' %]
<div id="yui-main">
<div class="yui-b"><div class="yui-g">
<div id="userauthsearchresults" class="container">
<h1>Authority search results</h1>
<div id="pages">
[% IF ( displayprev ) %]
<a href="opac-authorities-home.pl?startfrom=[% startfromprev %]&amp;[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&amp;[% END %]resultsperpage=[% resultsperpage %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode %]&amp;orderby=[% orderby %]">
&lt;&lt;
</a>
[% END %]
[% FOREACH number IN numbers %]
[% IF ( number.highlight ) %]
<span class="current">[% number.number %]</span>
[% ELSE %]
<a href="opac-authorities-home.pl?startfrom=[% number.startfrom %]&amp;[% FOREACH searchdat IN number.searchdata %][% searchdat.term %]=[% searchdat.val |url %]&amp;[% END %]resultsperpage=[% resultsperpage %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode %]&amp;orderby=[% orderby %]">[% number.number %]</a>
[% END %]
[% END %]
[% IF ( displaynext ) %]
<a href="opac-authorities-home.pl?startfrom=[% startfromnext %]&amp;[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&amp;[% END %]&amp;resultsperpage=[% resultsperpage %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode %]&amp;orderby=[% orderby %]">&gt;&gt;</a>
[% END %]
</div>
<div id="results">
[% IF ( total ) %]
[% IF ( countfuzzy ) %]
<b>Showing [% resultcount %] of about [% total %] results</b>
[% ELSE %]
<b>Results [% from %] to [% to %] of [% total %]</b>
[% END %]
[% ELSE %]
No results found.
[% END %]
</div>
[% IF ( total ) %]
<div class="searchresults">
<table>
<tr>
<th>Authorized headings</th>
<th>Type of heading</th>
[% UNLESS ( isEDITORS ) %]
<th>Biblio records</th>
[% END %]
<th>Full heading</th>
</tr>
[% FOREACH resul IN result %]
[% UNLESS ( loop.odd ) %]
<tr class="highlight">
[% ELSE %]
<tr>
[% END %]
<td>[% PROCESS authresult summary=resul.summary %]</td>
<td>[% resul.authtype %]</td>
[% UNLESS ( resul.isEDITORS ) %]
<td>
<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;op=do_search&amp;q=an=[% resul.authid %]">[% resul.used %] biblios</a>
</td>
[% END %]
<td>
<a href="opac-authoritiesdetail.pl?authid=[% resul.authid %]">View full heading</a>
</td>
</tr>
[% END %]
</table>
</div>
<div id="resultnumber">
[% IF ( displayprev ) %]
<a href="opac-authorities-home.pl?startfrom=[% startfromprev %]&amp;[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&amp;[% END %]resultsperpage=[% resultsperpage %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode %]&amp;orderby=[% orderby %]">&lt;&lt;</a>
[% END %]
[% FOREACH number IN numbers %]
[% IF ( number.highlight ) %]<span class="current">[% number.number %]</span>[% ELSE %]
<a href="opac-authorities-home.pl?startfrom=[% number.startfrom %]&amp;[% FOREACH searchdat IN number.searchdata %][% searchdat.term %]=[% searchdat.val |url %]&amp;[% END %]resultsperpage=[% resultsperpage %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode %]&amp;orderby=[% orderby %]">[% number.number %]</a>
[% END %]
[% END %]
[% IF ( displaynext ) %]
<a href="opac-authorities-home.pl?startfrom=[% startfromnext %]&amp;[% FOREACH searchdat IN searchdata %][% searchdat.term %]=[% searchdat.val |url %]&amp;[% END %]&amp;resultsperpage=[% resultsperpage %]&amp;type=opac&amp;op=do_search&amp;authtypecode=[% authtypecode %]&amp;orderby=[% orderby %]">&gt;&gt;</a>
[% END %]
</div>
[% END %]
</div>
</div>
</div>
</div>
[% IF ( OpacNav ) %]
<div class="yui-b">
<div id="leftmenus" class="container">
[% INCLUDE 'navigation.inc' %]
</div>
</div>[% END %]
</div>
[% INCLUDE 'opac-bottom.inc' %]