Bug 28933

Summary: Hard to parse OPAC-detail subscription information
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Attachments: Bug 28933: Add subscription class to each subscription in opac-detail
Bug 28933: Add subscription class to each subscription in opac-detail
Bug 28933: Add subscription class to each subscription in opac-detail

Description Lucas Gass (lukeg) 2021-08-31 20:35:22 UTC
I received a request to hide all closed subscriptions from the OPAC detail subscriptions tab. 

When a subscription is closed a '.subscription_closed' class is added, which is great. 

The problem there is no hierarchy to the HTML structure, every subscription detail (.subscription_closed, .subscription_location, etc. ) is a sibling of the next. 

It would be trivial to add a parent element to each subscription to make it easier to target with CSS/jQuery.
Comment 1 Lucas Gass (lukeg) 2021-08-31 20:41:20 UTC
Created attachment 124314 [details] [review]
Bug 28933: Add subscription class to each subscription in opac-detail

To Test:
1. Go to a record with some subscriptions, have some closed and some open.
2. Go to the opac-detail page, click on the subscription tab and use your developer tools to inscept the element.
3. Notice the hierarchy of HTML structure, everything is a sibling of the next.
4. Apply patch
5. Reload the same opac-detail page and again inscept the element.
6. Now every individual subscription should be wrapped in an element with the class name of 'subscription'.
Comment 2 Owen Leonard 2021-09-02 18:32:35 UTC
Created attachment 124436 [details] [review]
Bug 28933: Add subscription class to each subscription in opac-detail

To Test:
1. Go to a record with some subscriptions, have some closed and some
   open.
2. Go to the opac-detail page, click on the subscription tab and use
   your developer tools to inscept the element.
3. Notice the hierarchy of HTML structure, everything is a sibling of
   the next.
4. Apply patch
5. Reload the same opac-detail page and again inscept the element.
6. Now every individual subscription should be wrapped in an element
   with the class name of 'subscription'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2021-09-26 11:52:49 UTC
Created attachment 125321 [details] [review]
Bug 28933: Add subscription class to each subscription in opac-detail

To Test:
1. Go to a record with some subscriptions, have some closed and some
   open.
2. Go to the opac-detail page, click on the subscription tab and use
   your developer tools to inscept the element.
3. Notice the hierarchy of HTML structure, everything is a sibling of
   the next.
4. Apply patch
5. Reload the same opac-detail page and again inscept the element.
6. Now every individual subscription should be wrapped in an element
   with the class name of 'subscription'.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2021-09-29 10:44:27 UTC
Pushed to master for 21.11, thanks to everybody involved!