continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r646957 - in /continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ resources/localization/ webapp/WEB-INF/jsp/
Date Thu, 10 Apr 2008 20:57:07 GMT
Author: olamy
Date: Thu Apr 10 13:57:02 2008
New Revision: 646957

URL: http://svn.apache.org/viewvc?rev=646957&view=rev
Log:
[CONTINUUM-1639] Ability to download files from the working copy
Submitted by Maria Catherine Tan


Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/WorkingCopyAction.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
    continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/workingCopy.jsp

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/WorkingCopyAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/WorkingCopyAction.java?rev=646957&r1=646956&r2=646957&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/WorkingCopyAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/WorkingCopyAction.java
Thu Apr 10 13:57:02 2008
@@ -171,6 +171,11 @@
     {
         this.currentFile = currentFile;
     }
+    
+    public String getFile()
+    {
+        return currentFile;
+    }
 
     public String getOutput()
     {

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=646957&r1=646956&r2=646957&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Thu Apr 10 13:57:02 2008
@@ -549,6 +549,7 @@
 # ----------------------------------------------------------------------
 workingCopy.page.title = Continuum - Working Copy
 workingCopy.section.title = Working Copy for {0}
+workingCopy.currentFile.text = Download as Text
 
 # ----------------------------------------------------------------------
 # Page: Schedules

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties?rev=646957&r1=646956&r2=646957&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_fr.properties
Thu Apr 10 13:57:02 2008
@@ -549,6 +549,7 @@
 # ----------------------------------------------------------------------
 workingCopy.page.title = Continuum - Copie de travail
 workingCopy.section.title = Copie de travail de {0}
+workingCopy.currentFile.text = T\u00e9l\u00e9charger au format texte
 
 # ----------------------------------------------------------------------
 # Page: Schedules

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties?rev=646957&r1=646956&r2=646957&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum_pt_BR.properties
Thu Apr 10 13:57:02 2008
@@ -635,3 +635,4 @@
 
 workingCopy.page.title    = Continuum - C\u00F3pia de Trabalho
 workingCopy.section.title = C\u00F3pia de Trabalho para {0}
+workingCopy.currentFile.text = Download como Texto

Modified: continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=646957&r1=646956&r2=646957&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Thu Apr 10 13:57:02 2008
@@ -376,6 +376,14 @@
         <param name="contentLength">${fileLength}</param>
       </result>
     </action>
+    
+    <action name="workingCopyFileText" class="workingCopy">
+      <result name="success" type="stream">
+        <param name="contentType">application/octet-stream</param>
+        <param name="contentDisposition">filename="${downloadFilename}"</param>
+        <param name="contentLength">${fileLength}</param>
+      </result>
+    </action>
 
     <!--
     * schedule actions

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/workingCopy.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/workingCopy.jsp?rev=646957&r1=646956&r2=646957&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/workingCopy.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/workingCopy.jsp Thu Apr 10
13:57:02 2008
@@ -42,10 +42,19 @@
             if ( request.getParameter( "file" ) != null )
             {
         %>
-        <br />
+        <p>
+        <ww:url id="workingCopyTextUrl" action="workingCopyFileText">
+          <ww:param name="projectId" value="projectId"/>
+          <ww:param name="projectName" value="projectName"/>
+          <ww:param name="userDirectory" value="userDirectory"/>
+          <ww:param name="file" value="file"/>
+        </ww:url>
+        <ww:a href="%{workingCopyTextUrl}"><ww:text name="workingCopy.currentFile.text"/></ww:a>
+        
         <form>
           <textarea rows="50" cols="100"><ww:property value="fileContent"/></textarea>
         </form>
+        </p>
         <%
             }
         %>



Mime
View raw message