Bugzilla – Attachment 37811 Details for
Bug 13931
Date of birth in patron search result and in autocomplete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13931 - Implemented date of birth in patron search result and in autocomplete
Bug-13931---Implemented-date-of-birth-in-patron-se.patch (text/plain), 6.11 KB, created by
Jiri Kozlovsky
on 2015-04-14 11:01:33 UTC
(
hide
)
Description:
Bug 13931 - Implemented date of birth in patron search result and in autocomplete
Filename:
MIME Type:
Creator:
Jiri Kozlovsky
Created:
2015-04-14 11:01:33 UTC
Size:
6.11 KB
patch
obsolete
>From 0f81010552262c4c69052c3eeb47a1685c4adea8 Mon Sep 17 00:00:00 2001 >From: jirislav <mail@jkozlovsky.cz> >Date: Tue, 14 Apr 2015 12:59:56 +0200 >Subject: [PATCH] Bug 13931 - Implemented date of birth in patron search > result and in autocomplete > >--- > admin/columns_settings.yml | 2 ++ > circ/ysearch.pl | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt | 4 ++++ > .../prog/en/modules/members/tables/members_results.tt | 3 +++ > members/member.pl | 1 + > 6 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index bf3e4d6..2f63f8f 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -95,6 +95,8 @@ modules: > - > columnname: name > - >+ columnname: dateofbirth >+ - > columnname: category > - > columnname: library >diff --git a/circ/ysearch.pl b/circ/ysearch.pl >index ae4ae42..0175bb7 100755 >--- a/circ/ysearch.pl >+++ b/circ/ysearch.pl >@@ -29,6 +29,7 @@ use CGI qw ( -utf8 ); > use C4::Context; > use C4::Auth qw/check_cookie_auth/; > use Koha::Borrowers; >+use Koha::DateUtils qw/format_sqldatetime/; > > use JSON qw( to_json ); > >@@ -74,6 +75,7 @@ while ( my $b = $borrowers_rs->next ) { > surname => $b->surname // '', > firstname => $b->firstname // '', > cardnumber => $b->cardnumber // '', >+ dateofbirth => format_sqldatetime($b->dateofbirth, undef, undef, 1) // '', > address => $b->address // '', > city => $b->city // '', > zipcode => $b->zipcode // '', >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc >index 87f1969..87555a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc >@@ -14,7 +14,7 @@ $(document).ready(function(){ > .data( "ui-autocomplete" )._renderItem = function( ul, item ) { > return $( "<li></li>" ) > .data( "ui-autocomplete-item", item ) >- .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) >+ .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) > .appendTo( ul ); > }; > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 7ecf271..754669f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -162,6 +162,9 @@ $(document).ready(function() { > 'name': 'name_sorton', > 'value': 'borrowers.surname borrowers.firstname' > },{ >+ 'name': 'dateofbirth', >+ 'value': 'borrowers.dateofbirth', >+ },{ > 'name': 'category_sorton', > 'value': 'categories.description', > },{ >@@ -193,6 +196,7 @@ $(document).ready(function() { > [% END %] > { 'mDataProp': 'dt_cardnumber' }, > { 'mDataProp': 'dt_name' }, >+ { 'mDataProp': 'dt_dateofbirth' }, > { 'mDataProp': 'dt_category' }, > { 'mDataProp': 'dt_branch' }, > { 'mDataProp': 'dt_dateexpiry' }, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >index 00b02af..dce364c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >@@ -1,4 +1,5 @@ > [% USE AuthorisedValues %] >+[% USE KohaDates %] > { > "sEcho": [% sEcho %], > "iTotalRecords": [% iTotalRecords %], >@@ -14,6 +15,8 @@ > "[% data.cardnumber %]", > "dt_name": > "<span style='white-space:nowrap'><a href='/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber %]'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1%]</a><br />[% IF ( data.streetnumber ) %][% data.streetnumber %] [% END %][% IF ( data.streettype ) %][% AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) %] [% END %][% data.address %][% IF ( data.address2 ) %]<br />[% data.address2 %][% END %][% IF ( data.city || data.state || data.zipcode || data.country) %]<br />[% END %][% IF ( data.city ) %][% data.city %][% IF ( data.state ) %],[% END %][% END %][% IF ( data.state ) %] [% data.state %][% END %] [% IF ( data.zipcode ) %] [% data.zipcode %][% END %][% IF ( data.country ) %], [% data.country %][% END %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email %]'>[% data.email %]</a>[% END %]</span>", >+ "dt_dateofbirth": >+ "[% data.dateofbirth | $KohaDates %]", > "dt_category": > "[% data.category_description |html %] ([% data.category_type |html %])", > "dt_branch": >diff --git a/members/member.pl b/members/member.pl >index 191ff44..ba84008 100755 >--- a/members/member.pl >+++ b/members/member.pl >@@ -117,6 +117,7 @@ $template->param( > categories => \@categories, > branchcode => $patron->{branchcode}, > categorycode => $patron->{categorycode}, >+ dateofbirth => $patron->{dateofbirth}, > searchtype => $input->param('searchtype') || 'start_with', > searchfieldstype => $searchfieldstype, > PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20, >-- >1.7.10.4
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 13931
:
37801
|
37807
|
37809
|
37811
|
38045
|
38126
|
44691
|
44692
|
44693
|
44817
|
44818
|
44821
|
45062
|
45065