Bug 33892: Use template wrapper for tabs: OPAC authority detail

This patch updates the OPAC authority detail page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and locate an authority record in the OPAC
which has notes fields.

When viewing the details for that record the notes should appear in a
single "Notes" tab.

Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Owen Leonard 2023-06-05 13:06:39 +00:00 committed by Tomas Cohen Arazi
parent 48ccc9245c
commit 75c9b07c5c
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 12 additions and 11 deletions

View File

@ -162,22 +162,23 @@
[% END # / IF MARCURLS %]
[% END %]
<div id="authdescriptions" class="toptabs">
<ul class="nav nav-tabs" role="tablist">
<li id="tab_descriptions" class="nav-item" role="presentation">
<a class="nav-link active" id="descriptions-tab" data-toggle="tab" href="#descriptions" role="tab" aria-controls="descriptions" aria-selected="true" href="#descriptions">Notes</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" role="tabpanel" aria-labelledby="descriptions-tab" id="descriptions">
[% WRAPPER tabs id= "authdescriptions" %]
[% WRAPPER tabs_nav %]
[% WRAPPER tab_item tabname= "tab_descriptions" bt_active= 1 %]
<span>Notes</span>
[% END %]
[% END # /WRAPPER tabs_nav %]
[% WRAPPER tab_panels %]
[% WRAPPER tab_panel tabname="tab_descriptions" bt_active= 1 %]
<div class="content_set">
[% FOREACH note IN summary.notes %]
<p class="note auth[% note.field | html %]">[% note.note | html %]</p>
[% END %]
</div>
</div>
</div> <!-- /.tab-content -->
</div>
[% END # /tab_panel# %]
[% END # /WRAPPER tab_panels %]
[% END # /WRAPPER tabs#authdescriptions %]
</div> <!-- / .#userauthdetails -->
</div> <!-- / .col-lg-10/12 -->
[% IF Koha.Preference( 'OPACAuthorIdentifiers' ) && author_identifiers.size %]