@@ -, +, @@ get_marc_host fixes - Show related parts 773$g - Normalise using 'Host item entry' as title - Remove 'foreach' because non-xslt views only return first - If no $w, use $atg, and related tests in --- Koha/Biblio.pm | 6 ++ basket/basket.pl | 4 +- basket/sendbasket.pl | 4 +- .../prog/en/modules/basket/basket.tt | 20 ++--- .../prog/en/modules/basket/sendbasket.tt | 12 +-- .../en/modules/virtualshelves/sendshelf.tt | 12 +-- .../en/xslt/MARC21slim2intranetDetail.xsl | 75 +------------------ .../en/xslt/MARC21slim2intranetResults.xsl | 57 +------------- .../prog/en/xslt/MARC21slimUtils.xsl | 74 ++++++++++++++++++ .../bootstrap/en/modules/opac-basket.tt | 26 ++++--- .../bootstrap/en/modules/opac-sendbasket.tt | 12 +-- .../bootstrap/en/modules/opac-sendshelf.tt | 8 +- .../en/xslt/MARC21slim2OPACDetail.xsl | 75 +------------------ .../en/xslt/MARC21slim2OPACResults.xsl | 57 +------------- .../bootstrap/en/xslt/MARC21slimUtils.xsl | 74 ++++++++++++++++++ opac/opac-basket.pl | 4 +- opac/opac-sendbasket.pl | 4 +- opac/opac-sendshelf.pl | 4 +- t/db_dependent/Koha/Biblio/host_record.t | 8 +- virtualshelves/sendshelf.pl | 4 +- 20 files changed, 243 insertions(+), 297 deletions(-) --- a/Koha/Biblio.pm +++ a/Koha/Biblio.pm @@ -1237,6 +1237,12 @@ sub get_marc_host { last; } } + if ( !$hostfld and $record->subfield('773','t') ) { + # not linked using $w so just return plaintext + my $unlinkedf = $record->field('773'); + my $host = join( ", ", $unlinkedf->subfield('a'), $unlinkedf->subfield('t'), $unlinkedf->subfield('g') ); + return wantarray ? ( $host, $unlinkedf->subfield('g') ) : $host; + } return if !$hostfld; my $rcn = $hostfld->subfield('w'); --- a/basket/basket.pl +++ a/basket/basket.pl @@ -96,7 +96,9 @@ foreach my $biblionumber ( @bibs ) { $dat->{MARCSERIES} = $marcseriesarray; $dat->{MARCURLS} = $marcurlsarray; $dat->{HASAUTHORS} = $hasauthors; - $dat->{HOSTITEMENTRIES} = $biblio->get_marc_host; + my ( $host, $relatedparts ) = $biblio->get_marc_host; + $dat->{HOSTITEMENTRIES} = $host; + $dat->{RELATEDPARTS} = $relatedparts; push( @results, $dat ); } --- a/basket/sendbasket.pl +++ a/basket/sendbasket.pl @@ -86,7 +86,9 @@ if ( $email_add ) { $dat->{HASAUTHORS} = $hasauthors; $dat->{'biblionumber'} = $biblionumber; $dat->{ITEM_RESULTS} = $biblio->items->search_ordered; - $dat->{HOSTITEMENTRIES} = $biblio->get_marc_host; + my ( $host, $relatedparts ) = $biblio->get_marc_host; + $dat->{HOSTITEMENTRIES} = $host; + $dat->{RELATEDPARTS} = $relatedparts; $iso2709 .= $record->as_usmarc(); --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -221,12 +221,12 @@ [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] - Host item entries + Host item entry - [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %] -

- [% INCLUDE 'biblio-title.inc' link = 1 biblio=entry %] -

+ [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] +

[% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %]

+ [% ELSE %] +

[% BIBLIO_RESULT.HOSTITEMENTRIES | html %]

[% END %] @@ -299,11 +299,13 @@

[% BIBLIO_RESULT.notes | html %]

[% END %] [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] - [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %] -

Host item entry: - [% INCLUDE 'biblio-title.inc' link = 1 biblio=entry %] -

+

Host item entry: + [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] + [% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | html %] + [% ELSE %] + [% BIBLIO_RESULT.HOSTITEMENTRIES | html %] [% END %] +

[% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt @@ -129,12 +129,14 @@ Your cart [% END %] [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] - [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %] - Host item entry: - [% INCLUDE 'biblio-title.inc' link = 1 biblio=entry %] - -
+ Host item entry: + [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] + [% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | $raw %] + [% ELSE %] + [% BIBLIO_RESULT.HOSTITEMENTRIES %] [% END %] + +
[% END %] [% IF ( BIBLIO_RESULT.url ) %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt @@ -136,12 +136,14 @@ Your list: [% shelfname | $raw %] [% END %] [% IF BIBLIO_RESULT.HOSTITEMENTRIES %] - [% FOREACH entry IN BIBLIO_RESULT.HOSTITEMENTRIES %] - Host item entry: - [% INCLUDE 'biblio-title.inc' link = 1 biblio=entry %] - -
+ Host item entry: + [% IF BIBLIO_RESULT.HOSTITEMENTRIES.biblionumber %] + [% INCLUDE 'biblio-title.inc' link = 1 biblio=BIBLIO_RESULT.HOSTITEMENTRIES %] [% BIBLIO_RESULT.RELATEDPARTS | $raw %] + [% ELSE %] + [% BIBLIO_RESULT.HOSTITEMENTRIES %] [% END %] + +
[% END %] [% IF ( BIBLIO_RESULT.url ) %] --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -1053,78 +1053,9 @@ - - - - - - - - In: - - - - - - - - - - - - - a_t - - - - - - - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - - - - - /cgi-bin/koha/catalogue/detail.pl?biblionumber= - - - - - - ti,phr:( - - - - ) - - AND au:( - - - - - - ) - - - - /cgi-bin/koha/catalogue/search.pl?q= - - - - - - - - - - - - - - - - - + + + --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl +++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl @@ -926,60 +926,9 @@ - - - - - - - - Source: - - - - - - - - - - - - - a_t - - - - - - - /cgi-bin/koha/catalogue/search.pl?q=Control-number: - - - - - /cgi-bin/koha/catalogue/detail.pl?biblionumber= - - - - - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: - - - - - - - - - - - - - - - - + + + --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl +++ a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl @@ -607,6 +607,80 @@ + + + + + + + + + + Host item entry: + + + + + + + + + + + + + a_t + + + + + + + /cgi-bin/koha/catalogue/search.pl?q=Control-number: + + + + + /cgi-bin/koha/catalogue/detail.pl?biblionumber= + + + + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + + + /cgi-bin/koha/catalogue/search.pl?q= + + + + + + + + + + + + + + + + + - - - - - - - In: - - - - - - - - - - - - - a_t - - - - - - - /cgi-bin/koha/opac-search.pl?q=Control-number: - - - - - /cgi-bin/koha/opac-detail.pl?biblionumber= - - - - - - ti,phr:( - - - - ) - - AND au:( - - - - - - ) - - - - /cgi-bin/koha/opac-search.pl?q= - - - - - - - - - - - - - - - - - + + + --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl @@ -657,60 +657,9 @@ - - - - - - - -
-
- -
-
-
+ + +
--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl +++ a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slimUtils.xsl @@ -571,6 +571,80 @@ + + + + + + + + + + Host item entry: + + + + + + + + + + + + + a_t + + + + + + + /cgi-bin/koha/opac-search.pl?q=Control-number: + + + + + /cgi-bin/koha/opac-detail.pl?biblionumber= + + + + + + ti,phr:( + + + + ) + + AND au:( + + + + + + ) + + + + /cgi-bin/koha/opac-search.pl?q= + + + + + + + + + + + + + + + + +