Author: jvanzyl
Date: Tue May 17 07:06:09 2005
New Revision: 170600
URL: http://svn.apache.org/viewcvs?rev=170600&view=rev
Log:
o don't display the "Build All" button when there are no registered projects.
Modified:
maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml
maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Summary.vm
Modified: maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml?rev=170600&r1=170599&r2=170600&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/forms/continuumProject.xml Tue
May 17 07:06:09 2005
@@ -91,7 +91,16 @@
<!-- Summary -->
- <!-- TODO: the headings here need to be i18n -->
+ <!--
+ | 1 = new
+ | 2 = ok
+ | 3 = failed
+ | 4 = error
+ | 5 = signalled
+ | 6 = building
+ | 7 = checking out
+ | 8 = updating
+ -->
<summary>
<title-key>title.key</title-key>
@@ -114,6 +123,10 @@
<operation>
<name>Results</name>
<action>ProjectBuilds.vm/view/ProjectBuilds/id/$id$</action>
+ <!--
+ | Only show the result pages if there are builds to show and if the project is in
a state
+ | of ok, failed, error.
+ -->
<enable>getBuilds().size > 0 && ( getState() == 2 || getState()
== 3 || getState() == 4 )</enable>
</operation>
<operation>
@@ -123,6 +136,10 @@
<operation>
<name>Delete</name>
<action>Delete.vm/fid/$type$Project/id/$id$</action>
+ <!--
+ | Allow deletion when the project is in a state of new, ok, failed, error.
+ -->
+ <enable>getState() == 1 || getState() == 2 || getState() == 3 || getState()
== 4</enable>
</operation>
<operation>
<name>Build</name>
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=170600&r1=170599&r2=170600&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 Tue
May 17 07:06:09 2005
@@ -13,7 +13,8 @@
#end
<th colspan="$form.summary.operations.size()"></th>
</tr>
- #foreach ( $item in $formtool.getSummaryItems( $fid ) )
+ #set ( $items = $formtool.getSummaryItems( $fid ) )
+ #foreach ( $item in $items )
<tr class="$css.nextClass">
#foreach ( $se in $form.summary.summaryElements )
<td>$formtool.getSummaryItem( $form, $se, $item )</td>
@@ -29,14 +30,16 @@
#end
</table>
##
- ## TODO: This should be made a general feature in formica using the CAM
- ##
- <form method="post" action="$link">
- #hidden ( "action" "cam" )
- #hidden ( "cid" "buildAllProjects" )
- <div class="functnbar3">
+ ## 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 )
+ #hidden ( "action" "cam" )
+ #hidden ( "cid" "buildAllProjects" )
<input type="submit" name="build-all" value="Build All"/>
- </div>
- </form>
+ #end
+ </form>
+ </div>
</div>
</div>
|