]> source.dussan.org Git - archiva.git/blob
7164a178323dd49ee6673a73516a77f386c211b5
[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('edit')}</th>
53         <th>${$.i18n.prop('delete')}</th>
54         <th>${$.i18n.prop('modified')}</th>
55     </tr>
56     </thead>
57     <tbody>
58     {{each(i, row) itemsOnCurrentPage()}}
59       <tr data-bind="css:{ 'modified': row.modified()}">
60         {{each(j, columnDefinition) columns}}
61         {{var val = (typeof columnDefinition.rowText == 'function' ? columnDefinition.rowText(row) : row[columnDefinition.rowText])}}
62           <td>
63               ${val}
64           </td>
65         {{/each}}
66         {{if row.password()}}
67           <td>*****</td>
68         {{else}}
69           <td></td>
70         {{/if}}
71         <td>
72             <a href="#" data-bind="click: function(){ editNetworkProxy(row) }">${$.i18n.prop('edit')}</a>
73         </td>
74         <td>
75             <a href="#" data-bind="click: function(){ removeNetworkProxy(row) }">
76               <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
77             </a>
78         </td>
79         {{if row.modified()}}
80           <td>
81             <a href="#" data-bind="click: function(){ updateNetworkProxy(row) }">${$.i18n.prop('save')}</a>
82           </td>
83         {{else}}
84           <td></td>
85         {{/if}}
86
87     </tr>
88     {{/each}}
89     </tbody>
90
91 </script>
92
93 <script id="network-proxy-edit-tmpl" type='text/x-jquery-tmpl'>
94     <form id="network-proxy-edit-form" class="form-horizontal">
95       <fieldset id="network-proxy-edit-fieldset">
96         <div class="control-group">
97           <label class="control-label"  for="id">${$.i18n.prop('id')}</label>
98           <div class="controls">
99             {{if update}}
100               <span class="uneditable-input">${$data.networkProxy.id}</span>
101             {{else}}
102               <input type="text" class="xlarge" id="id" name="id" size="10"
103                      data-bind="value: networkProxy.id,css:{'uneditable-input': update},readonly:update"/>
104             {{/if}}
105           </div>
106         </div>
107         <div class="control-group">
108           <label class="control-label"  for="protocol">${$.i18n.prop('protocol')}</label>
109           <div class="controls">
110             <input type="text" class="xlarge required" id="protocol" name="protocol" size="8"
111                    data-bind="value: networkProxy.protocol"/>
112           </div>
113         </div>
114         <div class="control-group">
115           <label class="control-label"  for="host">${$.i18n.prop('host')}</label>
116           <div class="controls">
117             <input type="text" class="xlarge required" id="host" name="host" size="15"
118                    data-bind="value: networkProxy.host"/>
119           </div>
120         </div>
121         <div class="control-group">
122           <label class="control-label"  for="port">${$.i18n.prop('port')}</label>
123           <div class="controls">
124             <input type="text" class="xlarge required digits" id="port" name="port" size="6"
125                    data-bind="value: networkProxy.port"/>
126           </div>
127         </div>
128         <div class="control-group">
129           <label class="control-label"  for="username">${$.i18n.prop('username')}</label>
130           <div class="controls">
131             <input type="text" class="xlarge" id="username" name="username" size="50"
132                    data-bind="value: networkProxy.username"/>
133           </div>
134         </div>
135         <div class="control-group">
136           <label class="control-label"  for="password">${$.i18n.prop('password')}</label>
137           <div class="controls">
138             <input type="password" class="xlarge" id="password" name="password" size="50"
139                    data-bind="value: networkProxy.password"/>
140           </div>
141         </div>
142
143       </fieldset>
144       <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
145       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
146     </form>
147 </script>
148
149 <script id="network-proxies-bulk-save-tmpl" type='text/x-jquery-tmpl'>
150   {{if bulkSave()}}
151     <button data-bind="click: updateNetworkProxies" class="btn">${$.i18n.prop('save.all')}</button>
152   {{/if}}
153 </script>