Bug 29234: Further clean Z3950 Tests
[srvgit] / koha-tmpl / opac-tmpl / bootstrap / en / includes / authorities-search-results.inc
index dda8d0b..faf507f 100644 (file)
@@ -1,31 +1,30 @@
 [% BLOCK showreference %]
-[%#
-    Parameters:
-    heading: the heading itself
-    linkType: currently 'seefrom' or 'seealso', controls the label for the entry
-    type:
-    authid: if it is a linked authority, its authid
-%]
+[%# Parameters: %]
+[%# heading: the heading itself %]
+[%# linkType: currently 'seefrom' or 'seealso', controls the label for the entry %]
+[%# type: %]
+[%# authid: if it is a linked authority, its authid %]
+
     [% SET authidurl = '/cgi-bin/koha/opac-authoritiesdetail.pl?authid=' %]
     [% SET searchurl = '/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operator=contains&marclist=mainentry&and_or=and&orderby=HeadingAsc&value=' %]
     [% IF marcflavour == 'UNIMARC' %]
         [% SWITCH type %]
             [% CASE 'broader' %]
-              <span class="BT">BT: [% heading | html %]</span>
+              <span class="BT"><abbr title="Broader Term">BT</abbr>: [% heading | html %]</span>
             [% CASE 'narrower' %]
-              <span class="NT">NT: [% heading | html %]</span>
+              <span class="NT"><abbr title="Narrower Term">NT</abbr>: [% heading | html %]</span>
             [% CASE 'seefrom' %]
-              <span class="UF">UF: [% heading | html %]</span>
+              <span class="UF"><abbr title="Used For">UF</abbr>: [% heading | html %]</span>
             [% CASE 'seealso' %]
-              <span class="RT">RT: [% heading | html %]</span>
+              <span class="RT"><abbr title="Related Term">RT</abbr>: [% heading | html %]</span>
         [% END %]
     [% ELSE %]
         <span class="heading">
         [% IF ( linkType=='seealso' ) %]
             [% IF ( authid ) %]
-            <a href="[% authidurl | url %][% authid | url %]">[% heading | html %]</a>
+            <a href="[% authidurl | url %][% authid | uri %]">[% heading | html %]</a>
             [% ELSE %]
-            <a href="[% searchurl | url %][% heading | html %]">[% heading | html %]</a>
+            <a href="[% searchurl | url %][% heading | uri %]">[% heading | html %]</a>
             [% END %]
         [% ELSE %]
             [% heading | html %]
         [% UNLESS ( type=='seefrom' || type=='seealso' ) %]
             <span class="type">
                 [% SWITCH type %]
-                    [% CASE 'earlier' %](Earlier heading)
-                    [% CASE 'later' %](Later heading)
-                    [% CASE 'acronym' %](Acronym)
-                    [% CASE 'musical' %](Musical composition)
-                    [% CASE 'broader' %](Broader heading)
-                    [% CASE 'narrower' %](Narrower heading)
-                    [% CASE 'parent' %](Immediate parent body)
+                    [% CASE 'earlier' %]<span>(Earlier heading)</span>
+                    [% CASE 'later' %]<span>(Later heading)</span>
+                    [% CASE 'acronym' %]<span>(Acronym)</span>
+                    [% CASE 'musical' %]<span>(Musical composition)</span>
+                    [% CASE 'broader' %]<span>(Broader heading)</span>
+                    [% CASE 'narrower' %]<span>(Narrower heading)</span>
+                    [% CASE 'parent' %]<span>(Immediate parent body)</span>
                     [% CASE %]
                         [% IF type %]([% type | html %])[% END %]
                     [% END %]
 [% END # / BLOCK showreference %]
 
 [% BLOCK authresult %]
-    [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
+    [% IF ( summary.label ) %][% summary.label | html %]:[% END %]
+    [% IF summary.summary %]
+        <div class="authority-summary">
+            [% summary.summary | html %]
+        </div>
+    [% END %]
     [% UNLESS ( summary.summaryonly ) %]
         <div class="authorizedheading">
             [% FOREACH authorize IN summary.authorized %]
                 <span class="authorizedheading">[% authorize.heading | html %]</span>
+                [% UNLESS loop.last %] | [% END %]
             [% END %]
         </div>
         [% IF ( marcflavour == 'UNIMARC' ) %]
             [% IF summary.notes %]
                 <div class="authres_notes">
                     [% FOREACH note IN summary.notes %]
-                        [% note.note | html %]</span>
+                        <span>[% note.note | html %]</span>
                     [% END %]
                 </div>
             [% END %]
@@ -77,7 +82,7 @@
                 <div class="authres_otherscript">
                     [% FOREACH other IN summary.otherscript %]
                         [% PROCESS language lang=other.lang | trim %]:
-                        [% other.term %]
+                        [% other.term | html %]
                         [% IF ! loop.last %] ; [% END %]
                     [% END %]
                 </div>
                     <span class="seefrom">used for/see from:</span>
                 [% FOREACH seefro IN summary.seefrom %]
                     <div class="seefrom authref">
-                    [% PROCESS showreference
-                        heading=seefro.heading
-                        linkType='seefrom'
-                        type=seefro.type
-                    %]
+                    [%# Following on one line for translatability %]
+                    [% PROCESS showreference heading=seefro.heading linkType='seefrom' type=seefro.type %]
                     </div>
                 [% END %]
             [% END %]
                     <span class="seealso">see also:</span>
                 [% FOREACH seeals IN summary.seealso %]
                     <div class="seealso authref">
-                    [% PROCESS showreference
-                        heading=seeals.heading
-                        linkType='seealso'
-                        type=seeals.type
-                        authid=seeals.authid
-                    %]
+                    [%# Following on one line for translatability %]
+                    [% PROCESS showreference heading=seeals.heading linkType='seealso' type=seeals.type authid=seeals.authid %]
                     </div>
                 [% END %]
             [% END %]