You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ra...@apache.org on 2001/07/08 23:01:55 UTC

cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html customizer-portletset.vm

raphael     01/07/08 14:01:55

  Modified:    webapp/WEB-INF/templates/vm/controllers/html
                        card-customize.vm
               webapp/WEB-INF/templates/vm/controls clear.vm
               webapp/WEB-INF/templates/vm/controls/html jetspeed.vm
               webapp/WEB-INF/templates/vm/navigations/html top.vm
               webapp/WEB-INF/templates/vm/portlets/html
                        customizer-portletset.vm
  Added:       webapp/WEB-INF/templates/vm/controllers/html
                        multicolumn-customize.vm multicolumn.vm
  Log:
  - update controllers templates (MultiColumn)
  - fix some customization template issues
  
  Revision  Changes    Path
  1.2       +12 -4     jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html/card-customize.vm
  
  Index: card-customize.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html/card-customize.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- card-customize.vm	2001/06/25 11:32:38	1.1
  +++ card-customize.vm	2001/07/08 21:01:51	1.2
  @@ -1,8 +1,4 @@
   <table width="100%" cellspacing="1" cellpadding="0">
  -  <tr>
  -    <th>Title</th>
  -    <th>Action</th>        
  -  </tr>
   #foreach ($entry in $portlets)
   #set ($position = $velocityCount - 1)
     <tr>
  @@ -19,6 +15,7 @@
       </td>
     </tr>
   #end
  +<!--
     <tr>
       <td colspan="2">
         <form action="$jlink" method="post">
  @@ -29,4 +26,15 @@
         </form>
       </td>
     </tr>
  +  <tr>
  +    <td colspan="2" align="right">
  +      <form action="$jlink" method="post">
  +#if ($!action) <input type="hidden" name="$jlink.ActionKey" value="$action" /> #end
  +#if ($!paneid) <input type="hidden" name="paneid" value="$paneid" /> #end
  +        <input type="submit" name="eventSubmit_doSave" value="Save" />
  +        <input type="submit" name="eventSubmit_doApply" value="Save &amp; Apply" />
  +      </form>
  +    </td>
  +  </tr>
  +-->
   </table>
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html/multicolumn-customize.vm
  
  Index: multicolumn-customize.vm
  ===================================================================
  <table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
  #set ($col = 0)
  #set ($width = 100 / $portlets.length )
  #foreach ( $column in $portlets )
  #set ($row = 0)
    <td valign="top" width="$width%">
      <table width="100%" cellspacing="2" cellpadding="0" border="0">
  #foreach ( $portlet in $column )
        <tr>
          <td width="100%">
            <form action="$jlink" method="post">
  #if ($action) <input type="hidden" name="$jlink.ActionKey" value="$action" /> #end
            <input type="hidden" name="col" value="$col" />
            <input type="hidden" name="row" value="$row" />
            <table border="1" width="95%">
              <tr>
                <td>
                  <input type="submit" name="eventSubmit_doDelete" value="x" />                
                </td>
                <td align="right">
                  <input type="submit" name="eventSubmit_doLeft" value="<" />
                  <input type="submit" name="eventSubmit_doUp" value="^" />
                  <input type="submit" name="eventSubmit_doDown" value="v" />
                  <input type="submit" name="eventSubmit_doRight" value=">" />
                </td>
              </tr>
  #set ($title = $titles.get($portlet.Parent) )
              <tr>
                <td valign="middle" align="center" colspan="2">
                  <a href="$jlink.setAction("actions.Customize").setPortlet($!portlet.Parent)">
                    <b>#if ($title) $title #else $portlet.Parent #end</b>
                  </a>
                </td>
              </tr>
            </table>
            </form>
          </td>
        </tr>
  #set ($row = $row + 1)
  #end    
      </table>
    </td>
  #set ($col = $col + 1)
  #end
  </tr>
  </table>
  <form action="$jlink" method="post">
  #if ($action) <input type="hidden" name="$jlink.ActionKey" value="$action" /> #end
  <table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
    <td valign="right" width="100%">
      <input type="submit" name="eventSubmit_doSave" value="Save" />        
    </td>
  </tr>
  </table>
  </form>
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/controllers/html/multicolumn.vm
  
  Index: multicolumn.vm
  ===================================================================
  <table border="0" cellpadding="2" cellspacing="0" width="100%">
  <tr>
  #foreach ( $column in $portlets )
  #if ($!sizes.size() >= $velocityCount)
    #set ($width = $!sizes.elementAt($velocityCount-1))
  #end
    <td width="$!width" valign="top">
      <table width="100%" cellspacing="2" cellpadding="0" border="0">
  #foreach ( $portlet in $column )
        <tr>
          <td width="100%">$!portlet.getContent($data)</td>
        </tr>
  #end    
      </table>
    </td>
  #end
  </tr>
  </table>
  
  
  1.2       +1 -1      jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/clear.vm
  
  Index: clear.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/clear.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- clear.vm	2001/05/29 22:53:29	1.1
  +++ clear.vm	2001/07/08 21:01:53	1.2
  @@ -1 +1 @@
  -$portlet.getContent($data)
  \ No newline at end of file
  +$!portlet.getContent($data)
  \ No newline at end of file
  
  
  
  1.2       +1 -1      jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed.vm
  
  Index: jetspeed.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/controls/html/jetspeed.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jetspeed.vm	2001/06/25 11:33:11	1.1
  +++ jetspeed.vm	2001/07/08 21:01:53	1.2
  @@ -16,7 +16,7 @@
           <table border="0" cellpadding="2" cellspacing="0" width="100%" align="center">
           <tr>
               <td>
  -                $portlet.getContent($data)
  +                $!portlet.getContent($data)
               </td>
           </tr>
           </table>
  
  
  
  1.2       +3 -3      jakarta-jetspeed/webapp/WEB-INF/templates/vm/navigations/html/top.vm
  
  Index: top.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/navigations/html/top.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- top.vm	2001/02/11 22:54:02	1.1
  +++ top.vm	2001/07/08 21:01:54	1.2
  @@ -1,13 +1,13 @@
   <div>
     Welcome to Jetspeed -> <a href="$jlink">Home</a>  <br />
   #if ($data.User.hasLoggedIn())
  -  <a href="$jlink.setPage("Customize.vm")">Customize</a>
  +  <a href="$jlink.setPage("Customize")">Customize</a>
     &nbsp;&nbsp;&nbsp;
     <a href="$jlink.setAction("LogoutUser")">Logout</a>
     &nbsp;&nbsp;&nbsp;
  -  <a href="$jlink.setPage("EditAccount.vm")">Edit Account ($data.User.UserName)</a>
  +  <a href="$jlink.setPage("EditAccount")">Edit Account ($data.User.UserName)</a>
     &nbsp;&nbsp;&nbsp;
   #else
  -  <a href="$jlink.setPage("Login.vm")">Please login to Jetspeed</a>
  +  <a href="$jlink.setPage("Login")">Please login to Jetspeed</a>
   #end
   </div>
  
  
  
  1.2       +106 -22   jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/customizer-portletset.vm
  
  Index: customizer-portletset.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/customizer-portletset.vm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- customizer-portletset.vm	2001/06/25 11:33:51	1.1
  +++ customizer-portletset.vm	2001/07/08 21:01:55	1.2
  @@ -1,42 +1,126 @@
  -#set ($config = $portlet.PortletConfig)
  -<table width="100%" cellspacing="0" cellpadding="0">
  +#set ($tab = $data.Parameters.getString("mode") )
  +#if (!$tab)
  +  #set ($tab = $data.User.getTemp("cmode") )
  +  #if (!$tab) #set ($tab = "layout") #end
  +#end
  +$data.User.setTemp("cmode",$tab)
  +<table cellpadding="0" cellspacing="1" border="0" width="100%">
  +<tr>
  +  <td align="center" width="33%">
  +    <a href="$jlink.setPortlet($set.Name).addPathInfo("mode","layout")">Edit layout</a>
  +  </td>
  +  <td align="center" width="34%">
  +    <a href="$jlink.setPortlet($set.Name).addPathInfo("mode","add")">Add a new element</a>
  +  </td>
  +  <td align="center" width="33%">
  +    <a href="$jlink.setPortlet($set.Name).addPathInfo("mode","general")">Edit general properties</a>
  +  </td>
  +</tr>
  +</table>
  +#if ( $tab == "layout" )
  +$!set.Controller.getContent($data)
  +#end
  +#if ( $tab == "add" )
  +#if ($browser)
  +<form action="$jlink" method="post">
  +#if ($action) <input name="$jlink.ActionKey" type="hidden" value="$action" /> #end
  +<table width="100%" cellspacing="1" cellpadding="0">
  +  <tr>
  +    <td></td>
  +    <td align="left"><b>Title</b></td>
  +    <td align="left"><b>Description</b></td>
  +  </tr>
  +#foreach ($portlet in $browser)
  +  <tr>
  +    <td><input type="radio" name="pname" value="$portlet.Name" /></td>
  +    <td valign="top" align="left">$!portlet.Title</td>
  +    <td valign="top" align="left">$!portlet.Description</td>
  +  </tr>  
  +#end
  +</table>
  +<table width="100%" cellspacing="1" cellpadding="0">
     <tr>
  -    <td width="80%" rowspan="3">
  -      $set.Controller.getContent($data)
  +    <td align="right">
  +      <input type="submit" name="eventSubmit_doAdd" name="Add" />
       </td>
  -    <td width="20%">
  -      <form action="$jlink" method="post">
  +  </tr>
  +</table>
  +</form>
  +#else
  +<form action="$jlink" method="post">
   #if ($action) <input name="$jlink.ActionKey" type="hidden" value="$action" /> #end
  -        Change layout:<br />
  +<table width="100%" cellspacing="1" cellpadding="0">
  +  <tr>
  +    <td width="100%">
  +      Type the name of the pane to add:
  +      <br />
  +      <input type="text" name="pane" value="">
  +    </td>
  +  </tr>
  +  <tr>
  +    <td align="right">
  +      <input type="submit" name="eventSubmit_doAddset" name="Add" />
  +    </td>
  +  </tr>
  +</table>
  +</form>
  +#end
  +#end
  +#if ( $tab == "general" )
  +<form action="$jlink" method="post">
  +#if ($action) <input name="$jlink.ActionKey" type="hidden" value="$action" /> #end
  +<table width="100%" cellspacing="0" cellpadding="0">
  +  <tr>
  +    <td>
  +        Set a title for this pane :<br />
  +        <input type="text" name="title" value="$!set.Title" />
  +    </td>
  +  </tr>
  +#if ($controllers)
  +  <tr>
  +    <td>
  +        Select a layout for this pane :<br />
           <select name="controller">
   #foreach ($controller in $controllers)
  -          <option #if ($controller.Name == $currentController) SELECTED #end>$controller.Name
  +          <option #if ($controller.Name == $currentController) SELECTED #end>
  +#if ($controller.Title) $controller.Title #else $controller.Name #end
  +#end
  +        </select>
  +    </td>
  +  </tr>
  +#end
  +#if ($controls)
  +  <tr>
  +    <td>
  +        Select a decoration for this pane :<br />
  +        <select name="control">
  +#foreach ($control in $controls)
  +          <option #if ($control.Name == $currentControl) SELECTED #end>
  +#if ($control.Title) $control.Title #else $control.Name #end
   #end
           </select>
  -        <br /><input type="submit" name="eventSubmit_doLayout" value="Update" />
  -      </form>
       </td>
     </tr>
  +#end
  +#if ($skins)
     <tr>
  -    <td width="20%">
  -      <form action="$jlink" method="post">
  -#if ($action) <input name="$jlink.ActionKey" type="hidden" value="$action" /> #end
  -        Change color:<br/>
  +    <td>
  +        Select a color scheme for this pane :<br />
           <select name="skin">
   #foreach ($skin in $skins)
  -          <option #if ($skin.Name == $currentSkin) SELECTED #end>$skin.Name
  +          <option #if ($skin.Name == $currentSkin) SELECTED #end>
  +#if ($skin.Title) $skin.Title #else $skin.Name #end
   #end
           </select>
  -        <br /><input type="submit" name="eventSubmit_doSkin" value="Update" />
  -      </form>
       </td>
     </tr>
  +#end
     <tr>
  -    <td align="center" width="20%">
  -      <form action="$jlink" method="post">
  -#if ($action) <input name="$jlink.ActionKey" type="hidden" value="$action" /> #end
  -        <input type="submit" name="eventSubmit_doCancel" value="Done" />
  -      </form>
  +    <td align="right">
  +      <input type="submit" name="eventSubmit_doSave" value="Save" />
  +      <input type="submit" name="eventSubmit_doApply" value="Save &amp; Apply" />
       </td>
     </tr>
   </table>
  +</form>
  +#end
  \ No newline at end of file
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org