Bugzilla – Attachment 149965 Details for
Bug 33417
Create one standard Toolbar component
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33417: Add toolbar imports and options
Bug-33417-Add-toolbar-imports-and-options.patch (text/plain), 6.21 KB, created by
Martin Renvoize (ashimema)
on 2023-04-20 13:31:08 UTC
(
hide
)
Description:
Bug 33417: Add toolbar imports and options
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-04-20 13:31:08 UTC
Size:
6.21 KB
patch
obsolete
>From 7a2d3aac3a54b2882551712796ca3870dbe6d985 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Wed, 5 Apr 2023 12:04:20 +0000 >Subject: [PATCH] Bug 33417: Add toolbar imports and options > >This commit amends the required files to import the toolbar and add the >correct options > >Test plan as above > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/js/vue/components/ERM/AgreementsList.vue | 12 ++++++++++-- > .../components/ERM/EHoldingsLocalPackagesList.vue | 10 ++++++++-- > .../components/ERM/EHoldingsLocalTitlesList.vue | 14 ++++++++++++-- > .../prog/js/vue/components/ERM/LicensesList.vue | 10 ++++++++-- > 4 files changed, 38 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >index b9a6736244..287dd61283 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >@@ -1,7 +1,7 @@ > <template> > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="agreements_list"> >- <Toolbar v-if="!embedded" /> >+ <Toolbar v-if="!embedded" :options="this.toolbar_options" /> > <fieldset v-if="agreement_count > 0" class="filters"> > <label for="expired_filter">{{ $__("Filter by expired") }}:</label> > <input >@@ -50,7 +50,7 @@ > > <script> > import flatPickr from "vue-flatpickr-component" >-import Toolbar from "./AgreementsToolbar.vue" >+import Toolbar from "../Toolbar.vue" > import { inject, ref, reactive } from "vue" > import { APIClient } from "../../fetch/api-client.js" > import { storeToRefs } from "pinia" >@@ -147,6 +147,14 @@ export default { > }, > }, > }, >+ before_route_entered: false, >+ building_table: false, >+ toolbar_options: [ >+ { >+ to: "AgreementsFormAdd", >+ button_title: "New agreement", >+ }, >+ ], > } > }, > beforeRouteEnter(to, from, next) { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue >index 8e35e26792..e9c805ecff 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalPackagesList.vue >@@ -2,7 +2,7 @@ > <div> > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="packages_list"> >- <Toolbar /> >+ <Toolbar :options="this.toolbar_options" /> > <div > v-if="package_count > 0" > id="package_list_result" >@@ -24,7 +24,7 @@ > </template> > > <script> >-import Toolbar from "./EHoldingsLocalPackagesToolbar.vue" >+import Toolbar from "../Toolbar.vue" > import { inject, ref, reactive } from "vue" > import { storeToRefs } from "pinia" > import { APIClient } from "../../fetch/api-client.js" >@@ -98,6 +98,12 @@ export default { > "-1": ["edit", "delete"], > }, > }, >+ toolbar_options: [ >+ { >+ to: "EHoldingsLocalPackagesFormAdd", >+ button_title: "New package", >+ }, >+ ], > } > }, > beforeRouteEnter(to, from, next) { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue >index a6a4a865f0..13fba1793d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitlesList.vue >@@ -2,7 +2,7 @@ > <div> > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="titles_list"> >- <Toolbar /> >+ <Toolbar :options="this.toolbar_options" /> > <div > v-if="title_count > 0" > id="title_list_result" >@@ -24,7 +24,7 @@ > </template> > > <script> >-import Toolbar from "./EHoldingsLocalTitlesToolbar.vue" >+import Toolbar from "../Toolbar.vue" > import { inject, ref, reactive } from "vue" > import { storeToRefs } from "pinia" > import { APIClient } from "../../fetch/api-client.js" >@@ -90,6 +90,16 @@ export default { > }, > }, > cannot_search: false, >+ toolbar_options: [ >+ { >+ to: "EHoldingsLocalTitlesFormAdd", >+ button_title: "New title", >+ }, >+ { >+ to: "EHoldingsLocalTitlesFormImport", >+ button_title: "Import from list", >+ }, >+ ], > } > }, > beforeRouteEnter(to, from, next) { >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 78acd16c48..bce7a1e3c7 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 >@@ -1,7 +1,7 @@ > <template> > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="licenses_list"> >- <Toolbar /> >+ <Toolbar :options="this.toolbar_options" /> > <div v-if="license_count > 0" class="page-section"> > <KohaTable > ref="table" >@@ -18,7 +18,7 @@ > </template> > > <script> >-import Toolbar from "./LicensesToolbar.vue" >+import Toolbar from "../Toolbar.vue" > import { inject, ref } from "vue" > import { storeToRefs } from "pinia" > import { APIClient } from "../../fetch/api-client.js" >@@ -50,6 +50,12 @@ export default { > return { > license_count: 0, > initialized: false, >+ toolbar_options: [ >+ { >+ to: "LicensesFormAdd", >+ button_title: "New license", >+ }, >+ ], > tableOptions: { > columns: this.getTableColumns(), > url: "/api/v1/erm/licenses", >-- >2.40.0
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 33417
:
149193
|
149194
|
149195
|
149212
|
149215
|
149217
|
149229
|
149936
|
149937
|
149938
|
149939
|
149964
|
149965
|
149966
|
149967
|
152244
|
152245
|
152246
|
152247