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.

artifactDecorator.jsp 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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="decorator" uri="http://www.opensymphony.com/sitemesh/decorator" %>
  20. <%@ taglib prefix="page" uri="http://www.opensymphony.com/sitemesh/page" %>
  21. <%@ taglib prefix="s" uri="/struts-tags" %>
  22. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  23. <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
  24. <%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
  25. <%@ taglib prefix="archiva" uri="http://archiva.apache.org" %>
  26. <page:applyDecorator name="default">
  27. <html>
  28. <head>
  29. <title>Browse Repository</title>
  30. <s:head/>
  31. </head>
  32. <body>
  33. <s:set name="model" value="model"/>
  34. <c:choose>
  35. <c:when test="${model.packaging == 'maven-plugin'}">
  36. <c:url var="imageUrl" value="/images/mavenplugin.gif"/>
  37. <c:set var="packageName">Maven Plugin</c:set>
  38. </c:when>
  39. <c:when test="${model.packaging == 'pom'}">
  40. <c:url var="imageUrl" value="/images/pom.gif"/>
  41. <c:set var="packageName">POM</c:set>
  42. </c:when>
  43. <%-- These types aren't usually set in the POM yet, so we fudge them for the well known ones --%>
  44. <c:when test="${model.packaging == 'maven-archetype' or model.groupId == 'org.apache.maven.archetypes'}">
  45. <c:url var="imageUrl" value="/images/archetype.gif"/>
  46. <c:set var="packageName">Maven Archetype</c:set>
  47. </c:when>
  48. <c:when test="${model.packaging == 'maven-skin' or model.groupId == 'org.apache.maven.skins'}">
  49. <c:url var="imageUrl" value="/images/skin.gif"/>
  50. <c:set var="packageName">Maven Skin</c:set>
  51. </c:when>
  52. <%-- Must be last so that the above get picked up if possible --%>
  53. <c:when test="${model.packaging == 'jar'}">
  54. <c:url var="imageUrl" value="/images/jar.gif"/>
  55. <c:set var="packageName">JAR</c:set>
  56. </c:when>
  57. <c:otherwise>
  58. <c:url var="imageUrl" value="/images/other.gif"/>
  59. <c:set var="packageName"></c:set>
  60. </c:otherwise>
  61. </c:choose>
  62. <img src="${imageUrl}" width="66" height="66" alt="${packageName}" title="${packageName}" style="float: left"/>
  63. <h1>
  64. <c:choose>
  65. <c:when test="${empty (model.name)}">
  66. ${model.artifactId}
  67. </c:when>
  68. <c:otherwise>
  69. ${model.name}
  70. </c:otherwise>
  71. </c:choose>
  72. </h1>
  73. <div id="contentArea">
  74. <div id="tabs">
  75. <span>
  76. <c:set var="url">
  77. <s:url action="showArtifact">
  78. <s:param name="groupId" value="%{groupId}"/>
  79. <s:param name="artifactId" value="%{artifactId}"/>
  80. <s:param name="version" value="%{version}"/>
  81. </s:url>
  82. </c:set>
  83. <my:currentWWUrl url="${url}">Info</my:currentWWUrl>
  84. <c:set var="url">
  85. <s:url action="showArtifactDependencies">
  86. <s:param name="groupId" value="%{groupId}"/>
  87. <s:param name="artifactId" value="%{artifactId}"/>
  88. <s:param name="version" value="%{version}"/>
  89. </s:url>
  90. </c:set>
  91. <my:currentWWUrl url="${url}">Dependencies</my:currentWWUrl>
  92. <c:set var="url">
  93. <s:url action="showArtifactDependencyTree">
  94. <s:param name="groupId" value="%{groupId}"/>
  95. <s:param name="artifactId" value="%{artifactId}"/>
  96. <s:param name="version" value="%{version}"/>
  97. </s:url>
  98. </c:set>
  99. <my:currentWWUrl url="${url}">Dependency Tree</my:currentWWUrl>
  100. <c:set var="url">
  101. <s:url action="showArtifactDependees">
  102. <s:param name="groupId" value="%{groupId}"/>
  103. <s:param name="artifactId" value="%{artifactId}"/>
  104. <s:param name="version" value="%{version}"/>
  105. </s:url>
  106. </c:set>
  107. <my:currentWWUrl url="${url}">Used By</my:currentWWUrl>
  108. <c:set var="url">
  109. <s:url action="showArtifactMailingLists">
  110. <s:param name="groupId" value="%{groupId}"/>
  111. <s:param name="artifactId" value="%{artifactId}"/>
  112. <s:param name="version" value="%{version}"/>
  113. </s:url>
  114. </c:set>
  115. <my:currentWWUrl url="${url}">Mailing Lists</my:currentWWUrl>
  116. <%-- POSTPONED to 1.0-alpha-2
  117. <redback:ifAnyAuthorized permissions="archiva-access-reports">
  118. <c:set var="url">
  119. <s:url action="showArtifactReports">
  120. <s:param name="groupId" value="%{groupId}"/>
  121. <s:param name="artifactId" value="%{artifactId}"/>
  122. <s:param name="version" value="%{version}"/>
  123. </s:url>
  124. </c:set>
  125. <my:currentWWUrl url="${url}">Reports</my:currentWWUrl>
  126. </redback:ifAnyAuthorized>
  127. --%>
  128. </span>
  129. </div>
  130. <div class="sidebar3">
  131. <archiva:downloadArtifact groupId="${groupId}" artifactId="${artifactId}" version="${model.version}" />
  132. </div>
  133. <decorator:body />
  134. </div>
  135. </body>
  136. </html>
  137. </page:applyDecorator>