]> git.koha-community.org Git - koha.git/commit
Bug 29478: (follow-up) Provide default style for shortcut buttons
authorOwen Leonard <oleonard@myacpl.org>
Tue, 16 Nov 2021 14:17:19 +0000 (14:17 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 22 Nov 2021 10:48:46 +0000 (11:48 +0100)
commit58cec67dbdd6064e9435b04b7474fe0ebc5e0ac5
treee53a70325f3f0f6d6b56f5171168bf86cf4c376f
parent622b4c019b5c1078affacfa24e07edd68a2cb6e9
Bug 29478: (follow-up) Provide default style for shortcut buttons

This patch adds some CSS to _flatpickr.scss in order to give a deafult
style to the "yesterday," "today," and "tomorrow" controls added by the
shortcut plugin.

A missed translatable string is now wrapped in the __() function:
__("or").

The patch also updates the date calculation for those shortcuts to use
Flatpickr's date calculation shorthand. This isn't strictly necessary
but I think it makes the code more readable.

To test, apply the patch and build the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

In the staff client, view some pages with date-picker widgets. A
calendar widget time selection:

- Circulation -> Check out -> Checkout settings -> Select date:
  - The calendar widget should have "yesterday," "today," and "tomorrow"
    controls styled like links appearing after the time selector. The
    controls should be centered, with the "or" label on the same line.

A calendar widget without time selection:

- Tools -> Log viewer -> Display from.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/css/src/_flatpickr.scss
koha-tmpl/intranet-tmpl/prog/en/includes/calendar.inc