Bug 11694: Improve handling of individual hold suspension in Bootstrap OPAC
authorOwen Leonard <oleonard@myacpl.org>
Wed, 5 Feb 2014 21:11:29 +0000 (16:11 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 26 Mar 2014 16:07:44 +0000 (16:07 +0000)
commit17cf2657ef7fe0e293cdf4956b75f8e39c0aeeed
treec581a0d55c3574d64fb3c25fed16406ca3d4e8ff
parented10e5226cc8e9852dfee3f5520976695cb99412
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 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/opac-tmpl/bootstrap/css/opac.css
koha-tmpl/opac-tmpl/bootstrap/css/right-to-left.css
koha-tmpl/opac-tmpl/bootstrap/en/includes/date-format.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
koha-tmpl/opac-tmpl/bootstrap/less/opac.less