Bugzilla – Attachment 43222 Details for
Bug 14890
Remove C4::Dates from circ/bookcount.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14890: Simplify processing to display a date with hours
Bug-14890-Simplify-processing-to-display-a-date-wi.patch (text/plain), 2.29 KB, created by
Jonathan Druart
on 2015-10-08 08:55:18 UTC
(
hide
)
Description:
Bug 14890: Simplify processing to display a date with hours
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-08 08:55:18 UTC
Size:
2.29 KB
patch
obsolete
>From 5cf0cc307b4c3f111b98dc6b2962bfaebd85f5f6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Oct 2015 09:52:27 +0100 >Subject: [PATCH] Bug 14890: Simplify processing to display a date with hours > >The KohaDates plugin does that, it's not necessary to split the output. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > circ/bookcount.pl | 16 +--------------- > .../intranet-tmpl/prog/en/modules/circ/bookcount.tt | 2 +- > 2 files changed, 2 insertions(+), 16 deletions(-) > >diff --git a/circ/bookcount.pl b/circ/bookcount.pl >index 610fd5e..09dc6fc 100755 >--- a/circ/bookcount.pl >+++ b/circ/bookcount.pl >@@ -71,11 +71,8 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $branchloop = GetBranchesLoop(C4::Context->userenv->{branch}); > foreach (@$branchloop) { >- my $date = lastseenat( $itm, $_->{value} ); >- my ($datechunk, $timechunk) = slashdate($date); > $_->{issues} = issuesat($itm, $_->{value}); >- $_->{seen} = $datechunk; >- $_->{seentime} = $timechunk; >+ $_->{seen} = lastseenat( $itm, $_->{value} ) || undef; > } > > $template->param( >@@ -170,14 +167,3 @@ sub lastseenat { > my $date = ( $date1 lt $date2 ) ? $date2 : $date1 ; > return ($date); > } >- >-##################################################### >-# return date and time from timestamp >-sub slashdate { >- my ($date) = @_; >- $date or return; >- return ( >- output_pref({ dt => dt_from_string( $date ), dateonly => 1 }), >- substr($date,11,5) >- ); >-} >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt >index e83955f..f7b4765 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt >@@ -48,7 +48,7 @@ $(document).ready(function(){ > <td>[% branchloo.branchname %]</td> > <td>[% branchloo.issues %]</td> > <td>[% IF ( branchloo.seen ) %] >- [% branchloo.seen %] [% branchloo.seentime %] >+ [% branchloo.seen | $KohaDates with_hours => 1 %] > [% ELSE %] > <span>Never</span> > [% END %] >-- >2.1.0
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 14890
:
42852
|
43196
|
43221
| 43222