archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r674155 - in /archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main: java/org/apache/maven/archiva/web/action/admin/appearance/ resources/ webapp/WEB-INF/jsp/admin/ webapp/WEB-INF/jsp/components/
Date Sat, 05 Jul 2008 05:56:54 GMT
Author: brett
Date: Fri Jul  4 22:56:53 2008
New Revision: 674155

URL: http://svn.apache.org/viewvc?rev=674155&view=rev
Log:
some fixes for the appearance actions

Modified:
    archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java
    archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/OrganisationInfoAction.java
    archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
    archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/appearance.jsp
    archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editAppearance.jsp
    archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp

Modified: archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java?rev=674155&r1=674154&r2=674155&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java
(original)
+++ archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/AbstractAppearanceAction.java
Fri Jul  4 22:56:53 2008
@@ -20,8 +20,12 @@
  */
 
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.OrganisationInformation;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
+import com.opensymphony.xwork.Preparable;
+
 /**
  * AbstractAppearanceAction 
  *
@@ -30,6 +34,7 @@
  */
 public abstract class AbstractAppearanceAction
     extends PlexusActionSupport
+    implements Preparable
 {
     /**
      * Archiva Application Configuration
@@ -72,4 +77,20 @@
     {
         this.organisationUrl = organisationUrl;
     }
+
+    public void prepare()
+        throws Exception
+    {        
+        Configuration config = configuration.getConfiguration();
+        if (config != null)
+        {
+            OrganisationInformation orgInfo = config.getOrganisationInfo();
+            if (orgInfo != null)
+            {
+                setOrganisationLogo(orgInfo.getLogoLocation());
+                setOrganisationName(orgInfo.getName());
+                setOrganisationUrl(orgInfo.getUrl());
+            }
+        }
+    }
 }

Modified: archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/OrganisationInfoAction.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/OrganisationInfoAction.java?rev=674155&r1=674154&r2=674155&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/OrganisationInfoAction.java
(original)
+++ archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/appearance/OrganisationInfoAction.java
Fri Jul  4 22:56:53 2008
@@ -19,9 +19,6 @@
  * under the License.
  */
 
-import org.apache.maven.archiva.configuration.Configuration;
-import org.apache.maven.archiva.configuration.OrganisationInformation;
-
 /**
  * Stores the organisation information for displaying on the page.
  *
@@ -30,21 +27,4 @@
 public class OrganisationInfoAction
     extends AbstractAppearanceAction
 {
-    @Override
-    public String execute()
-        throws Exception
-    {        
-        Configuration config = configuration.getConfiguration();
-        if (config != null)
-        {
-            OrganisationInformation orgInfo = config.getOrganisationInfo();
-            if (orgInfo != null)
-            {
-                setOrganisationLogo(orgInfo.getLogoLocation());
-                setOrganisationName(orgInfo.getName());
-                setOrganisationUrl(orgInfo.getUrl());
-            }
-        }
-        return SUCCESS;
-    }
-}
\ No newline at end of file
+}

Modified: archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml?rev=674155&r1=674154&r2=674155&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
(original)
+++ archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/resources/xwork.xml
Fri Jul  4 22:56:53 2008
@@ -432,8 +432,8 @@
 
     <!-- .\ CONFIGURATION \.___________________________________________ -->
 
-    <action name="configureAppearance" class="organisationInfo" method="input">
-      <result name="input">/WEB-INF/jsp/admin/appearance.jsp</result>
+    <action name="configureAppearance" class="organisationInfo">
+      <result name="success">/WEB-INF/jsp/admin/appearance.jsp</result>
     </action>
 
     <action name="editAppearance" class="editOrganisationInfo" method="input">

Modified: archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/appearance.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/appearance.jsp?rev=674155&r1=674154&r2=674155&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/appearance.jsp
(original)
+++ archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/appearance.jsp
Fri Jul  4 22:56:53 2008
@@ -19,7 +19,6 @@
 
 <%@ taglib prefix="ww" uri="/webwork" %>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<ww:set name="organisationInfo" value="organisationInfo"/>
 
 <html>
 <head>
@@ -58,6 +57,12 @@
             <code>${organisationLogo}</code>
           </td>
         </tr>
+        <tr>
+          <th>&nbsp;</th>
+          <td>
+      <img src="${organisationLogo}" title="${organisationName}" border="0" alt=""/>
+          </td>
+        </tr>
       </table>
 </body>
 </html>

Modified: archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editAppearance.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editAppearance.jsp?rev=674155&r1=674154&r2=674155&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editAppearance.jsp
(original)
+++ archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editAppearance.jsp
Fri Jul  4 22:56:53 2008
@@ -36,11 +36,11 @@
 <ww:set name="editOrganisationInfo" value="editOrganisationInfo"/>
 <ww:actionmessage/>
 <ww:form method="post" action="saveAppearance" namespace="/admin" validate="true" theme="xhtml">
-    <ww:textfield name="organisationName" value="${organisationName}" label="Name"/>
-    <ww:textfield name="organisationUrl" value="${organisationUrl}" label="URL"/>
-    <ww:textfield name="organisationLogo" value="${organisationLogo}" label="Logo URL"/>
+    <ww:textfield name="organisationName" value="${organisationName}" label="Name" size="50"
/>
+    <ww:textfield name="organisationUrl" value="${organisationUrl}" label="URL" size="50"/>
+    <ww:textfield name="organisationLogo" value="${organisationLogo}" label="Logo URL"
size="50" />
   <ww:submit value="Save"/>
 </ww:form>
 </body>
 
-</html>
\ No newline at end of file
+</html>

Modified: archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp?rev=674155&r1=674154&r2=674155&view=diff
==============================================================================
--- archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp
(original)
+++ archiva/branches/archiva-MRM-829/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/components/companyLogo.jsp
Fri Jul  4 22:56:53 2008
@@ -19,7 +19,6 @@
 
 <%@ taglib uri="/webwork" prefix="ww" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
-<ww:set name="organisationInfo" value="organisationInfo"/>
 <c:if test="${!empty(organisationLogo)}">
   <ww:set name="organisationUrl" value="organisationUrl"/>
   <c:choose>



Mime
View raw message