Bug 33894: Use template wrapper for tabs: OPAC search history

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

To test, apply the patch and view the OPAC search history page. With the
OpacAuthorities system preference enabled you should see two tabs:
Catalog and Authority. Confirm that each tab shows the correct
information.

Deactivate OpacAuthorities and reload the search history page. The
bibliographic search history should display without tabs.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2c6e64ba96)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d53d0f6537)
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2023-06-01 13:40:02 +00:00 committed by Pedro Amorim
parent 6a399fb0ba
commit 99239d0f7e
1 changed files with 20 additions and 18 deletions

View File

@ -51,25 +51,27 @@
<h1>Search history</h1>
[% IF Koha.Preference( 'OpacAuthorities' ) == 1 %]
<div id="tabs" class="toptabs">
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item" role="presentation">
<a class="nav-link active" id="biblio-tab-link" href="#biblio_tab" aria-controls="biblio_tab" role="tab" data-toggle="tab" aria-selected="true">Catalog</a>
</li>
<li class="nav-item" role="presentation">
<a class="nav-link" id="authority-tab-link" href="#authority_tab" aria-controls="authority_tab" role="tab" data-toggle="tab" aria-selected="false">Authority</a>
</li>
</ul>
<div class="tab-content">
<div id="biblio_tab" role="tabpanel" class="tab-pane active" aria-labelledby="biblio-tab-link">
[% PROCESS catalog_search_history %]
</div> <!-- / #biblio_tab -->
<div id="authority_tab" role="tabpanel" class="tab-pane" aria-labelledby="authority-tab-link">
[% PROCESS authority_search_history %]
</div> <!-- / #authority_tab -->
</div> <!-- /.tab-content -->
</div> <!-- / #tabs -->
[% WRAPPER tabs id= "tabs" %]
[% WRAPPER tabs_nav %]
[% WRAPPER tab_item tabname= "biblio_tab" bt_active= 1 %] <span>Catalog</span> [% END %]
[% WRAPPER tab_item tabname= "authority_tab" %] <span>Authority</span> [% END %]
[% END # /WRAPPER tabs_nav %]
[% WRAPPER tab_panels %]
[% WRAPPER tab_panel tabname="biblio_tab" bt_active= 1 %]
<div id="biblio_tab" role="tabpanel" class="tab-pane active" aria-labelledby="biblio-tab-link">
[% PROCESS catalog_search_history %]
</div> <!-- / #biblio_tab -->
[% END # /tab_panel# %]
[% WRAPPER tab_panel tabname="authority_tab" %]
<div id="authority_tab" role="tabpanel" class="tab-pane" aria-labelledby="authority-tab-link">
[% PROCESS authority_search_history %]
</div> <!-- / #authority_tab -->
[% END # /tab_panel# %]
[% END # /WRAPPER tab_panels %]
[% END # /WRAPPER tabs %]
[% ELSE %]
[% PROCESS catalog_search_history %]
[% END %]