Summary: | Add classes to each NEEDSCONFIRM message for easier styling in circ/circulation.tt | ||
---|---|---|---|
Product: | Koha | Reporter: | Donna <bwsdonna> |
Component: | Hold requests | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | RESOLVED FIXED | QA Contact: | Kyle M Hall (khall) <kyle> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, gmcharlt, kebliss, kyle, lucas, philip.orr, sally.healey |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This patch adds a unique class to each "needs confirmation" message shown in circulation. Previously the only selector for any circulation message needing confirmation was #circ_needsconfirmation, so CSS or jQuery targeting only a single specific message was not easy to do.
With this patch you can directly target the new unique class selector for the specific message found behind the class element .needsconfirm.
|
Version(s) released in: |
24.05.00,23.11.06
|
Circulation function: | |||
Attachments: |
warning box for example two
warning box for example 1 Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt Bug 31981: (follow-up) Fix typo in class name |
Created attachment 142658 [details]
warning box for example 1
These look the same because they are the same! ( #circ_needsconfirmation ) If something NEEDSCONFIRMATION Koha will then cycle through all the possible things. In your care I believe it is: 1. [% IF ( RESERVED ) %] Item has been on hold for X since... 2. [% IF ( RESERVE_WAITING ) %] Item has been waiting for... I think we could add a ID/class to each of the NEEDSCONFIRMATION reasons. This would make it much easier to customize the dialog/alert boxes based on the reason. Would that work? Absolutely! Anything that would make it easier for libraries to distinguish would work! Created attachment 163647 [details] [review] Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt This patch adds a 'needsconfirm' class and a unique class to each NEEDSCONFIRM message on circ/circulation.tt to make these easier to style individually. To test: 1. APPLY patch 2. Review the diff to see each of the NEEDSCONFIRMATION messages. 3. Add some CSS to IntranetUserCSS like this: .needsconfirm { padding: 1em; color: #fff; } .reserved { background: blue; } .debt { background: red; } .reserve_waiting { background: orange; } .rentalcharge { background: purple; } .renew_issue { background: limegreen; } 4. Place a hold on an item for Patron A, do not trigger the hold, and check the item out to Patron B. The message background is blue. 5. Then check the item in, confirm the hold, then check the item out to Patron B. The message background is orange 6. Check something out that is already checked out to that patron, message background is lime green. 7. Have too much debt and check something out to a patron, message is red. Note: There are plenty more NEEDSCONFIRMATION messages but I don't think we need to test every single one. Note: These background colors are more testing purposes only. Created attachment 163653 [details] [review] Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt This patch adds a 'needsconfirm' class and a unique class to each NEEDSCONFIRM message on circ/circulation.tt to make these easier to style individually. To test: 1. APPLY patch 2. Review the diff to see each of the NEEDSCONFIRMATION messages. 3. Add some CSS to IntranetUserCSS like this: .needsconfirm { padding: 1em; color: #fff; } .reserved { background: blue; } .debt { background: red; } .reserve_waiting { background: orange; } .rentalcharge { background: purple; } .renew_issue { background: limegreen; } 4. Place a hold on an item for Patron A, do not trigger the hold, and check the item out to Patron B. The message background is blue. 5. Then check the item in, confirm the hold, then check the item out to Patron B. The message background is orange 6. Check something out that is already checked out to that patron, message background is lime green. 7. Have too much debt and check something out to a patron, message is red. Note: There are plenty more NEEDSCONFIRMATION messages but I don't think we need to test every single one. Note: These background colors are more testing purposes only. Signed-off-by: Donna <donna@bywatersolutions.com> Beautiful! Works as expected, and if there are two notices, both color boxes show on the modal. Only adds CSS classes, reviewed closely. Created attachment 166307 [details] [review] Bug 31981: Add classes to each NEEDSCONFIRM message in circ/circulation.tt This patch adds a 'needsconfirm' class and a unique class to each NEEDSCONFIRM message on circ/circulation.tt to make these easier to style individually. To test: 1. APPLY patch 2. Review the diff to see each of the NEEDSCONFIRMATION messages. 3. Add some CSS to IntranetUserCSS like this: .needsconfirm { padding: 1em; color: #fff; } .reserved { background: blue; } .debt { background: red; } .reserve_waiting { background: orange; } .rentalcharge { background: purple; } .renew_issue { background: limegreen; } 4. Place a hold on an item for Patron A, do not trigger the hold, and check the item out to Patron B. The message background is blue. 5. Then check the item in, confirm the hold, then check the item out to Patron B. The message background is orange 6. Check something out that is already checked out to that patron, message background is lime green. 7. Have too much debt and check something out to a patron, message is red. Note: There are plenty more NEEDSCONFIRMATION messages but I don't think we need to test every single one. Note: These background colors are more testing purposes only. Signed-off-by: Donna <donna@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Sorry, it looks like I forgot to switch to PQA and then the script didn#t update it. This is pushed already. Did you change something in the patch or just a sign-off? https://git.koha-community.org/Koha-community/Koha/commits/branch/main/search?q=31981 Very useful small enhancement, Pushed to 23.11.x for 23.11.06 Only looked at the diff while writing release notes. But: .debt_gaurantors should be .debt_guarantors, right? For me to reference if documentation is later needed. The unique classes that were added are: .additional_materials .age_restriction .already_issued .booked_early .booked_to_another .borrower_not_same_branch .reserved .debt .debt_guarantees .debt_gaurantors .highholds .issued_to_another .item_lost .no_rule_defined .not_for_loan_forcing .patron_cant .previssue .processing .recalled .recalled2 .reserve_waiting .reserved .rentalcharge .renew_issue .too_many_checkouts .too_many_onsite_checkouts .transferred .userblocked_overdue (In reply to Philip Orr from comment #11) > Only looked at the diff while writing release notes. > But: > .debt_gaurantors should be .debt_guarantors, right? Might be a little nicer. I can provide a quick follow-up. Created attachment 167167 [details] [review] Bug 31981: (follow-up) Fix typo in class name .debt_gaurantors > .debt_guarantors follow-up applied on 23.11.x Enhancement will not be backported to 23.05.x |
Created attachment 142657 [details] warning box for example two There are potentially two yellow warning boxes staff can see when checking out an item that is on hold and the two boxes are VERY difficult to distinguish between. It would be helpful to either change the wording, or change the color of one of them to help staff determine what action should be taken. For instance, place a hold on an item for Patron A, do not trigger the hold, and check the item out to Patron B. The message is: Please confirm checkout Item Toby goes bananas / (312824) has been on hold for Donna B (donnab) at Sparkly Unicorn Land since 10/25/2022 Cancel hold Yes, check out (Y) Don't check out and print slip (P) No, don't check out (N) Cancel checkout and place a hold for Jack Shepard (68) Then check the item in, confirm the hold, then check the item out to Patron B. The message is: Please confirm checkout Item Toby goes bananas / (312824) has been waiting for Donna B (donnab) at Sparkly Unicorn Land since 10/25/2022 Cancel hold Revert waiting status The first message is much more common - libraries typically see it when a patron has placed a hold on something, but another patron has taken it off the shelf to check out before staff were able to pull it for the other patron. The second message is much less common - this is when an item is on the hold pick up shelf and a patron other than who it was triggered for is trying to check it out.