Bug 30063: Fix address format
Signed-off-by: Séverine Queune <severine.queune@bulac.fr> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
4369f41463
commit
a853b0653f
4 changed files with 33 additions and 7 deletions
|
@ -2161,7 +2161,8 @@ li {
|
|||
}
|
||||
}
|
||||
|
||||
#searchresults {
|
||||
#searchresults,
|
||||
#table_borrowers {
|
||||
.address {
|
||||
ul {
|
||||
margin: 0;
|
||||
|
@ -4031,8 +4032,7 @@ input.renew {
|
|||
}
|
||||
|
||||
#pat_member {
|
||||
#patron_list_dialog,
|
||||
#searchresults {
|
||||
#patron_list_dialog {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -421,6 +421,31 @@
|
|||
return r;
|
||||
}
|
||||
}
|
||||
[% CASE 'name-address' %]
|
||||
{
|
||||
"data": "me.firstname:me.surname:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country",
|
||||
"searchable": true,
|
||||
"orderable": true,
|
||||
"render": function( data, type, row, meta ) {
|
||||
let patron_id = encodeURIComponent(row.patron_id);
|
||||
let r = '';
|
||||
[% IF ! open_on_row_click %]
|
||||
r += "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=" + patron_id + "\" class=\"patron_name\" data-borrowernumber=\"" + patron_id + "\" style=\"white-space:nowrap\">" + $patron_to_html(row, { invert_name: 1 }) + "</a>";
|
||||
[% ELSE %]
|
||||
r += $patron_to_html(row, { invert_name: 1 });
|
||||
[% END %]
|
||||
r += '<br/>';
|
||||
r += '<div class="address"><ul>';
|
||||
r += $format_address(row, { no_line_break: 1 });
|
||||
|
||||
if ( row.email ) {
|
||||
r += "<li>" + _("Email: ") + "<a href='mailto:" + encodeURIComponent(row.email) + "'>" + escape_str(row.email) + "</a></li>";
|
||||
}
|
||||
r += '</ul></div>'
|
||||
|
||||
return r;
|
||||
}
|
||||
}
|
||||
[% CASE 'name' %]
|
||||
{
|
||||
"data": "me.firstname:me.surname:me.othernames",
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
[% PROCESS 'patronfields.inc' %]
|
||||
[% SET libraries = Branches.all %]
|
||||
[% SET categories = Categories.all.unblessed %]
|
||||
[% SET columns = ['cardnumber', 'name', 'dateofbirth', 'branch', 'category', 'dateexpiry', 'checkouts', 'account_balance', 'borrowernotes', 'action'] %]
|
||||
[% SET columns = ['cardnumber', 'name-address', 'dateofbirth', 'branch', 'category', 'dateexpiry', 'checkouts', 'account_balance', 'borrowernotes', 'action'] %]
|
||||
[% PROCESS 'patron-search.inc' %]
|
||||
[% INCLUDE 'doc-head-open.inc' %]
|
||||
<title>Patrons[% IF ( searching ) %] › Search results[% END %] › Koha</title>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</div>
|
||||
[% END %]
|
||||
|
||||
<div id="patron_search_results">
|
||||
<div id="searchresults">
|
||||
[% IF CAN_user_tools_manage_patron_lists || CAN_user_borrowers_edit_borrowers %]
|
||||
<div class="searchheader fh-fixedHeader" id="searchheader" style="display:none;">
|
||||
<div>
|
||||
|
@ -310,7 +310,8 @@
|
|||
redirect_if_one_result => 1,
|
||||
redirect_url => redirect_url,
|
||||
sticky_header => "searchheader",
|
||||
sticky_to => "patron_search_results",
|
||||
sticky_to => "searchresults",
|
||||
default_sort_column => 'name-address',
|
||||
%]
|
||||
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ $(document).ready(function(){
|
|||
|
||||
$('body').on('click', '#guarantor_search', function(e) {
|
||||
e.preventDefault();
|
||||
var newin = window.open('/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,dateofbirth,address,action','popup','width=1024,height=768,resizable=no,toolbar=false,scrollbars=yes,top');
|
||||
var newin = window.open('/cgi-bin/koha/members/search.pl?columns=cardnumber,name,category,branch,dateofbirth,address-library,action','popup','width=1024,height=768,resizable=no,toolbar=false,scrollbars=yes,top');
|
||||
});
|
||||
|
||||
$('#guarantor_relationships').on('click', '.guarantor_cancel', function(e) {
|
||||
|
|
Loading…
Reference in a new issue