]> source.dussan.org Git - archiva.git/commitdiff
[MRM-131] add dependencies page
authorBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 16:01:32 +0000 (16:01 +0000)
committerBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 16:01:32 +0000 (16:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437175 13f79535-47bb-0310-9956-ffa450edef68

archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/ShowArtifactAction.java
archiva-webapp/src/main/java/org/apache/maven/archiva/web/mapper/RepositoryActionMapper.java
archiva-webapp/src/main/resources/xwork.xml
archiva-webapp/src/main/webapp/WEB-INF/jsp/browseArtifact.jsp
archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf [new file with mode: 0644]
archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf [new file with mode: 0644]
archiva-webapp/src/main/webapp/WEB-INF/jsp/showArtifact.jsp
archiva-webapp/src/main/webapp/WEB-INF/tags/currentWWUrl.tag

index 31ab2cc0fd1e16e7f52fb693867b919372e5e5b6..438934f6c3ca5e31e3b4c921c2404c4bea173f4a 100644 (file)
@@ -70,41 +70,78 @@ public class ShowArtifactAction
 
     private Model model;
 
-    public String execute()
+    private List dependencies;
+
+    public String artifact()
         throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException
     {
-        if ( StringUtils.isEmpty( groupId ) )
+        if ( !checkParameters() )
         {
-            // TODO: i18n
-            addActionError( "You must specify a group ID to browse" );
             return ERROR;
         }
 
-        if ( StringUtils.isEmpty( artifactId ) )
-        {
-            // TODO: i18n
-            addActionError( "You must specify a artifact ID to browse" );
-            return ERROR;
-        }
+        MavenProject project = readProject();
+
+        model = project.getModel();
+
+        return SUCCESS;
+    }
 
-        if ( StringUtils.isEmpty( version ) )
+    public String dependencies()
+        throws ConfigurationStoreException, IOException, XmlPullParserException, ProjectBuildingException
+    {
+        if ( !checkParameters() )
         {
-            // TODO: i18n
-            addActionError( "You must specify a version to browse" );
             return ERROR;
         }
 
+        MavenProject project = readProject();
+
+        model = project.getModel();
+
+        // TODO: should this be the whole set of artifacts, and be more like the maven dependencies report?
+        dependencies = project.getModel().getDependencies();
+
+        return SUCCESS;
+    }
+
+    private MavenProject readProject()
+        throws ConfigurationStoreException, ProjectBuildingException
+    {
         Configuration configuration = configurationStore.getConfigurationFromStore();
         List repositories = repositoryFactory.createRepositories( configuration );
 
         Artifact artifact = artifactFactory.createProjectArtifact( groupId, artifactId, version );
         // TODO: maybe we can decouple the assembly parts of the project builder from the repository handling to get rid of the temp repo
         ArtifactRepository localRepository = repositoryFactory.createLocalRepository( configuration );
-        MavenProject project = projectBuilder.buildFromRepository( artifact, repositories, localRepository );
+        return projectBuilder.buildFromRepository( artifact, repositories, localRepository );
+    }
 
-        model = project.getModel();
+    private boolean checkParameters()
+    {
+        boolean result = true;
 
-        return SUCCESS;
+        if ( StringUtils.isEmpty( groupId ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a group ID to browse" );
+            result = false;
+        }
+
+        else if ( StringUtils.isEmpty( artifactId ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a artifact ID to browse" );
+            result = false;
+        }
+
+        else if ( StringUtils.isEmpty( version ) )
+        {
+            // TODO: i18n
+            addActionError( "You must specify a version to browse" );
+            result = false;
+        }
+        return result;
     }
 
     public Model getModel()
@@ -112,6 +149,11 @@ public class ShowArtifactAction
         return model;
     }
 
+    public List getDependencies()
+    {
+        return dependencies;
+    }
+
     public String getGroupId()
     {
         return groupId;
index c686f727d3c77f4bb0a37ddbaac0f09598f5f1f3..9ebb1471903e24bdbe523d24df85160f9c2cd7ed 100644 (file)
@@ -51,6 +51,11 @@ public class RepositoryActionMapper
             return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
                 params.remove( "version" );
         }
+        else if ( "showArtifactDependencies".equals( actionMapping.getName() ) )
+        {
+            return BROWSE_PREFIX + params.remove( "groupId" ) + "/" + params.remove( "artifactId" ) + "/" +
+                params.remove( "version" ) + "/dependencies";
+        }
         else if ( "proxy".equals( actionMapping.getName() ) )
         {
             return PROXY_PREFIX + params.remove( "path" );
@@ -93,6 +98,18 @@ public class RepositoryActionMapper
                     params.put( "version", parts[2] );
                     return new ActionMapping( "showArtifact", "/", "", params );
                 }
+                else if ( parts.length == 4 )
+                {
+                    Map params = new HashMap();
+                    params.put( "groupId", parts[0] );
+                    params.put( "artifactId", parts[1] );
+                    params.put( "version", parts[2] );
+
+                    if ( "dependencies".equals( parts[3] ) )
+                    {
+                        return new ActionMapping( "showArtifactDependencies", "/", "", params );
+                    }
+                }
             }
         }
         else if ( path.startsWith( PROXY_PREFIX ) )
index db1d796a7c3a044206fe0eff572fb6229dde5d01..6075bf321339b7d3a2591df29210fe8fc2c554d5 100644 (file)
       <result>/WEB-INF/jsp/browseArtifact.jsp</result>
     </action>
 
-    <action name="showArtifact" class="showArtifactAction">
+    <action name="showArtifact" class="showArtifactAction" method="artifact">
+      <result>/WEB-INF/jsp/showArtifact.jsp</result>
+    </action>
+
+    <action name="showArtifactDependencies" class="showArtifactAction" method="dependencies">
       <result>/WEB-INF/jsp/showArtifact.jsp</result>
     </action>
 
index f7ba822ee80c4c3e94b374510fbd44f17189437f..95ee19f6710c9febd9d8c187862e374b877d1c10 100644 (file)
@@ -20,7 +20,7 @@
 <html>
 <head>
   <title>Browse Repository</title>
-  <ww:head />
+  <ww:head/>
 </head>
 
 <body>
       <c:forTokens items="${groupId}" delims="./" var="part">
         <c:choose>
           <c:when test="${empty(cumulativeGroup)}">
-            <c:set var="cumulativeGroup" value="${part}" />
+            <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>
       <strong>${artifactId}</strong>
 
     <h2>Versions</h2>
     <ul>
-      <ww:set name="versions" value="versions" />
+      <ww:set name="versions" value="versions"/>
       <c:forEach items="${versions}" var="version">
         <ww:url id="url" action="showArtifact" namespace="/">
-          <ww:param name="groupId" value="%{'${groupId}'}" />
-          <ww:param name="artifactId" value="%{'${artifactId}'}" />
-          <ww:param name="version" value="%{'${version}'}" />
+          <ww:param name="groupId" value="%{'${groupId}'}"/>
+          <ww:param name="artifactId" value="%{'${artifactId}'}"/>
+          <ww:param name="version" value="%{'${version}'}"/>
         </ww:url>
         <li><a href="${url}">${version}/</a></li>
       </c:forEach>
diff --git a/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf b/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactDependencies.jspf
new file mode 100644 (file)
index 0000000..984425c
--- /dev/null
@@ -0,0 +1,44 @@
+<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}'}"/>
+        <ww:param name="version" value="%{'${dependency.version}'}"/>
+      </ww:url>
+    </c:set>
+    <%-- TODO: showing the name and description would be nice, but that would require loading the POMs --%>
+    <a href="${url}">${dependency.artifactId}</a>
+  </h3>
+
+  <%-- TODO! use CSS, share with search results --%>
+  <p>
+            <span style="font-size: x-small">
+              <%-- TODO! share with browse as a tag --%>
+              <c:forTokens items="${dependency.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:otherwise>
+                </c:choose>
+                <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>
+              <strong>${dependency.artifactId}</strong>
+              | <strong>Version(s):</strong> ${dependency.version}
+              <c:if test="${!empty(dependency.scope)}">
+                | <strong>Scope:</strong> ${dependency.scope}
+              </c:if>
+              <c:if test="${!empty(dependency.classifier)}">
+                | <strong>Classifier:</strong> ${dependency.classifier}
+              </c:if>
+            </span>
+  </p>
+</c:forEach>
\ No newline at end of file
diff --git a/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf b/archiva-webapp/src/main/webapp/WEB-INF/jsp/include/artifactInfo.jspf
new file mode 100644 (file)
index 0000000..a2687b1
--- /dev/null
@@ -0,0 +1,200 @@
+<%@ taglib prefix="ww" uri="/webwork" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<p>
+  <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:otherwise>
+    </c:choose>
+    <ww:url id="url" action="browseGroup" namespace="/">
+      <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
+    </ww:url>
+    <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>
+  <a href="${url}">${model.artifactId}</a> /
+  <strong>${model.version}</strong>
+
+  <!-- TODO: new versions?
+    (<strong class="statusFailed">Newer version available:</strong>
+    <a href="artifact.html">2.0.3</a>)
+  -->
+</p>
+
+<p>${mode.description}</p>
+
+<table>
+  <tr>
+    <th>Group ID</th>
+    <td>${model.groupId}</td>
+  </tr>
+  <tr>
+    <th>Artifact ID</th>
+    <td>${model.artifactId}</td>
+  </tr>
+  <tr>
+    <th>Version</th>
+    <td>${model.version}</td>
+  </tr>
+  <tr>
+    <th>Packaging</th>
+    <td><code>${model.packaging}</code></td>
+  </tr>
+  <%-- TODO: derivatives
+    <tr>
+      <th>Derivatives</th>
+      <td>
+        <a href="#">Source</a>
+        |
+        <a href="#">Javadoc</a>
+      </td>
+    </tr>
+  --%>
+  <c:if test="${model.parent != null}">
+    <tr>
+      <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>
+        (<a href="${url}">View</a>)
+      </td>
+    </tr>
+  </c:if>
+  <%-- TODO: deployment timestamp
+    <tr>
+      <th>Deployment Date</th>
+      <td>
+        15 Jan 2006, 20:38:00 +1000
+      </td>
+    </tr>
+  --%>
+  <!-- TODO: origin
+    <tr>
+      <th>Origin</th>
+      <td>
+        <a href="TODO">Apache Repository</a>
+      </td>
+    </tr>
+  -->
+</table>
+
+<c:if test="${!empty(model.url) || model.organization != null || !empty(model.licenses)
+    || model.issueManagement != null || model.ciManagement != null}">
+
+  <h2>Other Details</h2>
+  <table>
+    <c:if test="${!empty(model.url)}">
+      <tr>
+        <th>URL</th>
+        <td>
+          <a href="${model.url}">${model.url}</a>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${model.organization != null}">
+      <tr>
+        <th>Organisation</th>
+        <td>
+          <c:choose>
+            <c:when test="${model.organization != null}">
+              <a href="${model.organization.url}">${model.organization.name}</a>
+            </c:when>
+            <c:otherwise>
+              ${model.organization.name}
+            </c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${!empty(model.licenses)}">
+      <c:forEach items="${model.licenses}" var="license">
+        <tr>
+          <th>License</th>
+          <td>
+            <c:choose>
+              <c:when test="${!empty(license.url)}">
+                <a href="${license.url}">${license.name}</a>
+              </c:when>
+              <c:otherwise>
+                ${license.name}
+              </c:otherwise>
+            </c:choose>
+          </td>
+        </tr>
+      </c:forEach>
+    </c:if>
+    <c:if test="${model.issueManagement != null}">
+      <tr>
+        <th>Issue Tracker</th>
+        <td>
+          <c:choose>
+            <c:when test="${!empty(model.issueManagement.url)}">
+              <a href="${model.issueManagement.url}">${model.issueManagement.system}</a>
+            </c:when>
+            <c:otherwise>
+              ${model.issueManagement.system}
+            </c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${model.ciManagement != null}">
+      <tr>
+        <th>Continuous Integration</th>
+        <td>
+          <c:choose>
+            <c:when test="${!empty(model.ciManagement.url)}">
+              <a href="${model.ciManagement.url}">${model.ciManagement.system}</a>
+            </c:when>
+            <c:otherwise>
+              ${model.ciManagement.system}
+            </c:otherwise>
+          </c:choose>
+        </td>
+      </tr>
+    </c:if>
+  </table>
+</c:if>
+
+<c:if test="${model.scm != null}">
+  <h2>SCM</h2>
+  <table>
+    <c:if test="${!empty(model.scm.connection)}">
+      <tr>
+        <th>Connection</th>
+        <td>
+          <code>${model.scm.connection}</code>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${!empty(model.scm.developerConnection)}">
+      <tr>
+        <th>Dev. Connection</th>
+        <td>
+          <code>${model.scm.developerConnection}</code>
+        </td>
+      </tr>
+    </c:if>
+    <c:if test="${!empty(model.scm.url)}">
+      <tr>
+        <th>Viewer</th>
+        <td>
+          <a href="${model.scm.url}">${model.scm.url}</a>
+        </td>
+      </tr>
+    </c:if>
+  </table>
+</c:if>
+
index ed843a634cb4ad1fbe6c246f053eb128103ef1a6..62630465a5d143b86f880ad25cf306f9ea22bdac 100644 (file)
 
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %>
 
 <html>
 <head>
   <title>Browse Repository</title>
-  <ww:head />
+  <ww:head/>
 </head>
 
 <body>
@@ -35,7 +36,7 @@
 </div>
 --%>
 
-<ww:set name="model" value="model" />
+<ww:set name="model" value="model"/>
 <h1>
   <c:choose>
     <c:when test="${empty(model.name)}">
 </h1>
 
 <div id="contentArea">
-<div id="tabs">
-  <p>
-    <strong>Info</strong>
-    <%-- TODO: perhaps using ajax?
-        <a href="TODO">Dependencies</a>
-        <a href="TODO">Depended On</a>
-        <a href="TODO">Mailing Lists</a>
-        <a href="TODO">Developers</a>
-        <a href="TODO">POM</a>
-    --%>
-  </p>
-</div>
-
-<div id="tabArea">
-<p>
-  <c:forTokens items="${model.groupId}" delims="." var="part">
+  <div id="tabs">
+    <p>
+      <c:set var="url">
+        <ww:url action="showArtifact">
+          <ww:param name="groupId" value="%{groupId}"/>
+          <ww:param name="artifactId" value="%{artifactId}"/>
+          <ww:param name="version" value="%{version}"/>
+        </ww:url>
+      </c:set>
+      <my:currentWWUrl url="${url}">Info</my:currentWWUrl>
+      <c:set var="url">
+        <ww:url action="showArtifactDependencies">
+          <ww:param name="groupId" value="%{groupId}"/>
+          <ww:param name="artifactId" value="%{artifactId}"/>
+          <ww:param name="version" value="%{version}"/>
+        </ww:url>
+      </c:set>
+      <my:currentWWUrl url="${url}">Dependencies</my:currentWWUrl>
+      <%-- TODO:
+          <a href="TODO">Depended On</a>
+          <a href="TODO">Mailing Lists</a>
+      --%>
+    </p>
+  </div>
+
+  <%-- TODO: perhaps using ajax? --%>
+  <%-- TODO: panels? this is ugly as is! --%>
+  <div id="tabArea">
     <c:choose>
-      <c:when test="${empty(cumulativeGroup)}">
-        <c:set var="cumulativeGroup" value="${part}" />
+      <c:when test="${dependencies != null}">
+        <%@ include file="/WEB-INF/jsp/include/artifactDependencies.jspf" %>
       </c:when>
       <c:otherwise>
-        <c:set var="cumulativeGroup" value="${cumulativeGroup}/${part}" />
+        <%@ include file="/WEB-INF/jsp/include/artifactInfo.jspf" %>
       </c:otherwise>
     </c:choose>
-    <ww:url id="url" action="browseGroup" namespace="/">
-      <ww:param name="groupId" value="%{'${cumulativeGroup}'}" />
-    </ww:url>
-    <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>
-  <a href="${url}">${model.artifactId}</a> /
-  <strong>${model.version}</strong>
-
-  <!-- TODO: new versions?
-    (<strong class="statusFailed">Newer version available:</strong>
-    <a href="artifact.html">2.0.3</a>)
-  -->
-</p>
-
-<p>${mode.description}</p>
-
-<table>
-  <tr>
-    <th>Group ID</th>
-    <td>${model.groupId}</td>
-  </tr>
-  <tr>
-    <th>Artifact ID</th>
-    <td>${model.artifactId}</td>
-  </tr>
-  <tr>
-    <th>Version</th>
-    <td>${model.version}</td>
-  </tr>
-  <tr>
-      <th>Packaging</th>
-      <td><code>${model.packaging}</code></td>
-    </tr>
-    <%-- TODO: derivatives
-    <tr>
-      <th>Derivatives</th>
-      <td>
-        <a href="#">Source</a>
-        |
-        <a href="#">Javadoc</a>
-      </td>
-    </tr>
-  --%>
-  <c:if test="${model.parent != null}">
-    <tr>
-      <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>
-        (<a href="${url}">View</a>)
-      </td>
-    </tr>
-  </c:if>
-  <%-- TODO: deployment timestamp
-    <tr>
-      <th>Deployment Date</th>
-      <td>
-        15 Jan 2006, 20:38:00 +1000
-      </td>
-    </tr>
-  --%>
-  <!-- TODO: origin
-    <tr>
-      <th>Origin</th>
-      <td>
-        <a href="TODO">Apache Repository</a>
-      </td>
-    </tr>
-  -->
-</table>
-
-<c:if test="${!empty(model.url) || model.organization != null || !empty(model.licenses)
-    || model.issueManagement != null || model.ciManagement != null}">
-
-  <h2>Other Details</h2>
-  <table>
-    <c:if test="${!empty(model.url)}">
-      <tr>
-        <th>URL</th>
-        <td>
-          <a href="${model.url}">${model.url}</a>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${model.organization != null}">
-      <tr>
-        <th>Organisation</th>
-        <td>
-          <c:choose>
-            <c:when test="${model.organization != null}">
-              <a href="${model.organization.url}">${model.organization.name}</a>
-            </c:when>
-            <c:otherwise>
-              ${model.organization.name}
-            </c:otherwise>
-          </c:choose>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${!empty(model.licenses)}">
-      <c:forEach items="${model.licenses}" var="license">
-        <tr>
-          <th>License</th>
-          <td>
-            <c:choose>
-              <c:when test="${!empty(license.url)}">
-                <a href="${license.url}">${license.name}</a>
-              </c:when>
-              <c:otherwise>
-                ${license.name}
-              </c:otherwise>
-            </c:choose>
-          </td>
-        </tr>
-      </c:forEach>
-    </c:if>
-    <c:if test="${model.issueManagement != null}">
-      <tr>
-        <th>Issue Tracker</th>
-        <td>
-          <c:choose>
-            <c:when test="${!empty(model.issueManagement.url)}">
-              <a href="${model.issueManagement.url}">${model.issueManagement.system}</a>
-            </c:when>
-            <c:otherwise>
-              ${model.issueManagement.system}
-            </c:otherwise>
-          </c:choose>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${model.ciManagement != null}">
-      <tr>
-        <th>Continuous Integration</th>
-        <td>
-          <c:choose>
-            <c:when test="${!empty(model.ciManagement.url)}">
-              <a href="${model.ciManagement.url}">${model.ciManagement.system}</a>
-            </c:when>
-            <c:otherwise>
-              ${model.ciManagement.system}
-            </c:otherwise>
-          </c:choose>
-        </td>
-      </tr>
-    </c:if>
-  </table>
-</c:if>
-
-<c:if test="${model.scm != null}">
-  <h2>SCM</h2>
-  <table>
-    <c:if test="${!empty(model.scm.connection)}">
-      <tr>
-        <th>Connection</th>
-        <td>
-          <code>${model.scm.connection}</code>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${!empty(model.scm.developerConnection)}">
-      <tr>
-        <th>Dev. Connection</th>
-        <td>
-          <code>${model.scm.developerConnection}</code>
-        </td>
-      </tr>
-    </c:if>
-    <c:if test="${!empty(model.scm.url)}">
-      <tr>
-        <th>Viewer</th>
-        <td>
-          <a href="${model.scm.url}">${model.scm.url}</a>
-        </td>
-      </tr>
-    </c:if>
-  </table>
-</c:if>
-
-</div>
+  </div>
 </div>
 
 </body>
index 6febd7f06fa05f015f46caa5813b1f01f0936f2d..fcc5cecb0a276b9732acb9297f3c6be541f2effd 100644 (file)
 \r
 <%@ taglib uri="/webwork" prefix="ww" %>\r
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>\r
-<%@ attribute name="action" required="true" %>\r
-<%@ attribute name="namespace" required="true" %>\r
+<%@ attribute name="action" %>\r
+<%@ attribute name="namespace" %>\r
+<%@ attribute name="url" %>\r
 <c:set var="currentUrl">\r
-  <ww:url />\r
-</c:set>\r
-<c:set var="url">\r
-  <ww:url action="${action}" namespace="${namespace}" />\r
+  <ww:url/>\r
 </c:set>\r
+<c:if test="${empty(url)}">\r
+  <c:set var="url">\r
+    <ww:url action="${action}" namespace="${namespace}"/>\r
+  </c:set>\r
+</c:if>\r
 <c:choose>\r
   <c:when test="${currentUrl == url}">\r
     <strong>\r
-      <jsp:doBody />\r
+      <jsp:doBody/>\r
     </strong>\r
   </c:when>\r
   <c:otherwise>\r
     <a href="${url}">\r
-      <jsp:doBody />\r
+      <jsp:doBody/>\r
     </a>\r
   </c:otherwise>\r
 </c:choose>\r