When looking at the messaging preferences table in the OPAC, it's really hard to customize. You can only use the row index or the translated descriptions when trying to select the correct line to add things to or when you want to hide unused messages. It would be great if we could add classes with the code for each notice/message, so this is easier.
Created attachment 146525 [details] [review] Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface Sometimes you want to hide notice from the messaging options becaue the library is not using it. With this patch, we'll have unique IDs on the <tr> to do so easily. To test: * Look at the messaging preferences * in the OPAC messaging tab * in the staff interface details tab * in the staff interface patron edit form * Verify there are no classes or IDs on the rows or other elements * Apply patch * Verify there are nice IDs now on the table rows (tr elements) for each message.
Created attachment 146580 [details] [review] Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface Sometimes you want to hide notice from the messaging options becaue the library is not using it. With this patch, we'll have unique IDs on the <tr> to do so easily. To test: * Look at the messaging preferences * in the OPAC messaging tab * in the staff interface details tab * in the staff interface patron edit form * Verify there are no classes or IDs on the rows or other elements * Apply patch * Verify there are nice IDs now on the table rows (tr elements) for each message. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 146581 [details] [review] Bug 32492: (follow-up) Add missing HTML filters Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Thanks for the follow-up!
Created attachment 147217 [details] [review] Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface Sometimes you want to hide notice from the messaging options becaue the library is not using it. With this patch, we'll have unique IDs on the <tr> to do so easily. To test: * Look at the messaging preferences * in the OPAC messaging tab * in the staff interface details tab * in the staff interface patron edit form * Verify there are no classes or IDs on the rows or other elements * Apply patch * Verify there are nice IDs now on the table rows (tr elements) for each message. Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 147218 [details] [review] Bug 32492: (follow-up) Add missing HTML filters Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 147220 [details] [review] Bug 32492: Add IDs to the rows of the patron messaging table in OPAC and staff interface Sometimes you want to hide notice from the messaging options becaue the library is not using it. With this patch, we'll have unique IDs on the <tr> to do so easily. To test: * Look at the messaging preferences * in the OPAC messaging tab * in the staff interface details tab * in the staff interface patron edit form * Verify there are no classes or IDs on the rows or other elements * Apply patch * Verify there are nice IDs now on the table rows (tr elements) for each message. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 147221 [details] [review] Bug 32492: (follow-up) Add missing HTML filters Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Enhancement - not backporting to 22.11.x. Setting to Needs documenting. Nice work everyone!
Can I make a case for this being tiny enough for backporting? It would save me some rather bad jQuery (I have to use the descriptions now, but that means I need to account for all languages installed)
Yeah, striking the right balance is hard.. I'd go with 'missing id' being a 'minor bug' personally.. but it's all opinion. I think I'd be happy to backport this one, there are no obvious changes or side effects for end users and it gives the power admin the ability to do a little more with IntranetUserJS/CSS with ease.
Maybe to explain a bit more: When you are using ILL there are a lot of new messaging options showing up now, also the hold reminder ones that require additional setup, not all libraries will want to use all notices and not all backends are implementing all of them. So there is a need to be able to hide some and until we have a proper configuration option for this, the ids will be super helpful. An easy fix for an existing problem.
The court has ruled and this can be backported ;) pushing to stable now
Does that make me the lawyer of the defence? ;) Thank you!
Nice work everyone! Pushed to stable for 22.11.x
Shouldn't this have an html filter? <tr id="[% messaging_preference.message_name _ "_message" | lower %]
(In reply to Lucas Gass from comment #17) > Shouldn't this have an html filter? > > <tr id="[% messaging_preference.message_name _ "_message" | lower %] There is a follow-up, sorry.
Backported to 22.05.x for upcoming 22.05.11
applied to 21.11 for 21.11.19
Not backported to 21.05.x