Bug 35356: Show SMS labels only when data exists
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / discharge.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE AuthorisedValues %]
5 [% USE Branches %]
6 [% PROCESS 'i18n.inc' %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10     [% UNLESS blocking_error  %]
11         [% t("Discharge for") | html %] [% INCLUDE 'patron-title.inc' no_html = 1 %] &rsaquo;
12     [% END %]
13     [% t("Patrons") | html %] &rsaquo;
14     [% t("Koha") | html %]
15 [% END %]</title>
16 [% INCLUDE 'doc-head-close.inc' %]
17 </head>
18 <body id="discharge" class="discharge">
19 [% WRAPPER 'header.inc' %]
20     [% INCLUDE 'patron-search-header.inc' %]
21 [% END %]
22
23 [% WRAPPER 'sub-header.inc' %]
24     [% WRAPPER breadcrumbs %]
25         [% WRAPPER breadcrumb_item %]
26             <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
27         [% END %]
28         [% WRAPPER breadcrumb_item %]
29             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
30         [% END %]
31         [% WRAPPER breadcrumb_item bc_active= 1 %]
32             <span>Discharge</span>
33         [% END %]
34     [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
36
37 <div class="main container-fluid">
38     <div class="row">
39         <div class="col-sm-10 col-sm-push-2">
40             <main>
41
42 [% INCLUDE 'members-toolbar.inc' %]
43
44 <h1>Discharge</h1>
45 [% FOR message IN messages %]
46     <div class="dialog [% message.type | html %]">
47     [% IF message.code == "unable_to_generate_pdf" %]
48         An error occurs when generating the PDF file.
49         Please contact the administrator to resolve this problem.
50     [% END %]
51     </div>
52 [% END %]
53 [% UNLESS can_be_discharged %]
54     <p>Cannot edit discharge: the patron has checked out items.</p>
55 [% ELSE %]
56     [% IF patron.holds.count %]
57         <p>Patron has holds. They will be cancelled if the discharge is generated.</p>
58     [% END %]
59     <div class="btn-toolbar">
60         <form method="post">
61             <input type="submit" name="discharge" class="btn btn-primary" value="Generate discharge" />
62             <input type="hidden" value="[% patron.borrowernumber | html %]" name="borrowernumber" />
63         </form>
64     </div>
65 [% END %]
66
67 [% IF validated_discharges %]
68     <div class="page-section">
69         <h2>Already validated discharges</h2>
70         <table>
71             <thead>
72                 <tr>
73                     <th>Requested</th>
74                     <th>Validated</th>
75                 </tr>
76             </thead>
77             <tbody>
78                 [% FOR d IN validated_discharges %]
79                     <tr>
80                         <td>[% d.needed | $KohaDates with_hours = 1 %]</td>
81                         <td>[% d.validated | $KohaDates with_hours = 1 %]</td>
82                     </tr>
83                 [% END %]
84             </tbody>
85         </table>
86     </div>
87 [% END %]
88
89             </main>
90         </div> <!-- /.col-sm-10.col-sm-push-2 -->
91
92         <div class="col-sm-2 col-sm-pull-10">
93             <aside>
94                 [% INCLUDE 'circ-menu.inc' %]
95             </aside>
96         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
97      </div> <!-- /.row -->
98
99 [% MACRO jsinclude BLOCK %]
100     [% INCLUDE 'str/members-menu.inc' %]
101     [% Asset.js("js/members-menu.js") | $raw %]
102 [% END %]
103
104 [% INCLUDE 'intranet-bottom.inc' %]