Bugzilla – Attachment 156668 Details for
Bug 30708
Creation of a new 'Preservation' module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30708: Rebase - Rewrite toolbar
Bug-30708-Rebase---Rewrite-toolbar.patch (text/plain), 6.89 KB, created by
Marcel de Rooy
on 2023-10-07 06:41:46 UTC
(
hide
)
Description:
Bug 30708: Rebase - Rewrite toolbar
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-10-07 06:41:46 UTC
Size:
6.89 KB
patch
obsolete
>From 7cf97529fd8b6dd31b029bb336d7725886285783 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 6 Jul 2023 10:01:31 +0200 >Subject: [PATCH] Bug 30708: Rebase - Rewrite toolbar >Content-Type: text/plain; charset=utf-8 > >Bug 33417 has changed how we handle the toolbars in Vue apps, this patch >is adjusting the 'Preservation' module code on top of it, but also adds >to make it more flexible (see bug 34215). > >Signed-off-by: Laurence Rault <laurence.rault@biblibre.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../components/Preservation/TrainsList.vue | 13 ++++++++--- > .../components/Preservation/TrainsShow.vue | 23 +++++++++++-------- > .../components/Preservation/TrainsToolbar.vue | 16 ------------- > .../components/Preservation/WaitingList.vue | 7 +++--- > 4 files changed, 27 insertions(+), 32 deletions(-) > delete mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsToolbar.vue > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsList.vue >index 3868b5b911..77a84c5010 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsList.vue >@@ -1,7 +1,13 @@ > <template> > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="trains_list"> >- <Toolbar /> >+ <Toolbar> >+ <ToolbarButton >+ to="/cgi-bin/koha/preservation/trains/add" >+ icon="plus" >+ :title="$__('New train')" >+ /> >+ </Toolbar> > <fieldset v-if="count_trains > 0" class="filters"> > <label>{{ $__("Filter by") }}:</label> > <input >@@ -54,7 +60,8 @@ > > <script> > import flatPickr from "vue-flatpickr-component" >-import Toolbar from "./TrainsToolbar.vue" >+import Toolbar from "../Toolbar.vue" >+import ToolbarButton from "../ToolbarButton.vue" > import { inject, ref, reactive } from "vue" > import { APIClient } from "../../fetch/api-client" > import { build_url } from "../../composables/datatables" >@@ -265,7 +272,7 @@ export default { > ] > }, > }, >- components: { flatPickr, Toolbar, KohaTable }, >+ components: { flatPickr, Toolbar, ToolbarButton, KohaTable }, > name: "trainsList", > emits: ["select-train", "close"], > } >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue >index c006ac121c..60ee1462a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsShow.vue >@@ -47,14 +47,14 @@ > </transition> > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="trains_show"> >- <div id="toolbar" class="btn-toolbar"> >- <router-link >+ <Toolbar> >+ <ToolbarButton > v-if="train.closed_on == null" > :to="`/cgi-bin/koha/preservation/trains/${train.train_id}/items/add`" > class="btn btn-default" >- ><font-awesome-icon icon="plus" /> >- {{ $__("Add items") }}</router-link >- > >+ icon="plus" >+ :title="$__('Add items')" >+ /> > <span > v-else > class="btn btn-default" >@@ -63,12 +63,12 @@ > > > <font-awesome-icon icon="plus" /> {{ $__("Add items") }} > </span> >- <router-link >+ <ToolbarButton > :to="`/cgi-bin/koha/preservation/trains/edit/${train.train_id}`" > class="btn btn-default" >- ><font-awesome-icon icon="pencil" /> >- {{ $__("Edit") }}</router-link >- > >+ icon="pencil" >+ :title="$__('Edit')" >+ /> > <a @click="deleteTrain(train)" class="btn btn-default" > ><font-awesome-icon icon="trash" /> {{ $__("Delete") }}</a > > >@@ -90,7 +90,7 @@ > @click="receiveTrain" > ><font-awesome-icon icon="inbox" /> {{ $__("Receive") }}</a > > >- </div> >+ </Toolbar> > <h2> > {{ $__("Train #%s").format(train.train_id) }} > </h2> >@@ -213,6 +213,8 @@ > import { inject, createVNode, render } from "vue" > import { APIClient } from "../../fetch/api-client" > import { useDataTable } from "../../composables/datatables" >+import Toolbar from "../Toolbar.vue" >+import ToolbarButton from "../ToolbarButton.vue" > > export default { > setup() { >@@ -547,6 +549,7 @@ export default { > }) > }, > }, >+ components: { Toolbar, ToolbarButton }, > name: "TrainsShow", > } > </script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsToolbar.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsToolbar.vue >deleted file mode 100644 >index 874b829976..0000000000 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsToolbar.vue >+++ /dev/null >@@ -1,16 +0,0 @@ >-<template> >- <div id="toolbar" class="btn-toolbar"> >- <router-link >- to="/cgi-bin/koha/preservation/trains/add" >- class="btn btn-default" >- ><font-awesome-icon icon="plus" /> >- {{ $__("New train") }}</router-link >- > >- </div> >-</template> >- >-<script> >-export default { >- name: "TrainsToolbar", >-} >-</script> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue >index a290ca5615..c62b0a1751 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/WaitingList.vue >@@ -85,7 +85,7 @@ > {{ $__("You need to configure this module first.") }} > </div> > <div v-else id="waiting-list"> >- <div id="toolbar" class="btn-toolbar"> >+ <Toolbar> > <a > class="btn btn-default" > @click="show_modal_add_to_waiting_list = true" >@@ -103,7 +103,7 @@ > ) > }}</a > > >- </div> >+ </Toolbar> > <div v-if="count_waiting_list_items > 0" class="page-section"> > <KohaTable > ref="table" >@@ -119,6 +119,7 @@ > > <script> > import flatPickr from "vue-flatpickr-component" >+import Toolbar from "../Toolbar.vue" > import { inject, ref } from "vue" > import { storeToRefs } from "pinia" > import { APIClient } from "../../fetch/api-client" >@@ -294,7 +295,7 @@ export default { > ] > }, > }, >- components: { flatPickr, KohaTable }, >+ components: { flatPickr, KohaTable, Toolbar }, > name: "WaitingList", > } > </script> >-- >2.30.2
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 30708
:
134715
|
134716
|
134732
|
134733
|
134734
|
134736
|
134737
|
134738
|
134782
|
134783
|
134784
|
134785
|
152939
|
152940
|
152941
|
152942
|
152943
|
152944
|
152945
|
152946
|
152947
|
152948
|
152949
|
152950
|
152951
|
152952
|
152953
|
152954
|
152955
|
152956
|
152957
|
152958
|
152959
|
152960
|
152961
|
152962
|
152963
|
152964
|
152965
|
152966
|
152967
|
152968
|
152969
|
152970
|
153102
|
153576
|
154167
|
154168
|
154169
|
154170
|
154171
|
154172
|
154173
|
154174
|
154175
|
154176
|
154177
|
154178
|
154179
|
154180
|
154181
|
154182
|
154183
|
154184
|
154185
|
154186
|
154187
|
154188
|
154189
|
154190
|
154191
|
154192
|
154193
|
154194
|
154195
|
154196
|
154197
|
154198
|
154199
|
154200
|
154201
|
154202
|
154203
|
156592
|
156596
|
156597
|
156636
|
156637
|
156638
|
156639
|
156640
|
156641
|
156642
|
156643
|
156644
|
156645
|
156646
|
156647
|
156648
|
156649
|
156650
|
156651
|
156652
|
156653
|
156654
|
156655
|
156656
|
156657
|
156658
|
156659
|
156660
|
156661
|
156662
|
156663
|
156664
|
156665
|
156666
|
156667
| 156668 |
156669
|
156670
|
156671
|
156672
|
156673
|
156674
|
156675
|
157502
|
157503
|
157506
|
157508
|
157512
|
157514
|
157557