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
10 ~ http://www.apache.org/licenses/LICENSE-2.0
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
20 <%@ taglib prefix="s" uri="/struts-tags" %>
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" %>
28 <title>Administration - Repository Groups</title>
34 <h1>Administration - Repository Groups</h1>
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"/>
42 <div id="contentArea">
48 <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
49 <s:form action="addRepositoryGroup" namespace="/admin">
50 <span class="label">Identifier<span style="color:red">*</span>:</span>
51 <s:textfield size="10" label="Identifier" theme="simple" name="repositoryGroup.id"/>
52 <s:submit value="Add Group" theme="simple" cssClass="button"/>
54 </redback:ifAnyAuthorized>
57 <h2>Repository Groups</h2>
60 <c:when test="${empty (repositoryGroups)}">
61 <strong>No Repository Groups Defined.</strong>
67 <c:forEach items="${repositoryGroups}" var="repositoryGroup" varStatus="i">
69 <div class="repoGroup">
70 <div class="managedRepo">
72 <div style="float:right">
73 <s:url id="deleteRepositoryGroupUrl" action="confirmDeleteRepositoryGroup">
74 <s:param name="repoGroupId" value="%{#attr.repositoryGroup.key}" />
76 <s:a href="%{deleteRepositoryGroupUrl}" cssClass="delete">
77 <img src="${iconDeleteUrl}"/>
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>
86 <c:if test="${!empty (groupToRepositoryMap[repositoryGroup.key])}">
88 <s:form name="form%{#attr.i}" action="addRepositoryToGroup" namespace="/admin" validate="true">
89 <s:hidden name="repoGroupId" value="%{#attr.repositoryGroup.key}"/>
90 <s:select list="%{#attr.groupToRepositoryMap[#attr.repositoryGroup.key]}" name="repoId" theme="simple"/>
91 <s:submit value="Add Repository" theme="simple" cssClass="button"/>
96 <c:set var="numberOfRepos" value="${fn:length(repositoryGroup.value.repositories)}" />
98 <c:forEach items="${repositoryGroup.value.repositories}" var="repository" varStatus="r">
101 <c:when test='${(r.index)%2 eq 0}'>
102 <c:set var="rowColor" value="dark" scope="page"/>
105 <c:set var="rowColor" value="lite" scope="page"/>
109 <div class="connector ${rowColor}">
110 <div class="controls">
111 <redback:ifAnyAuthorized permissions="archiva-manage-configuration">
112 <s:url id="sortDownRepositoryUrl" action="sortDownRepositoryFromGroup">
113 <s:param name="repoGroupId" value="%{#attr.repositoryGroup.key}"/>
114 <s:param name="targetRepo" value="managedRepositories['%{#attr.repository}'].id"/>
116 <s:url id="sortUpRepositoryUrl" action="sortUpRepositoryFromGroup">
117 <s:param name="repoGroupId" value="%{#attr.repositoryGroup.key}"/>
118 <s:param name="targetRepo" value="managedRepositories['%{#attr.repository}'].id"/>
120 <s:url id="removeRepositoryUrl" action="removeRepositoryFromGroup">
121 <s:param name="repoGroupId" value="%{#attr.repositoryGroup.key}"/>
122 <s:param name="repoId" value="managedRepositories[%{#attr.repository}].id"/>
124 <c:if test="${r.count > 1}">
125 <s:a href="%{sortUpRepositoryUrl}" cssClass="up" title="Move Repository Up">
126 <img src="${iconUpUrl}"/>
129 <c:if test="${r.count < numberOfRepos}">
130 <s:a href="%{sortDownRepositoryUrl}" cssClass="down" title="Move Repository Down">
131 <img src="${iconDownUrl}"/>
134 <s:a href="%{removeRepositoryUrl}" cssClass="delete" title="Delete Repository">
135 <img src="${iconDeleteUrl}"/>
137 </redback:ifAnyAuthorized>
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>
148 </div> <%-- repository --%>
151 </div> <%-- repository group --%>
153 </div> <%-- admin --%>
155 </div> <%-- content area --%>