[MRM-131] fix url rendering bugs

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437201 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2006-08-26 18:22:23 +00:00
parent 08866503a2
commit 3fc7f23def
3 changed files with 30 additions and 20 deletions

View File

@ -20,7 +20,7 @@
<html> <html>
<head> <head>
<title>Browse Repository</title> <title>Browse Repository</title>
<ww:head /> <ww:head/>
</head> </head>
<body> <body>
@ -31,11 +31,13 @@
<div id="nameColumn"> <div id="nameColumn">
<h2>Groups</h2> <h2>Groups</h2>
<ul> <ul>
<ww:set name="groups" value="groups" /> <ww:set name="groups" value="groups"/>
<c:forEach items="${groups}" var="groupId"> <c:forEach items="${groups}" var="groupId">
<ww:url id="url" action="browseGroup" namespace="/"> <c:set var="url">
<ww:param name="groupId" value="%{'${groupId}'}" /> <ww:url action="browseGroup" namespace="/">
</ww:url> <ww:param name="groupId" value="%{'${groupId}'}"/>
</ww:url>
</c:set>
<li><a href="${url}">${groupId}/</a></li> <li><a href="${url}">${groupId}/</a></li>
</c:forEach> </c:forEach>
</ul> </ul>

View File

@ -30,6 +30,7 @@
<div id="contentArea"> <div id="contentArea">
<div id="nameColumn"> <div id="nameColumn">
<p> <p>
<c:set var="cumulativeGroup" value=""/>
<c:forTokens items="${groupId}" delims="./" var="part"> <c:forTokens items="${groupId}" delims="./" var="part">
<c:choose> <c:choose>
<c:when test="${empty(cumulativeGroup)}"> <c:when test="${empty(cumulativeGroup)}">

View File

@ -20,7 +20,7 @@
<html> <html>
<head> <head>
<title>Browse Repository</title> <title>Browse Repository</title>
<ww:head /> <ww:head/>
</head> </head>
<body> <body>
@ -30,13 +30,14 @@
<div id="contentArea"> <div id="contentArea">
<div id="nameColumn"> <div id="nameColumn">
<p> <p>
<c:set var="cumulativeGroup" value=""/>
<c:forTokens items="${groupId}" delims="." var="part" varStatus="status"> <c:forTokens items="${groupId}" delims="." var="part" varStatus="status">
<c:choose> <c:choose>
<c:when test="${empty(cumulativeGroup)}"> <c:when test="${empty(cumulativeGroup)}">
<c:set var="cumulativeGroup" value="${part}" /> <c:set var="cumulativeGroup" value="${part}"/>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<c:set var="cumulativeGroup" value="${cumulativeGroup}.${part}" /> <c:set var="cumulativeGroup" value="${cumulativeGroup}.${part}"/>
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
<c:choose> <c:choose>
@ -44,37 +45,43 @@
<strong>${part}</strong> <strong>${part}</strong>
</c:when> </c:when>
<c:otherwise> <c:otherwise>
<ww:url id="url" action="browseGroup" namespace="/"> <c:set var="url">
<ww:param name="groupId" value="%{'${cumulativeGroup}'}" /> <ww:url action="browseGroup" namespace="/">
</ww:url> <ww:param name="groupId" value="%{'${cumulativeGroup}'}"/>
</ww:url>
</c:set>
<a href="${url}">${part}</a> / <a href="${url}">${part}</a> /
</c:otherwise> </c:otherwise>
</c:choose> </c:choose>
</c:forTokens> </c:forTokens>
</p> </p>
<ww:set name="groups" value="groups" /> <ww:set name="groups" value="groups"/>
<c:if test="${!empty(groups)}"> <c:if test="${!empty(groups)}">
<h2>Group / Artifact</h2> <h2>Group / Artifact</h2>
<ul> <ul>
<c:forEach items="${groups}" var="groupId"> <c:forEach items="${groups}" var="groupId">
<ww:url id="url" action="browseGroup" namespace="/"> <c:set var="url">
<ww:param name="groupId" value="%{'${groupId}'}" /> <ww:url action="browseGroup" namespace="/">
</ww:url> <ww:param name="groupId" value="%{'${groupId}'}"/>
</ww:url>
</c:set>
<li><a href="${url}">${groupId}/</a></li> <li><a href="${url}">${groupId}/</a></li>
</c:forEach> </c:forEach>
</ul> </ul>
</c:if> </c:if>
<ww:set name="artifactIds" value="artifactIds" /> <ww:set name="artifactIds" value="artifactIds"/>
<c:if test="${!empty(artifactIds)}"> <c:if test="${!empty(artifactIds)}">
<h2>Artifacts</h2> <h2>Artifacts</h2>
<ul> <ul>
<c:forEach items="${artifactIds}" var="artifactId"> <c:forEach items="${artifactIds}" var="artifactId">
<ww:url id="url" action="browseArtifact" namespace="/"> <c:set var="url">
<ww:param name="groupId" value="%{'${groupId}'}" /> <ww:url action="browseArtifact" namespace="/">
<ww:param name="artifactId" value="%{'${artifactId}'}" /> <ww:param name="groupId" value="%{'${groupId}'}"/>
</ww:url> <ww:param name="artifactId" value="%{'${artifactId}'}"/>
</ww:url>
</c:set>
<li><a href="${url}">${artifactId}/</a></li> <li><a href="${url}">${artifactId}/</a></li>
</c:forEach> </c:forEach>
</ul> </ul>