Bugzilla – Attachment 66153 Details for
Bug 19129
Clean up templates for organisation patrons in staff
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19129 - Clean up Details tab for Organisation patrons
Bug-19129---Clean-up-Details-tab-for-Organisation-.patch (text/plain), 11.89 KB, created by
Katrin Fischer
on 2017-08-17 21:39:32 UTC
(
hide
)
Description:
Bug 19129 - Clean up Details tab for Organisation patrons
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-08-17 21:39:32 UTC
Size:
11.89 KB
patch
obsolete
>From 282fb0480bc75eea925ef67c699a7077ed818c23 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Thu, 17 Aug 2017 14:51:08 +0000 >Subject: [PATCH] Bug 19129 - Clean up Details tab for Organisation patrons > >Problem: A patron category "I" would cause display problems >on the details in the intranet. This is because the templates >confused patron category "I" with patron type "I" (organisation). > >Patch: >- Cleans up variable confusion by introducint a new > variable 'is_organisation' instead of using 'I'. >- The template contained code to change the labels below > the address to 'Organisational phone:" etc., I have removed > this part as it does not match the edit form anymore. >- Initials, date of birth and gender are still hidden for > organisation - matching the edit form. > >Bonus: >- The patron category description was missing on the > right and left side of the details tab. Now it displays. >- Fixes some html issues: > - doubled up class attribute in a tag > - doubled up </li></li> > >To test: >- Create 3 patrons > - patron category code doesn't matter, but category type organisation > - patron category code 'I', category type NOT organisation > - patron category code NOT I, category type NOT organisaton >- Check details tab in patron account in staff for all 3 > - Verify patron category description shows correctly > - Verify information added to the account displays correctly > (phone numbers, emails, ...) >--- > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 7 +- > .../prog/en/includes/members-toolbar.inc | 4 +- > .../prog/en/modules/members/moremember.tt | 76 ++++++++++------------ > members/moremember.pl | 3 +- > 4 files changed, 42 insertions(+), 48 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 8bc4a5c..e621d64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -23,7 +23,8 @@ > [% INCLUDE 'member-display-address-style-us.inc' %] > [% END %] > >- [% IF ( phone ) %]<li class="patronphone"> >+ [% IF ( phone || mobile || phonepro ) %]<li class="patronphone"> >+ [% IF ( phone ) %] > <a href="tel:[% phone | url %]">[% phone | html %]</a> > [% ELSE %] > [% IF ( mobile ) %] >@@ -32,8 +33,8 @@ > [% IF ( phonepro ) %] > <a href="tel:[% phonepro | url %]">[% phonepro | html %]</a> > [% END %] >- [% END %]</li> >- [% END %] >+ [% END %] >+ [% END %]</li>[% END %] > [% IF ( email ) %] > <li class="email"> <a href="mailto:[% email | url %]" title="[% email | html %]">[% email | html %]</a></li> > [% ELSE %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >index 5b467ac..7b91418 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc >@@ -199,7 +199,7 @@ function searchToHold(){ > [% IF ( is_child ) %] > <li><a id="updatechild" href="#">Update child to adult patron</a></li> > [% ELSE %] >- <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is an adult" id="updatechild" href="#">Update child to adult patron</a></li></li> >+ <li class="disabled"><a data-toggle="tooltip" data-placement="left" title="Patron is an adult" id="updatechild" href="#">Update child to adult patron</a></li> > [% END %] > [% IF Koha.Preference('intranetreadinghistory') %] > [%IF ( privacy == 2 ) %] >@@ -249,7 +249,7 @@ function searchToHold(){ > </div> > <div class="modal-footer"> > <button class="btn btn-default approve" type="submit"><i class="fa fa-check"></i> Save</button> >- <button class="btn btn-default deny" href="#" class="cancel" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Cancel</button> >+ <button class="btn btn-default deny cancel" href="#" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> Cancel</button> > </div> > </form> > </div> >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 fd6b5e9..2fb93f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -218,12 +218,12 @@ function validate1(date) { > </div> > [% END %] > >-<h3>[% UNLESS ( I ) %] >+<h3>[% UNLESS ( is_organisation ) %] > [% title | html %] [% firstname | html %] [% END %] [% surname | html %] ([% cardnumber | html %])</h3> > <div class="yui-u first"> > <div id="patron-information" style="padding : .5em;"> > >- [% UNLESS ( I ) %][% IF ( othernames ) %]“[% othernames | html %]”[% END %] >+ [% IF ( othernames ) %]“[% othernames | html %]”[% END %] > > <div class = "address"> > [% IF Koha.Preference( 'AddressFormat' ) %] >@@ -234,46 +234,40 @@ function validate1(date) { > </div> > > <div class="rows"> >- <ol> >- [% IF ( I ) %] >- [% IF ( phonepro ) %]<li><span class="label">Organization phone: </span><a href="tel:[% phonepro %]">[% phonepro | html %]</a></li>[% END %] >- [% IF ( emailpro ) %]<li class="email"><span class="label">Organization email: </span>[% emailpro | html %]</li>[% END %] >- [% ELSE %] >- [% IF ( phone ) %]<li><span class="label">Primary phone: </span><a href="tel:[% phone %]">[% phone | html %]</a></li>[% END %] >- [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span><a href="tel:[% phonepro %]">[% phonepro | html %]</a></li>[% END %] >- [% IF ( mobile ) %]<li><span class="label">Other phone: </span><a href="tel:[% mobile %]">[% mobile | html %]</a></li>[% END %] >- [% END %] >- >- [% IF ( fax ) %]<li><span class="label">Fax: </span>[% fax %]</li>[% END %] >- [% UNLESS ( I ) %] >+ <ol> >+ [% IF ( phone ) %]<li><span class="label">Primary phone: </span><a href="tel:[% phone %]">[% phone | html %]</a></li>[% END %] >+ [% IF ( phonepro ) %]<li><span class="label">Secondary phone: </span><a href="tel:[% phonepro %]">[% phonepro | html %]</a></li>[% END %] >+ [% IF ( mobile ) %]<li><span class="label">Other phone: </span><a href="tel:[% mobile %]">[% mobile | html %]</a></li>[% END %] >+ [% IF ( fax ) %]<li><span class="label">Fax: </span>[% fax %]</li>[% END %] > [% IF ( email ) %]<li class="email"><span class="label">Primary email:</span><a title="[% email %]" href="mailto:[% email | url %]">[% email | html %]</a></li>[% END %] > [% IF ( emailpro ) %]<li class="email"><span class="label">Secondary email: </span><a title="[% emailpro %]" href="mailto:[% emailpro | url %]">[% emailpro | html %]</a></li>[% END %] >- [% END %] >- [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %] >- [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %] ([% age %] years)</li>[% END %] >- [% IF ( sex ) %]<li><span class="label">Gender:</span> >- [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] >- </li>[% END %][% END %] >- [% IF guarantees %] >- <li> >- <span class="label">Guarantees:</span> >- <ul> >- [% FOREACH guarantee IN guarantees %] >- <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li> >+ [% UNLESS ( is_organisation ) %] >+ [% IF ( initials ) %]<li><span class="label">Initials: </span>[% initials %]</li>[% END %] >+ [% IF ( dateofbirth ) %]<li><span class="label">Date of birth:</span>[% dateofbirth | $KohaDates %] ([% age %] years)</li>[% END %] >+ [% IF ( sex ) %]<li><span class="label">Gender:</span> >+ [% IF ( sex == 'F' ) %]Female[% ELSIF ( sex == 'M' ) %]Male[% ELSE %][% sex %][% END %] >+ </li>[% END %] >+ [% END %] >+ [% IF guarantees %] >+ <li> >+ <span class="label">Guarantees:</span> >+ <ul> >+ [% FOREACH guarantee IN guarantees %] >+ <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantee.borrowernumber %]">[% guarantee.firstname | html %] [% guarantee.surname | html %]</a></li> >+ [% END %] >+ </ul> >+ </li> >+ [% ELSIF guarantor %] >+ <li> >+ <span class="label">Guarantor:</span> >+ [% IF guarantor.borrowernumber %] >+ <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a> >+ [% ELSE %] >+ [% guarantor.firstname | html %] [% guarantor.surname | html %] > [% END %] >- </ul> >- </li> >- [% ELSIF guarantor %] >- <li> >- <span class="label">Guarantor:</span> >- [% IF guarantor.borrowernumber %] >- <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% guarantor.borrowernumber %]">[% guarantor.firstname | html %] [% guarantor.surname | html %]</a> >- [% ELSE %] >- [% guarantor.firstname | html %] [% guarantor.surname | html %] >- [% END %] >- </li> >- [% END %] >-</ol> >+ </li> >+ [% END %] >+ </ol> > </div> > <div class="action"> > [% IF ( guarantor.borrowernumber ) %] >@@ -400,7 +394,7 @@ function validate1(date) { > <ol> > <li><span class="label">Card number: </span>[% cardnumber %]</li> > <li><span class="label">Borrowernumber: </span> [% borrowernumber %]</li> >- <li><span class="label">Category: </span>[% description %] ([% categorycode %])</li> >+ <li><span class="label">Category: </span>[% categoryname %] ([% categorycode %])</li> > <li><span class="label">Registration date: </span>[% dateenrolled | $KohaDates %]</li> > > <li><span class="label">Expiration date: </span> >@@ -471,7 +465,6 @@ function validate1(date) { > </div> > <div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=3">Edit</a></div> > >- [% UNLESS ( I ) %] > <div id="patron-alternate-address" style="padding-top: 1em;"> > <h3>Alternate address</h3> > >@@ -489,7 +482,6 @@ function validate1(date) { > </div> > </div> > <div class="action"><a href="memberentry.pl?op=modify&borrowernumber=[% borrowernumber %]&step=6">Edit</a></div> >- [% END %] > > <div id="patron-alternative-contact" style="padding-top: 1em;"> > <h3>Alternative contact</h3> >diff --git a/members/moremember.pl b/members/moremember.pl >index b70a068..f826f8e 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -344,7 +344,7 @@ $template->param( > detailview => 1, > borrowernumber => $borrowernumber, > othernames => $data->{'othernames'}, >- categoryname => $data->{'description'}, >+ categoryname => $patron->category->description, > was_renewed => scalar $input->param('was_renewed') ? 1 : 0, > todaysdate => output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), > totalprice => sprintf("%.2f", $totalprice), >@@ -353,6 +353,7 @@ $template->param( > overdues_exist => $overdues_exist, > StaffMember => $category_type eq 'S', > is_child => $category_type eq 'C', >+ is_organisation => $category_type eq 'I', > samebranch => $samebranch, > quickslip => $quickslip, > housebound_role => scalar $patron->housebound_role, >-- >2.1.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 19129
:
66152
|
66153
|
66155
|
66156
|
66257
|
66258
|
66713
|
66714