]> source.dussan.org Git - archiva.git/blob
5d5a1c87a4b4e693223e1c0f7c9c1d7e059c0973
[archiva.git] /
1 <script id="networkProxiesMain" type="text/x-jquery-tmpl">
2   <div class="page-header">
3     <h2>${$.i18n.prop('network-proxies.list')}</h2>
4   </div>
5
6   <ul id="network-proxies-view-tabs" class="tabs">
7     <li id="network-proxies-view-tabs-li-grid" class="active">
8       <a href="#network-proxies-view" id="network-proxies-view-tabs-a-network-proxies-grid">${$.i18n.prop('network-proxies.grid.tab.title')}</a>
9     </li>
10     <li id="network-proxies-view-tabs-li-edit">
11       <a href="#network-proxies-edit">${$.i18n.prop('add')}</a>
12     </li>
13   </ul>
14   <div id="network-proxies-view-tabs-content" class="tab-content">
15     <div id="network-proxies-view" class="active">
16         <table class="bordered-table zebra-striped" id="networkProxiesTable"
17                data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-network-proxies-grid',pageLinksId:'network-proxiesPagination'">
18         </table>
19         <div id="network-proxiesPagination"></div>
20     </div>
21     <div id="network-proxies-edit" data-bind='template: {name:"network-proxy-edit-tmpl"}'></div>
22   </div>
23
24 </script>
25
26 <script id='ko-network-proxies-grid' type='text/x-jquery-tmpl'>
27     <thead>
28     <tr>
29         {{each(i, columnDefinition) columns}}
30         <th>${ columnDefinition.headerText }</th>
31         {{/each}}
32         <th>${$.i18n.prop('password')}</th>
33         <th>${$.i18n.prop('edit')}</th>
34         <th>${$.i18n.prop('delete')}</th>
35     </tr>
36     </thead>
37     <tbody>
38     {{each(i, row) itemsOnCurrentPage()}}
39     <tr>
40         {{each(j, columnDefinition) columns}}
41         {{var val = (typeof columnDefinition.rowText == 'function' ? columnDefinition.rowText(row) :
42         row[columnDefinition.rowText])}}
43         <td>
44             ${val}
45         </td>
46         {{/each}}
47         {{if row.password()}}
48           <td>*****</td>
49         {{else}}
50           <td></td>
51         {{/if}}
52         <td>
53             <a href="#" data-bind="click: function(){ editNetworkProxy(row) }">${$.i18n.prop('edit')}</a>
54         </td>
55         <td>
56             <a href="#" data-bind="click: function(){ removeNetworkProxy(row) }">
57               <img src="images/edit-cut.png" title="${$.i18n.prop('delete')}"/>
58             </a>
59         </td>
60     </tr>
61     {{/each}}
62     </tbody>
63
64 </script>
65
66 <script id="network-proxy-edit-tmpl" type='text/x-jquery-tmpl'>
67     <form id="network-proxy-edit-form">
68       <fieldset id="network-proxy-edit-fieldset">
69         <div class="clearfix">
70           <label for="id">${$.i18n.prop('id')}</label>
71           <div class="input">
72             {{if update}}
73               <span class="uneditable-input">${$data.networkProxy.id}</span>
74             {{else}}
75               <input type="text" class="xlarge" id="id" name="id" size="10"
76                      data-bind="value: networkProxy.id,css:{'uneditable-input': update},readonly:update"/>
77             {{/if}}
78           </div>
79         </div>
80         <div class="clearfix">
81           <label for="protocol">${$.i18n.prop('protocol')}</label>
82           <div class="input">
83             <input type="text" class="xlarge required" id="protocol" name="protocol" size="8"
84                    data-bind="value: networkProxy.protocol"/>
85           </div>
86         </div>
87         <div class="clearfix">
88           <label for="host">${$.i18n.prop('host')}</label>
89           <div class="input">
90             <input type="text" class="xlarge required" id="host" name="host" size="15"
91                    data-bind="value: networkProxy.host"/>
92           </div>
93         </div>
94         <div class="clearfix">
95           <label for="port">${$.i18n.prop('port')}</label>
96           <div class="input">
97             <input type="text" class="xlarge required digits" id="port" name="port" size="6"
98                    data-bind="value: networkProxy.port"/>
99           </div>
100         </div>
101         <div class="clearfix">
102           <label for="username">${$.i18n.prop('username')}</label>
103           <div class="input">
104             <input type="text" class="xlarge" id="username" name="username" size="50"
105                    data-bind="value: networkProxy.username"/>
106           </div>
107         </div>
108         <div class="clearfix">
109           <label for="password">${$.i18n.prop('password')}</label>
110           <div class="input">
111             <input type="password" class="xlarge" id="password" name="password" size="50"
112                    data-bind="value: networkProxy.password"/>
113           </div>
114         </div>
115
116       </fieldset>
117       <button data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
118       <button data-bind="click: displayGrid" class="btn">${$.i18n.prop('cancel')}</button>
119     </form>
120 </script>