Bug 32071 - Consistent classes for primary buttons: Catalog
Summary: Consistent classes for primary buttons: Catalog
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: Katrin Fischer
URL:
Keywords:
Depends on: 32148
Blocks: 32067
  Show dependency treegraph
 
Reported: 2022-11-02 12:05 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 32071: Consistent classes for primary buttons: Catalog (13.00 KB, patch)
2022-11-02 12:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Screenshots - where some changes are required (203.27 KB, application/pdf)
2022-11-05 23:40 UTC, David Nind
Details
Bug 32071: Consistent classes for primary buttons: Catalog (15.42 KB, patch)
2022-11-09 15:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 32071: Consistent classes for primary buttons: Catalog (15.47 KB, patch)
2022-11-10 09:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 32071: Consistent classes for primary buttons: Catalog (15.53 KB, patch)
2022-11-10 10:12 UTC, Katrin Fischer
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-02 12:05:13 UTC
As part of Bug 32067 - [OMNIBUS] Consistent classes for submit and/or primary buttons:

This patch will update buttons in catalog 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-02 12:14:09 UTC Comment hidden (obsolete)
Comment 2 David Nind 2022-11-05 23:40:35 UTC
Created attachment 143300 [details]
Screenshots - where some changes are required

I think these two things need looking at:

1. catalogue/moredetail.tt (items section for a record): alignment issue with 'Update' button for public and non-public note fields. See document with before and after screenshots attached.

2. catalogue/search-history.tt: Line 182 of catalogue/search-history.tt needs updating as well for the previous sessions for authority records, similar to previous sessions for catalog records. See document with screenshot attached.

Testing notes (using KTD).

1. These changed templates accessed from:
   Details view for a record
   Search results from a normal catalog search
   The cart
   User account menu (search history)
   
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/basket/ and koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/, 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 (I haven't attached this, but am happy to)
   - 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
   
3. Files changed:
   - basket/downloadcart.tt (No change. I couldn't find a link on the UI to get to this form, was able to access directly at http://127.0.0.1:8081/cgi-bin/koha/basket/downloadcart.pl, called from basket/downloadcart.pl)
   - basket/sendbasketform.tt (No change. Add some items to the cart. View the cart > Select all > Send.)
   - catalogue/advsearch.tt (Changed - search button now in orange. From the menu bar: Search > Advanced search.)
   - catalogue/detail.tt (Not determined. I couldn't figure out how to trigger or enable the "Download record" form/button.)
   - catalogue/itemsearch.tt (Changed - search button now in orange. Search (from the navigation bar at top of screen) > Item search).)
   - catalogue/moredetail.tt (Changed - Set status and Update buttons are larger. From the details page for a record select the 'Items' section.)
   - catalogue/results.tt (Minor change - search button is slightly bigger. Search the catalog, under the search results is 'Search withing results'.)
   - catalogue/search-history.tt (Changed - 'Delete' is now an orange button, dulled when no entries are selected, bright when entries are selected. Enable EnableSearchHistory. Do some catalog and authority searches. Log out and then log back in. Do some more catalog and authority searches. From the top navigation bar go to your user account drop down list in the top right-hand corner and select 'Search history'). 

4. Files not changed:
   - basket/basket.tt (Add some items to the cart. View the cart.)
   - basket/sendbasket.tt (This is the template for the body of the email message sent when sending a cart.)
   - catalogue/imageviewer.tt (Enable LocalCoverImages, upload a cover image for a record, triggered by clicking on the image displayed for the record and under the images tab.)
   - catalogue/ISBDdetail.tt (View the ISBD section for a record.)
   - catalogue/issuehistory.tt (View the checkout history section for a record.)
   - catalogue/itemsearch_csv.tt (Used to export details of items from Search > Item search > [enter search term] > search results page.) 
   - catalogue/itemsearch_json.tt (Used to export details of items from Search > Item search > [enter search term] > search results page.)
   - catalogue/labeledMARCdetail.tt (Enable viewLabeledMARC, view the labeled MARC section for a record.)
   - catalogue/MARCdetail.tt (View the MARC section for a record.)
   - catalogue/showmarc.tt (Click on 'Show' for 'MARC preview' in the normal details page for a record.)
   - catalogue/stockrotation.tt (Enable StockRotation and go to Cataloging > Stock rotation. Add a new rota. Add a stage to the rota. Add an item to the rota (Manage > Items > Add an item using barcode). View the rota section for a record.)

5. File count check:
   - Number of files in folder - basket: 4
   - Number of files listed - basket: 4 (only 2 changed in this patch)
   - Number of files in folder -  catalogue: 15
   - Number of files listed - catalogue: 15 (only 6 changed in this patch)

Questions/notes: 

1. basket/downloadcart.tt: I couldn't find a link on the UI to get to this form, was able to access directly at http://127.0.0.1:8081/cgi-bin/koha/basket/downloadcart.pl, called from basket/downloadcart.pl)

2. catalogue/detail.tt: I couldn't figure out how to trigger or enable the "Download record" form/button - I see a form that may be it that flashes up very briefly under the tabs section when viewing the details page for a record.

3. catalogue/moredetail.tt: alignment issue with 'Update' button for public and non-public note fields. See document with before and after screenshots attached.

4. catalogue/search-history.tt: Line 182 of catalogue/search-history.tt needs updating as well for the previous sessions for authority records, similar to previous sessions for catalog records. See document with screenshot attached.
Comment 3 Owen Leonard 2022-11-09 15:02:28 UTC
Created attachment 143518 [details] [review]
Bug 32071: Consistent classes for primary buttons: Catalog

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

Edit: This revised patch changes the button styles on the search history
page to make them more consistent with buttons in similar interfaces
(see catalog search results).

The patch also adds Bootstrap size classes to the item detail page and
removes some global CSS which targeted buttons on that page.

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

- Advanced search: The main search button at the top
- Search results: The "Search within results" submit button
- Bibliographic detail page: This change is to a hidden button. This
  section can be removed in a separate bug.
- Bibliographic detail page -> Items: Various "Update" and "Set status"
  buttons. Note that the alignment of buttons has not changed in the
  redesign.
- Item search: The main search button at the top
- Search history (from the logged-in user's menu in the top right):
  "Delete" buttons in each section
   - Catalog -- Current and previous sessions
   - Authority -- Current and previous sessions
- In the Cart popup window, click "Send." In the resulting popup, the
  "Send button.
- The template basket/downloadcart.tt has been modified but I think the
  template might be unused.
Comment 4 David Nind 2022-11-10 09:40:34 UTC
Created attachment 143630 [details] [review]
Bug 32071: Consistent classes for primary buttons: Catalog

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

Edit: This revised patch changes the button styles on the search history
page to make them more consistent with buttons in similar interfaces
(see catalog search results).

The patch also adds Bootstrap size classes to the item detail page and
removes some global CSS which targeted buttons on that page.

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

- Advanced search: The main search button at the top
- Search results: The "Search within results" submit button
- Bibliographic detail page: This change is to a hidden button. This
  section can be removed in a separate bug.
- Bibliographic detail page -> Items: Various "Update" and "Set status"
  buttons. Note that the alignment of buttons has not changed in the
  redesign.
- Item search: The main search button at the top
- Search history (from the logged-in user's menu in the top right):
  "Delete" buttons in each section
   - Catalog -- Current and previous sessions
   - Authority -- Current and previous sessions
- In the Cart popup window, click "Send." In the resulting popup, the
  "Send button.
- The template basket/downloadcart.tt has been modified but I think the
  template might be unused.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Katrin Fischer 2022-11-10 10:12:21 UTC
Created attachment 143632 [details] [review]
Bug 32071: Consistent classes for primary buttons: Catalog

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

Edit: This revised patch changes the button styles on the search history
page to make them more consistent with buttons in similar interfaces
(see catalog search results).

The patch also adds Bootstrap size classes to the item detail page and
removes some global CSS which targeted buttons on that page.

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

- Advanced search: The main search button at the top
- Search results: The "Search within results" submit button
- Bibliographic detail page: This change is to a hidden button. This
  section can be removed in a separate bug.
- Bibliographic detail page -> Items: Various "Update" and "Set status"
  buttons. Note that the alignment of buttons has not changed in the
  redesign.
- Item search: The main search button at the top
- Search history (from the logged-in user's menu in the top right):
  "Delete" buttons in each section
   - Catalog -- Current and previous sessions
   - Authority -- Current and previous sessions
- In the Cart popup window, click "Send." In the resulting popup, the
  "Send button.
- The template basket/downloadcart.tt has been modified but I think the
  template might be unused.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-11-10 13:06:39 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!