Created attachment 110377 [details] Screen grab showing operation of the toggle button and split button The button toolbar on SQL report pages is getting very crowded. I would like to move "Duplicate" and "Delete" into a split button menu with "Edit" as the primary function. I would also like to use Bootstrap's toggle button feature for the "Show/Hide SQL" button. See attached screen recording.
I really like the toggle on the hide/show and see no better option than to group the others in Edit like suggested. I wonder if there is something neat we could do to the chart ones as they are quite big.
Created attachment 132054 [details] [review] Bug 26486: Group edit buttons in reports toolbar This patch modifies the reports interface to change the reports toolbar in two ways: 1. The Edit, Duplicate, and Delete buttons are now combined into a button menu. My original idea was to have it be a split button, but the logic for handling various permissions made the template logic too convoluted. 2. The "Show SQL code" button is converted to a "Single toggle" button (https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle). This type of button is specifically designed for this kind of interface element. This patch includes indendation changes, so please diff accordingly. To test, apply the patch and go to Reports -> Saved reports. - Logged in as a user with Create and Delete report permissions: - View an SQL report. In the toolbar you should see an "Edit" button menu with three options: Edit, Duplicate, and Delete. Check that all work correctly, including a deletion JavaScript confirmation dialog. - Logged in as a user with Create but not Delete report permissions, you should see an "Edit" button menu with two choices: Edit and Duplicate. - Logged in as a user with Delete but not Create report permission (??) you should see only a standalone delete button. - Logged in as a user with Execute report permission, run an SQL report. Test the "Show SQL code" button. The text should change to "Hide SQL code" and the button should be styled to look like its "pressed" state.
Created attachment 134794 [details] [review] Bug 26486: Group edit buttons in reports toolbar This patch modifies the reports interface to change the reports toolbar in two ways: 1. The Edit, Duplicate, and Delete buttons are now combined into a button menu. My original idea was to have it be a split button, but the logic for handling various permissions made the template logic too convoluted. 2. The "Show SQL code" button is converted to a "Single toggle" button (https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle). This type of button is specifically designed for this kind of interface element. This patch includes indendation changes, so please diff accordingly. To test, apply the patch and go to Reports -> Saved reports. - Logged in as a user with Create and Delete report permissions: - View an SQL report. In the toolbar you should see an "Edit" button menu with three options: Edit, Duplicate, and Delete. Check that all work correctly, including a deletion JavaScript confirmation dialog. - Logged in as a user with Create but not Delete report permissions, you should see an "Edit" button menu with two choices: Edit and Duplicate. - Logged in as a user with Delete but not Create report permission (??) you should see only a standalone delete button. - Logged in as a user with Execute report permission, run an SQL report. Test the "Show SQL code" button. The text should change to "Hide SQL code" and the button should be styled to look like its "pressed" state. Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 135112 [details] [review] Bug 26486: Group edit buttons in reports toolbar This patch modifies the reports interface to change the reports toolbar in two ways: 1. The Edit, Duplicate, and Delete buttons are now combined into a button menu. My original idea was to have it be a split button, but the logic for handling various permissions made the template logic too convoluted. 2. The "Show SQL code" button is converted to a "Single toggle" button (https://getbootstrap.com/docs/3.3/javascript/#buttons-single-toggle). This type of button is specifically designed for this kind of interface element. This patch includes indendation changes, so please diff accordingly. To test, apply the patch and go to Reports -> Saved reports. - Logged in as a user with Create and Delete report permissions: - View an SQL report. In the toolbar you should see an "Edit" button menu with three options: Edit, Duplicate, and Delete. Check that all work correctly, including a deletion JavaScript confirmation dialog. - Logged in as a user with Create but not Delete report permissions, you should see an "Edit" button menu with two choices: Edit and Duplicate. - Logged in as a user with Delete but not Create report permission (??) you should see only a standalone delete button. - Logged in as a user with Execute report permission, run an SQL report. Test the "Show SQL code" button. The text should change to "Hide SQL code" and the button should be styled to look like its "pressed" state. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for 22.05.04
pushed to 21.11.x for 21.11.11
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.
Screenshots that show this seem to already have been updated.