Koha/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc
Jonathan Druart 051dd6bf0b Bug 29609: Centralized code to build the link to a biblio detail page
There are 2 prefs that control the default view of biblio detail pages:
IntranetBiblioDefaultView for staff and BiblioDefaultView for OPAC.
There are as well viewISBD, viewLabeledMARC and viewMARC to allow/don't
allow access to those page for staff members.

This code need to be in a single place to avoid discrepancy.

Test plan:
Play with BiblioDefaultView and IntranetBiblioDefaultView and confirm
that the links of biblio point to the correct view.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:16 +02:00

31 lines
1 KiB
HTML

[% IF ( link ) %]
<a href="[% PROCESS biblio_a_href biblionumber => biblio.biblionumber %]" class="title">
[% END %]
[% 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 %]
[% part_numbers = biblio.part_number.split(' \\| ') %]
[% part_names = biblio.part_name.split(' \\| ') %]
[% i = 0 %]
[% WHILE ( part_numbers.$i.defined || part_names.$i.defined ) %]
[% IF ( part_numbers.$i.defined ) %]
<span class="part-number">[% part_numbers.$i | html %]</span>
[% END %]
[% IF ( part_names.$i.defined ) %]
<span class="part-name">[% part_names.$i | html %]</span>
[% END %]
[% i = i + 1 %]
[% END %]
[% IF ( link ) %]
</a>
[% END %]