Bug 5877 : Offline circulation improvements : upload all files, apply at once
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / offline_circ / list.tt
1     [% INCLUDE "doc-head-open.inc" %]
2     <title>Koha &rsaquo; Circulation &rsaquo; Offline Circulation</title>
3     [% INCLUDE "doc-head-close.inc" %]
4     <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
5     <script type="text/javascript" language="javascript">
6         $(document).ready(function() {
7             $('#checkall').click(function() {
8                 $(":checkbox").attr('checked', $('#checkall').is(':checked'));
9             });
10             $('#process,#delete').click(function() {
11                 var action = $(this).attr("id");
12                 $(":checkbox[name=operationid]:checked").each(function() {
13                     var cb = $(this);
14                     $.ajax({
15                         url: "process.pl",
16                         data: { 'action': action, 'operationid': this.value },
17                         async: false,
18                         dataType: "text",
19                         success: function(data) {
20                             cb.replaceWith(data);
21                         }});
22                 });
23                 if( $('#operations tbody :checkbox').size() == 0 ) {
24                     $('#actions').hide();
25                 }
26             });
27         });
28     </script>
29 </head>
30 <body>
31     [% INCLUDE 'header.inc' %]
32     [% INCLUDE 'circ-search.inc' %]
33
34     <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Offline Circulation</div>
35
36     <div id="doc" class="yui-t7">
37
38             <div id="bd">
39
40             <h2>Offline Circulation</h2>
41
42             [% IF ( pending_operations ) %]
43
44                 <form>
45
46                 <table id="operations">
47                     <thead>
48                             <tr>
49                                 <th><input type="checkbox" name="checkall" id="checkall" /></th>
50                                     <th>Date</th>
51                                     <th>Action</th>
52                                     <th>Barcode</th>
53                                     <th>Cardnumber</th>
54                             </tr>
55                         </thead>
56                         <tbody>
57                             [% FOREACH operation IN pending_operations %]
58                                 <tr class="oc-[% operation.action %]">
59                                     <td><input type="checkbox" name="operationid" value="[% operation.operationid %]" /></td>
60                                         <td>[% operation.timestamp %]</td>
61                                         <td>[% operation.action %]</td>
62                                         <td>
63                                             [% IF ( biblionumber ) %]
64                                                 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% operation.biblionumber %]" title="[% operation.bibliotitle %]">[% operation.barcode %]</a>
65                                             [% ELSE %]
66                                                 <span class="error">[% operation.barcode %]</span>
67                                             [% END %]
68                                         </td>
69                                         <td>
70                                         [% IF ( operation.actionissue ) %]
71                                         [% IF ( operation.borrowernumber ) %]
72                                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% operation.borrowernumber %]" title="[% operation.borrower %]">[% operation.cardnumber %]</a>
73                                         [% ELSE %]
74                                             <span class="error">[% operation.cardnumber %]</span>
75                                         [% END %]
76                                         [% END %]
77                                         </td>
78                                 </tr>
79                             [% END %]
80                         </tbody>
81                 </table>
82
83             <p id="actions">For the selected operations:
84             <input type="button" id="process" value="Process" />
85             <input type="button" id="delete" value="Delete" /></p>
86
87             </form>
88
89         [% ELSE %]
90
91             <p>There is no pending offline operations.</p>
92
93         [% END %]
94
95     </div>
96
97     [% INCLUDE 'intranet-bottom.inc' %]