Bug 11694 - Improve handling of individual hold suspension in Bootstrap OPAC
Summary: Improve handling of individual hold suspension in Bootstrap OPAC
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/opac-user.pl#opac-user-...
Keywords:
: 11702 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-05 20:41 UTC by Owen Leonard
Modified: 2014-12-07 20:07 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 11694 - Improve handling of individual hold suspension in Bootstrap OPAC (123.57 KB, patch)
2014-02-06 18:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11694 - Improve handling of individual hold suspension in Bootstrap OPAC (121.71 KB, patch)
2014-02-27 13:40 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 11694 [QA Followup] - Don't include time when converting date string to DateTime (988 bytes, patch)
2014-02-27 13:42 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
[PASSED QA] Bug 11694 - Improve handling of individual hold suspension in Bootstrap OPAC (121.88 KB, patch)
2014-03-16 19:41 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11694 [QA Followup] - Don't include time when converting date string to DateTime (1.03 KB, patch)
2014-03-16 19:41 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 2014-02-05 20:41:49 UTC
Putting the hold suspension/resumption controls in the table of holds creates quite a bit of clutter, especially with AutoResumeSuspendedHolds enabled. I propose to make some styling changes to the way the controls are displayed. If AutoResumeSuspendedHolds is enabled (and so is JavaScript) the suspend control will trigger a modal dialog which will contain the "suspend until" options.
Comment 1 Owen Leonard 2014-02-06 18:05:15 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall (khall) 2014-02-27 13:40:47 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 2014-02-27 13:42:15 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall (khall) 2014-02-27 14:04:51 UTC
I should note there was a merge conflict in right-to-left.css when I applied this patch. I retained the new right-to-left.css code. I just want to note this in case this introduces a regression.
Comment 5 Owen Leonard 2014-02-27 14:19:20 UTC
*** Bug 11702 has been marked as a duplicate of this bug. ***
Comment 6 Katrin Fischer 2014-03-16 19:40:20 UTC
This would be a little bit nicer, if the read-only on the date entry field could be removed for better accessibility.
Comment 7 Katrin Fischer 2014-03-16 19:41:09 UTC
Created attachment 26385 [details] [review]
[PASSED QA] Bug 11694 - Improve handling of individual hold suspension in Bootstrap OPAC

This patch changes the way the controls to suspend and resume holds are
displayed on the OPAC for a logged-in user when using the Bootstrap
theme. Instead of showing all the suspend options in the table cell a
link will trigger a modal with the controls. This makes the table more
compact and readable.

The patch adds a span and class to the dateformat include so that the
dateformat hint can be hidden if JavaScript is enabled (and thus the
datepicker will use the correct format automatically).

A new class has been added to the CSS, ".js-show" to be used for
elements which should be hidden if JavaScript is disabled and made
visible by JavaScript if it is enabled.

To test you must have RequestOnOpac, SuspendHoldsOpac, and the bootstrap
theme enabled. Apply the patch for Bug 11702 if necessary in order for
suspend-until dates to be saved correctly.

Apply the patch and test with AutoResumeSuspendedHolds enabled:

1. Log in to the OPAC and place a hold.
2. View the list of your holds in the OPAC.
3. Click the "Suspend" link for your new hold. A modal window should
   appear allowing you to specify a suspend-until date.
4. Specify a suspend-until date. Test the "clear" link and confirm that
   it clears the date.
5. Specify a suspend-until date and submit.
6. Confirm that the hold has been suspended with the specified
   resumption date.
7. Click the "Resume" link on the suspended hold to resume.
8. Click the "Suspend" link again and submit without specifying a date.
9. Confirm that the hold has been suspended indefinitely.

Follow the same steps above with JavaScript disabled. The "suspend
until" options will appear inside the table as before and everything
should work correctly.

Test with AutoResumeSuspendedHolds disabled. No modal dialog should
appear when the "Suspend" link is clicked. The hold should simply be
suspended indefinitely.

Test again with JavaScript disabled. There should be no change in
functionality.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script, works as described.
Happy about the fallback for users without Javascript.
Comment 8 Katrin Fischer 2014-03-16 19:41:22 UTC
Created attachment 26386 [details] [review]
[PASSED QA] Bug 11694 [QA Followup] - Don't include time when converting date string to DateTime

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 9 Galen Charlton 2014-03-26 16:58:12 UTC
Pushed to master.  Thanks, Owen!

I've pushed the QA follow-up, although I would have preferred that the issue had stayed on bug 11702, as problems saving the suspension date in the database aren't dependent on the shape of the form.  I also note that I've been completely unable to reproduce the issue reported in bug 11702, and I strongly suspect that there is some kind of MySQL configuration issue or DateTime version issue is at play that really ought to be completely characterized.