]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/admin/org_unit_settings.xhtml
More self-closing cleanup
[Evergreen.git] / Open-ILS / xul / staff_client / server / admin / org_unit_settings.xhtml
1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- 
3 # Copyright (C) 2008  Georgia Public Library Service
4 # Bill Erickson <erickson@esilibrary.com>
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 -->
15
16 <!DOCTYPE html PUBLIC 
17     "-//W3C//DTD XHTML 1.0 Transitional//EN" 
18     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [
19     <!--#include virtual="/opac/locale/${locale}/lang.dtd"-->
20 ]>
21
22 <html xmlns='http://www.w3.org/1999/xhtml'>
23     <head>
24         <title>&staff.server.admin.org_unit_settings.title;</title>
25         <link type='text/css' rel='stylesheet' href='admin.css' />
26         <script type="text/javascript" src='/IDL2js?aou,aout,pgt,au,coust,aous,csg,coustl' />
27         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/dojo.js" />
28         <script type="text/javascript" djConfig="parseOnLoad: true,isDebug:false" src="/js/dojo/dojo/openils_dojo.js" />
29         <script type="text/javascript" src='org_unit_settings.js' />
30         <script type="text/javascript" src="/xul/server/util/clipboard.js" />
31         <style type="text/css">
32             h2 {
33                 display:inline;
34                 padding:5px;
35             } 
36             
37             .form_table textarea {
38                 width:500px;
39                 height:15em;
40             }
41             
42             #searchform {
43                 display:inline;
44             }
45             
46             .message {
47                 float:left;
48                 left:-50%;
49                 text-align:center;
50                 
51                 padding:5px;
52                 
53                 position:relative;
54                 background-color:#D9E8F9;
55                 
56                 /*Standards compliant*/
57                 border-bottom-left-radius:5px;
58                 border-bottom-right-radius:5px;
59                 
60                 /*Old staff client compliant, It could be worse, we could be using IE!*/
61                 -moz-border-radius-bottomleft:5px;
62                 -moz-border-radius-bottomright:5px; 
63             }
64             
65             .message_container {
66                 float:left;
67                 left:50%;
68                 top:0%;
69                 position: absolute;
70                 opacity:0;
71             }
72             
73         </style>
74     </head>
75
76     <body class='tundra tall'>
77         <div dojoType='dijit.layout.LayoutContainer' orientation='vertical' class='tall'>
78             <div dojoType='dijit.layout.ContentPane' layoutAlign='top'>
79                 <div id="toolbar1" dojoType="dijit.Toolbar">
80                     <h2>&staff.server.admin.org_unit_settings.title;</h2>
81                     
82                     <span dojoType="dijit.ToolbarSeparator" ></span>
83                     
84                     <span>&staff.server.admin.org_unit_settings.context_loc;</span>
85                     <select dojoType='openils.widget.OrgUnitFilteringSelect' jsId='osContextSelector'
86                             searchAttr='shortname' autocomplete='true' labelAttr='shortname' onchange='osChangeContext();' />
87                     
88                     <span dojoType="dijit.ToolbarSeparator" ></span>
89                     
90                     <form id='searchform' onSubmit='return doSearch()'>
91                             <input type='text' dojoType='dijit.form.TextBox' id='searchBox' onkeypress='osSearchChange();' />
92                             <button type='submit' dojoType='dijit.form.Button'>&staff.server.admin.org_unit_settings.filter;</button>
93                             <button dojoType='dijit.form.Button' onClick='clearSearch();'>&staff.server.admin.org_unit_settings.clear_filter;</button>
94                     </form>
95                     
96                     <span dojoType="dijit.ToolbarSeparator" ></span>
97
98                     <button dojoType='dijit.form.Button' onClick='osToJson();'>&staff.server.admin.org_unit_settings.export;</button>
99                     <button dojoType='dijit.form.Button' onClick='osFromJson();'>&staff.server.admin.org_unit_settings.import;</button>
100                 </div>
101                 <span>&staff.server.admin.org_unit_settings.uninherited;</span>
102             </div>
103             <div dojoType="dijit.layout.ContentPane" layoutAlign='client'>
104                 <div class='hide_me' id='no-perms'><b>&staff.server.admin.org_unit_settings.no_perms;</b></div>
105             </div>
106             <div dojoType="dijit.layout.ContentPane" layoutAlign='client' class='tall'>
107                 <script>
108                     var osGridLayout = [{
109                         defaultCell: {styles: 'text-align: center;'},
110                         cells : [[
111                             {   name: '&staff.server.admin.org_unit_settings.edit;', 
112                                 value: '&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;osLaunchEditor(\'SETTING\');&quot;>&staff.server.admin.org_unit_settings.edit;&lt;/a>',
113                                 get: osGetEditLink, 
114                                 formatter : osFormatEditLink
115                             },
116                             {   name: '&staff.server.admin.org_unit_settings.history;', 
117                                 value: '&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;osLaunchHistory(\'SETTING\');&quot;>&staff.server.admin.org_unit_settings.history;&lt;/a>',
118                                 get: osGetHistoryLink, 
119                                 formatter : osFormatHistoryLink
120                             },
121                             {name: '&staff.server.admin.org_unit_settings.group;', get: osGetGridData, field:'grp'},
122                             {name: '&staff.server.admin.org_unit_settings.setting;', get: osGetGridData, field:'label', width:'auto', styles:'text-align:left;'},
123                             {name: '&staff.server.admin.org_unit_settings.context;', get: osGetGridData, field:'context'},
124                             {name: '&staff.server.admin.org_unit_settings.value;', get: osGetGridData, field:'value'},
125                         ]]
126                     }];
127                 </script>
128                 <div dojoType='dojox.Grid' jsId='osGrid' ></div>
129             </div>
130         </div>
131
132         <!-- edit dialog -->
133         <div dojoType="dijit.Dialog" jsId='osEditDialog' title="&staff.server.admin.org_unit_settings.edit_setting;">
134             <table class='form_table'>
135                 <thead>
136                     <tr><td colspan='2' align='center'><div id='os-edit-name'></div></td></tr>
137                     <tr><td colspan='2' align='center'><div id='os-edit-desc' style='max-width:600px;'></div></td></tr>
138                 </thead>
139                 <tbody>
140                     <tr>
141                         <td>&staff.server.admin.org_unit_settings.context;</td>
142                         <td> 
143                             <select dojoType="openils.widget.OrgUnitFilteringSelect" jsId='osEditContextSelector'
144                                 searchAttr="shortname" autocomplete="true" labelAttr='shortname' />
145                         </td>
146                     </tr>
147                     <tr>
148                         <td>&staff.server.admin.org_unit_settings.value;</td>
149                         <td>
150                             <input dojoType='dijit.form.TextBox' jsId='osEditTextBox'/>
151                             <input dojoType='dijit.form.CurrencyTextBox' jsId='osEditCurrencyTextBox'/>
152                             <input dojoType='dijit.form.NumberTextBox' jsId='osEditNumberTextBox'/>
153                             <select dojoType='dijit.form.FilteringSelect' jsId='osEditBoolSelect'>
154                                 <option value='true'>&common.true;</option>
155                                 <option value='false'>&common.false;</option>
156                             </select>
157                             <div id='os-edit-auto-widget'></div>
158                         </td>
159                     </tr>
160                     <tr>
161                         <td> 
162                             <button dojoType='dijit.form.Button' onclick='osEditSetting(true);'>&staff.server.admin.org_unit_settings.delete_setting;</button>
163                         </td>
164                         <td> 
165                             <button dojoType='dijit.form.Button' onclick='osEditSetting();'>&staff.server.admin.org_unit_settings.update_setting;</button>
166                         </td>
167                     </tr>
168                 </tbody>
169             </table>
170         </div> <!-- /edit dialog -->
171         
172         <div dojoType="openils.widget.ProgressDialog" jsId="progressDialog" indeterminate="true" ></div>
173         
174         <!--i18n, use the &translation; here, then grab innerHTML in JS later.-->
175         <div id='proci18n' class='hidden'>&staff.server.admin.org_unit_settings.processing;</div>
176         <div id='noresults' class='hidden'>&staff.server.admin.org_unit_settings.no_results;</div>
177         <span id='os-true' class='hidden'>&common.true;</span>
178         <span id='os-false' class='hidden'>&common.false;</span>
179         <span id='os-copy' class='hidden'>&staff.server.admin.org_unit_settings.copy;</span>
180         <span id='os-revert' class='hidden'>&staff.server.admin.org_unit_settings.history_revert;</span>
181         <span id='os-not-chosen' class='hidden'>&staff.server.admin.org_unit_settings.not_chosen;</span>
182         
183         <!--Export Dialog-->
184         <div id='jsonOutputDialog' dojoType='dijit.Dialog' jsId='osJSONOutDialog' title='&staff.server.admin.org_unit_settings.export;'>
185             <table class='form_table'>
186                 <tr><td>&staff.server.admin.org_unit_settings.export_copy_label;</td></tr>
187                 <tr><td><textarea id='jsonOutput' /></td></tr>
188                 <tr><td><button dojoType='dijit.form.Button' onclick='osJsonOutputCopy();'>&staff.server.admin.org_unit_settings.copy;</button></td></tr>
189             </table>
190         </div>
191         
192         <!--Import Dialog-->
193         <div id='jsonInputDialog' dojoType='dijit.Dialog' jsId='osJSONInDialog' title='&staff.server.admin.org_unit_settings.import;'>
194             <table class='form_table'>
195                 <tr><td>&staff.server.admin.org_unit_settings.import_paste_label;</td></tr>
196                 <tr><td><textarea id='jsonInput' /></td></tr>
197                 <tr><td><button dojoType='dijit.form.Button' onclick='osJsonInputPaste();'>&staff.server.admin.org_unit_settings.paste;</button><button type='submit'  dojoType='dijit.form.Button' onclick='osFromJsonSubmit();'>&staff.server.admin.org_unit_settings.submit;</button></td></tr>
198             </table>
199         </div>
200         
201         <!--History Dialog-->
202         <div id="historyDialog" dojoType="dijit.Dialog" jsId="osHistDialog" title="&staff.server.admin.org_unit_settings.history;">
203             <span id='osHistName' ></span>
204             
205             <!--Headers grabbed from this table are put in the next one by the js.-->
206             <table id="histTitle" class="hidden">
207                 <tr>
208                     <td>&staff.server.admin.org_unit_settings.history_date;</td>
209                     <td>&staff.server.admin.org_unit_settings.history_unit;</td>
210                     <td>&staff.server.admin.org_unit_settings.history_orig;</td>
211                     <td>&staff.server.admin.org_unit_settings.history_new;</td>
212                 </tr>
213             </table>
214             
215             <table class="form_table" id="historyData" />
216         </div>
217         
218         <!--Displays alerts at the top of the screen, much nicer than alert() or dojo equiv.-->
219         <div class="message_container" id="msgCont">
220             <div class="message" id='msgInner' ></div>
221         </div>
222     </body>
223 </html>