continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r504127 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/ resources/ webapp/WEB-INF/jsp/ webapp/WEB-INF/jsp/components/
Date Tue, 06 Feb 2007 13:17:54 GMT
Author: evenisse
Date: Tue Feb  6 05:17:53 2007
New Revision: 504127

URL: http://svn.apache.org/viewvc?view=rev&rev=504127
Log:
[CONTINUUM-1115] selecting a project to build returns you to the project group page
Submitted by: Teodoro Cue Jr.

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java?view=diff&rev=504127&r1=504126&r2=504127
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
Tue Feb  6 05:17:53 2007
@@ -36,6 +36,12 @@
 
     private int buildDefinitionId;
 
+    private int projectGroupId;
+
+    private boolean fromGroupPage = false;
+
+    private boolean fromProjectPage = false;
+
     public String execute()
         throws ContinuumException
     {
@@ -62,6 +68,18 @@
             }
         }
 
+        if ( projectId > 0 )
+        {
+            if ( fromGroupPage == true )
+            {
+                return "to_group_page";
+            }
+            if ( fromProjectPage == true )
+            {
+                return "to_project_page";
+            }
+        }
+
         return SUCCESS;
     }
 
@@ -83,5 +101,35 @@
     public int getBuildDefinition()
     {
         return buildDefinitionId;
+    }
+
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
+    public void setProjectGroupId( int projectGroupId )
+    {
+        this.projectGroupId = projectGroupId;
+    }
+
+    public boolean isFromGroupPage()
+    {
+        return fromGroupPage;
+    }
+
+    public void setFromGroupPage( boolean fromGroupPage )
+    {
+        this.fromGroupPage = fromGroupPage;
+    }
+
+    public boolean isFromProjectPage()
+    {
+        return fromProjectPage;
+    }
+
+    public void setFromProjectPage( boolean fromProjectPage )
+    {
+        this.fromProjectPage = fromProjectPage;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?view=diff&rev=504127&r1=504126&r2=504127
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Tue Feb  6 05:17:53
2007
@@ -192,6 +192,8 @@
 
     <action name="buildProject" class="buildProject">
       <result name="success" type="chain">groupSummary</result>
+      <result name="to_group_page" type="chain">projectGroupSummary</result>
+      <result name="to_project_page" type="chain">projectView</result>
     </action>
 
     <action name="projectView" class="projectView">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp?view=diff&rev=504127&r1=504126&r2=504127
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
Tue Feb  6 05:17:53 2007
@@ -55,6 +55,7 @@
           <ww:url id="buildProjectUrl" action="buildProject" namespace="/">
             <ww:param name="projectId">${projectId}</ww:param>
             <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+            <ww:param name="fromProjectPage" value="true"/>
           </ww:url>
           <ww:a href="%{buildProjectUrl}"><img src="<ww:url value='/images/buildnow.gif'/>"
alt="<ww:text name='build'/>" title="<ww:text name='build'/>" border="0"></ww:a>
         </pss:ifAuthorized>

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp?view=diff&rev=504127&r1=504126&r2=504127
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/projectSummaryComponent.jsp
Tue Feb  6 05:17:53 2007
@@ -57,6 +57,8 @@
             <c:when test="${!project.inBuildingQueue and !project.inCheckoutQueue and
( project.state gt 0 ) and ( project.state lt 5 )}">
               <ww:url id="buildProjectUrl" action="buildProject" namespace="/" includeParams="none">
                 <ww:param name="projectId" value="${project.id}"/>
+                <ww:param name="projectGroupId" value="${project.projectGroupId}"/>
+                <ww:param name="fromGroupPage" value="true"/>
               </ww:url>
               <ww:a href="%{buildProjectUrl}">
                 <img src="<ww:url value='/images/buildnow.gif'/>" alt="Build Now"
title="Build Now" border="0">

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp?view=diff&rev=504127&r1=504126&r2=504127
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectView.jsp Tue
Feb  6 05:17:53 2007
@@ -62,6 +62,7 @@
                 <td>
                   <form method="post" action="buildProject.action">
                     <input type="hidden" name="projectId" value="<ww:property value="project.id"/>"/>
+                    <input type="hidden" name="fromProjectPage" value="true"/>
                     <input type="submit" name="build-project" value="<ww:text name="summary.buildNow"/>"/>
                   </form>
                 </td>



Mime
View raw message