]> source.dussan.org Git - archiva.git/blob
85613982f4b4468d38f3db4430298d58602a2816
[archiva.git] /
1 <!--
2   ~ Licensed to the Apache Software Foundation (ASF) under one
3   ~ or more contributor license agreements.  See the NOTICE file
4   ~ distributed with this work for additional information
5   ~ regarding copyright ownership.  The ASF licenses this file
6   ~ to you under the Apache License, Version 2.0 (the
7   ~ "License"); you may not use this file except in compliance
8   ~ with the License.  You may obtain a copy of the License at
9   ~
10   ~   http://www.apache.org/licenses/LICENSE-2.0
11   ~
12   ~ Unless required by applicable law or agreed to in writing,
13   ~ software distributed under the License is distributed on an
14   ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   ~ KIND, either express or implied.  See the License for the
16   ~ specific language governing permissions and limitations
17   ~ under the License.
18 -->
19 <script id="networkProxiesMain" type="text/x-jquery-tmpl">
20   <div class="page-header">
21     <h2>${$.i18n.prop('network-proxies.list')}</h2>
22   </div>
23
24   <ul id="network-proxies-view-tabs" class="nav nav-tabs">
25     <li id="network-proxies-view-tabs-li-grid">
26       <a data-toggle="tab" href="#network-proxies-view" id="network-proxies-view-tabs-a-network-proxies-grid">${$.i18n.prop('network-proxies.grid.tab.title')}</a>
27     </li>
28     <li id="network-proxies-view-tabs-li-edit">
29       <a data-toggle="tab" href="#network-proxies-edit">${$.i18n.prop('add')}</a>
30     </li>
31   </ul>
32   <div id="network-proxies-view-tabs-content" class="tab-content">
33     <div id="network-proxies-view" class="tab-pane">
34         <div id="network-proxies-bulk-save-btn" data-bind='template:{name:"network-proxies-bulk-save-tmpl"}'></div>
35         <table class="table table-striped table-bordered" id="networkProxiesTable"
36                data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-network-proxies-grid',pageLinksId:'network-proxiesPagination'">
37         </table>
38         <div id="network-proxiesPagination"></div>
39     </div>
40     <div id="network-proxies-edit" class="tab-pane" data-bind='template: {name:"network-proxy-edit-tmpl"}'></div>
41   </div>
42
43 </script>
44
45 <script id='ko-network-proxies-grid' type='text/x-jquery-tmpl'>
46     <thead>
47     <tr>
48         {{each(i, columnDefinition) columns}}
49         <th>${ columnDefinition.headerText }</th>
50         {{/each}}
51         <th>${$.i18n.prop('password')}</th>
52         <th>${$.i18n.prop('network.proxy.useNtlm')}</th>
53         <th>${$.i18n.prop('edit')}</th>
54         <th>${$.i18n.prop('delete')}</th>
55         <th>${$.i18n.prop('modified')}</th>
56     </tr>
57     </thead>
58     <tbody>
59     {{each(i, row) itemsOnCurrentPage()}}
60       <tr data-bind="css:{ 'modified': row.modified()}">
61         {{each(j, columnDefinition) columns}}
62         {{var val = (typeof columnDefinition.rowText == 'function' ? columnDefinition.rowText(row) : row[columnDefinition.rowText])}}
63           <td>
64               ${val}
65           </td>
66         {{/each}}
67         {{if row.password()}}
68           <td>*****</td>
69         {{else}}
70           <td></td>
71         {{/if}}
72           <td>${row.useNtlm()}</td>
73           <td>
74             <a href="#" data-bind="click: function(){ editNetworkProxy(row) }">${$.i18n.prop('edit')}</a>
75           </td>
76           <td>
77             <a href="#" data-bind="click: function(){ removeNetworkProxy(row) }">
78               <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
79             </a>
80           </td>
81         {{if row.modified()}}
82           <td>
83             <a href="#" data-bind="click: function(){ updateNetworkProxy(row) }">${$.i18n.prop('save')}</a>
84           </td>
85         {{else}}
86           <td></td>
87         {{/if}}
88
89     </tr>
90     {{/each}}
91     </tbody>
92
93 </script>
94
95 <script id="network-proxy-edit-tmpl" type='text/x-jquery-tmpl'>
96     <form id="network-proxy-edit-form" class="form-horizontal">
97       <fieldset id="network-proxy-edit-fieldset">
98         <div class="control-group">
99           <label class="control-label"  for="id">${$.i18n.prop('id')}</label>
100           <div class="controls">
101             {{if update}}
102               <span class="uneditable-input">${$data.networkProxy.id}</span>
103             {{else}}
104               <input type="text" class="xlarge" id="id" name="id" size="10"
105                      data-bind="value: networkProxy.id,css:{'uneditable-input': update},readonly:update"/>
106             {{/if}}
107           </div>
108         </div>
109         <div class="control-group">
110           <label class="control-label"  for="protocol">${$.i18n.prop('protocol')}</label>
111           <div class="controls">
112             <input type="text" class="xlarge required" id="protocol" name="protocol" size="8"
113                    data-bind="value: networkProxy.protocol"/>
114           </div>
115         </div>
116         <div class="control-group">
117           <label class="control-label"  for="host">${$.i18n.prop('host')}</label>
118           <div class="controls">
119             <input type="text" class="xlarge required" id="host" name="host" size="15"
120                    data-bind="value: networkProxy.host"/>
121           </div>
122         </div>
123         <div class="control-group">
124           <label class="control-label"  for="port">${$.i18n.prop('port')}</label>
125           <div class="controls">
126             <input type="text" class="xlarge required digits" id="port" name="port" size="6"
127                    data-bind="value: networkProxy.port"/>
128           </div>
129         </div>
130         <div class="control-group">
131           <label class="control-label"  for="username">${$.i18n.prop('username')}</label>
132           <div class="controls">
133             <input type="text" class="xlarge" id="username" name="username" size="50"
134                    data-bind="value: networkProxy.username"/>
135           </div>
136         </div>
137         <div class="control-group">
138           <label class="control-label"  for="password">${$.i18n.prop('password')}</label>
139           <div class="controls">
140             <input type="password" class="xlarge" id="password" name="password" size="50"
141                    data-bind="value: networkProxy.password"/>
142           </div>
143         </div>
144           <div class="control-group">
145             <label class="control-label"  for="password">${$.i18n.prop('network.proxy.useNtlm')}</label>
146             <div class="controls">
147               <input type="checkbox" id="useNtlm" name="useNtlm" data-bind="checked: networkProxy.useNtlm"/>
148             </div>
149           </div>
150
151       </fieldset>
152       <button id="network-proxy-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
153       {{if networkProxy.modified()}}
154        ${("#network-proxy-btn-save").button('reset')}
155       {{/if}}
156       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
157     </form>
158 </script>
159
160 <script id="network-proxies-bulk-save-tmpl" type='text/x-jquery-tmpl'>
161   {{if bulkSave()}}
162     <button data-bind="click: updateModifiedNetworkProxies" class="btn">${$.i18n.prop('save.all')}</button>
163   {{/if}}
164 </script>