Bugzilla – Attachment 66155 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), 12.11 KB, created by
Katrin Fischer
on 2017-08-17 22:21:16 UTC
(
hide
)
Description:
Bug 19129 - Clean up Details tab for Organisation patrons
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2017-08-17 22:21:16 UTC
Size:
12.11 KB
patch
obsolete
>From 2d45c5da5821b5db9728e9a50629924e74fbcfea 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 between categorycode and > categorytype. >- 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 | 74 ++++++++++------------ > members/moremember.pl | 6 +- > 4 files changed, 41 insertions(+), 50 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..b40c29a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -223,7 +223,7 @@ function validate1(date) { > <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 ( I ) %] >+ [% 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..fe3c49a 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -330,9 +330,6 @@ if ( C4::Context->preference("ExportCircHistory") ) { > $template->param(csv_profiles => [ Koha::CsvProfiles->search({ type => 'marc' }) ]); > } > >-# in template <TMPL_IF name="I"> => institutional (A for Adult, C for children) >-$template->param( $data->{'categorycode'} => 1 ); >- > # Display the language description instead of the code > # Note that this is certainly wrong > my ( $subtag, $region ) = split '-', $patron->lang; >@@ -344,7 +341,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 +350,7 @@ $template->param( > overdues_exist => $overdues_exist, > StaffMember => $category_type eq 'S', > is_child => $category_type eq 'C', >+ $category_type => 1, # [% IF ( I ) %] = institutional/organisation > samebranch => $samebranch, > quickslip => $quickslip, > housebound_role => scalar $patron->housebound_role, >-- >2.7.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