Bugzilla – Attachment 148810 Details for
Bug 33106
Add vendor link to ERM Licences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33106: Add vendor link to ERM licenses
Bug-33106-Add-vendor-link-to-ERM-licenses.patch (text/plain), 3.52 KB, created by
Jonathan Druart
on 2023-03-28 09:57:50 UTC
(
hide
)
Description:
Bug 33106: Add vendor link to ERM licenses
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-28 09:57:50 UTC
Size:
3.52 KB
patch
obsolete
>From 9e3c4138b824001de57065b7e961bc1e65b405de Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 Mar 2023 14:55:53 +0100 >Subject: [PATCH] Bug 33106: Add vendor link to ERM licenses > >This patch adds a "Licenses" link in the acquisition module to link to >the licenses defined in the ERM module. > >Test plan: >- Create a vendor >- Create some licenses in the ERM module, add some to the vendor >previously created >- Go to the detail page of the vendor in the acquisition module >=> Notice the new "Licenses" tab on the side bar >=> Notice that this tab does not appear if you do not have the permission >to see licenses >- Click on the new tab >=> Notice that you are redirected to the license list view, in the ERM >module, with an automatic filter on the vendor >--- > .../prog/en/includes/vendor-menu.inc | 5 +++++ > .../prog/js/vue/components/ERM/LicensesList.vue | 15 ++++++++++++++- > 2 files changed, 19 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc >index 3fc669e840b..394bf6c6dea 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/vendor-menu.inc >@@ -1,3 +1,4 @@ >+[% USE Koha %] > [% IF ( booksellerid ) %] > <div id="menu"> > <ul> >@@ -10,6 +11,10 @@ > [% ELSE %] > <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid | uri %]&owner=1">Uncertain prices</a></li> > [% END %] [% END %] >+ >+ [% IF Koha.Preference('ERMModule') && ( CAN_user_erm_erm_licensing || CAN_user_erm_erm_admin || CAN_user_erm_erm_show ) %] >+ <li><a href="/cgi-bin/koha/erm/licenses?vendor_id=[% booksellerid | uri %]">Licenses</a></li> >+ [% END %] > </ul> > </div> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >index 8cab5b4723c..8478aa24ec2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >@@ -45,6 +45,9 @@ export default { > return { > license_count: null, > initialized: false, >+ column_filters: { >+ vendor_id: this.$route.query.vendor_id || null, >+ }, > } > }, > beforeRouteEnter(to, from, next) { >@@ -122,7 +125,7 @@ export default { > window[av_cat] = map_av_dt_filter(av_cat) > }) > >- $("#" + table_id).kohaTable( >+ let table = $("#" + table_id).kohaTable( > { > ajax: { > url: "/api/v1/erm/licenses", >@@ -140,6 +143,7 @@ export default { > }, > }, > ], >+ iDeferLoading: true, > columns: [ > { > title: __("Name"), >@@ -324,6 +328,15 @@ export default { > license_table_settings, > 1 > ) >+ >+ let table_dt = table.DataTable() >+ if (this.column_filters.vendor_id) { >+ table >+ .find('thead tr:eq(1) th[data-filter="vendors"] select') >+ .val(this.column_filters.vendor_id) >+ table_dt.column(1).search(this.column_filters.vendor_id) >+ } >+ table_dt.draw() > }, > }, > props: { >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33106
:
147631
|
148810
|
148944
|
148946
|
149371