]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/templates/conify/global/config/z3950_source.tt2
LP1873286: Fix Bad End Tags
[Evergreen.git] / Open-ILS / src / templates / conify / global / config / z3950_source.tt2
1 [% WRAPPER base.tt2 %]
2 [% ctx.page_title = l('Z39.50 Servers') %]
3 <script type="text/javascript" src='[% ctx.media_prefix %]/js/ui/default/conify/global/config/z3950_source.js'> </script>
4
5 <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
6
7 [%  source_code = ctx.page_args.0; 
8     IF source_code %]
9
10     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
11         <div>[% l('Z39.50 Attributes for [_1]', source_code) | html %]</div>
12         <div>
13             <button dojoType='dijit.form.Button' onClick='zaGrid.showCreateDialog()'>[% l('New') %]</button>
14             <button dojoType='dijit.form.Button' onClick='zaGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
15             <button dojoType='dijit.form.Button' onClick='showAttrCloneDialog()'>[% l('Clone Attributes From Source') %]</button>
16         </div>
17     </div>
18     <div>
19         <button onClick="location.href = location.href.replace(/\/[^\/]+$/, '')">
20             [% l('Return to Sources') %]
21         </button>
22     </div>
23     <br/>
24     
25     <div>
26         [% l('Credentials for ') %]
27         <select dojoType="openils.widget.OrgUnitFilteringSelect" 
28             jsId='z39ContextSelector'
29             searchAttr='shortname' 
30             labelAttr='shortname'> 
31         </select> 
32         [% l('Username') %] 
33         <input type='text' id='z39-creds-username'/>
34         [% l('Password') %] 
35         <input type='password' id='z39-creds-password'/>
36         <button id='z39-creds-button' onclick='applyCreds()'>
37             [% l('Apply Credentials') %]
38         </button>
39         <button id='z39-creds-clear' onclick='applyCreds(1)'>
40             [% l('Clear Stored Credentials') %]
41         </button>
42     </div>
43
44     <br/>
45
46     <table
47         id="zaGrid"
48         jsid="zaGrid"
49         dojoType="openils.widget.FlattenerGrid"
50         columnPersistKey='"conify.config.z3950_attr"'
51         autoHeight="true"
52         editOnEnter="true"
53         editStyle="pane"
54         showLoadFilter="true"
55         fmClass="'cza'"
56         defaultSort="['code']"
57         query="{'source': ['[% source_code %]']}">
58         <thead>
59             <tr>
60                 <th field="source" fpath="source" ffilter="true"></th>
61                 <th field="name" fpath="name" ffilter="true"></th>
62                 <th field="label" fpath="label" ffilter="true"></th>
63                 <th field="code" fpath="code" ffilter="true"></th>
64                 <th field="format" fpath="format" ffilter="true"></th>
65                 <th field="truncation" fpath="truncation" ffilter="true"></th>
66             </tr>
67         </thead>
68     </table>
69
70     <div jsId="attrCloneDialog" dojoType="dijit.Dialog">
71         <span>[% l('Select a source to clone') %]</span>
72         <span><div id='attr-clone-source'></div></span>
73         <span><button onClick='cloneFromSource()'>[% l('Apply') %]</button></span>
74     </div>
75
76 [% ELSE %]
77
78     <div dojoType="dijit.layout.ContentPane" layoutAlign="top" class='oils-header-panel'>
79         <div>[% l('Z39.50 Servers') %]</div>
80         <div>
81             <button dojoType='dijit.form.Button' onClick='zsGrid.showCreateDialog()'>[% l('New Z39.50 Server') %]</button>
82             <button dojoType='dijit.form.Button' onClick='zsGrid.deleteSelected()'>[% l('Delete Selected') %]</button>
83         </div>
84     </div>
85
86     <table  jsId="zsGrid"
87             autoHeight='true'
88             dojoType="openils.widget.AutoGrid"
89             fieldOrder="['name', 'label', 'host', 'port', 'db', 'record_format', 'transmission_format', 'auth']"
90             query="{name: '*'}"
91             defaultCellWidth='"auto"'
92             fmClass='czs'
93             editOnEnter='true'>
94         <thead>
95             <tr><th field='name' formatter='formatSourceName'></th></tr>
96         </thead>
97     </table>
98
99 [% END %]
100
101 </div>
102
103 <script>var sourceCode = '[% source_code %]';</script>
104
105 [% END %]
106