Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/printslip.tt
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

33 lines
1.3 KiB
Text

[% USE Koha %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( caller == 'hold-transfer' ) %]
<title>Koha &rsaquo; Circulation &rsaquo; Hold transfer print receipt</title>
[% ELSIF ( caller == 'transfer' ) %]
<title>Koha &rsaquo; Circulation &rsaquo; Transfers print receipt</title>
[% ELSIF ( caller == 'members' ) %]
<title>Koha &rsaquo; Patrons &rsaquo; Print receipt for [% borrowernumber %]</title>
[% ELSIF ( title ) %][%# FIXME title is never defined %]
<title>Koha &rsaquo; Patrons &rsaquo; [% title %]</title>
[% END %]
[% INCLUDE 'doc-head-close.inc' %]
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% interface %]/[% theme %]/img/favicon.ico[% END %]" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/print_[% KOHA_VERSION %].css" />
[% IF ( Koha.Preference('SlipCSS') ) %]
<link rel="stylesheet" type="text/css" href="[% Koha.Preference('SlipCSS') %]" />
[% END %]
[% INCLUDE 'slip-print.inc' #printThenClose %]
</head>
<body id="circ_printslip" class="circ">
<div id="receipt">
[% IF plain %]
<pre>
[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %]
</pre>
[% ELSE %]
[% IF ( slip ) %][% slip %][% ELSE %]No slip template found[% END %]
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]