Koha/koha-tmpl/intranet-tmpl/prog/en/includes/member-display-address-style-fr.inc
Jonathan Druart 0ab22e1c7c Bug 18789: Send Koha::Patron object to the templates
In order to simplify and make uniform the code, the controller scripts send
a Koha::Patron object to the templates instead of all attributes of a patron.

That will make the code much more easier to maintain and will be less
error-prone.

The variable "patron" sent to the templates is supposed to represent the
patron the librarian is editing the detail.

In the members module and some scripts of the circulation module, the
patron's detail are sent one by one to the template. That leads to
frustration from developpers (making sure everything is passed from all
scripts) and to regression (we got tone of bugs in the last year because
of this way to do).
With this patch set it will be easy access patron's detail, passing only
1 variable from the controllers.

Test plan:
Play with the patron and circulation module and make sur the detail of
the patron you are editing/seeing info are correctly displayed.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-16 13:03:58 -03:00

19 lines
868 B
HTML

[% IF ( patron.address or patron.address2 ) %]
[% IF ( patron.address ) %]
[% SET roadtype_desc = '' %]
[% IF patron.streettype %]
[% SET roadtype_desc = AuthorisedValues.GetByCode('ROADTYPE', patron.streettype) %]
[% END %]
<li class="patronaddress1">[% IF patron.streetnumber %][% patron.streetnumber %] [% END %]
[%IF roadtype_desc %][% roadtype_desc %] [% END %]
[% patron.address %]
</li>
[% END %]
[% IF ( patron.address2 ) %]
<li class="patronaddress2">[% patron.address2 %]</li>
[% END %]
[% END %]
[% IF ( patron.city ) %]
<li class="patroncity">[%IF ( patron.zipcode ) %][% patron.zipcode %] [% END %][% patron.city %][% IF ( patron.state ) %]</br>[% patron.state %][% END %]
[% IF ( patron.country ) %]<br />[% patron.country %][% END %]</li>
[% END %]