Bug 9543 - (Follow-up) Show patrons messaging subscription on holds notification

As of comment #19
- Code de-duplicated to a BLOCK statement
- Variable renamed
- Wording slightly changed. I like it that way, but feel free to change it
  in a follow-up

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Marc Véron 2016-05-20 11:01:18 +02:00 committed by Brendan Gallagher
parent 481fb09701
commit 9c339f5941
1 changed files with 16 additions and 22 deletions

View File

@ -6,6 +6,20 @@
[% USE AuthorisedValues %]
[% USE ColumnsSettings %]
[% BLOCK display_bormessagepref %]
[% IF ( bormessagepref ) %]
<li>Patron notification:
[% FOREACH mtt IN bormessagepref.keys %]
[% IF ( mtt == 'email' ) %] Email. [% END %]
[% IF ( mtt == 'phone' ) %] Phone. [% END %]
[% IF ( mtt == 'sms' ) %] SMS. [% END %]
[% END %]
</li>
[% ELSE %]
<li>Patron is not notified.</li>
[% END %]
[% END %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
<link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
@ -238,17 +252,7 @@ $(document).ready(function () {
[% borcity %] [% borzip %]</li>
[% IF ( borphone ) %]<li> [% borphone %]</li>[% END %]
[% IF ( boremail ) %]<li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>[% END %]
[% IF ( bormessagepref ) %]
<li>Patron is notified:
[% FOREACH key IN bormessagepref.keys %]
[% IF ( key == 'email' ) %] Email. [% END %]
[% IF ( key == 'phone' ) %] Phone. [% END %]
[% IF ( key == 'sms' ) %] SMS. [% END %]
[% END %]
</li>
[% ELSE %]
<li>Patron is not notified</li>
[% END %]
[% INCLUDE display_bormessagepref %]
[% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
[% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]</ul>
[% IF ( transfertodo ) %]
@ -410,17 +414,7 @@ $(document).ready(function () {
[% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
[% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
[% UNLESS ( transfertodo) %]
[% IF ( bormessagepref ) %]
<li>Patron is notified:
[% FOREACH key IN bormessagepref.keys %]
[% IF ( key == 'email' ) %] Email. [% END %]
[% IF ( key == 'phone' ) %] Phone. [% END %]
[% IF ( key == 'sms' ) %] SMS. [% END %]
[% END %]
</li>
[% ELSE %]
<li>Patron is not notified</li>
[% END %]
[% INCLUDE display_bormessagepref %]
[% END %]
[% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
[% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]