Bug 31097: Add classes, drop an ELSE, drop <br />

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2024-05-02 11:41:36 +01:00 committed by Katrin Fischer
parent 2dd1fd5587
commit 1f53e721ef
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
3 changed files with 26 additions and 36 deletions

View file

@ -71,16 +71,18 @@
Restriction added by overdues process [% debarredcomment.remove('OVERDUES_PROCESS ') | $raw | html_line_break %]
[% ELSE %]
[% FOREACH restriction IN patron.restrictions %]
<div class="[% restriction.type.code | lower | html %]_restriction">
<span class="restriction_expiration">
[% IF restriction.expiration %]
[% restriction.expiration | $KohaDates %]
[% ELSE %]
<strong>Indefinite</strong>
[% END %]
[% IF restriction.comment %]
[% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %]<br />
[% ELSE %]
[% restriction.type.display_text | html %]<br />
[% END %]
</span>
<span class="restriction_detail">
[%- restriction.type.display_text | html -%][%- IF restriction.comment -%]: [%- restriction.comment | html_line_break -%][%- END -%]
</span>
</div>
[% END %]
[% END %]
</em><br/>

View file

@ -58,23 +58,17 @@
Restriction added by overdues process [% debarred_comment.remove('OVERDUES_PROCESS ') | html_line_break %]
[% ELSE %]
[% FOR restriction IN logged_in_user.restrictions %]
[% IF restriction.comment %]
[% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %], frozen until:
[% IF restriction.expiration %]
[% restriction.expiration | $KohaDates %]
[% ELSE %]
<strong>Indefinite</strong>
[% END %]
<br />
[% ELSE %]
[% restriction.type.display_text | html %], frozen until:
[% IF restriction.expiration %]
[% restriction.expiration | $KohaDates %]
[% ELSE %]
<strong>Indefinite</strong>
[% END %]
<br />
<div class="patron_restriction">
[%- restriction.type.display_text | html -%][%- IF restriction.comment -%]: <span class="restriction_comment">[% restriction.comment | html_line_break %]</span>, frozen until:
<span class="restriction_expiration">
[%- IF restriction.expiration -%]
[%- restriction.expiration | $KohaDates -%]
[%- ELSE -%]
<strong>Indefinite</strong>
[%- END -%]
</span>
[% END %]
</div>
[% END %]
[% END %]
</strong>

View file

@ -175,23 +175,17 @@
Restriction added by overdues process [% borrower.debarredcomment.remove('OVERDUES_PROCESS ') | html_line_break %]
[% ELSE %]
[% FOR restriction IN logged_in_user.restrictions %]
[% IF restriction.comment %]
[% restriction.type.display_text | html %]: [% restriction.comment | html_line_break %], frozen until:
[% IF restriction.expiration %]
[% restriction.expiration | $KohaDates %]
[% ELSE %]
<div class="patron_restriction">
[%- restriction.type.display_text | html -%][%- IF restriction.comment -%]: <span class="restriction_comment">[% restriction.comment | html_line_break %]</span>, frozen until:
<span class="restriction_expiration">
[%- IF restriction.expiration -%]
[%- restriction.expiration | $KohaDates -%]
[%- ELSE -%]
<strong>Indefinite</strong>
[% END %]
<br />
[% ELSE %]
[% restriction.type.display_text | html %], frozen until:
[% IF restriction.expiration %]
[% restriction.expiration | $KohaDates %]
[% ELSE %]
<strong>Indefinite</strong>
[% END %]
<br />
[%- END -%]
</span>
[% END %]
</div>
[% END %]
[% END %]
</strong>