I've gotten requests to hide various parts of the OPAC screen that don't presently have tags, so it's been hard to do it with jquery. This patch adds tags to three places. * The OPAC search strategy -- some sites don't want to see the actual strategy used to display (e.g., “ mc-itype:BK or mc-itype:CR”), just the count. I added a span surrounding that part of the line, and put the word Search in front. Now the line reads Search “ mc-itype:BK or mc-itype:CR” returned 2235 results. If this jquery is used: $("#strategy").remove(); The line reads Search returned 2235 results. * The OPAC record display -- I've had a couple of requests to turn off the Notes tab. I added a span to it, so that using this jquery: $("#holdingnotes").remove(); hides that tab. * The OPAC patron account messaging tab -- Enhanced Messaging Preferences syspref has to be on for hold notices etc. to get sent out, but if that syspref is on, the Messaging tab shows in the OPAC patron account. Some sites do not want to allow patrons to change the settings. I added a span to that tab, so that using this jquery: $("#showmsgtab").remove(); hides the messaging tab.
Actually, I wrote a patch some time batck to use a syspref to hide the messaging tab -- looks like Bug 3535 hasn't been pushed to head yet. The span label will work in the meantime, if it gets pushed.
Created attachment 2166 [details] [review] patch file against current head
The attached patch predates TT and will no longer apply. 'OPAC search strategy' is no longer a problem, as we have decided to generally not show the search terms and indexes but only the result count. Current display: "Your search returned 3119 results." My patch adds an unique id to every item tab and to every column in the items table on the holdings tab. I think the patron account tabs should be checked and dealt with in a separate patch.
Created attachment 8538 [details] [review] Bug 4918: Add ids to OPAC detail page Patch adds an unique id to every item tab and to every column in the items table on the holdings tab.
Created attachment 8539 [details] [review] Bug 4819: Add ids to OPAC detail page Patch adds an unique id to every item tab and to every column in the items table on the holdings tab.
Created attachment 8582 [details] [review] Bug 4819: Add ids to OPAC detail page Patch adds an unique id to every item tab and to every column in the items table on the holdings tab. http://bugs.koha-community.org/show_bug.cgi?id=4819 Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 8583 [details] [review] [SIGNED-OFF] Bug 4819: Add ids to OPAC detail page Patch adds an unique id to every item tab and to every column in the items table on the holdings tab. http://bugs.koha-community.org/show_bug.cgi?id=4819 Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This change allows us to use some variation on the following JavaScript: ---- // Hide the "date due" column // identify the header for the column we're hiding var th = $("#item_datedue"); // Get the index of the header cell var ind = $("#holdingst th").index(th); // Indexes are zero-based but ":nth-child" starts at one, so increment ind++; // Hide the table header $(th).hide(); // Hide each table cell within the holdings table which has the same // index as the header cell we identified $('#holdingst td:nth-child('+ind+')').hide(); ---- Place that JS inside a $(document).ready() block in your OPACUserJS system preference to automatically hide the specified column in the OPAC.
Template only change to add IDs to opac-details.tt. Fixes some indentation for readability. Marking as Passed QA.
patch pushed, with a small conflict solve, please double check
This bug will be included in the Koha 3.6.5 release.