Bug 4838 Fix repeated authorities selection
authorFrédéric Demians <f.demians@tamil.fr>
Tue, 5 Jun 2012 10:06:23 +0000 (12:06 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Sun, 10 Jun 2012 12:11:21 +0000 (14:11 +0200)
How to test:

Create an authority, with more than one heading, for example a
UNIMARC multilingual author:

  200 $7 da
      $a 原
      $b 純輔
  200 $7 ba
      $a Hara
      $b Junsuke

In data entry form, on 700 field, you click on ... Search for the above author.
In auhtority search result page, you just have a 'Choose' link, and so you just
can select the first heading (in Chinesse writing).

Apply the patch. Repeat. Now you have, on result page, you have two links, and
can select one heading or the other.

Signed-off-by: François Charbonnier <francois.charbonnier@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt

index c143995..7fd5607 100644 (file)
@@ -70,7 +70,13 @@ function jumpfull(page)
                         <td>[% resul.summary %]</td>
                         <td>[% resul.used %] times</td>
                         <td>
-                          <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% index %]')">choose</a>
+                          [% IF resul.repets %]
+                            [% FOREACH repet IN resul.repets %]
+                            <a href="javascript:jumpfull('blinddetail-biblio-search.pl?authid=[% resul.authid %]&amp;index=[% repet.index %]&amps;repet=[% 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>
+                          [% END %]
                         </td>
                         <td><a href="authorities.pl?authid=[% resul.authid %]">Edit authority</a></td>
                     </tr>