continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r170177 - in /maven/continuum/trunk/continuum-web/src/main/resources/templates: CommonMacros.vm navigations/Menu.vm screens/Index.vm
Date Sat, 14 May 2005 22:04:27 GMT
Author: jvanzyl
Date: Sat May 14 15:04:27 2005
New Revision: 170177

URL: http://svn.apache.org/viewcvs?rev=170177&view=rev
Log: (empty)

Modified:
    maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm
    maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Index.vm

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm?rev=170177&r1=170176&r2=170177&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/CommonMacros.vm Sat May
14 15:04:27 2005
@@ -1,253 +1,46 @@
-#macro ( keyField $entity $label $key $value $help )
-<tr>
-  <th>$label</th>
-  <td>
-    #if ( $entity )
-    $value
-    <input type="hidden" name="$key" value="$value" size="40"/>
-    #else
-    <input type="text" name="$key" value="$!value" size="40"/>
-    #end
-  </td>
-</tr>
-#end
-
-#macro ( field $label $key $value $help )
-<tr>
-  <th>$label</th>
-  <td>
-    <input type="text" name="$key" value="$!value" size="40"/>
-  </td>
-</tr>
-#end
-
-#macro ( help $message )
-<br/>
-<br/>
-<font size="-2">
-  $message
-</font>
+#macro ( addField $i18n $data $element )
+<th>$i18n.getString( $element.labelKey )</th>
+<td>
+  #set ( $value = $data.getParameters().getString( $element.id ) )
+  #if ( !$value )
+    #set( $value = "" )
+  #end
+  <input type="text" name="$element.id" value="$value" size="40"/>
+  <p>$i18n.getString( $element.messageKey )</p>
+</td>
 #end
 
-#macro ( addBar $path )
-<div class="functnbar3">
-  <a href="$link.setPage($path)">$i18n.getString('action.add')</a>
-</div>
+#macro ( editField $i18n $data $element $formtool )
+<th>$i18n.getString( $element.labelKey )</th>
+<td>
+  #set ( $value = $formtool.getAUElement( $form, $element, $item, $data ) )
+  #if ( !$value )
+    #set( $value = "" )
+  #end
+  <input type="text" name="$element.id" value="$value" size="40"/>
+  <p>$i18n.getString( $element.messageKey )</p>
+</td>
 #end
 
-#macro ( viewField $label $value )
-<tr>
-<th>$label</th>
-<td>$!value</td>
-</tr>
-#end
-
-#macro ( renderSummary $sr $id $link )
-
-<div class="app">
-  <div id="axial" class="h3">
-    <h3>$sr.getTitle($id)</h3>
-    <table border="1" cellspacing="2" cellpadding="3" width="100%">
-
-      <tr>
-        #foreach ( $columnHeader in $sr.getHeaders($id) )
-        <th>$columnHeader</th>
-        #end
-        <th colspan ="3"></th>
-      </tr>
-
-      #set ( $deleteAction = "web-delete-${id}" )
-
-      #set ( $class = "a" )
-
-      #foreach ( $object in $sr.getCollection($id) )
-      <tr class="$class">
-        #set( $keyValue = $sr.getKeyValue( $id, $object ) )
-        #foreach ( $value in $sr.getValues( $id, $object ) )
-        <td>$value</td>
-        #end
-        <td><a href="$link.setPage("$id,${id}-view.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">View<a/></td>
-        <td><a href="$link.setPage("$id,${id}-edit.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">Edit<a/></td>
-        <td><a href="$link.setPage("$id,${id}-delete.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">Delete<a/></td>
-      </tr>
-      #if ( $class == "a" )
-        #set ( $class = "b" )
-      #else
-        #set ( $class = "a" )
-      #end
-      #end
-
-    </table>
-
-    #addBar( "$id,${id}-edit.vm" )
 
-  </div>
-</div>
+#macro ( validateField $fvr $element )
+#if ( $fvr && !$fvr.getElementResult( $element.getId()).valid() )
+<td class="inputerror">
+  <p class="errormark">$fvr.getElementResult( $element.getId() ).errorMessage</p>
+</td>
 #end
-
-#macro ( renderMessageSummary $sr $id $link )
-
-<div class="app">
-  <div id="axial" class="h3">
-    <h3>$sr.getTitle($id)</h3>
-    <table border="1" cellspacing="2" cellpadding="3" width="100%">
-
-      <tr>
-        #foreach ( $columnHeader in $sr.getHeaders($id) )
-        <th>$columnHeader</th>
-        #end
-        <th colspan ="3"></th>
-      </tr>
-
-      #set ( $deleteAction = "web-delete-${id}" )
-
-      #set ( $class = "a" )
-
-      #foreach ( $object in $sr.getCollection($id) )
-      <tr class="$class">
-        #set( $keyValue = $sr.getKeyValue( $id, $object ) )
-        #foreach ( $value in $sr.getValues( $id, $object ) )
-        <td>$value</td>
-        #end
-        <td><a href="$link.setPage("message,papinet,${id}-view.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">View<a/></td>
-      </tr>
-      #if ( $class == "a" )
-        #set ( $class = "b" )
-      #else
-        #set ( $class = "a" )
-      #end
-      #end
-
-    </table>
-
-    <div class="functnbar3"/>
-
-  </div>
-</div>
-#end
-
-#macro ( renderUserSummary $sr $id $link )
-
-<div class="app">
-  <div id="axial" class="h3">
-    <h3>$sr.getTitle($id)</h3>
-    <table border="1" cellspacing="2" cellpadding="3" width="100%">
-
-      <tr>
-        #foreach ( $columnHeader in $sr.getHeaders($id) )
-        <th>$columnHeader</th>
-        #end
-        <th colspan ="4"></th>
-      </tr>
-
-      #set ( $deleteAction = "web-delete-${id}" )
-
-      #set ( $class = "a" )
-
-      #foreach ( $object in $sr.getCollection($id) )
-      <tr class="$class">
-        #set( $keyValue = $sr.getKeyValue( $id, $object ) )
-        #foreach ( $value in $sr.getValues( $id, $object ) )
-        <td>$value</td>
-        #end
-        <td><a href="$link.setPage("security,user-roles.vm").addQueryData('view','user-roles').addQueryData($id,$keyValue)">Roles<a/></td>
-        <td><a href="$link.setPage("$id,${id}-view.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">View<a/></td>
-        <td><a href="$link.setPage("$id,${id}-edit.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">Edit<a/></td>
-        <td><a href="$link.setPage("$id,${id}-delete.vm").addQueryData('view',$id).addQueryData($id,$keyValue)">Delete<a/></td>
-      </tr>
-      #if ( $class == "a" )
-        #set ( $class = "b" )
-      #else
-        #set ( $class = "a" )
-      #end
-      #end
-
-    </table>
-
-    #addBar( "$id,${id}-edit.vm" )
-
-  </div>
-</div>
 #end
 
-
-#macro ( renderEdit $id $fm $object $link )
-
-#set ( $form = $fm.getForm( $id ) )
-
-<div class="app">
-  <div id="axial" class="h3">
-    <h3>$fm.getTitle( $form )</h3>
-    <form action="$link.setPage("$id,${id}-summary.vm").addQueryData('action',"web-store-${id}")"
method="post">
-      <div class="axial">
-        <table border="0" cellspacing="2" cellpadding="3">
-          #foreach ( $element in $form.formElements )
-            #if ( $velocityCount == 1 )
-              #keyField( $object $fm.getLabel( $element ) $element.id $fm.getValue( $element,
$object ) $fm.getMessage( $element ) )
-            #else
-              #field( $fm.getLabel( $element ) $element.id $fm.getValue( $element, $object
) $fm.getMessage( $element ) )
-            #end
-          #end
-        </table>
-      </div>
-      <div class="functnbar3">
-        #if ( $tpi )
-        <input type="submit" name="f" value="Update"/>
-        #else
-        <input type="submit" name="f" value="Add"/>
-        #end
-      </div>
-    </form>
-  </div>
-</div>
+#macro ( hidden $name $value )
+<input type="hidden" name="$name" value="$value"/>
 #end
 
-#macro ( renderView $id $fm $object $link )
-
-#set ( $form = $fm.getForm( $id ) )
-
-<div class="app">
-  <div id="axial" class="h3">
-    <h3>$fm.getTitle( $form )</h3>
-    <div class="axial">
-      <table border="0" cellspacing="2" cellpadding="3">
-        #foreach ( $element in $form.formElements )
-          #viewField( $fm.getLabel( $element ) $fm.getValue( $element, $object ) )
-        #end
-      </table>
-    </div>
-    <div class="functnbar3"/>
-  </div>
+#macro ( submitBar $labelKey )
+<div class="functnbar3">
+  <input type="submit" value="$labelKey"/>
 </div>
 #end
 
-#macro ( verifyDelete $id $fm $object $link $keyValue)
-
-#set ( $form = $fm.getForm( $id ) )
-#set ( $deleteAction = "web-delete-${id}" )
-
-<div class="app">
-  <div id="axial" class="h3">
-
-    <div class="warningmessage">
-      <br/>
-      <strong>Are you really sure you want to delete this?</strong>
-    </div>
-
-    <h3>$fm.getTitle( $form )</h3>
-    <div class="axial">
-      <table border="0" cellspacing="2" cellpadding="3">
-        #foreach ( $element in $form.formElements )
-          #viewField( $fm.getLabel( $element ) $fm.getValue( $element, $object ) )
-        #end
-      </table>
-    </div>
-      <div class="functnbar3">
-        <form action="$link.setPage("$id,${id}-summary.vm").addQueryData('action',$deleteAction).addQueryData($id,$keyValue)"
method="post">
-          <input type="submit" name="f" value="Delete"/>
-        </form>
-      </div>
-  </div>
-</div>
+#macro ( bar )
+<div class="functnbar3"/>
 #end
-

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm?rev=170177&r1=170176&r2=170177&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/navigations/Menu.vm Sat
May 14 15:04:27 2005
@@ -2,17 +2,17 @@
  <div id="projecttools" class="toolgroup">
   <div class="label">Continuum</div>
   <div class="body">
-    <div><a href="$link.setPage('continuumProject.form').addQueryData('mode','summary')">Show
Projects</a></div>
+    <div><a href="$link.setPage('Summary.vm').addPathInfo( 'fid', 'continuumProject')">Show
Projects</a></div>
   </div>
  </div>
 
  <div id="projecttools" class="toolgroup">
   <div class="label">Add Project</div>
   <div class="body">
-    <div><a href="$link.setPage('addMavenTwoProject.form')">M2 Project</a></div>
-    <div><a href="$link.setPage('addMavenOneProject.form')">M1 Project</a></div>
-    <div><a href="$link.setPage('antProject.form')">Ant Project</a></div>
-    <div><a href="$link.setPage('shellProject.form')">Shell Project</a></div>
+    <div><a href="$link.setPage('Add.vm').addPathInfo( 'fid', 'addMavenTwoProject')">M2
Project</a></div>
+    <div><a href="$link.setPage('Add.vm').addPathInfo( 'fid', 'addMavenOneProject')">M1
Project</a></div>
+    <div><a href="$link.setPage('Add.vm').addPathInfo( 'fid', 'antProject')">Ant
Project</a></div>
+    <div><a href="$link.setPage('Add.vm').addPathInfo( 'fid', 'shellProject')">Shell
Project</a></div>
   </div>
  </div>
 </div>

Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Index.vm
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Index.vm?rev=170177&r1=170176&r2=170177&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Index.vm (original)
+++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/Index.vm Sat
May 14 15:04:27 2005
@@ -1,7 +1,3 @@
-<META HTTP-EQUIV=REFRESH CONTENT="1; URL=$link.setPage('continuumProject.form').addQueryData('mode','summary')">
-
-<!--
 <div class="app">
   <h3>Welcome to Continuum!</h3>
 </div>
--->



Mime
View raw message