Bugzilla – Attachment 45062 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 - Date of birth in patron search result and in autocomplete
Bug-13931---Date-of-birth-in-patron-search-result-.patch (text/plain), 5.92 KB, created by
Kyle M Hall (khall)
on 2015-11-20 16:54:06 UTC
(
hide
)
Description:
Bug 13931 - Date of birth in patron search result and in autocomplete
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-20 16:54:06 UTC
Size:
5.92 KB
patch
obsolete
>From b1777b9a09b2e071d992306b2b9b795139503ada Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Thu, 12 Nov 2015 20:45:01 +0100 >Subject: [PATCH] Bug 13931 - Date of birth in patron search result and in > autocomplete > >Test plan: >1) Apply the patch >2) Type into search form patron's name & check his date of birth in > autocompletion >3) Go to intranet/cgi-bin/koha/members/member.pl & submit > a search with more than one result .. now should in the table appear > patron's date of birth >4) Try show/hide columns section if it works correctly for date of birth >5) Go to intranet/cgi-bin/koha/admin/columns_settings.pl -> go to > patrons section & check there is dateofbirth & it's functionality > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > Works as described. Syspref dateformat respected. Column dateofbirth > configurable, but mandatory on autocompletion search result. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > 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 | 5 +++++ > .../prog/en/modules/members/tables/members_results.tt | 3 +++ > 5 files changed, 13 insertions(+), 1 deletion(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 3849245..a412986 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -166,6 +166,8 @@ modules: > - > columnname: name > - >+ columnname: dateofbirth >+ - > columnname: category > - > columnname: library >diff --git a/circ/ysearch.pl b/circ/ysearch.pl >index 74e14ee..c9557a4 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 ); > >@@ -83,6 +84,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 a7e9061..01a0d70 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 49971b7..2a78193 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -174,6 +174,9 @@ $(document).ready(function() { > 'name': 'name_sorton', > 'value': 'borrowers.surname borrowers.firstname' > },{ >+ 'name': 'dateofbirth', >+ 'value': 'borrowers.dateofbirth', >+ },{ > 'name': 'category_sorton', > 'value': 'categories.description', > },{ >@@ -205,6 +208,7 @@ $(document).ready(function() { > [% END %] > { 'mDataProp': 'dt_cardnumber' }, > { 'mDataProp': 'dt_name' }, >+ { 'mDataProp': 'dt_dateofbirth' }, > { 'mDataProp': 'dt_category' }, > { 'mDataProp': 'dt_branch' }, > { 'mDataProp': 'dt_dateexpiry' }, >@@ -381,6 +385,7 @@ function filterByFirstLetterSurname(letter) { > [% END %] > <th>Card</th> > <th>Name</th> >+ <th>Date of birth</> > <th>Category</th> > <th>Library</th> > <th>Expires on</th> >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 e4b7337..48f6fb4 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,5 +1,6 @@ > [% USE To %] > [% USE AuthorisedValues %] >+[% USE KohaDates %] > { > "sEcho": [% sEcho %], > "iTotalRecords": [% iTotalRecords %], >@@ -15,6 +16,8 @@ > "[% data.cardnumber | html %]", > "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 />[% INCLUDE escape_address data = data %]</span>", >+ "dt_dateofbirth": >+ "[% data.dateofbirth | $KohaDates %]", > "dt_category": > "[% data.category_description |html %] ([% data.category_type |html %])", > "dt_branch": >-- >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