]> source.dussan.org Git - archiva.git/commitdiff
[MRM-131] fix url rendering bugs
authorBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 18:17:15 +0000 (18:17 +0000)
committerBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 18:17:15 +0000 (18:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437200 13f79535-47bb-0310-9956-ffa450edef68

archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf
archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf

index 140933ae568cd3481e67b44fcd3bede71354446d..c9501cca5f4c964059dacf5c1bc4ec991b16d085 100644 (file)
@@ -5,13 +5,21 @@
 <c:forEach items="${dependencies}" var="dependency">
   <h3>
     <c:set var="url">
-      <ww:url action="showArtifact" namespace="/">
-        <ww:param name="groupId" value="%{'${dependency.groupId}'}"/>
-        <ww:param name="artifactId" value="%{'${dependency.artifactId}'}"/>
-        <c:if test="${!empty(dependency.version)}">
-          <ww:param name="version" value="%{'${dependency.version}'}"/>
-        </c:if>
-      </ww:url>
+      <c:choose>
+        <c:when test="${!empty(dependency.version)}">
+          <ww:url action="showArtifact" namespace="/">
+            <ww:param name="groupId" value="%{'${dependency.groupId}'}"/>
+            <ww:param name="artifactId" value="%{'${dependency.artifactId}'}"/>
+            <ww:param name="version" value="%{'${dependency.version}'}"/>
+          </ww:url>
+        </c:when>
+        <c:otherwise>
+          <ww:url action="browseArtifact" namespace="/">
+            <ww:param name="groupId" value="%{'${dependency.groupId}'}"/>
+            <ww:param name="artifactId" value="%{'${dependency.artifactId}'}"/>
+          </ww:url>
+        </c:otherwise>
+      </c:choose>
     </c:set>
       <%-- TODO: showing the name and description would be nice, but that would require loading the POMs --%>
     <a href="${url}">${dependency.artifactId}</a>
@@ -21,6 +29,7 @@
   <p>
             <span style="font-size: x-small">
               <%-- TODO! share with browse as a tag --%>
+              <c:set var="cumulativeGroup" value=""/>
               <c:forTokens items="${dependency.groupId}" delims="." var="part">
                 <c:choose>
                   <c:when test="${empty(cumulativeGroup)}">
index a2687b1ce7db4f139e7f3dd0662e56bd61bb2d08..a2ffb6f74c16a0d5c16ffcea1d98fcede1be1707 100644 (file)
@@ -2,24 +2,29 @@
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 
 <p>
+  <c:set var="cumulativeGroup" value=""/>
   <c:forTokens items="${model.groupId}" delims="." var="part">
     <c:choose>
       <c:when test="${empty(cumulativeGroup)}">
         <c:set var="cumulativeGroup" value="${part}"/>
       </c:when>
       <c:otherwise>
-        <c:set var="cumulativeGroup" value="${cumulativeGroup}/${part}"/>
+        <c:set var="cumulativeGroup" value="${cumulativeGroup}.${part}"/>
       </c:otherwise>
     </c:choose>
-    <ww:url id="url" action="browseGroup" namespace="/">
-      <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
-    </ww:url>
+    <c:set var="url">
+      <ww:url action="browseGroup" namespace="/">
+        <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
+      </ww:url>
+    </c:set>
     <a href="${url}">${part}</a> /
   </c:forTokens>
-  <ww:url id="url" action="browseArtifact" namespace="/">
-    <ww:param name="groupId" value="%{'${model.groupId}'}"/>
-    <ww:param name="artifactId" value="%{'${model.artifactId}'}"/>
-  </ww:url>
+  <c:set var="url">
+    <ww:url action="browseArtifact" namespace="/">
+      <ww:param name="groupId" value="%{'${model.groupId}'}"/>
+      <ww:param name="artifactId" value="%{'${model.artifactId}'}"/>
+    </ww:url>
+  </c:set>
   <a href="${url}">${model.artifactId}</a> /
   <strong>${model.version}</strong>
 
       <th>Parent</th>
       <td>
           ${model.parent.groupId} ${model.parent.artifactId} ${model.parent.version}
-        <ww:url id="url" action="showArtifact" namespace="/">
-          <ww:param name="groupId" value="%{'${model.parent.groupId}'}"/>
-          <ww:param name="artifactId" value="%{'${model.parent.artifactId}'}"/>
-          <ww:param name="version" value="%{'${model.parent.version}'}"/>
-        </ww:url>
+        <c:set var="url">
+          <ww:url action="showArtifact" namespace="/">
+            <ww:param name="groupId" value="%{'${model.parent.groupId}'}"/>
+            <ww:param name="artifactId" value="%{'${model.parent.artifactId}'}"/>
+            <ww:param name="version" value="%{'${model.parent.version}'}"/>
+          </ww:url>
+        </c:set>
         (<a href="${url}">View</a>)
       </td>
     </tr>