]> source.dussan.org Git - archiva.git/blob
b20ce116e88a8b1cb2dc32f578af1209f6d3f48e
[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="tabs">
25     <li id="network-proxies-view-tabs-li-grid" class="active">
26       <a 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 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="active">
34         <table class="bordered-table zebra-striped" id="networkProxiesTable"
35                data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-network-proxies-grid',pageLinksId:'network-proxiesPagination'">
36         </table>
37         <div id="network-proxiesPagination"></div>
38     </div>
39     <div id="network-proxies-edit" data-bind='template: {name:"network-proxy-edit-tmpl"}'></div>
40   </div>
41
42 </script>
43
44 <script id='ko-network-proxies-grid' type='text/x-jquery-tmpl'>
45     <thead>
46     <tr>
47         {{each(i, columnDefinition) columns}}
48         <th>${ columnDefinition.headerText }</th>
49         {{/each}}
50         <th>${$.i18n.prop('password')}</th>
51         <th>${$.i18n.prop('edit')}</th>
52         <th>${$.i18n.prop('delete')}</th>
53         <th>${$.i18n.prop('modified')}</th>
54     </tr>
55     </thead>
56     <tbody>
57     {{each(i, row) itemsOnCurrentPage()}}
58     <tr>
59         {{each(j, columnDefinition) columns}}
60         {{var val = (typeof columnDefinition.rowText == 'function' ? columnDefinition.rowText(row) :
61         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><a href="#" data-bind="click: function(){ updateNetworkProxy(row) }">${$.i18n.prop('save')}</a></td>
81         {{else}}
82           <td></td>
83         {{/if}}
84
85     </tr>
86     {{/each}}
87     </tbody>
88
89 </script>
90
91 <script id="network-proxy-edit-tmpl" type='text/x-jquery-tmpl'>
92     <form id="network-proxy-edit-form">
93       <fieldset id="network-proxy-edit-fieldset">
94         <div class="clearfix">
95           <label for="id">${$.i18n.prop('id')}</label>
96           <div class="input">
97             {{if update}}
98               <span class="uneditable-input">${$data.networkProxy.id}</span>
99             {{else}}
100               <input type="text" class="xlarge" id="id" name="id" size="10"
101                      data-bind="value: networkProxy.id,css:{'uneditable-input': update},readonly:update"/>
102             {{/if}}
103           </div>
104         </div>
105         <div class="clearfix">
106           <label for="protocol">${$.i18n.prop('protocol')}</label>
107           <div class="input">
108             <input type="text" class="xlarge required" id="protocol" name="protocol" size="8"
109                    data-bind="value: networkProxy.protocol"/>
110           </div>
111         </div>
112         <div class="clearfix">
113           <label for="host">${$.i18n.prop('host')}</label>
114           <div class="input">
115             <input type="text" class="xlarge required" id="host" name="host" size="15"
116                    data-bind="value: networkProxy.host"/>
117           </div>
118         </div>
119         <div class="clearfix">
120           <label for="port">${$.i18n.prop('port')}</label>
121           <div class="input">
122             <input type="text" class="xlarge required digits" id="port" name="port" size="6"
123                    data-bind="value: networkProxy.port"/>
124           </div>
125         </div>
126         <div class="clearfix">
127           <label for="username">${$.i18n.prop('username')}</label>
128           <div class="input">
129             <input type="text" class="xlarge" id="username" name="username" size="50"
130                    data-bind="value: networkProxy.username"/>
131           </div>
132         </div>
133         <div class="clearfix">
134           <label for="password">${$.i18n.prop('password')}</label>
135           <div class="input">
136             <input type="password" class="xlarge" id="password" name="password" size="50"
137                    data-bind="value: networkProxy.password"/>
138           </div>
139         </div>
140
141       </fieldset>
142       <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
143       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
144     </form>
145 </script>