]> source.dussan.org Git - archiva.git/blob
85c78aeeab0242b3ca1f24e318d2c0f458be529f
[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
20 <%@ taglib prefix="ww" uri="/webwork" %>
21 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
22 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
23 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
24 <%@ taglib prefix="archiva" uri="http://archiva.apache.org" %>
25
26 <html>
27 <head>
28   <title>Administration - Repository Groups</title>
29   <ww:head/>
30 </head>
31
32 <body>
33
34 <h1>Administration - Repository Groups</h1>
35
36 <c:url var="iconDeleteUrl" value="/images/icons/delete.gif"/>
37 <c:url var="iconEditUrl" value="/images/icons/edit.png"/>
38 <c:url var="iconCreateUrl" value="/images/icons/create.png"/>
39 <c:url var="iconUpUrl" value="/images/icons/up.gif"/>
40 <c:url var="iconDownUrl" value="/images/icons/down.gif"/>
41
42 <div id="contentArea">
43
44 <ww:actionerror/>
45 <ww:actionmessage/>
46
47 <div align="right">
48   <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
49     <ww:form action="addRepositoryGroup" namespace="/admin">
50       <span class="label">Identifier<span style="color:red">*</span>:</span> 
51       <ww:textfield size="10" label="Identifier" theme="simple" name="repositoryGroup.id"/>
52       <ww:submit value="Add Group" theme="simple" cssClass="button"/>
53     </ww:form>
54   </redback:ifAnyAuthorized>
55 </div>
56
57 <h2>Repository Groups</h2>
58
59 <c:choose>
60 <c:when test="${empty (repositoryGroups)}">
61   <strong>No Repository Groups Defined.</strong>
62 </c:when>
63 <c:otherwise>
64
65 <div class="admin">
66
67 <c:forEach items="${repositoryGroups}" var="repositoryGroup" varStatus="i">
68
69 <div class="repoGroup">
70   <div class="managedRepo">
71     
72     <div style="float:right">
73       <ww:url id="deleteRepositoryGroupUrl" action="confirmDeleteRepositoryGroup">
74         <ww:param name="repoGroupId" value="%{'${repositoryGroup.key}'}" />
75       </ww:url>
76       <ww:a href="%{deleteRepositoryGroupUrl}" cssClass="delete">
77         <img src="${iconDeleteUrl}"/>
78       </ww:a>
79     </div>
80     
81     <img src="<c:url value="/images/archiva-splat-32.gif"/>"/>
82     <p class="id">${repositoryGroup.key}</p>
83     <p><a href="${baseUrl}/${repositoryGroup.key}/">${baseUrl}/${repositoryGroup.key}/</a></p>
84   </div>
85
86   <c:if test="${!empty (groupToRepositoryMap[repositoryGroup.key])}">
87   <div class="repos">
88     <ww:form name="form${i}" action="addRepositoryToGroup" namespace="/admin" validate="true">
89       <ww:hidden name="repoGroupId" value="%{'${repositoryGroup.key}'}"/>
90       <ww:select list="groupToRepositoryMap['${repositoryGroup.key}']" name="repoId" theme="simple"/>
91       <ww:submit value="Add Repository" theme="simple" cssClass="button"/>
92     </ww:form>
93   </div>
94   </c:if>
95   
96   <c:set var="numberOfRepos" value="${fn:length(repositoryGroup.value.repositories)}" />
97
98   <c:forEach items="${repositoryGroup.value.repositories}" var="repository" varStatus="r">
99   
100   <c:choose>
101     <c:when test='${(r.index)%2 eq 0}'>
102       <c:set var="rowColor" value="dark" scope="page"/>
103     </c:when>
104     <c:otherwise>
105       <c:set var="rowColor" value="lite" scope="page"/>
106     </c:otherwise>
107   </c:choose>
108
109   <div class="connector ${rowColor}"> 
110     <div class="controls">
111       <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
112         <ww:url id="sortDownRepositoryUrl" action="sortDownRepositoryFromGroup">
113           <ww:param name="repoGroupId" value="%{'${repositoryGroup.key}'}"/>
114           <ww:param name="targetRepo" value="managedRepositories['${repository}'].id"/>
115         </ww:url>
116         <ww:url id="sortUpRepositoryUrl" action="sortUpRepositoryFromGroup">
117           <ww:param name="repoGroupId" value="%{'${repositoryGroup.key}'}"/>
118           <ww:param name="targetRepo" value="managedRepositories['${repository}'].id"/>
119         </ww:url>
120         <ww:url id="removeRepositoryUrl" action="removeRepositoryFromGroup">
121           <ww:param name="repoGroupId" value="%{'${repositoryGroup.key}'}"/>
122           <ww:param name="repoId" value="managedRepositories['${repository}'].id"/>
123         </ww:url>
124         <c:if test="${r.count > 1}">
125           <ww:a href="%{sortUpRepositoryUrl}" cssClass="up" title="Move Repository Up">
126             <img src="${iconUpUrl}"/>
127           </ww:a>
128         </c:if>
129         <c:if test="${r.count < numberOfRepos}">
130           <ww:a href="%{sortDownRepositoryUrl}" cssClass="down" title="Move Repository Down">
131             <img src="${iconDownUrl}"/>
132           </ww:a>
133         </c:if>
134         <ww:a href="%{removeRepositoryUrl}" cssClass="delete" title="Delete Repository">
135           <img src="${iconDeleteUrl}"/>
136         </ww:a>
137       </redback:ifAnyAuthorized>
138     </div>
139   
140     <h4>Repository</h4>
141     
142     <div class="managedRepo">
143       <img src="<c:url value="/images/archiva-splat-32.gif"/>"/>
144       <p class="id">${repository}</p>
145       <p class="name">${managedRepositories[repository].name}</p>
146       <p class="url"><a href="${baseUrl}/${managedRepositories[repository].id}/">${baseUrl}/${managedRepositories[repository].id}</a></p>
147     </div>
148   </div> <%-- repository --%> 
149   </c:forEach>
150
151 </div> <%-- repository group --%>
152 </c:forEach>
153 </div> <%-- admin --%>
154
155 </div> <%-- content area --%>
156 </c:otherwise>
157 </c:choose>