Koha/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc
Owen Leonard 3bd3ec4805
Bug 30566: Incorporate link handling in OPAC's biblio-title include
This patch modifies the biblio-title include so that it can be used to
link to the bibliographic record using the default biblio view.

On pages where the biblio-title include was wrapped in an anchor tag, a
link parameter is added: [% INCLUDE 'biblio-title.inc' link=> 1 %]

To test, apply the patch and view the following pages in the OPAC to
confirm that titles are displayed correctly and that the link to the
bibliographic record is correct:

- Log in to the OPAC: On the "your summary" page, check checkouts,
  overdues, holds, and article requests.
- Check the "your holds history" page.
- Locate a bibliographic record and click "Save to your lists."
  In the popup, the title should be displayed correctly without a link.
- Place a hold, and check the hold confirmation page.
- Check the "Recent comments" page.
- Locate a record which has a local cover image attached, and view the
  image.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-05 09:57:25 -03:00

28 lines
923 B
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 %]
[% 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 %]