Bugzilla – Attachment 43289 Details for
Bug 14990
Make the date formatting template side - moremember.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14990: Format the date template-side for moremember
Bug-14990-Format-the-date-template-side-for-moreme.patch (text/plain), 5.40 KB, created by
Jonathan Druart
on 2015-10-09 08:15:56 UTC
(
hide
)
Description:
Bug 14990: Format the date template-side for moremember
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-10-09 08:15:56 UTC
Size:
5.40 KB
patch
obsolete
>From 63c57377fa7db65b67e4e4edfb37d1a9f9bdca42 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 9 Oct 2015 09:14:33 +0100 >Subject: [PATCH] Bug 14990: Format the date template-side for moremember > >Test plan: >print slip and show the member detail page, the 3 dates date of birth, >date enrolled and date of expiry should be displayed correctly. >--- > .../intranet-tmpl/prog/en/modules/members/moremember-brief.tt | 9 +++++---- > koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 10 +++++----- > members/moremember.pl | 4 +--- > 3 files changed, 11 insertions(+), 12 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >index 6196df0..34367d8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-brief.tt >@@ -1,3 +1,4 @@ >+[% USE KohaDates %] > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Check duplicate patron</title> > [% INCLUDE 'doc-head-close.inc' %] >@@ -47,7 +48,7 @@ > [% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %] > [% END %] > <li><span class="label">Initials: </span>[% initials %]</li> >- <li><span class="label">Date of birth:</span>[% dateofbirth %]</li> >+ <li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %]</li> > <li><span class="label">Gender:</span>[% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %]</li>[% END %] > [% IF ( isguarantee ) %] > [% IF ( guaranteeloop ) %] >@@ -70,12 +71,12 @@ > <li><span class="label">Card number: </span>[% cardnumber %]</li> > <li><span class="label">Borrowernumber: </span> [% borrowernumber %]</li> > <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li> >- <li><span class="label">Registration date: </span>[% dateenrolled %]</li> >+ <li><span class="label">Registration date: </span>[% dateenrolled | $KohaDates %]</li> > <li><span class="label">Expiration date: </span> > [% IF ( was_renewed ) %] >- <strong class="reregistrinfo">[% dateexpiry %]</strong> >+ <strong class="reregistrinfo">[% dateexpiry | $KohaDates %]</strong> > [% ELSE %] >- [% dateexpiry %] >+ [% dateexpiry | $KohaDates %] > [% END %] > </li> > <li><span class="label">Library: </span>[% branchname %]</li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 5a8c5a9..21e5d91 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -166,7 +166,7 @@ function validate1(date) { > [% IF ( unknowuser ) %] > <div class="dialog message">This patron does not exist.</div> > [% ELSE %] >- [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry %]</div>[% END %] >+ [% IF ( was_renewed ) %]<div class="dialog message">Patron's account has been renewed until [% dateexpiry | $KohaDates %]</div>[% END %] > > [% IF ( flagged ) %] > <div id="circmessages" class="circmessage attention"> >@@ -225,7 +225,7 @@ function validate1(date) { > [% IF ( emailpro ) %]<li><span class="label">Secondary email: </span><a href="mailto:[% emailpro %]">[% emailpro %]</a></li>[% END %] > [% END %] > [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %] >- [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth %]</li>[% END %] >+ [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %]</li>[% END %] > [% IF ( sex ) %]<li><span class="label">Gender:</span> > [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] > </li>[% END %][% END %] >@@ -337,13 +337,13 @@ function validate1(date) { > <li><span class="label">Card number: </span>[% cardnumber %]</li> > <li><span class="label">Borrowernumber: </span> [% borrowernumber %]</li> > <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li> >- <li><span class="label">Registration date: </span>[% dateenrolled %]</li> >+ <li><span class="label">Registration date: </span>[% dateenrolled | $KohaDates %]</li> > > <li><span class="label">Expiration date: </span> > [% IF ( was_renewed ) %] >- <strong class="reregistrinfo">[% dateexpiry %]</strong> >+ <strong class="reregistrinfo">[% dateexpiry | $KohaDates %]</strong> > [% ELSE %] >- [% dateexpiry %] >+ [% dateexpiry | $KohaDates %] > [% END %] > </li> > >diff --git a/members/moremember.pl b/members/moremember.pl >index d7932de..cd44296 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -135,9 +135,7 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { > $data->{$_} = ''; > next; > } >- $userdate = output_pref({ dt => dt_from_string( $userdate ), dateonly => 1 }); >- $data->{$_} = $userdate || ''; >- $template->param( $_ => $userdate ); >+ $template->param( $_ => dt_from_string( $userdate ) ); > } > $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); > >-- >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 14990
:
43289
|
43338
|
43339
|
43570