Browse Source
Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>remotes/origin/19.11.x
Ere Maijala
5 years ago
committed by
Martin Renvoize
90 changed files with 195 additions and 298 deletions
@ -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 %] |
@ -0,0 +1,17 @@ |
|||
[% IF ( biblio.title ) %] |
|||
<span class="biblio-title">[% biblio.title | html %]</span> |
|||
[% ELSE %] |
|||
No title |
|||
[% END %] |
|||
[% IF ( biblio.medium ) %] |
|||
<span class="biblio-medium">[% biblio.medium | html %]</span> |
|||
[% END %] |
|||
[% FOREACH subtitle IN biblio.subtitle.split(' \\| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] |
|||
<span class="subtitle">[% subtitle | html %]</span> |
|||
[% END %] |
|||
[% IF ( biblio.part_number ) %] |
|||
<span class="part-number">[% biblio.part_number | html %]</span> |
|||
[% END %] |
|||
[% IF ( biblio.part_name ) %] |
|||
<span class="part-name">[% biblio.part_name | html %]</span> |
|||
[% END %] |
@ -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 %] |
@ -0,0 +1,14 @@ |
|||
[% IF ( biblio.title ) %] |
|||
<span class="biblio-title">[% biblio.title | html %]</span> |
|||
[% ELSE %] |
|||
No title |
|||
[% END %] |
|||
[% FOREACH subtitle IN biblio.subtitle.split(' \| ') %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] |
|||
<span class="subtitle">[% subtitle | html %]</span> |
|||
[% END %] |
|||
[% IF ( biblio.part_number ) %] |
|||
<span class="part-number">[% biblio.part_number | html %]</span> |
|||
[% END %] |
|||
[% IF ( biblio.part_name ) %] |
|||
<span class="part-name">[% biblio.part_name | html %]</span> |
|||
[% END %] |
@ -1,55 +0,0 @@ |
|||
#!/usr/bin/perl |
|||
# |
|||
# Copyright 2014 Catalyst IT |
|||
# |
|||
# This file is part of Koha. |
|||
# |
|||
# Koha is free software; you can redistribute it and/or modify it |
|||
# under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 3 of the License, or |
|||
# (at your option) any later version. |
|||
# |
|||
# Koha is distributed in the hope that it will be useful, but |
|||
# WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
|||
|
|||
use Modern::Perl; |
|||
|
|||
use C4::Context; |
|||
use C4::Biblio qw( AddBiblio ); |
|||
use Koha::Database; |
|||
use Koha::Libraries; |
|||
use Koha::Patrons; |
|||
|
|||
use Test::More tests => 4; |
|||
|
|||
use_ok('Koha::Biblio'); |
|||
use_ok('Koha::Biblios'); |
|||
|
|||
my $schema = Koha::Database->new()->schema(); |
|||
$schema->storage->txn_begin(); |
|||
|
|||
my $dbh = C4::Context->dbh; |
|||
$dbh->{RaiseError} = 1; |
|||
|
|||
my @branches = Koha::Libraries->search(); |
|||
my $borrower = Koha::Patrons->search()->next(); |
|||
|
|||
my $biblio = MARC::Record->new(); |
|||
$biblio->append_fields( |
|||
MARC::Field->new( '100', ' ', ' ', a => 'Hall, Kyle' ), |
|||
MARC::Field->new( '245', ' ', ' ', a => "Test Record", b => "Test Record Subtitle", b => "Another Test Record Subtitle" ), |
|||
); |
|||
my ( $biblionumber, $biblioitemnumber ) = AddBiblio( $biblio, '' ); |
|||
|
|||
$biblio = Koha::Biblios->find( $biblionumber ); |
|||
my @subtitles = $biblio->subtitles(); |
|||
is( $subtitles[0], 'Test Record Subtitle', 'Got first subtitle correctly' ); |
|||
is( $subtitles[1], 'Another Test Record Subtitle', 'Got second subtitle correctly' ); |
|||
|
|||
$schema->storage->txn_rollback(); |
|||
|
Loading…
Reference in new issue