]> source.dussan.org Git - archiva.git/commitdiff
[MRM-550]
authorMaria Odea B. Ching <oching@apache.org>
Sun, 13 Jul 2008 05:15:17 +0000 (05:15 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Sun, 13 Jul 2008 05:15:17 +0000 (05:15 +0000)
submitted by John Michael Luy
-don't display the "up" link/image when it is the first item and won't dispaly the "down" link/image if it is the last item

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@676261 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/proxyConnectors.jsp

index f334d4da159d5654bc4c7b05e1d22d0b8c41445c..f3362bc29095e8548d8fb202475612288cceffe5 100644 (file)
@@ -73,6 +73,8 @@
     <p class="name">${repoMap[repository.key].name}</p>
   </div>
 
+  <c:set var="numberOfRepos" value="${fn:length(repository.value)}" />
+
   <c:forEach items="${repository.value}" var="connector" varStatus="pc">
   
   <c:choose>
           <ww:param name="source" value="%{'${connector.sourceRepoId}'}"/>
           <ww:param name="target" value="%{'${connector.targetRepoId}'}"/>
         </ww:url>
-        <ww:a href="%{sortUpProxyConnectorUrl}" cssClass="up" title="Move Proxy Connector Up">
-          <img src="${iconUpUrl}"/>
-        </ww:a>
-        <ww:a href="%{sortDownProxyConnectorUrl}" cssClass="down" title="Move Proxy Connector Down">
-          <img src="${iconDownUrl}"/>
-        </ww:a>
+        <c:if test="${pc.count > 1}">
+          <ww:a href="%{sortUpProxyConnectorUrl}" cssClass="up" title="Move Proxy Connector Up">
+            <img src="${iconUpUrl}"/>
+          </ww:a>
+        </c:if>
+        <c:if test="${pc.count < numberOfRepos}">
+          <ww:a href="%{sortDownProxyConnectorUrl}" cssClass="down" title="Move Proxy Connector Down">
+            <img src="${iconDownUrl}"/>
+          </ww:a>
+        </c:if>
         <ww:a href="%{editProxyConnectorUrl}" cssClass="edit" title="Edit Proxy Connector">
           <img src="${iconEditUrl}"/>
         </ww:a>