]> source.dussan.org Git - archiva.git/blob
8960e1cba9662da3f77087dbc890b30ca9f66b8f
[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="my" tagdir="/WEB-INF/tags" %>
23 <%@ taglib prefix="archiva" uri="http://archiva.apache.org" %>
24 <%@ taglib prefix="redback" uri="http://plexus.codehaus.org/redback/taglib-1.0" %>
25
26 <html>
27 <head>
28   <title>Browse Repository</title>
29   <ww:head/>
30 </head>
31
32 <body>
33
34 <ww:set name="model" value="model"/>
35 <c:choose>
36   <c:when test="${model.packaging == 'maven-plugin'}">
37     <c:url var="imageUrl" value="/images/mavenplugin.gif"/>
38     <c:set var="packageName">Maven Plugin</c:set>
39   </c:when>
40   <c:when test="${model.packaging == 'pom'}">
41     <c:url var="imageUrl" value="/images/pom.gif"/>
42     <c:set var="packageName">POM</c:set>
43   </c:when>
44   <%-- These types aren't usually set in the POM yet, so we fudge them for the well known ones --%>
45   <c:when test="${model.packaging == 'maven-archetype' or model.groupId == 'org.apache.maven.archetypes'}">
46     <c:url var="imageUrl" value="/images/archetype.gif"/>
47     <c:set var="packageName">Maven Archetype</c:set>
48   </c:when>
49   <c:when test="${model.packaging == 'maven-skin' or model.groupId == 'org.apache.maven.skins'}">
50     <c:url var="imageUrl" value="/images/skin.gif"/>
51     <c:set var="packageName">Maven Skin</c:set>
52   </c:when>
53   <%-- Must be last so that the above get picked up if possible --%>
54   <c:when test="${model.packaging == 'jar'}">
55     <c:url var="imageUrl" value="/images/jar.gif"/>
56     <c:set var="packageName">JAR</c:set>
57   </c:when>
58   <c:otherwise>
59     <c:url var="imageUrl" value="/images/other.gif"/>
60     <c:set var="packageName"></c:set>
61   </c:otherwise>
62 </c:choose>
63 <img src="${imageUrl}" width="66" height="66" alt="${packageName}" title="${packageName}" style="float: left"/>
64
65 <h1>
66   <c:choose>
67     <c:when test="${empty (model.name)}">
68       ${model.artifactId}
69     </c:when>
70     <c:otherwise>
71       ${model.name}
72     </c:otherwise>
73   </c:choose>
74 </h1>
75
76 <div id="contentArea">
77   <div id="tabs">
78     <span>
79       <c:set var="url">
80         <ww:url action="showArtifact">
81           <ww:param name="groupId" value="%{groupId}"/>
82           <ww:param name="artifactId" value="%{artifactId}"/>
83           <ww:param name="version" value="%{version}"/>
84         </ww:url>
85       </c:set>
86       <my:currentWWUrl url="${url}">Info</my:currentWWUrl>
87       <c:set var="url">
88         <ww:url action="showArtifactDependencies">
89           <ww:param name="groupId" value="%{groupId}"/>
90           <ww:param name="artifactId" value="%{artifactId}"/>
91           <ww:param name="version" value="%{version}"/>
92         </ww:url>
93       </c:set>
94       <my:currentWWUrl url="${url}">Dependencies</my:currentWWUrl>
95       <c:set var="url">
96         <ww:url action="showArtifactDependencyTree">
97           <ww:param name="groupId" value="%{groupId}"/>
98           <ww:param name="artifactId" value="%{artifactId}"/>
99           <ww:param name="version" value="%{version}"/>
100         </ww:url>
101       </c:set>
102       <my:currentWWUrl url="${url}">Dependency Tree</my:currentWWUrl>
103       <c:set var="url">
104         <ww:url action="showArtifactDependees">
105           <ww:param name="groupId" value="%{groupId}"/>
106           <ww:param name="artifactId" value="%{artifactId}"/>
107           <ww:param name="version" value="%{version}"/>
108         </ww:url>
109       </c:set>
110       <my:currentWWUrl url="${url}">Used By</my:currentWWUrl>
111       <c:set var="url">
112         <ww:url action="showArtifactMailingLists">
113           <ww:param name="groupId" value="%{groupId}"/>
114           <ww:param name="artifactId" value="%{artifactId}"/>
115           <ww:param name="version" value="%{version}"/>
116         </ww:url>
117       </c:set>
118       <my:currentWWUrl url="${url}">Mailing Lists</my:currentWWUrl>
119       <%-- POSTPONED to 1.0-alpha-2
120       <redback:ifAnyAuthorized permissions="archiva-access-reports">
121         <c:set var="url">
122               <ww:url action="showArtifactReports">
123                 <ww:param name="groupId" value="%{groupId}"/>
124                 <ww:param name="artifactId" value="%{artifactId}"/>
125                 <ww:param name="version" value="%{version}"/>
126               </ww:url>
127             </c:set>
128             <my:currentWWUrl url="${url}">Reports</my:currentWWUrl>
129       </redback:ifAnyAuthorized>
130         --%>
131       
132     </span>
133   </div>
134
135   <div class="sidebar3">
136     <archiva:downloadArtifact groupId="${model.groupId}" artifactId="${model.artifactId}" version="${model.version}"/>
137   </div>
138
139   <%-- TODO: perhaps using ajax? --%>
140   <%-- TODO: panels? this is ugly as is --%>
141   <div id="tabArea">
142     <c:choose>
143       <c:when test="${dependencies != null}">
144         <%@ include file="/WEB-INF/jsp/include/artifactDependencies.jspf" %>
145       </c:when>
146       <c:when test="${dependencyTree != null}">
147         <%@ include file="/WEB-INF/jsp/include/dependencyTree.jspf" %>
148       </c:when>
149       <c:when test="${dependees != null}">
150         <%@ include file="/WEB-INF/jsp/include/projectDependees.jspf" %>
151       </c:when>
152       <c:when test="${mailingLists != null}">
153         <%@ include file="/WEB-INF/jsp/include/mailingLists.jspf" %>
154       </c:when>
155       <c:when test="${reports != null}">
156         <%@ include file="/WEB-INF/jsp/include/artifactReports.jspf" %>
157       </c:when>
158       <c:otherwise>
159         <%@ include file="/WEB-INF/jsp/include/artifactInfo.jspf" %>
160       </c:otherwise>
161     </c:choose>
162   </div>
163 </div>
164
165 </body>
166 </html>