Bug 32097 - Consistent classes for primary buttons: Lists
Summary: Consistent classes for primary buttons: Lists
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 32067
  Show dependency treegraph
 
Reported: 2022-11-03 14:54 UTC by Owen Leonard
Modified: 2023-06-08 22:28 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:


Attachments
Bug 32097: Consistent classes for primary buttons: Lists (5.02 KB, patch)
2022-11-03 14:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32097: Consistent classes for primary buttons: Lists (5.07 KB, patch)
2022-11-07 13:48 UTC, David Nind
Details | Diff | Splinter Review
Screnshots - pages before patch applied (136.74 KB, application/pdf)
2022-11-07 13:53 UTC, David Nind
Details
Bug 32097: Consistent classes for primary buttons: Lists (5.13 KB, patch)
2022-11-09 17:49 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-11-03 14:54:12 UTC
As part of Bug 32067 - [OMNIBUS] Consistent classes for submit and/or primary buttons:

This patch will update buttons in lists templates so that buttons which are currently styled as primary buttons will have the the "btn btn-primary" classes.

In some places, the classes have been added to buttons which were not input[type='submit'] but which should be styled as primary.
Comment 1 Owen Leonard 2022-11-03 14:59:12 UTC
Created attachment 143125 [details] [review]
Bug 32097: Consistent classes for primary buttons: Lists

This patch makes changes the button markup in lists templates so that
all submit buttons and any buttons that should should be styled as
primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view lists pages to confirm that everything
looks correct. In most cases there are no visible changes.
Comment 2 David Nind 2022-11-07 13:48:56 UTC
Created attachment 143368 [details] [review]
Bug 32097: Consistent classes for primary buttons: Lists

This patch makes changes the button markup in lists templates so that
all submit buttons and any buttons that should should be styled as
primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view lists pages to confirm that everything
looks correct. In most cases there are no visible changes.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-11-07 13:51:21 UTC
Testing notes (using KTD).

1. These changed templates accessed from: Lists
   
2. I tested by:
   - Reviewing the patch - <input type="submit"... becomes <input type="submit" class="btn btn-primary"...
   - Listing the templates in koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/ and splitting into two lists - those changed and those not changed
   - Working out how to access them
   - Creating screenshots and putting them in a document 
   - Applying the patch (+ flush_memcached, restart_all, and cleared browser cache)
   - Going through the list of files again: compared to original screenshot taken, then noted whether changed or not
   - Noting any questions - these don't affect the sign off for this bug
   
3. Files changed - no visible changes noticed:
   - ../../includes/virtualshelves/merge/selection.tt (Not sure how to trigger the dislay of this one - not referenced by any files (git grep selection.tt ":(exclude)*.po"))
   - addbybiblionumber.tt (Lists > select a list > Add items > modal window to add using barcodes or biblio number)
   - downloadshelf.tt (No visible change. Not sure how to display from the lists area - standard formats and CSV profiles download automatically without a separate a form/page. Accessed directly using http://127.0.0.1:8081/cgi-bin/koha/virtualshelves/downloadshelf.pl?shelfnumber=1)
   - sendshelfform.tt (No visible change. Lists > select a list to view > Send list) 
   - shelves.tt
     . Lists homepage (No visible change. Lists)
     . Create a new list (No visible change. Lists > New list > enter details > Save)
     . Edit list (No visible change. Lists > select a list > Edit > Edit list) 
     . Transfer ownership (No visible change. Lists > select a public list > Transfer action > search for new owner > Transfer)
     . Add items to another list (No visible change. Lists > view a list with more than one item > select two or more items > from the toolbar select the list to add to > Save - pop up window appears with options to save or cancel)
     . Place a hold (select one or more items in a list > select 'Place hold' from the toolbar > taken to Catalog area to complete the holds actions)
     . Merge selected (select one or more items in a list > select 'Merge selected' from the toolbar > taken to Cataloguing area to start the merging records process)
   
4. Files not changed:
   - tables/shelves_results.tt (used to generate the list of lists under Your lists and Public lists - no submit buttons)
   - sendshelf.tt (no buttons - message sent when sending list)

5. File count check:
   - Number of files in folder: 5 + 1 in tables directory + 1 in merge directory = 7
   - Number of files listed: 7 (5 changed in this patch)

Questions

1. Should the buttons be in the div or outisde the div? Those in the white background are:
   - Transfer ownership: Lists > select a public list > Transfer action > search for new owner > Transfer
Comment 4 David Nind 2022-11-07 13:53:39 UTC
Created attachment 143369 [details]
Screnshots - pages before patch applied

This attachment has screenshots of pages before the patch was applied.

No visible changes noticed for any of the files changed.
Comment 5 Tomás Cohen Arazi (tcohen) 2022-11-09 17:49:10 UTC
Created attachment 143560 [details] [review]
Bug 32097: Consistent classes for primary buttons: Lists

This patch makes changes the button markup in lists templates so that
all submit buttons and any buttons that should should be styled as
primary buttons have the Bootstrap class "btn btn-primary."

To test, apply the patch and view lists pages to confirm that everything
looks correct. In most cases there are no visible changes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-11-09 18:29:56 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!