continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r487588 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java webapp/WEB-INF/jsp/buildDefinitionEdit.jsp webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp
Date Fri, 15 Dec 2006 16:11:55 GMT
Author: evenisse
Date: Fri Dec 15 08:11:54 2006
New Revision: 487588

URL: http://svn.apache.org/viewvc?view=rev&rev=487588
Log:
Fix group build definition edition in project view

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
    maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/components/buildDefinitionSummaryComponent.jsp

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?view=diff&rev=487588&r1=487587&r2=487588
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
Fri Dec 15 08:11:54 2006
@@ -66,6 +66,8 @@
 
     private Map profiles;
 
+    private boolean groupBuildDefinition = false;
+
     public void prepare()
         throws Exception
     {
@@ -137,7 +139,7 @@
     public String saveBuildDefinition()
         throws ContinuumException
     {
-        if (projectId != 0)
+        if ( projectId != 0  && !groupBuildDefinition )
         {
             return saveToProject();
         }
@@ -198,7 +200,14 @@
             return INPUT;
         }
 
-        return "success_group";
+        if ( projectId != 0 )
+        {
+            return SUCCESS;
+        }
+        else
+        {
+            return "success_group";
+        }
     }
 
     public String removeFromProject()
@@ -391,5 +400,15 @@
     public void setProfiles( Map profiles )
     {
         this.profiles = profiles;
+    }
+
+    public boolean isGroupBuildDefinition()
+    {
+        return groupBuildDefinition;
+    }
+
+    public void setGroupBuildDefinition( boolean groupBuildDefinition )
+    {
+        this.groupBuildDefinition = groupBuildDefinition;
     }
 }

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp?view=diff&rev=487588&r1=487587&r2=487588
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
Fri Dec 15 08:11:54 2006
@@ -27,6 +27,7 @@
                 <ww:hidden name="buildDefinitionId"/>
                 <ww:hidden name="projectId"/>
                 <ww:hidden name="projectGroupId"/>
+                <ww:hidden name="groupBuildDefinition"/>
     
                 <table>
                   <tbody>

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=487588&r1=487587&r2=487588
==============================================================================
--- 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
Fri Dec 15 08:11:54 2006
@@ -44,13 +44,15 @@
             <ww:url id="editUrl" action="buildDefinition" method="input" namespace="/">
               <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
               <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+              <ww:param name="groupBuildDefinition">true</ww:param>
             </ww:url>
             <ww:a href="%{editUrl}"><img src="<ww:url value='/images/edit.gif'/>"
alt="<ww:text name='edit'/>" title="<ww:text name='edit'/>" border="0"></ww:a>
           </pss:ifAuthorized>
-          <pss:ifAuthorized permission="continuum-remove-group-build-definition">
+          <pss:ifAuthorized permission="continuum-remove-group-build-definition" resource="${projectGroupName}">
             <ww:url id="removeUrl" action="removeGroupBuildDefinition" namespace="/">
               <ww:param name="projectGroupId">${pageScope.buildDefinitionSummary.projectGroupId}</ww:param>
               <ww:param name="buildDefinitionId">${pageScope.buildDefinitionSummary.id}</ww:param>
+              <ww:param name="groupBuildDefinition">true</ww:param>
               <ww:param name="confirmed" value="false"/>
             </ww:url>
             <ww:a href="%{removeUrl}"><img src="<ww:url value='/images/delete.gif'/>"
alt="<ww:text name='delete'/>" title="<ww:text name='delete'/>" border="0"></ww:a>



Mime
View raw message