Bugzilla – Attachment 105279 Details for
Bug 25463
Patron details page - display the alternative contact address as a block
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25463: Patron details page - display the alternative contact address as a block
Bug-25463-Patron-details-page---display-the-altern.patch (text/plain), 11.13 KB, created by
David Roberts
on 2020-05-22 20:17:27 UTC
(
hide
)
Description:
Bug 25463: Patron details page - display the alternative contact address as a block
Filename:
MIME Type:
Creator:
David Roberts
Created:
2020-05-22 20:17:27 UTC
Size:
11.13 KB
patch
obsolete
>From 2a64fa9f8181b425edf3984e37b1466cd6c0914c Mon Sep 17 00:00:00 2001 >From: David Roberts <david@koha-ptfs.co.uk> >Date: Fri, 22 May 2020 18:44:25 +0000 >Subject: [PATCH] Bug 25463: Patron details page - display the alternative > contact address as a block > >This patch changes the format of the alternative contact address to a block, instead of a list. > >To test: > >1) Edit a patron's contact details so that the Main Address and Alternative Contact addresses are complete >2) Install the patch >3) Ensure that the AddressFormat system preference is set to US style >4) View the patron record (members/moremember.pl) and ensure that the >address format in both the Contact information and Alternative address >sections display identically. >5) Change the AddressFormat system preference to German style, and >repeat >6) Change the AddressFormat system preference to French style, and >repeat. >--- > .../member-display-altv-address-style-de.inc | 9 ++++ > .../member-display-altv-address-style-fr.inc | 9 ++++ > .../member-display-altv-address-style-us.inc | 11 ++++ > .../prog/en/modules/members/moremember.tt | 62 ++++------------------ > 4 files changed, 40 insertions(+), 51 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-de.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-fr.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-us.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-de.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-de.inc >new file mode 100644 >index 00000000000..cd278bc3fd0 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-de.inc >@@ -0,0 +1,9 @@ >+[% IF ( patron.altcontactaddress1 or patron.altcontactaddress2 ) %] >+ <li class="altcontactname">[% patron.altcontactfirstname | html %] [% patron.altcontactsurname | html %][% end | html %] </li> >+ <li class="altcontactaddress1">[% if (patron.altcontactaddress1) | html %][% patron.altcontactaddress1 | html %][% end | html %] </li> >+ <li class="altcontactaddress2">[% if (patron.altcontactaddress2) | html %][% patron.altcontactaddress2 | html %][% end | html %] </li> >+[% END %] >+[% IF ( patron.altcontactzipcode ) %]<li class="altcontactzipcode"> [% patron.altcontactzipcode | html %] [% IF ( patron.altcontactaddress3 ) %][% patron.altcontactaddress3 %][% END %]</li> >+[% IF ( patron.altcontactstate ) %]<li clas="altcontactaddress3"> [% patron.altcontactstate | html %] [% END %]</li> >+[% IF ( patron.altcontactcountry ) %] <li class="altcontactcountry"> [% patron.altcontactcountry | html %][% END %]</li> >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-fr.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-fr.inc >new file mode 100644 >index 00000000000..cd278bc3fd0 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-fr.inc >@@ -0,0 +1,9 @@ >+[% IF ( patron.altcontactaddress1 or patron.altcontactaddress2 ) %] >+ <li class="altcontactname">[% patron.altcontactfirstname | html %] [% patron.altcontactsurname | html %][% end | html %] </li> >+ <li class="altcontactaddress1">[% if (patron.altcontactaddress1) | html %][% patron.altcontactaddress1 | html %][% end | html %] </li> >+ <li class="altcontactaddress2">[% if (patron.altcontactaddress2) | html %][% patron.altcontactaddress2 | html %][% end | html %] </li> >+[% END %] >+[% IF ( patron.altcontactzipcode ) %]<li class="altcontactzipcode"> [% patron.altcontactzipcode | html %] [% IF ( patron.altcontactaddress3 ) %][% patron.altcontactaddress3 %][% END %]</li> >+[% IF ( patron.altcontactstate ) %]<li clas="altcontactaddress3"> [% patron.altcontactstate | html %] [% END %]</li> >+[% IF ( patron.altcontactcountry ) %] <li class="altcontactcountry"> [% patron.altcontactcountry | html %][% END %]</li> >+[% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-us.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-us.inc >new file mode 100644 >index 00000000000..271a9bbdaac >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-altv-address-style-us.inc >@@ -0,0 +1,11 @@ >+[% IF ( patron.altcontactaddress1 or patron.altcontactaddress2 ) %] >+ <li class="altcontactname">[% patron.altcontactfirstname | html %] [% patron.altcontactsurname | html %][% end | html %] </li> >+ <li class="altcontactaddress1">[% if (patron.altcontactaddress1) | html %][% patron.altcontactaddress1 | html %][% end | html %] </li> >+ <li class="altcontactaddress2">[% if (patron.altcontactaddress2) | html %][% patron.altcontactaddress2 | html %][% end | html %] </li> >+[% END %] >+<li class="altcontactaddress3"> >+[% IF ( patron.altcontactaddress3 ) %][% patron.altcontactaddress3 | html %], [% END %] >+[% IF ( patron.altcontactstate ) %] [% patron.altcontactstate | html %],[% END %] >+[% IF ( patron.altcontactzipcode ) %] [% patron.altcontactzipcode | html %],[% END %] >+[% IF ( patron.altcontactcountry ) %] [% patron.altcontactcountry | html %][% END %] >+</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 8a9580026c8..2c7a579248f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -640,65 +640,25 @@ > <h3>Alternative contact</h3> > <a class="btn btn-default btn-xs" href="memberentry.pl?op=modify&borrowernumber=[% patron.borrowernumber | html %]&step=2"><i class="fa fa-pencil"></i> Edit</a> > </div> >+ <div class="address"> >+ <ul> >+ [% IF Koha.Preference( 'AddressFormat' ) %] >+ [% INCLUDE "member-display-altv-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %] >+ [% ELSE %] >+ [% INCLUDE 'member-display-altv-address-style-us.inc' %] >+ [% END %] >+ </ul> >+ </div> > <div class="rows"> > <ol> >- [% IF ( patron.altcontactsurname ) %] >- <li id="patron-altcontactsurname"> >- <span class="label">Surname: </span> >- [% patron.altcontactsurname | html %] >- </li> >- [% END %] >- [% IF ( patron.altcontactfirstname ) %] >- <li id="patron-altcontactfirstname"> >- <span class="label">First name: </span> >- [% patron.altcontactfirstname | html %] >- </li> >- [% END %] >- [% IF ( patron.altcontactaddress1 ) %] >- <li id="patron-altcontactaddress1"> >- <span class="label">Address: </span> >- [% patron.altcontactaddress1 | html %] >- </li> >- [% END %] >- [% IF ( patron.altcontactaddress2 ) %] >- <li id="patron-altcontactaddress2"> >- <span class="label">Address 2: </span> >- [% patron.altcontactaddress2 | html %] >- </li> >- [% END %] >- [% IF ( patron.altcontactaddress3 ) %] >- <li id="patron-altcontactaddress3"> >- <span class="label">City: </span> >- [% patron.altcontactaddress3 | html %] >- </li> >- [% END %] >- >- [% IF ( patron.altcontactstate ) %] >- <li id="patron-altcontactstate"> >- <span class="label">State: </span> >- [% patron.altcontactstate | html %] >- </li> >- [% END %] >- [% IF ( patron.altcontactzipcode ) %] >- <li id="patron-altcontactzipcode"> >- <span class="label">ZIP/Postal code: </span> >- [% patron.altcontactzipcode | html %] >- </li> >- [% END %] >- [% IF ( patron.altcontactcountry ) %] >- <li id="patron-altcontactcountry"> >- <span class="label">Country: </span> >- [% patron.altcontactcountry | html %] >- </li> >- [% END %] > [% IF ( patron.altcontactphone ) %] > <li id="patron-altcontactphone"> > <span class="label">Phone: </span> >- <a href="tel:[% patron.altcontactphone | url %]">[% patron.altcontactphone | html %]</a> >+ <a href="tel:[% patron.altcontactphone | uri %]">[% patron.altcontactphone |html %]</a> > </li> > [% END %] > </ol> >- </div> [% # /div.rows %] >+ </div> > [% ELSE %] > <div class="patroninfo-heading"> > <h3>Alternative contact</h3> >-- >2.11.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 25463
:
105275
|
105278
|
105279
|
105318