You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by jv...@apache.org on 2005/07/05 05:41:35 UTC

svn commit: r209200 - in /maven/continuum/trunk/continuum-web/src/main/resources: META-INF/plexus/components.xml templates/screens/Summary.vm

Author: jvanzyl
Date: Mon Jul  4 20:41:34 2005
New Revision: 209200

URL: http://svn.apache.org/viewcvs?rev=209200&view=rev
Log:
o use velocity for the summary page, close out some visual issues

Modified:
    maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm

Modified: maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml?rev=209200&r1=209199&r2=209200&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml Mon Jul  4 20:41:34 2005
@@ -139,21 +139,6 @@
       <implementation>org.apache.maven.continuum.web.context.DefaultViewContextPopulator</implementation>
       <configuration>
         <views>
-          <!-- Start Forms Views -->
-          <view>
-            <id>Summary</id>
-            <scalars>
-              <scalar>
-                <id>projectsWithFailures</id>
-                <expression>getProjectsWithFailures().size()</expression>
-              </scalar>
-              <scalar>
-                <id>projectsWithErrors</id>
-                <expression>getProjectsWithErrors().size()</expression>
-              </scalar>
-            </scalars>
-          </view>
-          <!-- End Forms Views -->
           <view>
             <id>ProjectBuilds</id>
             <scalars>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm?rev=209200&r1=209199&r2=209200&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm Mon Jul  4 20:41:34 2005
@@ -17,15 +17,18 @@
   <div id="h3">
     <h3>$i18n.getString( $form.summary.titleKey )</h3>
     <table border="1" cellspacing="2" cellpadding="3" width="100%">
+
+      <!-- i18n -->
       <tr>
-        #foreach ( $se in $form.summary.summaryElements )
-        <th>$i18n.getString( $form.getElement( $se.id ).labelKey )</th>
-        #end
-        <th colspan="$form.summary.operations.size()"></th>
+        <th>Status</th>
+        <th>Project Name</th>
+        <th>Version</th>
+        <th colspan="6"></th>
       </tr>
-      #set ( $items = $formtool.getSummaryItems( $form.id ) )
-      #foreach ( $item in $items )
 
+      #set ( $items = $continuum.projects )
+
+      #foreach ( $item in $items )
       #if ( $item.state == 2 )
         #set( $success = $success + 1 )
       #elseif ( $item.state == 3 )
@@ -35,23 +38,44 @@
       #end
 
       <tr class="$css.nextClass">
-        #foreach ( $se in $form.summary.summaryElements )
-        <td>$formtool.getSummaryItem( $form, $se, $item )</td>
+        <td>$state.generate( $item )</td>
+        <td>$item.name</td>
+        <td>$item.version</td>
+        <td><a href="$link.setPage('View.vm').addPathInfo('fid', "${item.executorId}Project").addPathInfo('id', $item.id)">View</a></td>
+
+        ## Operations
+
+        <td><a href="$link.setPage('Edit.vm').addPathInfo('fid', "${item.executorId}Project").addPathInfo('id', $item.id)">Edit</a></td>
+
+        #if ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state == 4 )
+        <td><a href="$link.setPage('Delete.vm').addPathInfo('fid', "${item.executorId}Project").addPathInfo('id', $item.id)">Delete</a></td>
+        #else
+        <td>Delete</td>
+        #end
+
+        #if ( $item.state != 1 )
+        #set ( $build = $continuum.getLatestBuildForProject($item.id) )
+        <td><a href="$link.setPage('ProjectBuild.vm').addPathInfo('view', "ProjectBuild").addPathInfo('id', $item.id).addPathInfo('buildId', $build.id)">Last Result</a></td>
+        #else
+        <td>Last Result</td>
         #end
-        #foreach ( $operation in $form.summary.operations )
-        #if ( $formtool.enableOperation( $form, $operation, $item ) )
-        <td><a href="$link.setPage( $formtool.getOperationUrl( $form, $item, $operation ) )">$operation.name</a></td>
+
+        #if ( $item.state != 1 )
+        <td><a href="$link.setPage('ProjectBuilds.vm').addPathInfo('view', "ProjectBuilds").addPathInfo('id', $item.id)">All Results</a></td>
         #else
-        <td>$operation.name</td>
+        <td>All Results</td>
         #end
+
+        #if ( $item.state == 1 || $item.state == 2 || $item.state == 3 || $item.state == 4 )
+        <td><a href="$link.addPathInfo('action', 'cam').addPathInfo('cid','buildProject').addPathInfo('id', $item.id)">Build</a></td>
+        #else
+        <td>Build</td>
         #end
+
       </tr>
       #end
     </table>
 
-    ##
-    ## TODO: This should be made a general feature in formica using the CAM and an option for an
-    ## enable expression to model what we have below.
     <div class="functnbar3">
       <form method="post" action="$link">
         #if ( $items && $items.size() > 0 )