1.1.x branch git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@693741 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-1.2-M1
@@ -43,6 +43,11 @@ public class ProxyConnectorsAction | |||
{ | |||
private Map<String, AbstractRepositoryConfiguration> repoMap; | |||
/** | |||
* boolean to indicate that remote repo is present. Used for Add Link | |||
*/ | |||
private boolean remoteRepoExists=false; | |||
/** | |||
* Map of Proxy Connectors. | |||
*/ | |||
@@ -57,6 +62,8 @@ public class ProxyConnectorsAction | |||
repoMap.putAll( config.getManagedRepositoriesAsMap() ); | |||
proxyConnectorMap = createProxyConnectorMap(); | |||
remoteRepoExists=config.getRemoteRepositories().size()>0; | |||
} | |||
public Map<String, AbstractRepositoryConfiguration> getRepoMap() | |||
@@ -68,4 +75,9 @@ public class ProxyConnectorsAction | |||
{ | |||
return proxyConnectorMap; | |||
} | |||
public boolean getRemoteRepoExists() | |||
{ | |||
return remoteRepoExists; | |||
} | |||
} |
@@ -46,14 +46,22 @@ | |||
<ww:actionerror/> | |||
<ww:actionmessage/> | |||
<div style="float:right"> | |||
<redback:ifAnyAuthorized permissions="archiva-manage-configuration"> | |||
<ww:url id="addProxyConnectorUrl" action="addProxyConnector"/> | |||
<ww:a href="%{addProxyConnectorUrl}" cssClass="create"> | |||
<img src="<c:url value="/images/icons/create.png" />"/> | |||
Add | |||
</ww:a> | |||
</redback:ifAnyAuthorized> | |||
<div style="float:right"> | |||
<c:choose> | |||
<c:when test="${remoteRepoExists}"> | |||
<redback:ifAnyAuthorized permissions="archiva-manage-configuration"> | |||
<ww:url id="addProxyConnectorUrl" action="addProxyConnector"/> | |||
<ww:a href="%{addProxyConnectorUrl}" cssClass="create"> | |||
<img src="<c:url value="/images/icons/create.png" />"/> | |||
Add | |||
</ww:a> | |||
</redback:ifAnyAuthorized> | |||
</c:when> | |||
<c:otherwise> | |||
<img src="<c:url value="/images/icons/create.png" />"/> | |||
Add (Disabled. No remote repositories) | |||
</c:otherwise> | |||
</c:choose> | |||
</div> | |||
<h2>Repository Proxy Connectors</h2> |