Bugzilla – Attachment 130613 Details for
Bug 30063
Make the main patron search use the /patrons REST API route
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30063: Fix address format
Bug-30063-Fix-address-format.patch (text/plain), 5.75 KB, created by
Jonathan Druart
on 2022-02-15 10:31:30 UTC
(
hide
)
Description:
Bug 30063: Fix address format
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-02-15 10:31:30 UTC
Size:
5.75 KB
patch
obsolete
>From 9669b4329f44f02786c2d14df9aa00c520ea2cf4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 14 Feb 2022 17:13:53 +0100 >Subject: [PATCH] Bug 30063: Fix address format > >--- > .../prog/css/src/staff-global.scss | 6 ++--- > .../prog/en/includes/patron-search.inc | 25 +++++++++++++++++++ > .../prog/en/modules/members/member.tt | 6 ++--- > koha-tmpl/intranet-tmpl/prog/js/members.js | 2 +- > 4 files changed, 32 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index fbf5200bfeb..d6f862ae074 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -2156,7 +2156,8 @@ li { > } > } > >-#searchresults { >+#searchresults, >+#table_borrowers { > .address { > ul { > margin: 0; >@@ -4025,8 +4026,7 @@ input.renew { > } > > #pat_member { >- #patron_list_dialog, >- #searchresults { >+ #patron_list_dialog { > display: none; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index d6c8acb0a4c..da447180e5d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -415,6 +415,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", >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 016060065da..e0122edbc1e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -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,7 @@ > redirect_if_one_result => 1, > redirect_url => redirect_url, > sticky_header => "searchheader", >- sticky_to => "patron_search_results", >+ sticky_to => "searchresults", > %] > > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/members.js b/koha-tmpl/intranet-tmpl/prog/js/members.js >index 5559ac03635..1b7383b2c78 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/members.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/members.js >@@ -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=800,height=600,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=800,height=600,resizable=no,toolbar=false,scrollbars=yes,top'); > }); > > $('#guarantor_relationships').on('click', '.guarantor_cancel', function(e) { >-- >2.25.1
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 30063
:
130608
|
130609
|
130610
|
130611
|
130612
|
130613
|
130614
|
130615
|
132387
|
132552
|
132731
|
132732
|
132733
|
132734
|
132735
|
132736
|
132737
|
132738
|
132739
|
132740
|
132741
|
132742
|
132743
|
132744
|
132745
|
132746
|
132747
|
132748
|
132749
|
132759
|
132760
|
132761
|
132762
|
132763
|
132764
|
132765
|
132766
|
132767
|
132768
|
132769
|
132770
|
132771
|
132772
|
132773
|
132774
|
132775
|
132776
|
132777
|
132958