Bugzilla – Attachment 174359 Details for
Bug 38010
Migrate vendors to Vue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38010: Add dropdown button component
Bug-38010-Add-dropdown-button-component.patch (text/plain), 4.48 KB, created by
Matt Blenkinsop
on 2024-11-11 15:01:05 UTC
(
hide
)
Description:
Bug 38010: Add dropdown button component
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-11-11 15:01:05 UTC
Size:
4.48 KB
patch
obsolete
>From fb3d827c8dbb98620e2ae56bda6c2f9943b91161 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Fri, 8 Nov 2024 11:25:45 +0000 >Subject: [PATCH] Bug 38010: Add dropdown button component > >--- > .../js/vue/components/DropdownButtons.vue | 30 ++++++++++++ > .../js/vue/components/Vendors/VendorShow.vue | 47 ++++++++++--------- > 2 files changed, 55 insertions(+), 22 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/js/vue/components/DropdownButtons.vue > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/DropdownButtons.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/DropdownButtons.vue >new file mode 100644 >index 00000000000..288885efa58 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/DropdownButtons.vue >@@ -0,0 +1,30 @@ >+<template> >+ <div class="btn-group"> >+ <a >+ class="btn btn-default dropdown-toggle" >+ data-bs-toggle="dropdown" >+ href="#" >+ ><i class="fa fa-plus"></i> New</a >+ > >+ <ul class="dropdown-menu"> >+ <li v-for="(item, index) in items" :key="index"> >+ <ButtonLink >+ :to="item.to" >+ :title="$__(item.title)" >+ :callback="item.callback" >+ /> >+ </li> >+ </ul> >+ </div> >+</template> >+ >+<script> >+import ButtonLink from "./ButtonLink.vue" >+ >+export default { >+ components: { ButtonLink }, >+ props: ["items"], >+} >+</script> >+ >+<style></style> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue >index f350e43d2e5..967329897c7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorShow.vue >@@ -2,10 +2,29 @@ > <div v-if="!initialized">{{ $__("Loading") }}</div> > <div v-else id="vendors_show"> > <Toolbar> >- <ButtonLink >- :to="{ name: 'VendorFormAdd' }" >- icon="plus" >- :title="$__('New vendor')" >+ <DropdownButtons >+ :items="[ >+ { >+ to: { >+ path: '/cgi-bin/koha/acqui/basketheader.pl', >+ query: { booksellerid: vendor.id, op: 'add_form' }, >+ }, >+ title: 'Basket', >+ callback: 'redirect', >+ }, >+ { >+ to: { >+ path: '/cgi-bin/koha/admin/aqcontract.pl', >+ query: { booksellerid: vendor.id, op: 'add_form' }, >+ }, >+ title: 'Contract', >+ callback: 'redirect', >+ }, >+ { >+ to: { name: 'VendorFormAdd' }, >+ title: 'Vendor', >+ }, >+ ]" > /> > <ButtonLink > :to="{ >@@ -15,24 +34,6 @@ > icon="pencil" > :title="$__('Edit vendor')" > /> >- <ButtonLink >- :to="{ >- path: '/cgi-bin/koha/acqui/basketheader.pl', >- query: { booksellerid: vendor.id, op: 'add_form' }, >- }" >- icon="plus" >- :title="$__('New basket')" >- callback="redirect" >- /> >- <ButtonLink >- :to="{ >- path: '/cgi-bin/koha/admin/aqcontract.pl', >- query: { booksellerid: vendor.id, op: 'add_form' }, >- }" >- icon="plus" >- :title="$__('New contract')" >- callback="redirect" >- /> > <ButtonLink > :to="{ > path: '/cgi-bin/koha/acqui/parcels.pl', >@@ -91,6 +92,7 @@ import VendorContacts from "./VendorContacts.vue" > import VendorSubscriptions from "./VendorSubscriptions.vue" > import VendorContracts from "./VendorContracts.vue" > import VendorBaskets from "./VendorBaskets.vue" >+import DropdownButtons from "../DropdownButtons.vue" > > export default { > setup() { >@@ -146,6 +148,7 @@ export default { > components: { > Toolbar, > ButtonLink, >+ DropdownButtons, > VendorDetails, > VendorOrderingInformation, > VendorInterfaces, >-- >2.39.3 (Apple Git-146)
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 38010
:
174119
|
174120
|
174121
|
174122
|
174123
|
174124
|
174125
|
174126
|
174128
|
174129
|
174130
|
174131
|
174132
|
174133
|
174134
|
174135
|
174136
|
174137
|
174138
|
174139
|
174140
|
174141
|
174142
|
174143
|
174144
|
174145
|
174146
|
174147
|
174148
|
174151
|
174152
|
174153
|
174154
|
174155
|
174156
|
174157
|
174158
|
174159
|
174160
|
174161
|
174162
|
174163
|
174164
|
174165
|
174166
|
174167
|
174168
|
174169
|
174170
|
174171
|
174172
|
174173
|
174174
|
174175
|
174176
|
174177
|
174178
|
174179
|
174194
|
174196
|
174197
|
174198
|
174199
|
174200
|
174201
|
174202
|
174203
|
174204
|
174205
|
174206
|
174207
|
174208
|
174209
|
174210
|
174211
|
174212
|
174213
|
174214
|
174215
|
174216
|
174217
|
174218
|
174220
|
174221
|
174222
|
174223
|
174224
|
174225
|
174226
|
174248
|
174266
|
174267
|
174269
|
174270
|
174273
|
174327
|
174328
|
174329
|
174330
|
174331
|
174332
|
174333
|
174334
|
174335
|
174336
|
174337
|
174338
|
174339
|
174340
|
174341
|
174342
|
174343
|
174344
|
174345
|
174346
|
174347
|
174348
|
174349
|
174350
|
174351
|
174352
|
174353
|
174354
|
174355
|
174356
|
174357
|
174358
| 174359 |
174360
|
174603