You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

repositoryGroups.jsp 5.8KB

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