Bug 33945: (follow-up) Avoid breaking checkouts table when pref is empty
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / branchoverdues.tt
1 [% USE raw %]
2 [% USE Branches %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Overdues at [% Branches.GetLoggedInBranchname | html %] &rsaquo; Circulation &rsaquo; Koha</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
10 <body id="circ_branchoverdues" class="circ">
11 [% WRAPPER 'header.inc' %]
12     [% INCLUDE 'circ-search.inc' %]
13 [% END %]
14
15
16 [% WRAPPER 'sub-header.inc' %]
17     [% WRAPPER breadcrumbs %]
18         [% WRAPPER breadcrumb_item %]
19             <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
20         [% END %]
21         [% WRAPPER breadcrumb_item bc_active= 1 %]
22             [% tx('Overdues at {library}', { library = Branches.GetLoggedInBranchname }) %]
23         [% END %]
24     [% END #/ WRAPPER breadcrumbs %]
25 [% END #/ WRAPPER sub-header.inc %]
26
27 <div class="main container-fluid">
28     <div class="row">
29         [% IF Koha.Preference('CircSidebar') %]
30             <div class="col-sm-10 col-sm-push-2">
31         [% ELSE %]
32             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
33         [% END %]
34             <main>
35
36 <h1>Circulation: Overdues at [% Branches.GetLoggedInBranchname | html %]</h1>
37
38 <form name="selectlocation" action="branchoverdues.pl" method="post">
39     <label for="location">Shelving location selected: </label><select id="location" name="location">
40         <option value="">All shelving locations</option>
41         [% FOREACH locationsloo IN locationsloop %]
42             [% IF ( locationsloo.selected ) %]<option value="[% locationsloo.authorised_value | html %]" selected="selected">[% locationsloo.lib | html %]</option>[% ELSE %]<option value="[% locationsloo.authorised_value | html %]">[% locationsloo.lib | html %]</option>[% END %]
43         [% END %]
44     </select>
45     <input type="submit" name="location" class="btn btn-primary" value="OK" />
46 </form>
47
48     [% IF ( overduesloop ) %]
49         <div class="page-section">
50             <table style="width:100%;">
51                 <tr>
52                     <th>Date due</th>
53                     <th>Title</th>
54                     <th>Patron</th>
55                     <th>Location</th>
56                 </tr>
57                 [% FOREACH overduesloo IN overduesloop %]
58                     <tr>
59                         <td>
60                             [% overduesloo.date_due | $KohaDates as_due_date => 1 %]
61                         </td>
62                         <td>
63                             [% INCLUDE 'biblio-title.inc' biblio=overduesloo link = 1 %] [% IF ( overduesloo.author ) %] by [% overduesloo.author | html %][% END %]
64
65                                 <br />Barcode : [% overduesloo.barcode | html %]
66                         </td>
67                         <td>
68                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overduesloo.borrowernumber | uri %]">[% overduesloo.borrowersurname | html %], [% overduesloo.borrowerfirstname | html %]</a>
69                             <br />[% overduesloo.cardnumber | html %]
70                             <br />[% overduesloo.borrowerphone | html %]<br />
71                         [% IF ( overduesloo.borroweremail ) %]<a href="mailto:[% overduesloo.borroweremail | uri %]?subject=Overdue: [% overduesloo.title | uri %]">
72                         [% overduesloo.borroweremail | html %]</a>[% END %]
73                         </td>
74                         <td>[% Branches.GetName( overduesloo.homebranch ) | html %] [% overduesloo.itemcallnumber | html %]
75                         </td>
76                     </tr>
77                 [% END %]
78             </table>
79         </div> <!-- /.page-section -->
80     [% ELSE %]
81         <div class="dialog message">There are no overdues for today[% IF ( location ) %] at the selected location[% END %].</div>
82     [% END %]
83     [% IF ( todayoverduesloop ) %]
84         <div id="branch_odues_today_odues" class="page-section">
85             <table style="width:100%;">
86             <caption>Today's notifications</caption>
87             <tr>
88                 <th>Date due</th>
89                 <th>Title</th>
90                 <th>Borrower</th>
91                 <th>Location</th>
92                 <th>Cancel</th>
93             </tr>
94                 [% FOREACH todayoverduesloo IN todayoverduesloop %]
95                     <tr>
96                         <td>
97                             <p>
98                             [% todayoverduesloo.date_due | $KohaDates as_due_date => 1 %]
99                             </p>
100                         </td>
101                         <td>
102                             <p>
103                                 <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% todayoverduesloo.biblionumber | uri %]">[% todayoverduesloo.title | html %]</a>
104                                 &nbsp; (<strong>[% todayoverduesloo.description | html %]</strong>)
105                                 <br />Barcode : [% todayoverduesloo.barcode | html %]
106                             </p>
107                         </td>
108                         <td>
109                             <p><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% todayoverduesloo.borrowernumber | uri %]">[% todayoverduesloo.borrowersurname | html %] &nbsp; [% todayoverduesloo.borrowerfirstname | html %]</a>
110                             <br />[% todayoverduesloo.cardnumber | html %]<br />
111                             <br />[% todayoverduesloo.borrowerphone | html %]<br />
112                         [% IF ( todayoverduesloo.borroweremail ) %]<a href="mailto:[% todayoverduesloo.borroweremail | uri %]?subject=Overdue: [% todayoverduesloo.title | uri %]">
113                         [% todayoverduesloo.borroweremail | html %]</a>[% END %]
114                             </p>
115                         </td>
116                         <td><p>[% Branches.GetName( todayoverduesloo.homebranch ) | html %] [% todayoverduesloo.itemcallnumber | html %]</p>
117                         </td>
118                         <td>
119                         <a href="branchoverdues.pl?action=remove&amp;borrowernumber=[% todayoverduesloo.borrowernumber | uri %]&amp;itemnumber=[% todayoverduesloo.itemnumber | uri %]&amp;method=phone&amp;location=[% todayoverduesloo.location | uri %]">Cancel notification</a>
120                         </td>
121                     </tr>
122                 [% END %]
123             </table>
124         </div>
125     [% END %]
126
127                 </main>
128             </div> <!-- /.col-sm-10.col-sm-push-2 -->
129
130             [% IF Koha.Preference('CircSidebar') %]
131                 <div class="col-sm-2 col-sm-pull-10">
132                     <aside>
133                         [% INCLUDE 'circ-nav.inc' %]
134                     </aside>
135                 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
136             [% END %]
137         </div> <!-- /.row -->
138
139 [% INCLUDE 'intranet-bottom.inc' %]