View | Details | Raw Unified | Return to bug 33324
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/export.tt (-248 / +265 lines)
Lines 51-313 Link Here
51
    </div>
51
    </div>
52
[% END %]
52
[% END %]
53
53
54
<div id="exporttype" class="toptabs">
54
[% WRAPPER tabs id= "exporttype" %]
55
    <ul class="nav nav-tabs" role="tablist">
55
    [% WRAPPER tabs_nav %]
56
        <li role="presentation" class="active">
56
        [% WRAPPER tab_item tabname= "bibs" bt_active= 1 %] <span>Export bibliographic records</span> [% END %]
57
            <a href="#bibs" aria-controls="bibs" role="tab" data-toggle="tab">Export bibliographic records</a>
57
        [% WRAPPER tab_item tabname= "auths" %] <span>Export authority records</span> [% END %]
58
        </li>
59
        <li role="presentation">
60
            <a href="#auths" aria-controls="auths" role="tab" data-toggle="tab">Export authority records</a>
61
        </li>
62
        [% IF ( allow_db_export ) %]
58
        [% IF ( allow_db_export ) %]
63
            <li role="presentation">
59
            [% WRAPPER tab_item tabname= "db" %] <span>Export database</span> [% END %]
64
                <a href="#db" aria-controls="db" role="tab" data-toggle="tab">Export database</a>
65
            </li>
66
        [% END %]
60
        [% END %]
67
        [% IF ( allow_conf_export ) %]
61
        [% IF ( allow_conf_export ) %]
68
            <li role="presentation">
62
            [% WRAPPER tab_item tabname= "conf" %] <span>Export configuration</span> [% END %]
69
                <a href="#conf" aria-controls="conf" role="tab" data-toggle="tab">Export configuration</a>
70
            </li>
71
        [% END %]
63
        [% END %]
72
    </ul>
64
    [% END # /WRAPPER tabs_nav %]
73
    <div class="tab-content">
65
74
        <div id="bibs" role="tabpanel" class="tab-pane active">
66
    [% WRAPPER tab_panels %]
75
        <p>
67
        [% WRAPPER tab_panel tabname="bibs" bt_active= 1 %]
76
            <strong>Note : The items are exported by this tool unless specified.</strong>
68
            <p>
77
        </p>
69
                <strong>Note : The items are exported by this tool unless specified.</strong>
78
70
            </p>
79
        <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
71
80
            <fieldset class="rows">
72
            <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
81
            <legend> Select records to export </legend>
73
                <fieldset class="rows">
82
                <ol>
74
                    <legend> Select records to export </legend>
83
                <li>
75
                    <ol>
84
                    <label for="start">From biblionumber: </label>
76
                        <li>
85
                    <input id="start" type="text" name="StartingBiblionumber" size="5" />
77
                            <label for="start">From biblionumber: </label>
86
                </li>
78
                            <input id="start" type="text" name="StartingBiblionumber" size="5" />
87
                <li>
79
                        </li>
88
                    <label for="end">To biblionumber: </label>
80
                        <li>
89
                    <input id="end" type="text" name="EndingBiblionumber" size="5" />
81
                            <label for="end">To biblionumber: </label>
90
                </li>
82
                            <input id="end" type="text" name="EndingBiblionumber" size="5" />
91
83
                        </li>
92
                <li>
84
93
                    <label for="itemtype">Item type: </label>
85
                        <li>
94
                    <select name="itemtype" id="itemtype" multiple>
86
                            <label for="itemtype">Item type: </label>
95
                        <option value="">-- All --</option>
87
                            <select name="itemtype" id="itemtype" multiple>
96
                        [% FOREACH itemtype IN itemtypes %]
88
                                <option value="">-- All --</option>
97
                            <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
89
                                [% FOREACH itemtype IN itemtypes %]
98
                        [% END %]
90
                                    <option value="[% itemtype.itemtype | html %]">[% itemtype.translated_description | html %]</option>
99
                    </select>
91
                                [% END %]
100
                </li>
92
                            </select>
101
93
                        </li>
102
                <li>
94
103
                    <label>With items owned by the following libraries: </label>
95
                        <li>
104
                    [% INCLUDE 'branch-selector.inc' branches = libraries %]
96
                            <label>With items owned by the following libraries: </label>
105
                </li>
97
                            [% INCLUDE 'branch-selector.inc' branches = libraries %]
106
            </ol>
98
                        </li>
107
99
                    </ol>
108
            <fieldset class="rows">
100
109
                <legend>Call number range</legend>
101
                    <fieldset class="rows">
110
                <ol>
102
                        <legend>Call number range</legend>
111
                    <li>
103
                        <ol>
112
                        <label for="startcn">From item call number: </label>
104
                            <li>
113
                        <input id="startcn" type="text" name="start_callnumber" size="15" />
105
                                <label for="startcn">From item call number: </label>
114
                    </li>
106
                                <input id="startcn" type="text" name="start_callnumber" size="15" />
115
                    <li>
107
                            </li>
116
                        <label for="endcn">To item call number: </label>
108
                            <li>
117
                        <input id="endcn" type="text" name="end_callnumber" size="15" />
109
                                <label for="endcn">To item call number: </label>
118
                    </li>
110
                                <input id="endcn" type="text" name="end_callnumber" size="15" />
119
                </ol>
111
                            </li>
120
            </fieldset>
112
                        </ol>
121
113
                    </fieldset>
122
            <fieldset class="rows">
114
123
                <legend>Accession date (inclusive)</legend>
115
                    <fieldset class="rows">
124
                <ol>
116
                        <legend>Accession date (inclusive)</legend>
125
                    <li>
117
                        <ol>
126
                            <label for="from">Start date:</label>
118
                            <li>
127
                            <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickr" data-date_to="to" />
119
                                <label for="from">Start date:</label>
128
                    </li>
120
                                <input type="text" size="10" id="from" name="start_accession" value="[% from | html %]" class="flatpickr" data-date_to="to" />
129
                    <li>
121
                            </li>
130
                        <label for="to">End date:</label>
122
                            <li>
131
                        <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickr" />
123
                                <label for="to">End date:</label>
132
                    </li>
124
                                <input size="10" id="to" name="end_accession" value="[% end_accession | html %]" type="text" class="flatpickr" />
133
                </ol>
125
                            </li>
134
            </fieldset>
126
                        </ol>
135
127
                    </fieldset>
136
            </fieldset>
128
                </fieldset>
137
            <fieldset class="rows">
129
138
            <legend>
130
                <fieldset class="rows">
139
                Use a file
131
                    <legend>
140
            </legend>
132
                        Use a file
141
                <ol>
133
                    </legend>
142
                <li>File containing a list of biblionumbers with one biblionumber per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)</li>
134
                    <ol>
143
                <li><label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" /></li>
135
                        <li>
144
                </ol>
136
                            File containing a list of biblionumbers with one biblionumber per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)
145
            </fieldset>
137
                        </li>
146
            <fieldset class="rows">
138
                        <li>
147
            <legend> Options</legend>
139
                            <label for="id_list_file">File: </label> <input type="file" id="id_list_file" name="id_list_file" />
148
        <ol>        <li>
140
                        </li>
149
                <label for="dont_export_item">Don't export items:</label>
141
                    </ol>
150
                <input id="dont_export_item" type="checkbox" name="dont_export_item" />
142
                </fieldset>
151
                </li>
143
152
                <li>
144
                <fieldset class="rows">
153
                <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label>
145
                    <legend> Options</legend>
154
                <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" />
146
                    <ol>
155
                </li>
147
                        <li>
156
                <li>
148
                            <label for="dont_export_item">Don't export items:</label>
157
                <label for="export_remove_fields">Don't export fields:</label>
149
                            <input id="dont_export_item" type="checkbox" name="dont_export_item" />
158
                <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" />
150
                        </li>
159
                separate by a blank. (e.g., 100a 200 606)
151
                        <li>
160
                </li></ol>
152
                            <label for="strip_items_not_from_libraries">Remove items not owned by selected libraries:</label>
161
            </fieldset>
153
                            <input id="strip_items_not_from_libraries" type="checkbox" name="strip_items_not_from_libraries" />
162
            <fieldset class="rows">
154
                        </li>
163
            <legend>
155
                        <li>
164
                Output format
156
                            <label for="export_remove_fields">Don't export fields:</label>
165
            </legend>
157
                            <input id="export_remove_fields" type="text" name="export_remove_fields" value="[% export_remove_fields | html %]" />
166
                <ol><li>
158
                            separate by a blank. (e.g., 100a 200 606)
167
                    <label for="output_format">File format: </label>
159
                        </li>
168
                    <select id="output_format" name="output_format">
160
                    </ol>
169
                        <option value="iso2709">MARC</option>
161
                </fieldset>
170
                        <option value="xml">XML</option>
162
171
                        [% IF csv_profiles %]
163
                <fieldset class="rows">
172
                            <option value="csv">CSV</option>
164
                    <legend>
165
                        Output format
166
                    </legend>
167
                    <ol>
168
                        <li>
169
                            <label for="output_format">File format: </label>
170
                            <select id="output_format" name="output_format">
171
                                <option value="iso2709">MARC</option>
172
                                <option value="xml">XML</option>
173
                                [% IF csv_profiles %]
174
                                    <option value="csv">CSV</option>
175
                                [% ELSE %]
176
                                    <option value="csv" disabled data-toggle="tooltip" data-placement="left" title="You must create a CSV profile for MARC exports to use this option.">CSV</option>
177
                                [% END %]
178
                            </select>
179
                        </li>
180
                        <li class="csv_profiles">
181
                            <label for="bibs_csv_profile">CSV profile: </label>
182
                            <select id="bibs_csv_profile" name="csv_profile_id">
183
                                [% FOR csv_profile IN csv_profiles %]
184
                                    <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option>
185
                                [% END %]
186
                            </select>
187
                        </li>
188
                        <li>
189
                            <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
190
                        </li>
191
                    </ol>
192
                </fieldset>
193
                <input type="hidden" name="op" value="export" />
194
                <input type="hidden" name="record_type" value="bibs" />
195
                <fieldset class="action">
196
                    <input type="submit" class="btn btn-primary" value="Export bibliographic records" />
197
                </fieldset>
198
            </form>
199
        [% END # /tab_panel#bibs %]
200
201
        [% WRAPPER tab_panel tabname="auths" %]
202
            <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
203
                <fieldset class="rows">
204
                    <legend> Select records to export </legend>
205
                    <ol>
206
                        <li>
207
                            <label for="start">From authid: </label>
208
                            <input id="start" type="text" name="starting_authid" size="6" />
209
                        </li>
210
                        <li>
211
                            <label for="end">To authid: </label>
212
                            <input id="end" type="text" name="ending_authid" size="6" />
213
                        </li>
214
                        <li>
215
                            <label for="authtype">Authority type: </label>
216
                            <select name="authtype" id="authtype">
217
                                <option value="">-- All --</option>
218
                                [% FOREACH authority_type IN authority_types %]
219
                                    <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
220
                                [% END %]
221
                            </select>
222
                        </li>
223
                    </ol>
224
                </fieldset>
225
226
                <fieldset class="rows">
227
                    <legend>
228
                        Use a file
229
                    </legend>
230
                    <ol>
231
                        <li>
232
                            File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)
233
                        </li>
234
                        <li>
235
                            <label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" />
236
                        </li>
237
                    </ol>
238
                </fieldset>
239
240
                <fieldset class="rows">
241
                    <legend>Options</legend>
242
                    <ol>
243
                        <li>
244
                            <label for="export_remove_fields">Don't export fields:</label>
245
                            <input id="export_remove_fields" type="text" name="export_remove_fields" />
246
                            <div class="hint">separate by a blank. (e.g., 100a 200 606)</div>
247
                        </li>
248
                    </ol>
249
                </fieldset>
250
251
                <fieldset class="rows">
252
                    <legend>Output format</legend>
253
                    <ol>
254
                        <li>
255
                            <label for="output_format">File format: </label>
256
                            <select id="output_format_auth" name="output_format">
257
                                <option value="marc">MARC</option>
258
                                <option value="xml">XML</option>
259
                            </select>
260
                        </li>
261
                        <li>
262
                            <label for="filename_auth">File name:</label>
263
                            <input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" />
264
                        </li>
265
                    </ol>
266
                </fieldset>
267
268
                <input type="hidden" name="op" value="export" />
269
                <input type="hidden" name="record_type" value="auths" />
270
271
                <fieldset class="action"><input type="submit" class="btn btn-primary" value="Export authority records" /></fieldset>
272
            </form>
273
        [% END # /tab_panel#auths %]
274
275
        [% IF ( allow_db_export ) %]
276
            [% WRAPPER tab_panel tabname="db" %]
277
                <form method="post" class="clearfix" action="/cgi-bin/koha/tools/export.pl">
278
                    <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p>
279
                    <fieldset class="rows">
280
                        <legend> Choose a file </legend>
281
                        [% IF ( dbfiles && (dbfiles.size > 0) ) %]
282
                            <ul>
283
                                [% FOREACH dbfile IN dbfiles %]
284
                                    <li><input type="radio" name="filename" value="[% dbfile | html %]" />[% dbfile | html %]</li>
285
                                [% END %]
286
                            </ul>
173
                        [% ELSE %]
287
                        [% ELSE %]
174
                            <option value="csv" disabled data-toggle="tooltip" data-placement="left" title="You must create a CSV profile for MARC exports to use this option.">CSV</option>
288
                            <p style="clear:both">Unfortunately, no backups are available.</p>
175
                        [% END %]
176
                    </select>
177
                </li>
178
                <li class="csv_profiles">
179
                    <label for="bibs_csv_profile">CSV profile: </label>
180
                    <select id="bibs_csv_profile" name="csv_profile_id">
181
                        [% FOR csv_profile IN csv_profiles %]
182
                            <option value="[% csv_profile.export_format_id | html %]">[% csv_profile.profile | html %]</option>
183
                        [% END %]
184
                    </select>
185
                </li>
186
                <li>
187
                <label for="filename">File name:</label><input id="filename" type="text" name="filename" value="koha.mrc" />
188
                </li></ol>
189
            </fieldset>
190
            <input type="hidden" name="op" value="export" />
191
            <input type="hidden" name="record_type" value="bibs" />
192
193
            <fieldset class="action"><input type="submit" class="btn btn-primary" value="Export bibliographic records" /></fieldset>
194
        </form>
195
        </div>
196
197
        <div id="auths" role="tabpanel" class="tab-pane">
198
        <form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/export.pl">
199
            <fieldset class="rows">
200
            <legend> Select records to export </legend>
201
                <ol><li>
202
                    <label for="start">From authid: </label>
203
                    <input id="start" type="text" name="starting_authid" size="6" />
204
                </li>
205
                <li>
206
                    <label for="end">To authid: </label>
207
                    <input id="end" type="text" name="ending_authid" size="6" />
208
                </li>
209
                <li>
210
                    <label for="authtype">Authority type: </label>
211
                    <select name="authtype" id="authtype">
212
                        <option value="">-- All --</option>
213
                        [% FOREACH authority_type IN authority_types %]
214
                            <option value="[% authority_type.authtypecode | html %]">[% authority_type.authtypetext | html %]</option>
215
                        [% END %]
289
                        [% END %]
216
                    </select>
290
                    </fieldset>
217
                </li>
218
                </ol>
219
            </fieldset>
220
            <fieldset class="rows">
221
            <legend>
222
                Use a file
223
            </legend>
224
                <ol>
225
                <li>File containing a list of authids with one authid per line. This list works as a filter: it is compatible with other parameters. (File types accepted: .csv and .txt)</li>
226
                <li><label for="id_list_file">File:</label> <input type="file" id="id_list_file" name="id_list_file" /></li>
227
                </ol>
228
            </fieldset>
229
            <fieldset class="rows">
230
            <legend>Options</legend>
231
                <ol>
232
                <li>
233
                    <label for="export_remove_fields">Don't export fields:</label>
234
                    <input id="export_remove_fields" type="text" name="export_remove_fields" />
235
                    separate by a blank. (e.g., 100a 200 606)
236
                </li></ol>
237
            </fieldset>
238
            <fieldset class="rows">
239
            <legend>Output format</legend>
240
                <ol><li>
241
                    <label for="output_format">File format: </label>
242
                    <select id="output_format_auth" name="output_format">
243
                        <option value="marc">MARC</option>
244
                        <option value="xml">XML</option>
245
                    </select>
246
                </li>
247
                <li>
248
                <label for="filename_auth">File name:</label><input id="filename_auth" type="text" name="filename_auth" value="koha.mrc" />
249
                </li></ol>
250
            </fieldset>
251
            <input type="hidden" name="op" value="export" />
252
            <input type="hidden" name="record_type" value="auths" />
253
254
            <fieldset class="action"><input type="submit" class="btn btn-primary" value="Export authority records" /></fieldset>
255
        </form>
256
        </div>
257
291
258
        [% IF ( allow_db_export ) %]
292
                    [% IF ( dbfiles && (dbfiles.size > 0) ) %]
259
        <div id="db" role="tabpanel" class="tab-pane">
293
                        <input type="hidden" name="op" value="export" />
260
        <form method="post" action="/cgi-bin/koha/tools/export.pl">
294
                        <input type="hidden" name="record_type" value="db" />
261
            <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p>
295
                        <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download database" /></fieldset>
262
            <fieldset class="rows">
296
                    [% END %]
263
            <legend> Choose a file </legend>
297
                </form>
264
            [% IF ( dbfiles && (dbfiles.size > 0) ) %]
298
            [% END # /tab_panel#db %]
265
                <ul>
299
        [% END # /IF allow_db_export %]
266
                [% FOREACH dbfile IN dbfiles %]
267
                    <li><input type="radio" name="filename" value="[% dbfile | html %]">[% dbfile | html %]</input></li>
268
                [% END %]
269
                </ul>
270
            [% ELSE %]
271
                <p>Unfortunately, no backups are available.</p>
272
            [% END %]
273
            </fieldset>
274
275
            [% IF ( dbfiles && (dbfiles.size > 0) ) %]
276
                <input type="hidden" name="op" value="export" />
277
                <input type="hidden" name="record_type" value="db" />
278
                <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download database" /></fieldset>
279
            [% END %]
280
        </form>
281
        </div>
282
        [% END %]
283
300
284
        [% IF ( allow_conf_export ) %]
301
        [% IF ( allow_conf_export ) %]
285
        <div id="conf" role="tabpanel" class="tab-pane">
302
            [% WRAPPER tab_panel tabname="conf" %]
286
        <form method="post" action="/cgi-bin/koha/tools/export.pl">
303
                <form method="post" class="clearfix" action="/cgi-bin/koha/tools/export.pl">
287
            <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p>
304
                    <p><strong>Note : This export file will be very large, and is generated nightly.</strong></p>
288
            <fieldset class="rows">
305
                    <fieldset class="rows">
289
            <legend> Choose a file </legend>
306
                        <legend> Choose a file </legend>
290
            [% IF ( conffiles && (conffiles.size > 0) ) %]
307
                        [% IF ( conffiles && (conffiles.size > 0) ) %]
291
                <ul>
308
                            <ul>
292
                [% FOREACH conffile IN conffiles %]
309
                                [% FOREACH conffile IN conffiles %]
293
                    <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li>
310
                                    <li><input type="radio" name="filename" value="[% conffile | html %]">[% conffile | html %]</input></li>
294
                [% END %]
311
                                [% END %]
295
                </ul>
312
                                </ul>
296
            [% ELSE %]
313
                        [% ELSE %]
297
                <p>Unfortunately, no backups are available.</p>
314
                            <p style="clear:both">Unfortunately, no backups are available.</p>
298
            [% END %]
315
                        [% END %]
299
            </fieldset>
316
                    </fieldset>
300
317
301
            [% IF ( conffiles && (conffiles.size > 0) ) %]
318
                    [% IF ( conffiles && (conffiles.size > 0) ) %]
302
                <input type="hidden" name="op" value="export" />
319
                        <input type="hidden" name="op" value="export" />
303
                <input type="hidden" name="record_type" value="conf" />
320
                        <input type="hidden" name="record_type" value="conf" />
304
                <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download configuration" /></fieldset>
321
                        <fieldset class="action"><input type="submit" class="btn btn-primary" value="Download configuration" /></fieldset>
305
            [% END %]
322
                    [% END %]
306
        </form>
323
                </form>
307
        </div>
324
            [% END # /tab_panel#conf %]
308
        [% END %]
325
        [% END # /IF allow_conf_export %]
309
    </div> <!-- /.tab-content -->
326
    [% END # /WRAPPER tab_panels %]
310
</div>
327
[% END # /WRAPPER tabs %]
311
328
312
            </main>
329
            </main>
313
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
330
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt (-87 / +85 lines)
Lines 38-128 Link Here
38
            <main>
38
            <main>
39
39
40
                [% IF ( op == 'show_form' ) %]
40
                [% IF ( op == 'show_form' ) %]
41
                <h1>Batch patron modification</h1>
41
                    <h1>Batch patron modification</h1>
42
                <form id="patron_batchmod_form" method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl">
42
                    <form id="patron_batchmod_form" method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl">
43
                    <input type="hidden" name="op" value="show" />
43
                        <input type="hidden" name="op" value="show" />
44
                    <div id="batch_patron_options" class="toptabs">
44
45
                        <ul class="nav nav-tabs" role="tablist">
45
                        [% WRAPPER tabs id= "batch_patron_options" %]
46
                            <li role="presentation" class="active">
46
                            [% WRAPPER tabs_nav %]
47
                                <a href="#usecardnumber" aria-controls="usecardnumber" role="tab" data-toggle="tab">By card number</a>
47
                                [% WRAPPER tab_item tabname= "usecardnumber" bt_active= 1 %] <span>By card number</span> [% END %]
48
                            </li>
48
                                [% WRAPPER tab_item tabname= "useborrowernumber" %] <span>By borrowernumber</span> [% END %]
49
                            <li role="presentation">
49
                                [% IF patron_lists %]
50
                                <a href="#useborrowernumber" aria-controls="useborrowernumber" role="tab" data-toggle="tab">By borrowernumber</a>
50
                                    [% WRAPPER tab_item tabname= "uselist" %] <span>By patron list</span> [% END %]
51
                            </li>
51
                                [% END %]
52
                            [% IF patron_lists %]
52
                            [% END # /WRAPPER tabs_nav %]
53
                                <li role="presentation">
53
54
                                    <a href="#uselist" aria-controls="uselist" role="tab" data-toggle="tab">By patron list</a>
54
                            [% WRAPPER tab_panels %]
55
                                </li>
55
                                [% WRAPPER tab_panel tabname="usecardnumber" bt_active= 1 %]
56
                            [% END %]
57
                        </ul>
58
                        <div class="tab-content">
59
                            <div id="usecardnumber" role="tabpanel" class="tab-pane active">
60
                                <fieldset class="rows">
61
                                    <legend>Use a file of card numbers</legend>
62
                                    <ol>
63
                                        <li>
64
                                            <label for="cardnumberuploadfile">File: </label> <input type="file"
65
                                                id="cardnumberuploadfile" name="cardnumberuploadfile" />
66
                                            <div class="hint">File must contain one card number per line.</div>
67
                                        </li>
68
                                    </ol>
69
                                </fieldset>
70
                                <fieldset class="rows">
71
                                    <legend>Or list card numbers one by one</legend>
72
                                    <ol>
73
                                        <li>
74
                                            <label for="cardnumberlist">Card number list (one card number per line):
75
                                            </label>
76
                                            <textarea rows="10" cols="30" id="cardnumberlist"
77
                                                name="cardnumberlist">[% cardnumberlist | html %]</textarea>
78
                                        </li>
79
                                    </ol>
80
                                </fieldset>
81
                                <fieldset class="action">
82
                                    <input type="submit" class="btn btn-primary" value="Continue" />
83
                                    <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
84
                                </fieldset>
85
                            </div>
86
                            <div id="useborrowernumber" role="tabpanel" class="tab-pane">
87
                                <fieldset class="rows">
88
                                    <legend>Use a file of borrowernumbers</legend>
89
                                    <ol>
90
                                        <li>
91
                                            <label for="borrowernumberuploadfile">File: </label> <input type="file"
92
                                                id="borrowernumberuploadfile" name="borrowernumberuploadfile" />
93
                                            <div class="hint">File must contain one borrowernumber per line.</div>
94
                                        </li>
95
                                    </ol>
96
                                </fieldset>
97
                                <fieldset class="rows">
98
                                    <legend>List borrowernumbers one by one</legend>
99
                                    <ol>
100
                                        <li>
101
                                            <label for="borrowernumberlist">Borrowernumber list (one number per line):
102
                                            </label>
103
                                            <textarea rows="10" cols="30" id="borrowernumberlist"
104
                                                name="borrowernumberlist">[% borrowernumberlist | html %]</textarea>
105
                                        </li>
106
                                    </ol>
107
                                </fieldset>
108
                                <fieldset class="action">
109
                                    <input type="submit" class="btn btn-primary" value="Continue" />
110
                                    <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
111
                                </fieldset>
112
                            </div>
113
                            [% IF patron_lists %]
114
                                <div id="uselist" role="tabpanel" class="tab-pane">
115
                                    <fieldset class="rows">
56
                                    <fieldset class="rows">
116
                                        <legend>Use a patron list</legend>
57
                                        <legend>Use a file of card numbers</legend>
117
                                        <ol>
58
                                        <ol>
118
                                            <li>
59
                                            <li>
119
                                                <label for="patron_list_id">Patron list: </label>
60
                                                <label for="cardnumberuploadfile">File: </label> <input type="file"
120
                                                <select id="patron_list_id" name="patron_list_id">
61
                                                    id="cardnumberuploadfile" name="cardnumberuploadfile" />
121
                                                    <option value=""> -- Choose a patron list -- </option>
62
                                                <div class="hint">File must contain one card number per line.</div>
122
                                                    [% FOREACH pl IN patron_lists %]
63
                                            </li>
123
                                                    <option value="[% pl.patron_list_id | html %]">[% pl.name | html %]</option>
64
                                        </ol>
124
                                                    [% END %]
65
                                    </fieldset>
125
                                                </select>
66
                                    <fieldset class="rows">
67
                                        <legend>Or list card numbers one by one</legend>
68
                                        <ol>
69
                                            <li>
70
                                                <label for="cardnumberlist">Card number list (one card number per line):
71
                                                </label>
72
                                                <textarea rows="10" cols="30" id="cardnumberlist"
73
                                                    name="cardnumberlist">[% cardnumberlist | html %]</textarea>
126
                                            </li>
74
                                            </li>
127
                                        </ol>
75
                                        </ol>
128
                                    </fieldset>
76
                                    </fieldset>
Lines 130-140 Link Here
130
                                        <input type="submit" class="btn btn-primary" value="Continue" />
78
                                        <input type="submit" class="btn btn-primary" value="Continue" />
131
                                        <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
79
                                        <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
132
                                    </fieldset>
80
                                    </fieldset>
133
                                </div>
81
                                [% END # /tab_panel# %]
134
                            [% END %]
82
135
                        </div> <!-- /.tab-content -->
83
                                [% WRAPPER tab_panel tabname="useborrowernumber" %]
136
                    </div><!-- /#batch_patron_options -->
84
                                    <fieldset class="rows">
137
                </form>
85
                                        <legend>Use a file of borrowernumbers</legend>
86
                                        <ol>
87
                                            <li>
88
                                                <label for="borrowernumberuploadfile">File: </label> <input type="file"
89
                                                    id="borrowernumberuploadfile" name="borrowernumberuploadfile" />
90
                                                <div class="hint">File must contain one borrowernumber per line.</div>
91
                                            </li>
92
                                        </ol>
93
                                    </fieldset>
94
                                    <fieldset class="rows">
95
                                        <legend>List borrowernumbers one by one</legend>
96
                                        <ol>
97
                                            <li>
98
                                                <label for="borrowernumberlist">Borrowernumber list (one number per line):
99
                                                </label>
100
                                                <textarea rows="10" cols="30" id="borrowernumberlist"
101
                                                    name="borrowernumberlist">[% borrowernumberlist | html %]</textarea>
102
                                            </li>
103
                                        </ol>
104
                                    </fieldset>
105
                                    <fieldset class="action">
106
                                        <input type="submit" class="btn btn-primary" value="Continue" />
107
                                        <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
108
                                    </fieldset>
109
                                [% END # /tab_panel# %]
110
111
                                [% IF patron_lists %]
112
                                    [% WRAPPER tab_panel tabname="uselist" %]
113
                                        <fieldset class="rows">
114
                                            <legend>Use a patron list</legend>
115
                                            <ol>
116
                                                <li>
117
                                                    <label for="patron_list_id">Patron list: </label>
118
                                                    <select id="patron_list_id" name="patron_list_id">
119
                                                        <option value=""> -- Choose a patron list -- </option>
120
                                                        [% FOREACH pl IN patron_lists %]
121
                                                        <option value="[% pl.patron_list_id | html %]">[% pl.name | html %]</option>
122
                                                        [% END %]
123
                                                    </select>
124
                                                </li>
125
                                            </ol>
126
                                        </fieldset>
127
                                        <fieldset class="action">
128
                                            <input type="submit" class="btn btn-primary" value="Continue" />
129
                                            <a class="cancel" href="/cgi-bin/koha/tools/tools-home.pl">Cancel</a>
130
                                        </fieldset>
131
                                    [% END # /tab_panel# %]
132
                                [% END %]
133
                            [% END # /WRAPPER tab_panels %]
134
                        [% END # /WRAPPER tabs %]
135
                    </form>
138
                [% END %]
136
                [% END %]
139
137
140
                [% IF ( op == 'show') && (!borrowers) && (!notfoundcardnumbers) # Alert if no patrons given%]
138
                [% IF ( op == 'show') && (!borrowers) && (!notfoundcardnumbers) # Alert if no patrons given%]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/overduerules.tt (-90 / +87 lines)
Lines 69-167 Link Here
69
            </div>
69
            </div>
70
            [% END %]
70
            [% END %]
71
            [% IF ( table ) %]
71
            [% IF ( table ) %]
72
            <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
72
                <form method="post" action="/cgi-bin/koha/tools/overduerules.pl">
73
                <input type="hidden" name="op" value="save" />
73
                    <input type="hidden" name="op" value="save" />
74
                <input type="hidden" name="branch" value="[% branch | html %]" />
74
                    <input type="hidden" name="branch" value="[% branch | html %]" />
75
                <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3>
75
                    <h3>Rules for overdue actions: [% IF ( branch ) %][% Branches.GetName( branch ) | html %][% ELSE %] default library [% END %]</h3>
76
                    [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
76
                        [% IF ( datasaved ) %]<div class="dialog message">Changes saved.</div> [% END %]
77
77
78
                <div id="rulestabs" class="toptabs">
78
                    [% WRAPPER tabs id= "rulestabs" %]
79
                    <ul class="nav nav-tabs" role="tablist">
79
                        [% WRAPPER tabs_nav %]
80
                        [% FOR tab IN tabs %]
80
                            [% FOR tab IN tabs %]
81
                            <li role="presentation">
81
                                [% WRAPPER tab_item tabname= tab.id %][% END %]
82
                                <a href="#[% tab.id | uri %]" class="tab [% tab.id | html %]" data-number="[% tab.number | html %]" aria-controls="[% tab.id | uri %]" role="tab" data-toggle="tab"></a>
82
                            [% END %]
83
                            </li>
83
                        [% END # /WRAPPER tabs_nav %]
84
                        [% END %]
84
85
                    </ul>
85
                        [% WRAPPER tab_panels %]
86
                    <div class="tab-content">
86
                            [% FOR tab IN tabs %]
87
                        [% FOR tab IN tabs %]
87
                                [% WRAPPER tab_panel tabname=tab.id %]
88
                            <div id="[% tab.id | html %]" role="tabpanel" class="tab-pane">
88
                                    <table>
89
                                <table>
89
                                        <thead>
90
                                    <thead>
91
                                        <tr>
92
                                        <th>&nbsp;</th>
93
                                        <th scope="col">Delay</th>
94
                                        <th scope="col">Letter</th>
95
                                        <th scope="col">Restrict</th>
96
                                            [% FOREACH mtt IN message_transport_types %]
97
                                                [% NEXT IF mtt == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
98
                                                [% NEXT IF mtt == 'phone' AND !Koha.Preference('PhoneNotification') %]
99
                                                <th scope="col">
100
                                                    [% SWITCH mtt %]
101
                                                    [% CASE 'email' %]<span>Email</span>
102
                                                    [% CASE 'print' %]<span>[% tp('Message transport type', 'Print') | html %]</span>
103
                                                    [% CASE 'sms' %]<span>SMS</span>
104
                                                    [% CASE 'feed' %]<span>Feed</span>
105
                                                    [% CASE 'itiva' %]<span>Phone (i-tiva)</span>
106
                                                    [% CASE 'phone' %]<span>Phone</span>
107
                                                    [% CASE %]<span>[% mtt | html %]</span>
108
                                                    [% END %]
109
                                                </th>
110
                                            [% END %]
111
                                        </tr>
112
                                    </thead>
113
                                    <tbody>
114
                                        [% FOREACH value IN tab.values %]
115
                                            <tr>
90
                                            <tr>
116
                                                <th scope="row">[% value.line | html %]</th>
91
                                            <th>&nbsp;</th>
117
                                                <td>
92
                                            <th scope="col">Delay</th>
118
                                                    <input type="text" inputmode="numeric" pattern="[0-9]*" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
93
                                            <th scope="col">Letter</th>
119
                                                </td>
94
                                            <th scope="col">Restrict</th>
120
                                                <td>
95
                                                [% FOREACH mtt IN message_transport_types %]
121
                                                    <select name="letter[% tab.number | html %]-[% value.overduename | html %]">
96
                                                    [% NEXT IF mtt == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
122
                                                        <option value="">No notice</option>
97
                                                    [% NEXT IF mtt == 'phone' AND !Koha.Preference('PhoneNotification') %]
123
                                                        [% FOREACH letter IN letters %]
98
                                                    <th scope="col">
124
                                                            [% IF letter.code == value.selected_lettercode %]
99
                                                        [% SWITCH mtt %]
125
                                                            <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
100
                                                        [% CASE 'email' %]<span>Email</span>
126
                                                            [% ELSE %]
101
                                                        [% CASE 'print' %]<span>[% tp('Message transport type', 'Print') | html %]</span>
127
                                                            <option value="[% letter.code | html %]">[% letter.name | html %]</option>
102
                                                        [% CASE 'sms' %]<span>SMS</span>
128
                                                            [% END %]
103
                                                        [% CASE 'feed' %]<span>Feed</span>
104
                                                        [% CASE 'itiva' %]<span>Phone (i-tiva)</span>
105
                                                        [% CASE 'phone' %]<span>Phone</span>
106
                                                        [% CASE %]<span>[% mtt | html %]</span>
129
                                                        [% END %]
107
                                                        [% END %]
130
                                                    </select>
108
                                                    </th>
131
                                                </td>
109
                                                [% END %]
132
                                                <td>
110
                                            </tr>
133
                                                    [% IF ( value.debarred ) %]
111
                                        </thead>
134
                                                        <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
112
                                        <tbody>
135
                                                    [% ELSE %]
113
                                            [% FOREACH value IN tab.values %]
136
                                                        <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
114
                                                <tr>
137
                                                    [% END %]
115
                                                    <th scope="row">[% value.line | html %]</th>
138
                                                </td>
139
                                                [% FOREACH mtt IN value.message_transport_types %]
140
                                                    [% NEXT IF mtt.value == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
141
                                                    [% NEXT IF mtt.value == 'phone' AND !Koha.Preference('PhoneNotification') %]
142
                                                    <td>
116
                                                    <td>
143
                                                        [% IF mtt.selected %]
117
                                                        <input type="text" inputmode="numeric" pattern="[0-9]*" name="delay[% tab.number | html %]-[% value.overduename | html %]" value="[% value.delay | html %]" />
144
                                                            <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
118
                                                    </td>
145
                                                        [% ELSE %]
119
                                                    <td>
146
                                                            [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
120
                                                        <select name="letter[% tab.number | html %]-[% value.overduename | html %]">
147
                                                                <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
121
                                                            <option value="">No notice</option>
148
                                                            [% ELSE %]
122
                                                            [% FOREACH letter IN letters %]
149
                                                                <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
123
                                                                [% IF letter.code == value.selected_lettercode %]
124
                                                                <option value="[% letter.code | html %]" selected="selected">[% letter.name | html %]</option>
125
                                                                [% ELSE %]
126
                                                                <option value="[% letter.code | html %]">[% letter.name | html %]</option>
127
                                                                [% END %]
150
                                                            [% END %]
128
                                                            [% END %]
129
                                                        </select>
130
                                                    </td>
131
                                                    <td>
132
                                                        [% IF ( value.debarred ) %]
133
                                                            <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" checked="checked" value="1" />
134
                                                        [% ELSE %]
135
                                                            <input type="checkbox" name="debarred[% tab.number | html %]-[% value.overduename | html %]" value="1" />
151
                                                        [% END %]
136
                                                        [% END %]
152
                                                    </td>
137
                                                    </td>
153
                                                [% END # /FOREACH mtt %]
138
                                                    [% FOREACH mtt IN value.message_transport_types %]
154
                                            </tr>
139
                                                        [% NEXT IF mtt.value == 'itiva' AND !Koha.Preference('TalkingTechItivaPhoneNotification') %]
155
                                        [% END # /FOREACH value %]
140
                                                        [% NEXT IF mtt.value == 'phone' AND !Koha.Preference('PhoneNotification') %]
156
                                    </tbody>
141
                                                        <td>
157
                                </table>
142
                                                            [% IF mtt.selected %]
158
                            </div> <!-- /.tab-pane -->
143
                                                                <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" checked="checked" />
159
                        [% END # /FOR tabs %]
144
                                                            [% ELSE %]
160
                    </div> <!-- /.tab-content -->
145
                                                                [% IF mtt.value == "sms" and not Koha.Preference("SMSSendDriver") %]
161
                </div>
146
                                                                    <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" disabled="disabled" />
147
                                                                [% ELSE %]
148
                                                                    <input type="checkbox" name="mtt[% tab.number | html %]-[% value.overduename | html %]" value="[% mtt.value | html %]" />
149
                                                                [% END %]
150
                                                            [% END %]
151
                                                        </td>
152
                                                    [% END # /FOREACH mtt %]
153
                                                </tr>
154
                                            [% END # /FOREACH value %]
155
                                        </tbody>
156
                                    </table>
157
                                [% END # /tab_panel# %]
158
                            [% END %]
159
                        [% END # /WRAPPER tab_panels %]
160
                    [% END # /WRAPPER tabs %]
162
161
163
                <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save changes" /></fieldset>
162
                    <fieldset class="action"><input type="submit" class="btn btn-primary" value="Save changes" /></fieldset>
164
            </form>
163
                </form>
165
            [% ELSE %]
164
            [% ELSE %]
166
                <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
165
                <div class="warning">You don't have patron categories defined, or the patron categories are not set to receive overdue notices.</div>
167
                <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
166
                <div class="warning">If this is not what you were expecting, go to <a href="../admin/categories.pl">patron categories</p></div>
Lines 180-194 Link Here
180
[% MACRO jsinclude BLOCK %]
179
[% MACRO jsinclude BLOCK %]
181
    [% Asset.js("js/tools-menu.js") | $raw %]
180
    [% Asset.js("js/tools-menu.js") | $raw %]
182
    <script>
181
    <script>
183
        var tab_map = { "1" : _("First"), "2" : _("Second"), "3" : _("Third")};
182
        var tab_map = { "0" : _("First"), "1" : _("Second"), "2" : _("Third")};
184
        $(document).ready(function() {
183
        $(document).ready(function() {
185
            $('#selectlibrary').find("input:submit").hide();
184
            $('#selectlibrary').find("input:submit").hide();
186
            $('#branch').change(function() {
185
            $('#branch').change(function() {
187
                $('#selectlibrary').submit();
186
                $('#selectlibrary').submit();
188
            });
187
            });
189
            $("li>a.tab").each( function(){
188
            $("#rulestabs li > a").each( function( i ){
190
                var id = $(this).attr("data-number");
189
                $(this).html(tab_map[ i ]);
191
                $(this).html(tab_map[id]);
192
            });
190
            });
193
            if( $("#rulestabs .tab-pane.active").length < 1 ){
191
            if( $("#rulestabs .tab-pane.active").length < 1 ){
194
                $("#rulestabs a:first").tab("show");
192
                $("#rulestabs a:first").tab("show");
195
- 

Return to bug 33324