From 9cc4b0d8191fa8af61f473f6adfb76d3fbd45d6c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 13 Mar 2026 13:04:55 -0400 Subject: [PATCH] Bug 42097: Add link to create new club from list of club templates This patch adds a "New club" button to the list of club templates. This makes it easy to create a new club using any of the templates in the list. To test, apply the patch and go to Tools -> Patron clubs. - Create a club template if necessary. - On the patron clubs main page, in the list of club templates, there should be an "Actions" menu in the last table cell. - Now alongside "Edit" and "Delete" you should see "New club" - Choosing "New club" should take you to the new club form with the heading "Create a new [you template name] club" - The permissions around the "Edit" and "Delete" controls haven't changed, but the "New club" control depends on the user having CAN_user_clubs_edit_clubs permission. - Test as a user without CAN_user_clubs_edit_clubs permission to confirm that the "New club" control is omitted. - Test as a user with only CAN_user_clubs_edit_clubs permission to confirm that the edit and delete buttons are missing. - Test as a user with only CAN_user_clubs_enroll permission. There should be no actions column in the table of club templates. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind --- .../prog/en/modules/clubs/clubs.tt | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt index a1c911bc93..76d5d2a58f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/clubs/clubs.tt @@ -73,7 +73,9 @@ Public enrollment Email required Library - Actions + [% IF ( CAN_user_clubs_edit_templates || CAN_user_clubs_edit_clubs ) %] + Actions + [% END %] @@ -96,12 +98,28 @@ [% END %] [% Branches.GetName( t.branchcode ) | html %] - - [% IF CAN_user_clubs_edit_templates %] - Edit - Delete - [% END %] - + [% IF ( CAN_user_clubs_edit_templates || CAN_user_clubs_edit_clubs ) %] + +
+ Actions + +
+ + [% END %] [% END %] -- 2.39.5