portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets role-browser.vm role-form.vm user-browser.vm user-form.vm
Date Mon, 11 Jun 2001 07:02:23 GMT
taylor      01/06/11 00:02:23

  Added:       webapp/WEB-INF/templates/vm GlobalMacros.vm
               webapp/WEB-INF/templates/vm/portlets role-browser.vm
                        role-form.vm user-browser.vm user-form.vm
  Log:
  added first set of security forms for browsing, editing, adding and deleting users and roles
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/GlobalMacros.vm
  
  Index: GlobalMacros.vm
  ===================================================================
  #* ------------------------------------------------------------------
  #
  # Macros that are used for displaying input forms.
  #
  *# ------------------------------------------------------------------
  
  #macro (text $text)
    <font face="$ui.sansSerifFonts">
      $text
    </font>
  #end
  
  #macro (formLabel $label)
    <td bgcolor="$ui.formLabelColor">
      <b>
        <font face="$ui.sansSerifFonts">
          $label
        </font>
      </b>
    </td>
  #end
  
  #macro (formTextField $name $value)
    <td bgcolor="$ui.formFieldColor">
      <font face="$ui.sansSerifFonts">
        <input type="text" size="30" name="$name" value="$value">
      </font>
    </td>
  #end
  
  #macro (textField $name $value $size)
    <font face="$ui.sansSerifFonts">
      <input type="text" size="30" name="$name" value="$value">
    </font>
  #end
  
  #macro (listBox $list)
    <font face="$ui.sansSerifFonts">
      $list
    </font>
  #end
  
  #macro (formPasswordCell $label $name $value)
    <td bgcolor="$ui.formLabelColor">
      <b>
        <font face="$ui.sansSerifFonts">
          $label
        </font>
      </b>
    </td>
    <td bgcolor="$ui.formFieldColor">
      <font face="$ui.sansSerifFonts">
        <input type="password" size="30" name="$name" value="$value">
      </font>
    </td>
  #end
  
  #macro (formCell $label $name $value)
    #formLabel("$label")
    #formTextField("$name" "$value")
  #end
  
  #macro (fileUploadField $name)
    <td bgcolor="$ui.formFieldColor">
      <font face="$ui.sansSerifFonts">
        <input type="file" size="30" name="$name">
      </font>
    </td>
  #end
  
  #macro (fileUpload "$label" "$name")
    #formLabel("$label")
    #fileUploadField("$name")
  #end
  
  #macro (formCheckBox $label $name $checked)
    <td bgcolor="$ui.formLabelColor">
      <b>
        <font face="$ui.sansSerifFonts">
          $label
        </font>
      </b>
    </td>
    <td bgcolor="$ui.formFieldColor">
      <input type="checkbox" name="$name" #if($checked)checked=1#end/>
    </td>
  #end
  
  #macro (formListBox $label $list)
    <td bgcolor="$ui.formLabelColor">
      <b>
        <font face="$ui.sansSerifFonts">
          $label
        </font>
      </b>
    </td>
    <td bgcolor="$ui.formFieldColor">
      $list
    </td>
  #end
  
  #* ------------------------------------------------------------------
  #
  # Macros that are used for displaying information in tables.
  #
  *# ------------------------------------------------------------------
  
  #macro (headerCell $body)
    <td>
      <b>     
          $body
      </b>
    </td>
  #end
  
  #macro (entryCell $body)
    <td>    
        $body &nbsp;    
    </td>
  #end
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/role-browser.vm
  
  Index: role-browser.vm
  ===================================================================
  #**
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: role-browser.vm,v 1.1 2001/06/11 07:02:20 taylor Exp $
  
  *#
  
  #set ( $headings = ["Role Name"] )
  
  <table>
  
    <tr>
      <td>
        <table border="true" cellspacing="1" cellpadding="3">
          <tr>
            #foreach ($heading in $headings)
            #headerCell ($heading)
            #end
          </tr>
  
          #foreach ($role in $roles)
          <tr>
            #entryCell ($role.Name)
            <td>
                <a href="$jlink.setPanel("Role").addPathInfo("rolename",$role.Name)">Permissions</a>
&nbsp;
                <a href="$jlink.setPanel("Role").addPathInfo("rolename",$role.Name).addQueryData("mode","delete")">Remove</a>
            </td>
          </tr>
          #end
        </table>
      </td>
    </tr>
    <tr>
      <td>
          <a href="$jlink.setPanel("Role").addQueryData("mode","insert")">Add Role</a>
      <td>
    </tr>
  </table>
  
  
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/role-form.vm
  
  Index: role-form.vm
  ===================================================================
  #**
  
  Display the details of a role.
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: role-form.vm,v 1.1 2001/06/11 07:02:21 taylor Exp $
  
  *#
  
  <form method="post" action="$jlink.setPanel("Role Browser").setAction("portlets.security.RoleUpdateAction")">
    <div align="left">
      <table bgcolor="#ffffff" cellpadding="5">
  
        #if ($errorTemplate)
        <tr>
          <td colspan="2">
            <table bgcolor="#ffffff">
              <tr>
                <td>
                  #parse ($errorTemplate)
                </td>
              </tr>
            </table>
          </td>
        </tr>
        #end
  
        <tr>
          #formCell ("Role Name" "name" $!role.Name)
        </tr>
        <tr>
          <td align="$ui.buttonAlignment" bgcolor="$ui.buttonColor">
            #*
              Check for a mode, the update and delete buttons
              shouldn't appear when inserting a new user.
            *#            
  
            #if ($mode == "modify")
              <input type="submit" name="eventSubmit_doUpdate" value="Update Role"/>
            #elseif ($mode == "delete")
              <input type="submit" name="eventSubmit_doDelete" value="Confirm Deletion"/>
            #else
              <input type="submit" name="eventSubmit_doInsert" value="Add Role"/>
            #end
  
            </font>
        </td>
      </tr>
    </table>
      
    <input type="hidden" name="rolename" value="$!role.Name"/>
  </div>
  </form>
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/user-browser.vm
  
  Index: user-browser.vm
  ===================================================================
  #**
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: user-browser.vm,v 1.1 2001/06/11 07:02:21 taylor Exp $
  
  *#
  
  #set ( $headings = ["Username","Password","First Name", "Last Name", "Email"] )
  
  <table>
  
    <tr>
      <td>
        <table border="true" cellspacing="1" cellpadding="3">
          <tr>
            #foreach ($heading in $headings)
            #headerCell ($heading)
            #end
          </tr>
  
          #foreach ($user in $users)
          <tr>
            #entryCell ($!user.UserName)
            #entryCell ($!user.Password)
            #entryCell ($!user.FirstName)
            #entryCell ($!user.LastName)
            #entryCell ("<a href=mailto:$!user.Email>$!user.Email</a>")
            <td>
                <a href="$jlink.setPanel("User").addPathInfo("username",$user.UserName).addQueryData("mode","modify")">Edit</a>
&nbsp;
                <a href="$jlink.setPanel("User").addPathInfo("username",$user.UserName).addQueryData("mode","modify")">Roles</a>
&nbsp;
                <a href="$jlink.setPanel("User").addPathInfo("username",$user.UserName).addQueryData("mode","delete")">Remove</a>
            </td>
          </tr>
          #end
        </table>
      </td>
    </tr>
    <tr>
      <td>
          <a href="$jlink.setPanel("User")">Add User</a>
      <td>
    </tr>
  </table>
  
  
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/user-form.vm
  
  Index: user-form.vm
  ===================================================================
  #**
  
  Display the details of a user.
  
  @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
  @version $Id: user-form.vm,v 1.1 2001/06/11 07:02:22 taylor Exp $
  <form method="post" action="$jlink.setPage("portlets,user-browser.vm").setAction("portlets.security.UserUpdateAction")">
  *#
  
  <form method="post" action="$jlink.setPanel("User Browser").setAction("portlets.security.UserUpdateAction")">
    <div align="left">
      <table bgcolor="#ffffff" cellpadding="5">
  
        #if ($errorTemplate)
        <tr>
          <td colspan="2">
            <table bgcolor="#ffffff">
              <tr>
                <td>
                  #parse ($errorTemplate)
                </td>
              </tr>
            </table>
          </td>
        </tr>
        #end
  
        <tr>
          #formCell ("Username" "username" $!user.UserName)
        </tr>
        <tr>
          #formCell ("Password" "password" $!user.Password)
        </tr>
        <tr>
          #formCell ("First Name" "firstname" $!user.FirstName)
        </tr>
        <tr>
          #formCell ("Last Name" "lastname" $!user.LastName)
        </tr>
        <tr>
          #formCell ("Email" "email" $!user.Email)
        </tr>
  
        <tr>
          <td align="$ui.buttonAlignment" bgcolor="$ui.buttonColor">
            #*
              Check for a mode, the update and delete buttons
              shouldn't appear when inserting a new user.
            *#            
  
            #if ($mode == "modify")
              <input type="submit" name="eventSubmit_doUpdate" value="Update User"/>
            #elseif ($mode == "delete")
              <input type="submit" name="eventSubmit_doDelete" value="Confirm Deletion"/>
            #else
              <input type="submit" name="eventSubmit_doInsert" value="Add User"/>
            #end
  
            </font>
        </td>
      </tr>
    </table>
      
    <input type="hidden" name="userid" value="$!user.UserId"/>
  </div>
  </form>
  
  

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


Mime
View raw message