475fab5de48369cddbd2dba5892601907cbf6a0a
[working/Evergreen.git] / Open-ILS / web / templates / default / conify / global / config / circ_modifier.tt2
1 [% WRAPPER default/base.tt2 %]
2 <h1>Circulation Modifier</h1> <br/>
3
4 <script type ="text/javascript">
5
6     dojo.require('dijit.form.FilteringSelect');
7     dojo.require('openils.widget.AutoGrid');
8
9     function formatSIPMediaType(inDatum) {
10         switch (inDatum) {
11             case '000':
12                 return 'Other';
13             case '001':
14                 return 'Book';
15             case '002':
16                 return 'Magazine';
17             case '003':
18                 return 'Bound Journal';
19             case '004':
20                 return 'Audio Tape';
21             case '005':
22                 return 'Video Tape';
23             case '006':
24                 return 'CD/CDROM';
25             case '007':
26                 return 'Diskette';
27             case '008':
28                 return 'Book with diskette';
29             case '009':
30                 return 'Book with CD';
31             case '010':
32                 return 'Book with audio tape';
33         }
34     }
35
36     openils.Util.addOnLoad(
37         function() {
38             cmGrid.overrideEditWidgets.sip2_media_type = sip2Selector;
39             cmGrid.loadAll({order_by:{ccm : 'name'}});
40         }
41     );
42
43 </script>
44
45 <div class='hidden'>
46     <select dojoType="dijit.form.FilteringSelect" jsId="sip2Selector">
47         <option value='000'>Other</option>
48         <option value='001' selected='selected'>Book</option>
49         <option value='002'>Magazine</option>
50         <option value='003'>Bound Journal</option>
51         <option value='004'>Audio Tape</option>
52         <option value='005'>Video Tape</option>
53         <option value='006'>CD/CDROM</option>
54         <option value='007'>Diskette</option>
55         <option value='008'>Book with diskette</option>
56         <option value='009'>Book with CD</option>
57         <option value='010'>Book with audio tape</option>
58     </select>
59 </div>
60
61 <div dojoType="dijit.layout.ContentPane" layoutAlign="client" class='oils-header-panel'>
62     <div>Circulation Modifier</div>
63     <div>
64         <button dojoType='dijit.form.Button' onClick='cmGrid.showCreateDialog()'>New Circ Modifier</button>
65         <button dojoType='dijit.form.Button' onClick='cmGrid.deleteSelected()'>Delete Selected</button>
66     </div>
67 </div>
68
69 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
70     <table  jsId="cmGrid"
71             autoHeight='true'
72             dojoType="openils.widget.AutoGrid"
73             fieldOrder="['code', 'name', 'description', 'sip2_media_type', 'magnetic_media']"
74             query="{name: '*'}"
75             defaultCellWidth='"auto"'
76             fmClass='ccm'
77             editOnEnter='true'>
78         <thead>
79             <tr>
80                 <th field="magnetic_media" options='No,Yes' values='f,t'/>
81                 <th field="sip2_media_type" formatter='formatSIPMediaType'/>
82             </tr>
83         </thead>
84     </table>
85  </div>
86
87 [% END %]