Bugzilla – Attachment 36322 Details for
Bug 13739
KohaDates should display hours if they exists by default unless specified
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 13739 - KohaDates should display hours if they exists by default unless specified
SIGNED-OFF-Bug-13739---KohaDates-should-display-ho.patch (text/plain), 1.71 KB, created by
Jesse Maseto
on 2015-03-02 15:12:06 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 13739 - KohaDates should display hours if they exists by default unless specified
Filename:
MIME Type:
Creator:
Jesse Maseto
Created:
2015-03-02 15:12:06 UTC
Size:
1.71 KB
patch
obsolete
>From c60113bfbed953dfe31a76cbdb96194636ebd165 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 20 Feb 2015 10:27:00 -0500 >Subject: [PATCH] [SIGNED OFF] Bug 13739 - KohaDates should display hours if they exists by default unless specified > >There are many parts of Koha that are now hiding hours by default. This >is rarely helpful. KohaDates should display hours by default unless the >time is 23:59, in which case the hours should be not be displayed. > >Test Plan: >1) Check out two items, one due at at an hour, one not >2) View the patron's circ history, note you don't see the hours >3) Apply this patch >4) View the circ history again, note the hours are listed for date/time > where the time is not 23:59. > >Signed-off-by: Jesse Maseto <jesse@bywatersolutions.com> >--- > Koha/Template/Plugin/KohaDates.pm | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/Koha/Template/Plugin/KohaDates.pm b/Koha/Template/Plugin/KohaDates.pm >index 711255a..54b8721 100644 >--- a/Koha/Template/Plugin/KohaDates.pm >+++ b/Koha/Template/Plugin/KohaDates.pm >@@ -28,13 +28,15 @@ our $DYNAMIC = 1; > sub filter { > my ( $self, $text, $args, $config ) = @_; > return "" unless $text; >- $config->{with_hours} //= 0; > > my $dt = dt_from_string( $text, 'iso' ); > >- return $config->{as_due_date} ? >- output_pref({ dt => $dt, as_due_date => 1 }) : >- output_pref({ dt => $dt, dateonly => !$config->{with_hours} }); >+ my $params; >+ $params->{dt} = $dt; >+ $params->{dateonly} = 1 if ( defined $config->{with_hours} && $config->{with_hours} == 0 ); >+ $params->{as_due_date} = 1 unless ( $params->{dateonly} ); >+ >+ return output_pref( $params ); > } > > 1; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13739
:
36095
|
36312
| 36322