Bugzilla – Attachment 170516 Details for
Bug 37513
Disable 'Delete' button if the record source cannot be deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37513: Only display delete button if usage_count == 0
Bug-37513-Only-display-delete-button-if-usagecount.patch (text/plain), 1.67 KB, created by
David Nind
on 2024-08-21 05:06:06 UTC
(
hide
)
Description:
Bug 37513: Only display delete button if usage_count == 0
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-08-21 05:06:06 UTC
Size:
1.67 KB
patch
obsolete
>From be60ca64da70940e4165919090b89efae0ccc1ac Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 19 Aug 2024 14:52:24 -0300 >Subject: [PATCH] Bug 37513: Only display delete button if usage_count == 0 > >Signed-off-by: David Nind <david@davidnind.com> >--- > .../js/vue/components/Admin/RecordSources/List.vue | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue >index a1595b9e64..b5d7846d55 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/List.vue >@@ -35,6 +35,7 @@ export default { > return { > title: this.$__("Record sources"), > tableOptions: { >+ options: { embed: "usage_count" }, > columns: [ > { > title: this.$__("ID"), >@@ -59,7 +60,16 @@ export default { > }, > ], > actions: { >- "-1": ["edit", "delete"], >+ "-1": [ >+ "edit", >+ { >+ delete: { >+ text: this.$__("Delete"), >+ icon: "fa fa-trash", >+ should_display: row => row.usage_count == 0, >+ }, >+ }, >+ ], > }, > url: "/api/v1/record_sources", > }, >-- >2.39.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 37513
:
170475
|
170476
|
170477
|
170478
|
170479
|
170512
|
170513
|
170514
|
170515
|
170516
|
170544
|
170545
|
170546
|
170547
|
170548
|
171205
|
171236