Bug 33064: Add a licenses option to the searchbar

This patch adds a licenses option to the top searchbar

Test plan:
1) Apply patch
2) run yarn build
3) Navigate to the ERM module
4) Observe that the top search bar should have an option for licenses
5) Click on licenses in the left hand menu, the search bar should update to show licenses as the active search option

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Matt Blenkinsop 2023-04-18 13:15:42 +00:00 committed by Tomas Cohen Arazi
parent 80f8556619
commit b17fbf849c
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 18 additions and 1 deletions

View File

@ -14,6 +14,18 @@
</form>
</div>
<div id="license_search" role="tabpanel" class="tab-pane">
<form action="/cgi-bin/koha/erm/licenses" method="get">
<div class="form-title">
<label class="control-label">License search</label>
</div>
<div class="form-content">
<input type="text" name="q" id="license_filter" class="head-searchbox form-control" placeholder="Enter search keywords" size="40" />
</div>
<button type="submit"><i class="fa fa-arrow-right"></i></button>
</form>
</div>
<div id="package_search" role="tabpanel" class="tab-pane">
<form action="/cgi-bin/koha/erm/eholdings/local/packages" method="get">
<div class="form-title">
@ -43,6 +55,9 @@
<li role="presentation" class="active">
<a id="agreement_search_tab" title="Search agreements" href="#agreement_search" aria-controls="agreement_search" role="tab" aria-expanded="true" data-toggle="tab" class="keep_text"><i class="fa fa-check-circle-o"></i> <span class="tab-title">Search agreements</span></a>
</li>
<li role="presentation">
<a id="license_search_tab" title="Search licenses" href="#license_search" aria-controls="license_search" role="tab" aria-expanded="true" data-toggle="tab" class="keep_text"><i class="fa fa-gavel"></i> <span class="tab-title">Search licenses</span></a>
</li>
<li role="presentation">
<a id="package_search_tab" title="Search packages" href="#package_search" aria-controls="package_search" role="tab" data-toggle="tab" class="keep_text"><i class="fa fa-archive"></i> <span class="tab-title">Search packages</span></a>
</li>

View File

@ -67,7 +67,9 @@ router.beforeEach((to, from) => {
router.afterEach((to, from) => {
let tab_id = 'agreement'; // Agreements
if (to.path.match(/\/erm\/eholdings\/local\/packages/)) {
if (to.path.match(/\/erm\/licenses/)) {
tab_id = 'license';
} else if (to.path.match(/\/erm\/eholdings\/local\/packages/)) {
tab_id = 'package';
} else if (to.path.match(/\/erm\/eholdings\/local\/titles/)) {
tab_id = 'title';