Similar to Bug 27766, I think it would improve the calendar interface if we hid unique holidays and holiday exceptions which are in the past. Checking a checkbox would show the hidden entries.
Created attachment 117260 [details] [review] Bug 27773: Hide unique holidays and exceptions which have passed This patch modifies the display of unique holidays and holiday exceptions so that dates in the past are hidden by default. A corresponding "Show past entries" checkbox can be checked to show the hidden entries. This patch also moves the inline CSS to a separate file because I want to. To test you should have some unique holidays and holiday exceptions in your system from the past and in the future. - Apply the patch and go to Tools -> Calendar - In the tables of existing holidays, check that no dates in the past appear in the "Exceptions" or "Unique holidays" tables. - Checking the checkbox at the top of each of these tables should trigger the display of the hidden rows.
Sorry Owen, the patch doesn't apply :/ Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 27773: Hide unique holidays and exceptions which have passed error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt). error: could not build fake ancestor Patch failed at 0001 Bug 27773: Hide unique holidays and exceptions which have passed The copy of the patch that failed is found in: .git/rebase-apply/patch
Created attachment 119077 [details] [review] Bug 27773: Hide unique holidays and exceptions which have passed This patch modifies the display of unique holidays and holiday exceptions so that dates in the past are hidden by default. A corresponding "Show past entries" checkbox can be checked to show the hidden entries. This patch also moves the inline CSS to a separate file because I want to. To test you should have some unique holidays and holiday exceptions in your system from the past and in the future. - Apply the patch and go to Tools -> Calendar - In the tables of existing holidays, check that no dates in the past appear in the "Exceptions" or "Unique holidays" tables. - Checking the checkbox at the top of each of these tables should trigger the display of the hidden rows.
(In reply to Séverine Queune from comment #2) > Sorry Owen, the patch doesn't apply :/ My fault, I forgot to squash two patches!
Test done this day on a ptfs sandbox : everything works fine.
Test plan done : - Apply the patch and go to Tools -> Calendar - In the tables of existing holidays, check that no dates in the past appear in the "Exceptions" or "Unique holidays" tables. - Checking the checkbox at the top of each of these tables should trigger the display of the hidden rows.
Owen, can you please check? FAIL koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tt FAIL filters asset_must_be_raw at line 8 ([% Asset.css("css/calendar.css") %])
Created attachment 119310 [details] [review] Bug 27773: Hide unique holidays and exceptions which have passed This patch modifies the display of unique holidays and holiday exceptions so that dates in the past are hidden by default. A corresponding "Show past entries" checkbox can be checked to show the hidden entries. To test you should have some unique holidays and holiday exceptions in your system from the past and in the future. - Apply the patch and go to Tools -> Calendar - In the tables of existing holidays, check that no dates in the past appear in the "Exceptions" or "Unique holidays" tables. - Checking the checkbox at the top of each of these tables should trigger the display of the hidden rows.
Algorithmically speaking it would have been better to not build "date_past" (and so compare today with the holiday date) every time we draw the table, but only once when initiated (using data-past='1' for instance). Regarding the mess in the template, and the unnecessary complicated date handling (DATE_SORT and date formatting), I would not consider it blocker.
Created attachment 119552 [details] [review] Bug 27773: Hide unique holidays and exceptions which have passed This patch modifies the display of unique holidays and holiday exceptions so that dates in the past are hidden by default. A corresponding "Show past entries" checkbox can be checked to show the hidden entries. To test you should have some unique holidays and holiday exceptions in your system from the past and in the future. - Apply the patch and go to Tools -> Calendar - In the tables of existing holidays, check that no dates in the past appear in the "Exceptions" or "Unique holidays" tables. - Checking the checkbox at the top of each of these tables should trigger the display of the hidden rows. Signed-off-by: Pascale Nalon <pascale.nalon@ensmp.fr> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 21.05, thanks to everybody involved!
Enhancement not pushed to 20.11.x