diff options
author | Jesse McConnell <jmcconnell@apache.org> | 2007-05-24 16:27:31 +0000 |
---|---|---|
committer | Jesse McConnell <jmcconnell@apache.org> | 2007-05-24 16:27:31 +0000 |
commit | 4b0ebdca0837bb0ae60ac722e23bbaf9b12df049 (patch) | |
tree | 8a828ab2a70112f16347b09a6c3f4251c192cd39 | |
parent | e5d26bf107c082e68361fcc35dc24f289ee348ef (diff) | |
download | archiva-4b0ebdca0837bb0ae60ac722e23bbaf9b12df049.tar.gz archiva-4b0ebdca0837bb0ae60ac722e23bbaf9b12df049.zip |
[MRM-351] revisiting, added another configuration option for turning off the applet itself but still enabling the findArtifact functionality. switched defaults to true by popular demand as well.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541350 13f79535-47bb-0310-9956-ffa450edef68
5 files changed, 18 insertions, 5 deletions
diff --git a/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo index 5e168af44..50380ca10 100644 --- a/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo +++ b/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo @@ -714,7 +714,14 @@ <description>true if find artifacts should be enabled</description>
<version>1.0.0+</version>
<type>boolean</type>
- <defaultValue>false</defaultValue>
+ <defaultValue>true</defaultValue>
+ </field>
+ <field>
+ <name>appletFindEnabled</name>
+ <description>true if applet behavior for find artifacts should be enabled</description>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <defaultValue>true</defaultValue>
</field>
</fields>
</class>
diff --git a/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml b/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml index b2ddcddea..3d21ac66e 100644 --- a/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml +++ b/archiva-base/archiva-configuration/src/main/resources/org/apache/maven/archiva/configuration/default-archiva.xml @@ -169,7 +169,8 @@ <webapp> <ui> - <showFindArtifacts>false</showFindArtifacts> + <showFindArtifacts>true</showFindArtifacts> + <appletFindEnabled>true</appletFindEnabled> </ui> </webapp> diff --git a/archiva-base/archiva-configuration/src/test/conf/repository-manager.xml b/archiva-base/archiva-configuration/src/test/conf/repository-manager.xml index a0ffdf7c6..5cb654aec 100644 --- a/archiva-base/archiva-configuration/src/test/conf/repository-manager.xml +++ b/archiva-base/archiva-configuration/src/test/conf/repository-manager.xml @@ -181,7 +181,8 @@ <webapp> <ui> - <showFindArtifacts>false</showFindArtifacts> + <showFindArtifacts>true</showFindArtifacts> + <appletFindEnabled>true</appletFindEnabled> </ui> </webapp> diff --git a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java index 87852e9d8..968166745 100644 --- a/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java +++ b/archiva-base/archiva-configuration/src/test/java/org/apache/maven/archiva/configuration/ArchivaConfigurationTest.java @@ -87,7 +87,8 @@ public class ArchivaConfigurationTest extends PlexusTestCase UserInterfaceOptions ui = (UserInterfaceOptions) webapp.getUi(); assertNotNull( "check webapp ui", ui ); - assertFalse( "check showFindArtifacts", ui.isShowFindArtifacts() ); + assertTrue( "check showFindArtifacts", ui.isShowFindArtifacts() ); + assertTrue( "check appletFindEnabled", ui.isAppletFindEnabled() ); } public void testGetConfigurationSystemOverride() throws Exception diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/findArtifact.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/findArtifact.jsp index 081407ff9..70f956100 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/findArtifact.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/findArtifact.jsp @@ -56,16 +56,19 @@ <ww:form method="POST" action="checksumSearch" namespace="/" onsubmit="this.md5.value = generateMd5(this.file.value,this.md5.value); this.file.disabled = true"> + <ww:if test="${sessionScope.uiOptions.appletFindEnabled}"> <tr> <td class="tdLabel"><label for="checksumSearch_file" class="label">Search for:</label></td> <td> <input type="file" name="file" size="50" value="" id="checksumSearch_file"/> </td> </tr> + </ww:if> <ww:textfield label="Checksum" size="50" name="md5"/> <ww:submit value="Go!"/> </ww:form> + <ww:if test="${sessionScope.uiOptions.appletFindEnabled}"> <p> Select the file you would like to locate in the remote repository. The entire file will @@ -81,7 +84,7 @@ width="400" height="20" name="ChecksumApplet"> </applet> </p> - + </ww:if> </div> </div> |