From 06ef9f11098405cd688f43af39d828a4eb674582 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 11 Dec 2013 11:14:47 -0300 Subject: [PATCH] Bug 10691: (follow-up) restore behaviour for control field ($w) As noted by Jared, in the presence of 4XX$w or 5XX$w the display got broken by this refactoring. This patch restores the previous behaviour in that front. The OPAC themes get fixed too, and the Bootstrap one gets this fix too. Applied the fix that Galen proposed on comment #30 regarding Zeno's fix in bug 11174. Sponsored-by: Universidad Nacional de Cordoba Signed-off-by: Jared Camins-Esakov Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- .../includes/authorities-search-results.inc | 19 ++++++--- .../includes/authorities-search-results.inc | 42 ++++++++++++++++--- .../opac-authoritiessearchresultlist.tt | 4 +- .../includes/authorities-search-results.inc | 22 +++++++--- 4 files changed, 68 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc index bb8e3f6060..7d96264541 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search-results.inc @@ -1,4 +1,11 @@ [% BLOCK showreference %] + [% SET authidurl = '/cgi-bin/koha/authorities/detail.pl?authid=' %] [% SET searchurl = '/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=any&operator=contains&orderby=HeadingAsc&value=' %] @@ -15,14 +22,14 @@ [% END %] [% ELSE %] - [% IF ( type=='seefrom' ) %] + [% IF ( linkType=='seefrom' ) %] used for/see from: - [% ELSIF ( type=='seealso' ) %] + [% ELSIF ( linkType=='seealso' ) %] see also: [% END %] - [% IF ( type=='seealso' ) %] + [% IF ( linkType=='seealso' ) %] [% IF ( authid ) %] [% heading | html %] [% ELSE %] @@ -68,7 +75,7 @@ [% IF summary.seefrom %]
[% FOREACH see IN summary.seefrom %] - [% PROCESS showreference heading=see.heading label="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] [% IF ! loop.last %] ; [% END %] [% END %]
@@ -76,7 +83,7 @@ [% IF summary.seealso %]
[% FOREACH see IN summary.seealso %] - [% PROCESS showreference heading=see.heading label="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] [% IF ! loop.last %] ; [% END %] [% END %]
@@ -96,6 +103,7 @@
[% PROCESS showreference heading=seefro.heading + linkType='seefrom' type=seefro.type authid=seefro.authid %] @@ -107,6 +115,7 @@
[% PROCESS showreference heading=seeals.heading + linkType='seealso' type=seeals.type authid=seeals.authid %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/authorities-search-results.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/authorities-search-results.inc index 61bd900536..6a9f9d0e30 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/authorities-search-results.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/authorities-search-results.inc @@ -1,4 +1,13 @@ [% BLOCK showreference %] + + [% 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' %] @@ -11,10 +20,22 @@ RT: [% heading | html %] [% END %] [% ELSE %] - [% IF ( label ) %][% label | html %][% END %] + + [% IF ( linkType=='seefrom' ) %] + used for/see from: + [% ELSIF ( linkType=='seealso' ) %] + see also: + [% END %] - [% IF ( linkpath && search ) %][% heading | html %] - [% ELSE %][% heading | html %][% END %] + [% IF ( linkType=='seealso' ) %] + [% IF ( authid ) %] + [% heading | html %] + [% ELSE %] + [% heading | html %] + [% END %] + [% ELSE %] + [% heading | html %] + [% END %] [% UNLESS ( type=='seefrom' || type=='seealso' ) %] @@ -53,7 +74,7 @@ [% IF summary.seealso %]
[% FOREACH see IN summary.seealso %] - [% PROCESS showreference heading=see.heading label="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] [% IF ! loop.last %] ; [% END %] [% END %]
@@ -71,14 +92,23 @@ [% IF ( summary.seefrom ) %] [% FOREACH seefro IN summary.seefrom %]
- [% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %] + [% PROCESS showreference + heading=seefro.heading + linkType='seefrom' + type=seefro.type + %]
[% END %] [% END %] [% IF ( summary.seealso ) %] [% FOREACH seeals IN summary.seealso %]
- [% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %] + [% PROCESS showreference + heading=seeals.heading + linkType='seealso' + type=seeals.type + authid=seeals.authid + %]
[% END %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt index 6256f180c2..262d7f0a35 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt @@ -85,7 +85,7 @@ [% FOREACH resul IN result %] - [% PROCESS authresult summary=resul.summary link="/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&value=" %] + [% PROCESS authresult summary=resul.summary %] [% resul.authtype %] [% UNLESS ( resul.isEDITORS ) %] @@ -111,4 +111,4 @@
[% INCLUDE 'opac-bottom.inc' %] -[% BLOCK jsinclude %][% END %] \ No newline at end of file +[% BLOCK jsinclude %][% END %] diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc b/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc index b3371aacc7..dcd2efca80 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc @@ -1,6 +1,13 @@ [% BLOCK showreference %] + [% SET authidurl = '/cgi-bin/koha/opac-authoritiesdetail.pl?authid=' %] - [% SET searchurl = '/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&value=' %] + [% 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' %] @@ -14,14 +21,14 @@ [% END %] [% ELSE %] - [% IF ( type=='seefrom' ) %] + [% IF ( linkType=='seefrom' ) %] used for/see from: - [% ELSIF ( type=='seealso' ) %] + [% ELSIF ( linkType=='seealso' ) %] see also: [% END %] - [% IF ( type=='seealso' ) %] + [% IF ( linkType=='seealso' ) %] [% IF ( authid ) %] [% heading | html %] [% ELSE %] @@ -67,7 +74,7 @@ [% IF summary.seefrom %]
[% FOREACH see IN summary.seefrom %] - [% PROCESS showreference heading=see.heading label="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] [% IF ! loop.last %] ; [% END %] [% END %]
@@ -75,7 +82,7 @@ [% IF summary.seealso %]
[% FOREACH see IN summary.seealso %] - [% PROCESS showreference heading=see.heading label="" type=see.type search='' %] + [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %] [% IF ! loop.last %] ; [% END %] [% END %]
@@ -95,7 +102,9 @@
[% PROCESS showreference heading=seefro.heading + linkType='seefrom' type=seefro.type + authid=seefro.authid %]
[% END %] @@ -105,6 +114,7 @@
[% PROCESS showreference heading=seeals.heading + linkType='seealso' type=seeals.type authid=seeals.authid %] -- 2.39.5