From a1a05db1b638803135df535cd9f40180523e5f0e Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Tue, 23 Apr 2019 11:15:31 +0300 Subject: [PATCH] Bug 11529: Add templates for biblio title display. Unify display. Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- C4/Biblio.pm | 33 ----------- C4/HoldsQueue.pm | 7 +-- C4/Search.pm | 1 - C4/ShelfBrowser.pm | 2 +- Koha/Biblio.pm | 15 ----- acqui/neworderbiblio.pl | 1 - basket/basket.pl | 1 - catalogue/ISBDdetail.pl | 1 + catalogue/MARCdetail.pl | 3 +- catalogue/detail.pl | 4 +- catalogue/moredetail.pl | 5 +- cataloguing/moveitem.pl | 2 +- circ/reserveratios.pl | 5 +- circ/transferstoreceive.pl | 2 +- .../prog/css/src/staff-global.scss | 6 ++ .../prog/en/includes/biblio-title-head.inc | 10 ++++ .../prog/en/includes/biblio-title.inc | 17 ++++++ .../prog/en/includes/waiting_holds.inc | 2 +- .../prog/en/modules/acqui/neworderbiblio.tt | 3 +- .../prog/en/modules/basket/basket.tt | 8 +-- .../prog/en/modules/basket/sendbasket.tt | 1 + .../prog/en/modules/catalogue/ISBDdetail.tt | 4 +- .../prog/en/modules/catalogue/MARCdetail.tt | 4 +- .../prog/en/modules/catalogue/detail.tt | 5 +- .../prog/en/modules/catalogue/imageviewer.tt | 6 +- .../prog/en/modules/catalogue/issuehistory.tt | 6 +- .../prog/en/modules/catalogue/moredetail.tt | 4 +- .../en/modules/catalogue/stockrotation.tt | 6 +- .../prog/en/modules/cataloguing/addbooks.tt | 3 +- .../prog/en/modules/cataloguing/merge.tt | 5 +- .../prog/en/modules/cataloguing/moveitem.tt | 4 +- .../prog/en/modules/circ/article-requests.tt | 6 +- .../prog/en/modules/circ/branchoverdues.tt | 2 +- .../circ/circulation_batch_checkouts.tt | 2 +- .../prog/en/modules/circ/overdue.tt | 2 +- .../prog/en/modules/circ/pendingreserves.tt | 3 +- .../prog/en/modules/circ/renew.tt | 18 +++--- .../prog/en/modules/circ/request-article.tt | 4 +- .../prog/en/modules/circ/reserveratios.tt | 2 +- .../en/modules/circ/transferstoreceive.tt | 2 +- .../prog/en/modules/circ/view_holdsqueue.tt | 2 +- .../prog/en/modules/members/holdshistory.tt | 2 +- .../prog/en/modules/members/readingrec.tt | 2 +- .../prog/en/modules/reserve/request.tt | 8 +-- .../prog/en/modules/serials/result.tt | 3 +- .../prog/en/modules/tags/list.tt | 2 +- .../en/modules/tools/batch_delete_records.tt | 2 +- .../en/modules/virtualshelves/sendshelf.tt | 5 +- .../prog/en/modules/virtualshelves/shelves.tt | 3 +- .../en/includes/biblio-title-head.inc | 9 +++ .../bootstrap/en/includes/biblio-title.inc | 14 +++++ .../bootstrap/en/includes/holds-table.inc | 10 +--- .../bootstrap/en/includes/shelfbrowser.inc | 6 +- .../en/modules/opac-addbybiblionumber.tt | 2 +- .../bootstrap/en/modules/opac-basket.tt | 5 +- .../bootstrap/en/modules/opac-detail.tt | 7 ++- .../bootstrap/en/modules/opac-imageviewer.tt | 6 +- .../bootstrap/en/modules/opac-opensearch.tt | 2 +- .../en/modules/opac-readingrecord.tt | 6 +- .../bootstrap/en/modules/opac-reserve.tt | 7 +-- .../en/modules/opac-results-grouped.tt | 7 ++- .../bootstrap/en/modules/opac-results.tt | 10 +--- .../bootstrap/en/modules/opac-review.tt | 2 +- .../bootstrap/en/modules/opac-sendbasket.tt | 7 ++- .../bootstrap/en/modules/opac-sendshelf.tt | 5 +- .../bootstrap/en/modules/opac-shelves.tt | 10 +--- .../en/modules/opac-showreviews-rss.tt | 2 +- .../bootstrap/en/modules/opac-showreviews.tt | 3 +- .../bootstrap/en/modules/opac-tags.tt | 7 +-- .../bootstrap/en/modules/opac-user.tt | 10 ++-- opac/opac-addbybiblionumber.pl | 4 ++ opac/opac-basket.pl | 3 - opac/opac-detail.pl | 2 - opac/opac-readingrecord.pl | 1 - opac/opac-reserve.pl | 2 +- opac/opac-sendshelf.pl | 2 - opac/opac-shelves.pl | 1 - opac/opac-showreviews.pl | 2 +- opac/opac-tags.pl | 2 +- opac/opac-user.pl | 2 - reserve/request.pl | 8 +-- serials/subscription-bib-search.pl | 3 + svc/checkouts | 1 - t/Biblio.t | 6 -- t/db_dependent/Biblio.t | 7 +-- t/db_dependent/Koha/BiblioUtils.t | 55 ------------------- tags/list.pl | 1 - tools/batch_delete_records.pl | 1 - virtualshelves/sendshelf.pl | 2 - virtualshelves/shelves.pl | 5 +- 90 files changed, 195 insertions(+), 298 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title-head.inc create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title-head.inc create mode 100644 koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc delete mode 100755 t/db_dependent/Koha/BiblioUtils.t diff --git a/C4/Biblio.pm b/C4/Biblio.pm index eae7cd5df3..0e009ee914 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -30,7 +30,6 @@ BEGIN { AddBiblio GetBiblioData GetMarcBiblio - GetRecordValue GetISBDView GetMarcControlnumber GetMarcNotes @@ -643,38 +642,6 @@ sub _check_valid_auth_link { return ($field->as_string('abcdefghijklmnopqrstuvwxyz') eq $authorized_heading); } -=head2 GetRecordValue - - my $values = GetRecordValue($field, $record); - -Get MARC fields from the record using the framework mappings for biblio fields. - -=cut - -sub GetRecordValue { - my ( $field, $record ) = @_; - - if (!$record) { - carp 'GetRecordValue called with undefined record'; - return; - } - - my @result; - my @mss = GetMarcSubfieldStructureFromKohaField("biblio.$field"); - foreach my $fldhash ( @mss ) { - my $tag = $fldhash->{tagfield}; - my $sub = $fldhash->{tagsubfield}; - foreach my $fld ( $record->field($tag) ) { - if( $sub eq '@' || $fld->is_control_field ) { - push @result, $fld->data if $fld->data; - } else { - push @result, grep { $_ } $fld->subfield($sub); - } - } - } - return \@result; -} - =head2 GetBiblioData $data = &GetBiblioData($biblionumber); diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 70bb0bcc85..1a4e334452 100755 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -134,8 +134,8 @@ sub GetHoldsQueueItems { my @bind_params = (); my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, biblioitems.itemtype, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode, - biblio.copyrightdate, biblio.subtitle, biblio.part_number, - biblio.part_name, + biblio.copyrightdate, biblio.subtitle, biblio.medium, + biblio.part_number, biblio.part_name biblioitems.publicationyear, biblioitems.pages, biblioitems.size, biblioitems.isbn, items.copynumber FROM tmp_holdsqueue @@ -158,9 +158,6 @@ sub GetHoldsQueueItems { } delete $row->{itemtype}; - my @subtitles = split(/ \| /, $row->{'subtitle'} // '' ); - $row->{'subtitle'} = \@subtitles; - push @$items, $row; } return $items; diff --git a/C4/Search.pm b/C4/Search.pm index 6d7157c6ac..4c4a3d0e10 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1938,7 +1938,6 @@ sub searchResults { SetUTF8Flag($marcrecord); my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw ); - $oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord); $oldbiblio->{result_number} = $i + 1; # add imageurl to itemtype if there is one diff --git a/C4/ShelfBrowser.pm b/C4/ShelfBrowser.pm index 05669fb94e..401776edc0 100644 --- a/C4/ShelfBrowser.pm +++ b/C4/ShelfBrowser.pm @@ -223,7 +223,7 @@ sub GetShelfInfo { my $this_biblio = GetBibData($item->{biblionumber}); next unless defined $this_biblio; $item->{'title'} = $this_biblio->{'title'}; - $item->{'subtitle'} = C4::Biblio::SplitKohaField($this_biblio->{'subtitle'}), + $item->{'subtitle'} = $this_biblio->{'subtitle'}, $item->{'medium'} = $this_biblio->{'medium'}; $item->{'part_number'} = $this_biblio->{'part_number'}; $item->{'part_name'} = $this_biblio->{'part_name'}; diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm index d944cb06f7..22adee7505 100644 --- a/Koha/Biblio.pm +++ b/Koha/Biblio.pm @@ -80,21 +80,6 @@ sub metadata { return Koha::Biblio::Metadata->_new_from_dbic($metadata); } -=head3 subtitles - -my @subtitles = $biblio->subtitles(); - -Returns list of subtitles for a record according to the framework. - -=cut - -sub subtitles { - my ( $self ) = @_; - - my @subtitles = split( / \| /, $self->subtitle // '' ); - return @subtitles; -} - =head3 can_article_request my $bool = $biblio->can_article_request( $borrower ); diff --git a/acqui/neworderbiblio.pl b/acqui/neworderbiblio.pl index d1662c5454..aed5d56a67 100755 --- a/acqui/neworderbiblio.pl +++ b/acqui/neworderbiblio.pl @@ -130,7 +130,6 @@ foreach my $result ( @{$marcresults} ) { my $marcrecord = C4::Search::new_record_from_zebra( 'biblioserver', $result ); my $biblio = TransformMarcToKoha( $marcrecord, '' ); - $biblio->{subtitles} = C4::Biblio::SplitKohaField($biblio->{'subtitle'}); $biblio->{booksellerid} = $booksellerid; push @results, $biblio; diff --git a/basket/basket.pl b/basket/basket.pl index c6d317035b..2ae309f9fe 100755 --- a/basket/basket.pl +++ b/basket/basket.pl @@ -62,7 +62,6 @@ foreach my $biblionumber ( @bibs ) { my $dat = &GetBiblioData($biblionumber); next unless $dat; my $record = &GetMarcBiblio({ biblionumber => $biblionumber }); - $dat->{subtitle} = GetRecordValue('subtitle', $record); my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); diff --git a/catalogue/ISBDdetail.pl b/catalogue/ISBDdetail.pl index 81995a7dc0..01d7e34145 100755 --- a/catalogue/ISBDdetail.pl +++ b/catalogue/ISBDdetail.pl @@ -140,6 +140,7 @@ $template->param ( ocoins => $biblio->get_coins, C4::Search::enabled_staff_search_views, searchid => scalar $query->param('searchid'), + biblio => $biblio, ); my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 3f5a534d04..ab44ef76d4 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -315,7 +315,8 @@ $template->param ( marcview => 1, z3950_search_params => C4::Search::z3950_search_args($biblio), C4::Search::enabled_staff_search_views, - searchid => scalar $query->param('searchid'), + searchid => scalar $query->param('searchid'), + biblio => $biblio_object->unblessed, ); my @allorders_using_biblio = GetOrdersByBiblionumber ($biblionumber); diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 42846359e1..b041c829ae 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -141,8 +141,7 @@ my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour ); my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour ); my $marcseriesarray = GetMarcSeries($record,$marcflavour); my $marcurlsarray = GetMarcUrls ($record,$marcflavour); -my $marchostsarray = GetMarcHosts($record,$marcflavour); -my $subtitle = GetRecordValue('subtitle', $record); +my $marchostsarray = GetMarcHosts($record,$marcflavour); my $itemtypes = { map { $_->{itemtype} => $_ } @{ Koha::ItemTypes->search->unblessed } }; @@ -378,7 +377,6 @@ $template->param( MARCURLS => $marcurlsarray, MARCISBNS => $marcisbnsarray, MARCHOSTS => $marchostsarray, - subtitle => $subtitle, itemdata_ccode => $itemfields{ccode}, itemdata_enumchron => $itemfields{enumchron}, itemdata_uri => $itemfields{uri}, diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index a4152b44bb..c55c72bfc4 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -110,7 +110,7 @@ if (@hostitems){ push (@items,@hostitems); } -my $subtitle = GetRecordValue('subtitle', $record); +my $biblio = Koha::Biblios->find( $biblionumber ); my $totalcount=@all_items; my $showncount=@items; @@ -258,7 +258,7 @@ $template->param( biblioitemnumber => $bi, itemnumber => $itemnumber, z3950_search_params => C4::Search::z3950_search_args(GetBiblioData($biblionumber)), - subtitle => $subtitle, + biblio => $biblio->unblessed, ); $template->param(ONLY_ONE => 1) if ( $itemnumber && $showncount != @items ); $template->{'VARS'}->{'searchid'} = $query->param('searchid'); @@ -291,7 +291,6 @@ $template->param (countorders => $count_orders_using_biblio); my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ; $template->param (countdeletedorders => $count_deletedorders_using_biblio); -my $biblio = Koha::Biblios->find( $biblionumber ); my $holds = $biblio->holds; $template->param( holdcount => $holds->count ); diff --git a/cataloguing/moveitem.pl b/cataloguing/moveitem.pl index 697057ef03..1e664a911e 100755 --- a/cataloguing/moveitem.pl +++ b/cataloguing/moveitem.pl @@ -61,7 +61,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( my $biblio = Koha::Biblios->find( $biblionumber ); -$template->param(bibliotitle => $biblio->title); +$template->param(biblio => $biblio); $template->param(biblionumber => $biblionumber); # If we already have the barcode of the item to move and the biblionumber to move the item to diff --git a/circ/reserveratios.pl b/circ/reserveratios.pl index 66eebd3ce1..ae9cf1863f 100755 --- a/circ/reserveratios.pl +++ b/circ/reserveratios.pl @@ -164,7 +164,10 @@ while ( my $data = $sth->fetchrow_hashref ) { priority => $data->{priority}, name => $data->{borrower}, title => $data->{title}, - subtitle => C4::Biblio::SplitKohaField($data->{'subtitle'}), + subtitle => $data->{subtitle}, + medium => $data->{medium}, + part_number => $data->{part_number}, + part_name => $data->{part_name}, author => $data->{author}, itemnum => $data->{itemnumber}, biblionumber => $data->{biblionumber}, diff --git a/circ/transferstoreceive.pl b/circ/transferstoreceive.pl index 3734b3c935..b9123f6c01 100755 --- a/circ/transferstoreceive.pl +++ b/circ/transferstoreceive.pl @@ -99,7 +99,7 @@ while ( my $library = $libraries->next ) { %getransf = ( %getransf, title => $biblio->title, - subtitle => C4::Biblio::SplitKohaField($biblio->{'subtitle'}), + subtitle => $biblio->subtitle, medium => $biblio->medium, part_number => $biblio->part_number, part_name => $biblio->part_name, diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss index cef9e874c1..a4d07403a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss +++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss @@ -3961,6 +3961,12 @@ input.renew { width: 100% !important; } +.ar-title, .hq-title { + .biblio-title { + font-weight: bold; + } +} + #stockrotation { h3 { margin: 30px 0 10px 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title-head.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title-head.inc new file mode 100644 index 0000000000..e0c420144d --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title-head.inc @@ -0,0 +1,10 @@ +[% IF ( biblio.title ) %] + [% biblio.title | html %] +[% ELSE %] + No title +[% END %] +[% biblio.medium | html %] +[% FOREACH subtitle IN biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] + [% subtitle | html %] +[% END %] +[% biblio.part_number | html %] [% biblio.part_name | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc new file mode 100644 index 0000000000..fd01ecead1 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc @@ -0,0 +1,17 @@ +[% IF ( biblio.title ) %] + [% biblio.title | html %] +[% ELSE %] + No title +[% END %] +[% IF ( biblio.medium ) %] + [% biblio.medium | html %] +[% END %] +[% FOREACH subtitle IN biblio.subtitle.split(' \\| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] + [% subtitle | html %] +[% END %] +[% IF ( biblio.part_number ) %] + [% biblio.part_number | html %] +[% END %] +[% IF ( biblio.part_name ) %] + [% biblio.part_name | html %] +[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc index f4606ac51e..716f1c7bdf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc @@ -22,7 +22,7 @@ [% reserveloo.waitingdate | $KohaDates %] [% reserveloo.reservedate | $KohaDates %] [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %] - [% reserveloo.biblio.title | html %] [% FOREACH subtitl IN reserveloo.biblio.subtitles %] [% subtitl | html %] [% reserveloo.biblio.part_number | html %] [% reserveloo.biblio.part_name | html %][% END %] + [% INCLUDE 'biblio-title.inc' biblio=reserveloo.biblio %] [% UNLESS ( item_level_itypes ) %] [% IF ( ItemTypes.GetDescription(reserveloo.item.effective_itemtype) ) %]  ([% ItemTypes.GetDescription(reserveloo.item.effective_itemtype) | html %]) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt index 8abc2a8fbe..d4642a14ad 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tt @@ -49,8 +49,7 @@ [% FOREACH biblio IN resultsloop %] -

[% biblio.title | html %] - [% FOREACH subtitle IN biblio.subtitles %] [% subtitle | html %][% END %] +

[% INCLUDE 'biblio-title.inc' %] [% IF ( biblio.author ) %] by [% biblio.author | html %],[% END %]

[% IF ( biblio.isbn ) %] [% biblio.isbn | html %][% END %] [% IF ( biblio.pages ) %] - [% biblio.pages | html %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt index de1788c783..d110dcbe52 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt @@ -70,8 +70,7 @@ [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]

- [% BIBLIO_RESULT.title |html %] - [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl | html %][% END %] + [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]

@@ -264,10 +263,7 @@ - [% BIBLIO_RESULT.title |html %] - [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] - [% subtitl | html %] - [% END %] + [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %] [% BIBLIO_RESULT.author | html %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt index 0e6dc2faed..6af47706d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt @@ -33,6 +33,7 @@ Your cart [% BIBLIO_RESULT.title | $raw %] [% IF ( BIBLIO_RESULT.subtitle ) %] [% BIBLIO_RESULT.subtitle | $raw %][% END %] + [% BIBLIO_RESULT.part_number | $raw %] [% BIBLIO_RESULT.part_name | $raw %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt index ec1527be94..346b53b7a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt @@ -6,7 +6,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - ISBD details + ISBD details for [% INCLUDE 'biblio-title-head.inc' %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -20,7 +20,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - ISBD details + ISBD details for [% INCLUDE 'biblio-title.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt index 7034199f20..9e357cb2a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt @@ -6,7 +6,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - MARC details for [% bibliotitle | html %] + MARC details for [% INCLUDE 'biblio-title-head.inc' %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -21,7 +21,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - MARC details for [% bibliotitle | html %] + MARC details for [% INCLUDE 'biblio-title.inc' %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index fead33d121..c81b8685d2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -6,6 +6,7 @@ [% USE Branches %] [% USE Biblio %] [% USE ColumnsSettings %] +[% USE Stash %] [% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] [% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] @@ -34,7 +35,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - Details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %] + Details for [% INCLUDE 'biblio-title-head.inc' biblio=Stash.stash() %] [% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -49,7 +50,7 @@ [% IF ( unknownbiblionumber ) %] Unknown record [% ELSE %] - Details for [% title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %] + Details for [% INCLUDE 'biblio-title.inc' biblio=Stash.stash() %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt index cd4d35ee8a..712420d4e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Catalog › [% biblio.title | html %] [% FOREACH subtitl IN subtitle %] [% subtitl | html %][% END %] › Images +Koha › Catalog › [% INCLUDE 'biblio-title-head.inc' %] › Images [% INCLUDE 'doc-head-close.inc' %] @@ -15,7 +15,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] -

+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt index 8ac04390be..92aea46250 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/stockrotation.tt @@ -4,7 +4,7 @@ [% USE Branches %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Catalog › Stock rotation details for [% biblio.title | html %] +Koha › Catalog › Stock rotation details for [% INCLUDE 'biblio-title-head.inc' %] [% INCLUDE 'doc-head-close.inc' %] @@ -12,7 +12,7 @@ [% INCLUDE 'header.inc' %] [% INCLUDE 'cat-search.inc' %] - +
@@ -22,7 +22,7 @@
[% IF no_op_set %] -

Stock rotation details for [% biblio.title | html %]

+

Stock rotation details for [% INCLUDE 'biblio-title.inc' %]

[% IF rotas.count > 0 && items.size > 0 %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt index 16a447cdfb..823ad60470 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt @@ -75,8 +75,7 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt index 9d2e9f26d7..2550819714 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation_batch_checkouts.tt @@ -117,7 +117,7 @@ [% END %] [% END %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt index edf9d32058..1510f81ed9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt @@ -77,7 +77,8 @@ [% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt index 3672300aa2..608ed5c84d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -38,11 +38,11 @@ [% ELSIF error == "no_checkout" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) is not checked out to a patron.

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) is not checked out to a patron.

[% ELSIF error == "too_many" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been renewed the maximum number of times by [% borrower.firstname | html %] [% borrower.surname | html %] ( [% borrower.cardnumber | html %] )

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been renewed the maximum number of times by [% borrower.firstname | html %] [% borrower.surname | html %] ( [% borrower.cardnumber | html %] )

[% IF Koha.Preference('AllowRenewalLimitOverride') %] @@ -54,7 +54,7 @@ [% ELSIF error == "too_soon" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %].

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) cannot be renewed before [% soonestrenewdate | $KohaDates %].

[% IF Koha.Preference('AllowRenewalLimitOverride') %] @@ -66,7 +66,7 @@ [% ELSIF error == "auto_too_soon" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %].

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed before [% soonestrenewdate | $KohaDates %].

[% IF Koha.Preference('AllowRenewalLimitOverride') %] @@ -78,7 +78,7 @@ [% ELSIF error == "auto_too_late" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed anymore since [% latestautorenewdate | $KohaDates %].

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed anymore since [% latestautorenewdate | $KohaDates %].

[% IF Koha.Preference('AllowRenewalLimitOverride') %] @@ -90,7 +90,7 @@ [% ELSIF error == "auto_account_expired" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal and cannot be renewed because the patron's account is expired

[% IF Koha.Preference('AllowRenewalLimitOverride') %] @@ -102,7 +102,7 @@ [% ELSIF error == "auto_renew" or error == "auto_too_much_oweing" %] -

[% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal.

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) has been scheduled for automatic renewal.

[% IF Koha.Preference('AllowRenewalLimitOverride') %] @@ -114,7 +114,7 @@ [% ELSIF error == "on_reserve" %] -

This item is on hold for another patron.

+

[% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ): This item is on hold for another patron.

@@ -153,7 +153,7 @@

Item renewed:

- [% item.biblio.title | html %] [% item.biblioitem.subtitle | html %] + [% INCLUDE 'biblio-title.inc' biblio=item.biblio %] ( [% item.barcode | html %] ) renewed for [% borrower.firstname | html %] [% borrower.surname | html %] ( [% borrower.cardnumber | html %] ) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt index fdc8d7c6ee..e2257fc8e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/request-article.tt @@ -21,7 +21,7 @@ Catalog [% UNLESS blocking_error %] › - [% biblio.title | html %] + [% INCLUDE 'biblio-title.inc' %] › Request article [% END %] @@ -33,7 +33,7 @@

-

Request article from [% biblio.title | html %]

+

Request article from [% INCLUDE 'biblio-title.inc' %]

[% IF no_patrons_found %]

Patron not found

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt index eac912a4a2..86bc3efc09 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt @@ -57,7 +57,7 @@
- diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt index cd7c0df373..63bc6263de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt @@ -125,7 +125,7 @@ [% FOREACH hold IN holds %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index 097dbf0f44..bc352dde7c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -74,7 +74,7 @@ - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index d63cc3281d..f169274f89 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -10,7 +10,7 @@ [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] [% UNLESS ( multi_hold ) %] - Koha › Circulation › Holds › Place a hold on [% title | html %] + Koha › Circulation › Holds › Place a hold on [% INCLUDE 'biblio-title-head.inc' %] [% ELSE %] Koha › Circulation › Holds › Confirm holds [% END %] @@ -22,7 +22,7 @@ [% INCLUDE 'circ-search.inc' %] [% UNLESS ( multi_hold ) %] - + [% ELSE %] [% END %] @@ -58,7 +58,7 @@ [% END %] [% UNLESS ( multi_hold ) %] -

Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% title | html %] [% subtitle | html %] [% part_number | html %] [% part_name | html %]

+

Place a hold on [% INCLUDE 'biblio-default-view.inc' %][% INCLUDE 'biblio-title.inc' %]

[% ELSE %]

Confirm holds

[% END %] @@ -187,7 +187,7 @@ [% END %] [% ELSE %] - + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt index 6b0b0bffeb..064f09b3d4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/result.tt @@ -21,7 +21,8 @@ [% FOREACH resultsloo IN resultsloop %] - - - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt index fa56105e78..0310e41c5b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt @@ -31,11 +31,12 @@ Your list: [% shelfname | $raw %]
  • [% BIBLIO_RESULT.title | $raw %] - [% IF ( BIBLIO_RESULT.subtitle.size ) %] - [% FOREACH subtitle IN BIBLIO_RESULT.subtitle %] + [% IF ( BIBLIO_RESULT.subtitle ) %] + [% FOREACH subtitle IN BIBLIO_RESULT.subtitle.split(' | ') %] [% subtitle | $raw %] [% END %] [% END %] + [% BIBLIO_RESULT.part_number | $raw %] [% BIBLIO_RESULT.part_name | $raw %]

    diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 9d553cc8e8..57f5e24eb1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -212,7 +212,8 @@ [% itemsloo.XSLTBloc | $raw %] [% ELSE %] [% INCLUDE 'biblio-default-view.inc' biblionumber = itemsloo.biblionumber %] - [% itemsloo.title | html %][% FOREACH subtitl IN itemsloo.subtitle %] [% subtitl | html %][% END %] + [% INCLUDE 'biblio-title.inc' biblio=itemsloo %] + [% END %]

    [% IF ( itemsloo.notforloan ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title-head.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title-head.inc new file mode 100644 index 0000000000..70bb297b36 --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title-head.inc @@ -0,0 +1,9 @@ +[% IF ( biblio.title ) %] + [% biblio.title | html %] +[% ELSE %] + No title +[% END %] +[% FOREACH subtitle IN biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] + [% subtitle | html %] +[% END %] +[% biblio.part_number | html %] [% biblio.part_name | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc new file mode 100644 index 0000000000..f85eb71c6e --- /dev/null +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc @@ -0,0 +1,14 @@ +[% IF ( biblio.title ) %] + [% biblio.title | html %] +[% ELSE %] + No title +[% END %] +[% FOREACH subtitle IN biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] + [% subtitle | html %] +[% END %] +[% IF ( biblio.part_number ) %] + [% biblio.part_number | html %] +[% END %] +[% IF ( biblio.part_name ) %] + [% biblio.part_name | html %] +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index b3bb1cf729..3c5ea15938 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -53,18 +53,12 @@

  • [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt index f418509f1f..21f2c11adb 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt @@ -18,7 +18,7 @@ [% END %]
      [% FOREACH biblio IN biblios %] -
    • [% biblio.title | html %] +
    • [% INCLUDE 'biblio-title.inc' %] [% IF ( biblio.author ) %] [% biblio.author | html %] [% END %]
    • [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt index 292282ef33..7bff7c0318 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt @@ -67,8 +67,7 @@ [% FOREACH BIBLIO_RESULT IN BIBLIO_RESULTS %]

      - [% BIBLIO_RESULT.title | html %] - [% IF ( BIBLIO_RESULT.subtitle ) %] [% FOREACH subtitl IN BIBLIO_RESULT.subtitle %] [% subtitl | html %] [% END %][% END %] + [% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %] [% IF ( BIBLIO_RESULT.author ) %] [% BIBLIO_RESULT.author | html %][% END %]

      @@ -257,7 +256,7 @@