]> source.dussan.org Git - archiva.git/blob
43685e589f2c3b9f96cd32a4af15428e30834ec6
[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="repositoryGroupsMain" type="text/html">
20   <div class="page-header">
21     <h2><img src="images/applications-internet-2-32-32.png"/>${$.i18n.prop('repository.groups.list')}</h2>
22   </div>
23   <ul id="repository-groups-view-tabs" class="nav nav-tabs">
24     <li id="repository-groups-view-tabs-li-grid" class="active">
25       <a data-toggle="tab" href="#repository-groups-view" id="repository-groups-view-tabs-a-network-proxies-grid">
26         ${$.i18n.prop('repository-groups.grid.tab.title')}
27       </a>
28     </li>
29     <li id="repository-groups-view-tabs-li-edit">
30       <a data-toggle="tab" href="#repository-groups-edit" id="repository-groups-view-tabs-a-edit">${$.i18n.prop('add')}</a>
31     </li>
32
33   </ul>
34   <div id="repository-groups-view-tabs-content" class="tab-content">
35         <div id="repository-groups-view" class="tab-pane active">
36           <div id="repository-groups-table" data-bind='template:{name:"repository-groups-table-tmpl"}'>
37           </div>
38         </div>
39         <div id="repository-groups-edit" class="tab-pane">
40               <div class="row-fluid">
41                 <div class="span5 dotted">
42                   <div id="repository-groups-edit-div" data-bind='template:{name:"repository-group-edit-tmpl"}'></div>
43                   <div id="repository-groups-edit-order-div" style="min-height: 80px"
44                      data-bind="sortable: { template: 'repository-group-edit-order-tmpl',data:repositoryGroup.managedRepositories,afterMove:repositoryMoved}">
45                   </div>
46                 </div>
47
48                 <div class="span5 dotted">
49                   <h5>${$.i18n.prop('repository.groups.available.repositories')}</h5>
50                   <br/>
51                   <div id="repository-groups-edit-available-repositories" style="min-height: 80px"
52                        data-bind="sortable: { template: 'repository-group-edit-order-tmpl',data:availableRepositories,afterMove:repositoryMoved}">
53
54                   </div>
55                 </div>
56
57               </div>
58
59         </div>
60
61   </div>
62 </script>
63
64 <script id="repository-groups-table-tmpl" type="text/html">
65   <table class="table table-striped table-bordered">
66     <thead>
67       <th>${$.i18n.prop('repository.groups.groups.grid.header')}</th>
68       <th>${$.i18n.prop('repository.groups.repositories.grid.header')}</th>
69       <th>${$.i18n.prop('edit')}</th>
70       <th>${$.i18n.prop('delete')}</th>
71       <th>${$.i18n.prop('save')}</th>
72     </thead>
73     <tbody>
74     {{each(i, repositoryGroup) repositoryGroups}}
75       <tr data-bind="css:{ 'modified': repositoryGroup.modified()}">
76         <td>${repositoryGroup.id}</td>
77         <td>
78           <ul>
79           {{each(j,id) repositoryGroup.repositories()}}
80             <li>${id}</li>
81           {{/each}}
82           </ul>
83         </td>
84         <td>
85           <a href="#" data-bind="click: function(){editRepositoryGroup(repositoryGroup)}">
86             <img src="images/edit-find-22-22.png" title="${$.i18n.prop('edit')}">
87           </a>
88         </td>
89         <td>
90           <a href="#" data-bind="click: function(){deleteRepositoryGroup(repositoryGroup)}">
91             <img src="images/edit-cut-22-22.png" title="${$.i18n.prop('delete')}"/>
92           </a>
93         </td>
94         <td>
95           {{if repositoryGroup.modified()}}
96             <a href="#" class="btn btn-warning" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)}">
97               ${$.i18n.prop('save')}
98             </a>
99           {{/if}}
100         </td>
101       </tr>
102     {{/each}}
103     </tbody>
104   </table>
105 </script>
106
107 <script id="repository-group-edit-tmpl" type="text/html">
108   <div class="row-fluid">
109   {{if update}}
110     <div class="dotted span8">
111       <blockquote>
112         ${repositoryGroup.id}
113         <br/>
114         <a href="${window.archivaRuntimeInfo.baseUrl}/repository/${repositoryGroup.id()}" target="_blank">
115           ${window.archivaRuntimeInfo.baseUrl}/repository/${repositoryGroup.id()}
116         </a>
117       </blockquote>
118     </div>
119   {{else}}
120     <div class="dotted span8">
121       <form id="repository-group-edit-form" class="well">
122         <fieldset id="repository-group-edit-fieldset">
123           <div class="control-group">
124             <label class="control-label" for="id">${$.i18n.prop('id')}</label>
125             <div class="controls">
126               <input type="text" class="xlarge required" id="id" name="id" size="15"
127                    data-bind="value: repositoryGroup.id,css:{'uneditable-input': update},readonly:update"/>
128             </div>
129           </div>
130         </fieldset>
131       </form>
132     </div>
133   {{/if}}
134   {{if repositoryGroup.modified()}}
135     <div class="span3">
136       <a href="#" class="btn btn-warning" data-bind="click: function(){saveRepositoryGroup(repositoryGroup)}">${$.i18n.prop('save')}</a>
137     </div>
138     <br/>
139   {{/if}}
140   </div>
141 </script>
142
143 <script id="repository-group-edit-order-tmpl" type="text/html">
144   <div class="well draggable-item">
145     <blockquote>
146       ${$data.id()}
147       <br/>
148       ${$data.name()}
149       <br/>
150       <a href="${window.archivaRuntimeInfo.baseUrl}/repository/${$data.id()}" target="_blank">
151         ${window.archivaRuntimeInfo.baseUrl}/repository/${$data.id()}
152       </a>
153       <br/>
154     </blockquote>
155
156   </div>
157 </script>
158
159 <script id="repository-group-delete-warning-tmpl" type='text/html'>
160     <div>
161       <span class="label label-warning">${$.i18n.prop('warning.not.undone.operation')}</span>
162     </div>
163 </script>