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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt (-118 / +220 lines)
Lines 10-19 Link Here
10
[% END %]
10
[% END %]
11
</title>
11
</title>
12
[% INCLUDE 'doc-head-close.inc' %]
12
[% INCLUDE 'doc-head-close.inc' %]
13
14
[% Asset.css("css/datatables.css") | $raw %]
13
[% Asset.css("css/datatables.css") | $raw %]
15
14
16
<style type="text/css">
15
<style>
17
	fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
16
	fieldset.rows div.toptabs li { clear:none;margin-right:.5em;padding-bottom:0;width:auto; }
18
    fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
17
    fieldset.rows div.toptabs .ui-tabs-nav li.ui-tabs-active {background-color : #F4F8F9; }
19
	fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
18
	fieldset.rows .ui-tabs-panel { margin-right : 10px; margin-left : 10px;margin-bottom:10px;}
Lines 24-33 Link Here
24
<body id="admin_authorised_values" class="admin">
23
<body id="admin_authorised_values" class="admin">
25
[% INCLUDE 'header.inc' %]
24
[% INCLUDE 'header.inc' %]
26
[% INCLUDE 'prefs-admin-search.inc' %]
25
[% INCLUDE 'prefs-admin-search.inc' %]
27
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo; [% IF op == 'add_form' %] <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a> &rsaquo; [% IF ( action_modify ) %]Modify authorized value[% END %]
26
<div id="breadcrumbs">
28
	   [% IF ( action_add_value ) %]New authorized value[% END %]
27
    <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
29
	   [% IF ( action_add_category ) %]New category[% END %][% END %]
28
    <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> &rsaquo;
30
[% IF op == 'list' %]Authorized values[% END %]</div>
29
    [% IF op == 'add_form' %]
30
        <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a> &rsaquo;
31
        [% IF ( action_modify ) %]Modify authorized value[% END %]
32
        [% IF ( action_add_value ) %]New authorized value[% END %]
33
        [% IF ( action_add_category ) %]New category[% END %]
34
    [% ELSIF ( loop ) %]
35
        <a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a> &rsaquo;
36
        Authorized values for category [% category | html %]
37
    [% ELSE %]
38
        Authorized values
39
    [% END %]
40
</div>
31
41
32
<div class="main container-fluid">
42
<div class="main container-fluid">
33
    <div class="row">
43
    <div class="row">
Lines 127-142 Link Here
127
    </form>
137
    </form>
128
[% END %]
138
[% END %]
129
139
130
131
[% IF op == 'list' %]
140
[% IF op == 'list' %]
132
141
133
<div id="toolbar" class="btn-toolbar">
142
<div id="toolbar" class="btn-toolbar">
134
    <a id="addauth" class="btn btn-default btn-sm" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% category | url %]"><i class="fa fa-plus"> </i> New authorized value for [% category | html %]</a>
135
    <a id="addcat" class="btn btn-default btn-sm" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form"><i class="fa fa-plus"> </i> New category</a>
143
    <a id="addcat" class="btn btn-default btn-sm" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form"><i class="fa fa-plus"> </i> New category</a>
144
    [% IF ( searchfield ) %]
145
        <a id="addauth" class="btn btn-default btn-sm" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% category | url %]"><i class="fa fa-plus"> </i> New authorized value for [% category | html %]</a>
146
    [% END %]
136
</div>
147
</div>
137
148
138
<h1>Authorized values</h1>
149
[% IF ( searchfield ) %]
139
<div class="note"><i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.</div>
150
    <h1>Authorized values for category [% category | html %]</h1>
151
    [% PROCESS category_descriptions code_category = category %]
152
[% ELSE %]
153
    <h1>Authorized values</h1>
154
[% END %]
155
156
[% IF ( searchfield ) %]
157
    <div class="note">
158
        <i class="fa fa-exclamation"></i> <strong>NOTE:</strong> If you change an authorized value code, existing records using it won't be updated. Changes to value descriptions will show immediately.
159
    </div>
160
[% END %]
140
161
141
[% FOR m IN messages %]
162
[% FOR m IN messages %]
142
    <div class="dialog [% m.type | html %]">
163
    <div class="dialog [% m.type | html %]">
Lines 169-278 Link Here
169
    </div>
190
    </div>
170
[% END %]
191
[% END %]
171
192
172
<form action="/cgi-bin/koha/admin/authorised_values.pl" method="post" id="category">
193
[% IF ( searchfield ) %]
173
  <label for="searchfield">Show category: </label>
194
174
  <select name="searchfield" id="searchfield" size="1">
195
    <form action="/cgi-bin/koha/admin/authorised_values.pl" method="get" id="category">
175
  [% FOR c IN categories %]
196
        <p>
176
    [% IF c == searchfield %]
197
            <label for="searchfield">Show category: </label>
177
      <option value="[% c | html %]" selected="selected">[% c | html %]</option>
198
            <select name="searchfield" id="searchfield" size="1">
199
                [% FOR c IN categories %]
200
                    [% IF c == searchfield %]
201
                        <option value="[% c | html %]" selected="selected">[% c | html %]</option>
202
                    [% ELSE %]
203
                        <option value="[% c | html %]">[% c | html %]</option>
204
                    [% END %]
205
                [% END %]
206
            </select>
207
            <input type="submit" value="Submit" />
208
        </p>
209
    </form>
210
211
    [% IF loop %]
212
213
    <table id="table_authorized_values" class="authorized_values_table">
214
    <thead><tr>
215
        <th>Authorized value</th>
216
        <th>Description</th>
217
        <th>Description (OPAC)</th>
218
        <th>Icon</th>
219
        <th>Branches limitations</th>
220
        <th>Actions</th>
221
        </tr>
222
    </thead><tbody>
223
    [% FOREACH loo IN loop %]
224
    <tr>
225
        <td>[% loo.authorised_value | html %]</td>
226
        <td>[% loo.lib | html %]</td>
227
        <td>[% loo.lib_opac | html %]</td>
228
        <td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl | url %]" alt=""/>[% ELSE %]&nbsp;[% END %]</td>
229
        <td>
230
            [% IF loo.branches.size > 0 %]
231
                [% branches_str = "" %]
232
                [% FOREACH branch IN loo.branches %]
233
                    [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
234
                [% END %]
235
                <span href="#" title="[% branches_str | html %]">
236
                    [% IF loo.branches.size > 1 %]
237
                        [% loo.branches.size | html %] branches limitations
238
                    [% ELSE %]
239
                        [% loo.branches.size | html %] branch limitation
240
                    [% END %]
241
            [% ELSE %]
242
                No limitation
243
            [% END %]
244
        </td>
245
        <td class="actions"><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;id=[% loo.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
246
        <a class="delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&amp;searchfield=[% searchfield | uri %]&amp;id=[% loo.id | uri %]"><i class="fa fa-trash"></i> Delete</a></td>
247
    </tr>
248
    [% END # /FOREACH loop %]
249
    </tbody></table>
178
    [% ELSE %]
250
    [% ELSE %]
179
      <option value="[% c | html %]">[% c | html %]</option>
251
        <div class="dialog message">
252
            <p>There are no authorized values defined for [% category | html %]</p>
253
            <form action="/cgi-bin/koha/admin/authorised_values.pl" method="get">
254
                <input type="hidden" name="op" value="add_form" />
255
                <input type="hidden" name="category" value="[% category | html %]" />
256
                <button type="submit"><i class="fa fa-plus"></i> Add a new authorized value</button>
257
            </form>
258
        </div>
180
    [% END %]
259
    [% END %]
181
  [% END %]
182
  <input type="submit" value="Submit" />
183
</form>
184
[% IF ( category == 'Bsort1' ) %]
185
    <p>An authorized value attached to patrons, that can be used for stats purposes</p>
186
[% END %]
187
[% IF ( category == 'Bsort2' ) %]
188
    <p>An authorized value attached to patrons, that can be used for stats purposes</p>
189
[% END %]
190
[% IF ( category == 'Asort1' ) %]
191
    <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
192
[% END %]
193
[% IF ( category == 'Asort2' ) %]
194
    <p>An authorized value attached to acquisitions, that can be used for stats purposes</p>
195
[% END %]
196
[% IF ( category == 'SUGGEST' ) %]
197
    <p>Reasons to reject or accept patron suggestions</p>
198
[% END %]
199
[% IF ( category == 'DAMAGED' ) %]
200
    <p>Statuses to describe a damaged item</p>
201
[% END %]
202
[% IF ( category == 'LOST' ) %]
203
   <p>Statuses to describe a lost item</p>
204
[% END %]
205
[% IF ( category == 'MANUAL_INV' ) %]
206
    <p>Additional values for manual invoice types</p>
207
[% END %]
208
[% IF ( category == 'BOR_NOTES' ) %]
209
    <p>Values for custom patron notes</p>
210
[% END %]
211
[% IF ( category == 'LOC' ) %]
212
    <p>Values for shelving locations</p>
213
[% END %]
214
[% IF ( category == 'CCODE' ) %]
215
    <p>Values for collection codes</p>
216
 [% END %]
217
 [% IF ( category == 'NOT_LOAN' ) %]
218
    <p>Statuses to describe why an item is not for loan</p>
219
 [% END %]
220
<h3>Authorized values for category [% category | html %]:</h3>
221
260
222
[% IF ( loop ) %]<div id="pagertable_authorized_values">
261
[% ELSE # category was selected %]
223
</div>[% END %]
224
262
225
[% IF ( loop ) %]<table id="table_authorized_values">
263
    <table id="categoriest" class="authorized_values_table">
226
<thead><tr>
264
        <thead>
227
	<th>Authorized value</th>
265
            <tr>
228
	<th>Description</th>
266
                <th>Category</th>
229
	<th>Description (OPAC)</th>
267
                <th>Description</th>
230
	<th>Icon</th>
268
                <th>&nbsp;</th>
231
    <th>Branches limitations</th>
269
            </tr>
232
    <th>Actions</th>
270
        </thead>
233
	</tr>
271
        <tbody>
234
</thead><tbody>
272
            [% FOR c IN categories %]
235
[% FOREACH loo IN loop %]
273
                <tr>
236
[% UNLESS ( loop.odd ) %]
274
                    <td><a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=[% c | uri %]">[% c | html %]</a></td>
237
<tr>
275
                    <td>
238
[% ELSE %]
276
                        [% PROCESS category_descriptions code_category = c %]
239
<tr>
277
                    </td>
240
[% END %]
278
                    <td>
241
	<td>[% loo.authorised_value | html %]</td>
279
                        <a id="addauth" class="btn btn-default btn-xs" href= "/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;category=[% c | uri %]"><i class="fa fa-plus"> </i> Add</a>
242
    <td>[% loo.lib | html %]</td>
280
                    </td>
243
    <td>[% loo.lib_opac | html %]</td>
281
                </tr>
244
	<td>[% IF ( loo.imageurl ) %]<img src="[% loo.imageurl | html %]" alt=""/>[% ELSE %]&nbsp;[% END %]</td>
245
    <td>
246
        [% IF loo.branches.size > 0 %]
247
            [% branches_str = "" %]
248
            [% FOREACH branch IN loo.branches %]
249
                [% branches_str = branches_str _ " " _ branch.branchname _ "(" _ branch.branchcode _ ")" %]
250
            [% END %]
282
            [% END %]
251
            <span href="#" title="[% branches_str | html %]">
283
        </tbody>
252
                [% IF loo.branches.size > 1 %]
284
    </table>
253
                    [% loo.branches.size | html %] branches limitations
285
[% END # /IF ( searchfield  )%]
254
                [% ELSE %]
255
                    [% loo.branches.size | html %] branch limitation
256
                [% END %]
257
        [% ELSE %]
258
            No limitation
259
        [% END %]
260
    </td>
261
    <td class="actions"><a href="/cgi-bin/koha/admin/authorised_values.pl?op=add_form&amp;id=[% loo.id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
262
    <a class="delete btn btn-default btn-xs" href="/cgi-bin/koha/admin/authorised_values.pl?op=delete&amp;searchfield=[% searchfield | url %]&amp;id=[% loo.id | html %]"><i class="fa fa-trash"></i> Delete</a></td>
263
</tr>
264
[% END %]
265
</tbody></table>[% ELSE %]
266
<div class="dialog message">There are no authorized values defined for [% category | html %]</div>
267
[% END %]
268
269
[% IF ( isprevpage ) %]
270
<form class="inline" action="/cgi-bin/koha/admin/authorised_values.pl" method="post">
271
<input type="hidden" name="searchfield" value="[% searchfield | html %]" />
272
	<input type="submit" value="&lt;&lt; Previous" /></form>
273
[% END %] 
274
286
275
[% END %]
287
[% END # /IF op == 'list' %]
276
288
277
            </main>
289
            </main>
278
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
290
        </div> <!-- /.col-sm-10.col-sm-push-2 -->
Lines 289-299 Link Here
289
    [% INCLUDE 'datatables.inc' %]
301
    [% INCLUDE 'datatables.inc' %]
290
    <script>
302
    <script>
291
        $(document).ready(function() {
303
        $(document).ready(function() {
292
            $("#table_authorized_values").dataTable($.extend(true, {}, dataTablesDefaults, {
304
            $(".authorized_values_table").dataTable($.extend(true, {}, dataTablesDefaults, {
293
                "aoColumnDefs": [
305
                "aoColumnDefs": [
294
                    { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
306
                    { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
295
                ],
307
                ],
296
                "aaSorting": [[ 1, "asc" ]],
308
                "aaSorting": [[ 0, "asc" ]],
297
                "sPaginationType": "four_button"
309
                "sPaginationType": "four_button"
298
            }));
310
            }));
299
311
Lines 305-318 Link Here
305
            $("a.delete").click(function(){
317
            $("a.delete").click(function(){
306
                return confirm(_("Are you sure you want to delete this authorized value?"));
318
                return confirm(_("Are you sure you want to delete this authorized value?"));
307
            });
319
            });
308
            [% IF op == 'list' %]
320
            $('#category').find("input:submit").hide();
309
                $('#category').find("input:submit").hide();
321
            $('#searchfield').change(function() {
310
                $('#searchfield').change(function() {
322
                $('#category').submit();
311
                    $('#category').submit();
323
            });
312
                });
313
            [% END %]
314
        });
324
        });
315
    </script>
325
    </script>
326
[% END %]
316
327
328
[% BLOCK category_descriptions %]
329
    [% SWITCH code_category %]
330
        [% CASE 'Asort1' %]
331
            <p>Used for acquisitions statistical purposes</p>
332
        [% CASE 'Asort2' %]
333
            <p>Used for acquisitions statistical purposes</p>
334
        [% CASE 'BOR_NOTES' %]
335
            <p>Values for custom patron messages that appear on the circulation screen and the OPAC. The value in the description field should be the message text and is limited to 200 characters</p>
336
        [% CASE 'branches' %]
337
            <p></p>
338
        [% CASE 'Bsort1' %]
339
            <p>Values that can be entered to fill in the patron’s sort 2 field</p>
340
        [% CASE 'Bsort2' %]
341
            <p>An authorized value attached to patrons, that can be used for statistical purposes</p>
342
        [% CASE 'CAND' %]
343
            <p></p>
344
        [% CASE 'CCODE' %]
345
            <p>Collection codes (appears when cataloging and working with items)</p>
346
        [% CASE 'cn_source' %]
347
            <p></p>
348
        [% CASE 'CONTROL_NUM_SEQUENCE' %]
349
            <p></p>
350
        [% CASE 'COUNTRY' %]
351
            <p>Used in UNIMARC 102 $a</p>
352
        [% CASE 'DAMAGED' %]
353
            <p>Descriptions for items marked as damaged (appears when cataloging and working with items)</p>
354
        [% CASE 'DEPARTMENT' %]
355
            <p>Departments are required by and will be used in the Course Reserves module</p>
356
        [% CASE 'ETAT' %]
357
            <p>Used in French UNIMARC installations in field 995 $o to identify item status. Similar to NOT_LOAN</p>
358
        [% CASE 'HINGS_AS' %]
359
            <p>General holdings: acquisition status designator :: This data element specifies acquisition status for the unit at the time of the holdings report.</p>
360
        [% CASE 'HINGS_C' %]
361
            <p>General holdings: completeness designator</p>
362
        [% CASE 'HINGS_PF' %]
363
            <p>Physical form designators</p>
364
        [% CASE 'HINGS_RD' %]
365
            <p>General holdings: retention designator :: This data element specifies the retention policy for the unit at the time of the holdings report.</p>
366
        [% CASE 'HINGS_UT' %]
367
            <p>General holdings: type of unit designator</p>
368
        [% CASE 'HSBND_FREQ' %]
369
            <p>Frequencies used by the housebound module. They are displayed on the housebound tab in the patron account in staff.</p>
370
        [% CASE 'ITEMTYPECAT' %]
371
            <p>Allows multiple Item types to be searched in a category. Categories can be entered into the Authorized value ITEMTYPECAT. To combine Item types to this category, enter this Search category to any Item types</p>
372
        [% CASE 'itemtypes' %]
373
            <p></p>
374
        [% CASE 'LANG' %]
375
            <p>ISO 639-2 standard language codes</p>
376
        [% CASE 'LOC' %]
377
            <p>Shelving location (usually appears when adding or editing an item). LOC maps to items.location in the Koha database.</p>
378
        [% CASE 'LOST' %]
379
            <p>Descriptions for the items marked as lost (appears when adding or editing an item)</p>
380
        [% CASE 'MANUAL_INV' %]
381
            <p>Values for manual invoicing types</p>
382
        [% CASE 'NOT_LOAN' %]
383
            <p>Reasons why a title is not for loan</p>
384
        [% CASE 'OPAC_SUG' %]
385
            <p>A list of reasons displayed in the suggestion form on the OPAC.</p>
386
        [% CASE 'ORDER_CANCELLATION_REASON' %]
387
            <p>Reasons why an order might have been cancelled</p>
388
        [% CASE 'PAYMENT_TYPE' %]
389
            <p>Populates a dropdown list of custom payment types when paying fines</p>
390
        [% CASE 'qualif' %]
391
            <p>Function codes (author, editor, collaborator, etc.) used in UNIMARC 7XX $4 (French)</p>
392
        [% CASE 'RELTERMS' %]
393
            <p>French terms of relations</p>
394
        [% CASE 'REPORT_GROUP' %]
395
            <p>A way to sort and filter your reports, the default values in this category include the Koha modules (Accounts, Acquitisions, Catalog, Circulation, Patrons)</p>
396
        [% CASE 'REPORT_SUBGROUP' %]
397
            <p>Can be used to further sort and filter your reports. This category is empty by default. Values here need to include the authorized value code from REPORT_GROUP in the Description (OPAC) field to link the subgroup to the appropriate group.</p>
398
        [% CASE 'RESTRICTED' %]
399
            <p>Restricted status of an item</p>
400
        [% CASE 'ROADTYPE' %]
401
            <p>Road types to be used in patron addresses</p>
402
        [% CASE 'SIP_MEDIA_TYPE' %]
403
            <p>Used when creating or editing an item type to assign a SIP specific media type for devices like lockers and sorters.</p>
404
        [% CASE 'STACK' %]
405
            <p>Shelving control number</p>
406
        [% CASE 'SUGGEST' %]
407
            <p>List of patron suggestion reject or accept reasons (appears when managing suggestions)</p>
408
        [% CASE 'SUGGEST_FORMAT' %]
409
            <p>List of Item types to display in a drop down menu on the Purchase suggestion form on the OPAC. When creating the authorized values for SUGGEST_FORMAT, enter a description into this form so it is visible on the OPAC to patrons.</p>
410
        [% CASE 'SUGGEST_STATUS' %]
411
            <p>A list of additional custom status values for suggestions that can be used in addition to the default values.</p>
412
        [% CASE 'TERM' %]
413
            <p>Terms to be used in Course Reserves module. Enter terms that will show in the drop down menu when setting up a Course reserve. (For example: Spring, Summer, Winter, Fall).</p>
414
        [% CASE 'WITHDRAWN' %]
415
            <p>Description of a withdrawn item (appears when adding or editing an item)</p>
416
        [% CASE 'YES_NO' %]
417
            <p>A generic authorized value field that can be used anywhere you need a simple yes/no pull down menu.</p>
418
    [% END %]
317
[% END %]
419
[% END %]
420
318
[% INCLUDE 'intranet-bottom.inc' %]
421
[% INCLUDE 'intranet-bottom.inc' %]
319
- 

Return to bug 21803