continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r358139 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/view/BuildNowCell.java webapp/summary.jsp
Date Tue, 20 Dec 2005 23:15:11 GMT
Author: evenisse
Date: Tue Dec 20 15:15:01 2005
New Revision: 358139

URL: http://svn.apache.org/viewcvs?rev=358139&view=rev
Log:
define new action columns

Added:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
  (with props)
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp

Added: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java?rev=358139&view=auto
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
(added)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
Tue Dec 20 15:15:01 2005
@@ -0,0 +1,50 @@
+package org.apache.maven.continuum.web.view;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.continuum.web.model.SummaryProjectModel;
+import org.apache.maven.continuum.web.util.StateGenerator;
+
+import org.extremecomponents.table.bean.Column;
+import org.extremecomponents.table.cell.DisplayCell;
+import org.extremecomponents.table.core.BaseModel;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Used in Summary view
+ *
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public class BuildNowCell
+    extends DisplayCell
+{
+    public void init(BaseModel model, Column column)
+    {
+        super.init(model, column);
+
+        SummaryProjectModel project = (SummaryProjectModel) model.getCurrentCollectionBean();
+
+        HttpServletRequest request = (HttpServletRequest) model.getPageContext().getRequest();
+
+        if ( !project.isInQueue() && ( project.getState() == 1 || project.getState()
== 2 || project.getState() == 3 || project.getState() == 4 ) )
+        {
+            column.setValue( "<a href=\"" + request.getContextPath() + "/buildProject.action?projectId="
+ project.getId() + "\">Build Now</a>" );
+        }
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/BuildNowCell.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp?rev=358139&r1=358138&r2=358139&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/webapp/summary.jsp Tue Dec 20 15:15:01
2005
@@ -20,9 +20,17 @@
                 <a href="TO_BE_DEFINE">${pageScope.project.name}</a>
             </ec:column>
             <ec:column property="version"/>
-            <ec:column property="buildNumber" title="summary.projectTable.build"  cell="org.apache.maven.continuum.web.view.BuildCell"/>
-            <ec:column property="groupName" title="summary.projectTable.group">
-                ${pageScope.project.projectGroupName}
+            <ec:column property="buildNumber" title="summary.projectTable.build" cell="org.apache.maven.continuum.web.view.BuildCell"/>
+            <ec:column property="projectGroupName" title="summary.projectTable.group"/>
+            <ec:column property="buildNowAction" title="&nbsp;" cell="org.apache.maven.continuum.web.view.BuildNowCell"/>
+            <ec:column property="buildHistoryAction" title="&nbsp;">
+                TODO
+            </ec:column>
+            <ec:column property="workingCopyAction" title="&nbsp;">
+                TODO
+            </ec:column>
+            <ec:column property="deleteAction" title="&nbsp;">
+                <a href="${pageContext.request.contextPath}/deleteProject.action?projectId=${pageScope.project.id}">Delete</a>
             </ec:column>
           </ec:row>
         </ec:table>



Mime
View raw message