Bugzilla – Attachment 195363 Details for
Bug 42097
Add link to create new club from list of club templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 42097: Add link to create new club from list of club templates
Bug-42097-Add-link-to-create-new-club-from-list-of.patch (text/plain), 5.12 KB, created by
David Nind
on 2026-03-13 23:12:23 UTC
(
hide
)
Description:
Bug 42097: Add link to create new club from list of club templates
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-03-13 23:12:23 UTC
Size:
5.12 KB
patch
obsolete
>From 9cc4b0d8191fa8af61f473f6adfb76d3fbd45d6c Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <david@davidnind.com> >--- > .../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 @@ > <th>Public enrollment</th> > <th>Email required</th> > <th>Library</th> >- <th class="no-export no-sort">Actions</th> >+ [% IF ( CAN_user_clubs_edit_templates || CAN_user_clubs_edit_clubs ) %] >+ <th class="no-export no-sort">Actions</th> >+ [% END %] > </tr> > </thead> > <tbody> >@@ -96,12 +98,28 @@ > [% END %] > </td> > <td>[% Branches.GetName( t.branchcode ) | html %]</td> >- <td class="actions"> >- [% IF CAN_user_clubs_edit_templates %] >- <a class="btn btn-xs btn-default" style="white-space:nowrap" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id | html %]"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit </a> >- <a class="btn btn-xs btn-default delete_template" href="#" data-id="[% t.id | html %]" data-name="[% t.name | html %]"> <i class="fa fa-trash-can"></i> Delete </a> >- [% END %] >- </td> >+ [% IF ( CAN_user_clubs_edit_templates || CAN_user_clubs_edit_clubs ) %] >+ <td class="actions"> >+ <div class="btn-group dropup"> >+ <a class="btn btn-default btn-xs dropdown-toggle" id="template_actions_[% c.id | html %]" role="button" data-bs-toggle="dropdown" href="#"> Actions </a> >+ <ul class="dropdown-menu dropdown-menu-end" role="menu" aria-labelledby="template_actions_[% c.id | html %]"> >+ [% IF CAN_user_clubs_edit_templates %] >+ <li> >+ <a class="dropdown-item" href="/cgi-bin/koha/clubs/templates-add-modify.pl?id=[% t.id | html %]"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit </a> >+ </li> >+ <li> >+ <a class="dropdown-item delete_template" href="#" data-id="[% t.id | html %]" data-name="[% t.name | html %]"> <i class="fa fa-trash-can"></i> Delete </a> >+ </li> >+ [% END %] >+ [% IF CAN_user_clubs_edit_clubs %] >+ <li> >+ <a class="dropdown-item" href="/cgi-bin/koha/clubs/clubs-add-modify.pl?club_template_id=[% t.id | html %]"><i class="fa fa-plus" aria-hidden="true"></i> New club</a> >+ </li> >+ [% END %] >+ </ul> >+ </div> >+ </td> >+ [% END %] > </tr> > [% END %] > </tbody> >-- >2.39.5
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 42097
:
195346
| 195363