Changeset 67 for trunk/templates


Ignore:
Timestamp:
11/30/10 18:01:27 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

checkpoint
Add user ACL handling nearing function
Add user/edit user pages merged; they're next to identical anyway
Group list images tweaked with proper "alpha channel", CSS fiddled again

  • final arrangement will probably be a couple of small triangles; pointing right for an expandable group, down for an expanded one

Option to add user to a different group removed

Location:
trunk/templates
Files:
2 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/templates/permlist.tmpl

    r66 r67  
    11<tr>
    22        <td align="right">Group:</td>
    3         <td<TMPL_UNLESS may_group_edit> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="group_edit"<TMPL_IF group_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_group_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
    4         <td<TMPL_UNLESS may_group_create> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="group_create"<TMPL_IF group_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_group_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
    5         <td<TMPL_UNLESS may_group_delete> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="group_delete"<TMPL_IF group_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_group_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td> </tr>
     3        <td<TMPL_UNLESS may_group_edit> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="group_edit"</TMPL_UNLESS><TMPL_IF group_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_group_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
     4        <td<TMPL_UNLESS may_group_create> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="group_create"</TMPL_UNLESS><TMPL_IF group_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_group_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
     5        <td<TMPL_UNLESS may_group_delete> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="group_delete"</TMPL_UNLESS><TMPL_IF group_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_group_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td> </tr>
    66<tr>
    77        <td align="right">User:</td>
    8         <td<TMPL_UNLESS may_user_edit> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="user_edit"<TMPL_IF user_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_user_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
    9         <td<TMPL_UNLESS may_user_create> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="user_create"<TMPL_IF user_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_user_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
    10         <td<TMPL_UNLESS may_user_delete> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="user_delete"<TMPL_IF user_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_user_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td>
     8        <td<TMPL_UNLESS may_user_edit> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="user_edit"</TMPL_UNLESS><TMPL_IF user_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_user_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
     9        <td<TMPL_UNLESS may_user_create> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="user_create"</TMPL_UNLESS><TMPL_IF user_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_user_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
     10        <td<TMPL_UNLESS may_user_delete> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="user_delete"</TMPL_UNLESS><TMPL_IF user_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_user_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td>
    1111</tr>
    1212<tr>
    1313        <td align="right">Domain:</td>
    14         <td<TMPL_UNLESS may_domain_edit> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="domain_edit"<TMPL_IF domain_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_domain_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
    15         <td<TMPL_UNLESS may_domain_create> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="domain_create"<TMPL_IF domain_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_domain_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
    16         <td<TMPL_UNLESS may_domain_delete> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="domain_delete"<TMPL_IF domain_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_domain_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td>
     14        <td<TMPL_UNLESS may_domain_edit> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="domain_edit"</TMPL_UNLESS><TMPL_IF domain_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_domain_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
     15        <td<TMPL_UNLESS may_domain_create> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="domain_create"</TMPL_UNLESS><TMPL_IF domain_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_domain_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
     16        <td<TMPL_UNLESS may_domain_delete> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="domain_delete"</TMPL_UNLESS><TMPL_IF domain_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_domain_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td>
    1717        <!-- td class="noaccess"> - Delegate [fixme: WTF?]</td -->
    1818</tr>
    1919<tr>
    2020        <td align="right">Domain Record:</td>
    21         <td<TMPL_UNLESS may_record_edit> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="record_edit"<TMPL_IF record_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_record_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
    22         <td<TMPL_UNLESS may_record_create> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="record_create"<TMPL_IF record_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_record_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
    23         <td<TMPL_UNLESS may_record_delete> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="record_delete"<TMPL_IF record_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_record_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td>
     21        <td<TMPL_UNLESS may_record_edit> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="record_edit"</TMPL_UNLESS><TMPL_IF record_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_record_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
     22        <td<TMPL_UNLESS may_record_create> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="record_create"</TMPL_UNLESS><TMPL_IF record_create> checked="checked"</TMPL_IF><TMPL_UNLESS may_record_create> disabled="disabled"</TMPL_UNLESS> /> Create</td>
     23        <td<TMPL_UNLESS may_record_delete> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="record_delete"</TMPL_UNLESS><TMPL_IF record_delete> checked="checked"</TMPL_IF><TMPL_UNLESS may_record_delete> disabled="disabled"</TMPL_UNLESS> /> Delete</td>
    2424        <!-- td class="noaccess"> - Delegate</td -->
    2525</tr>
    2626<tr>
    2727        <td align="right">Self:</td>
    28         <td<TMPL_UNLESS may_self_edit> class="noaccess"</TMPL_UNLESS>><input type="checkbox" name="self_edit"<TMPL_IF self_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_self_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
     28        <td<TMPL_UNLESS may_self_edit> class="<TMPL_UNLESS info>noaccess<TMPL_ELSE>info</TMPL_UNLESS>"</TMPL_UNLESS>><input type="checkbox"<TMPL_UNLESS info> name="self_edit"</TMPL_UNLESS><TMPL_IF self_edit> checked="checked"</TMPL_IF><TMPL_UNLESS may_self_edit> disabled="disabled"</TMPL_UNLESS> /> Edit</td>
    2929<!-- <TMPL_IF may_admin><TMPL_VAR NAME=admin></TMPL_IF> -->
    3030</tr>
  • trunk/templates/user.tmpl

    r66 r67  
    99
    1010<input type="hidden" name="sid" value="<TMPL_VAR NAME=sid>" />
    11 <input type="hidden" name="page" value="adduser" />
    12 <input type="hidden" name="newuser" value="yes" />
     11<input type="hidden" name="page" value="user" />
     12<input type="hidden" name="action" value="<TMPL_VAR NAME=action>" />
    1313
    1414<table border="0" cellspacing="2" cellpadding="2" width="450">
    1515<TMPL_IF add_failed>    <tr>
    16                 <td class="errhead" colspan="2">Error adding user <TMPL_VAR NAME=uname>: <TMPL_VAR NAME=errmsg></td>
     16                <td class="errhead" colspan="2">Error <TMPL_IF add>adding<TMPL_ELSE>updating</TMPL_IF> user <TMPL_VAR NAME=uname>: <TMPL_VAR NAME=errmsg></td>
    1717        </tr></TMPL_IF>
    1818        <tr class="darkrowheader"><td colspan="2" align="center">Add User</td></tr>
     
    4040        <tr class="datalinelight">
    4141                <td>Account Type:</td>
     42<TMPL_IF is_admin>
    4243                <td align="left"><select name="accttype">
    4344<TMPL_LOOP name=actypelist>             <option value="<TMPL_VAR NAME=actypeval>"<TMPL_IF typesel> selected="selected"</TMPL_IF>><TMPL_VAR NAME=actypename></option>
    4445</TMPL_LOOP>            </select></td>
    45         </tr>
    46         <tr class="datalinelight">
    47                 <td>Add user in group:</td>
    48                 <td><select name="group">
    49 <TMPL_LOOP name=grouplist>              <option value="<TMPL_VAR NAME=groupval>"<TMPL_IF groupactive> selected="selected"</TMPL_IF>><TMPL_VAR name=groupname></option>
    50 </TMPL_LOOP>            </select></td>
     46<TMPL_ELSE>
     47                <td>User</td>
     48</TMPL_IF>
    5149        </tr>
    5250        <tr class="datalinelight">
     
    6361        </td>
    6462</tr>
    65 <tr>
    66         <td align="right">Group:</td>
    67         <td><input type="checkbox"<TMPL_IF i_grped> checked="checked"</TMPL_IF> disabled="disabled" /> Edit</td>
    68         <td><input type="checkbox"<TMPL_IF i_grpcreate> checked="checked"</TMPL_IF> disabled="disabled" /> Create</td>
    69         <td><input type="checkbox"<TMPL_IF i_grpdel> checked="checked"</TMPL_IF> disabled="disabled" /> Delete</td>
    70 </tr>
    71 <tr>
    72         <td align="right">User:</td>
    73         <td><input type="checkbox"<TMPL_IF i_usered> checked="checked"</TMPL_IF> disabled="disabled" /> Edit</td>
    74         <td><input type="checkbox"<TMPL_IF i_usercreate> checked="checked"</TMPL_IF> disabled="disabled" /> Create</td>
    75         <td><input type="checkbox"<TMPL_IF i_userdel> checked="checked"</TMPL_IF> disabled="disabled" /> Delete</td>
    76 </tr>
    77 <tr>
    78         <td align="right">Domain:</td>
    79         <td><input type="checkbox"<TMPL_IF i_domed> checked="checked"</TMPL_IF> disabled="disabled" /> Edit</td>
    80         <td><input type="checkbox"<TMPL_IF i_domcreate> checked="checked"</TMPL_IF> disabled="disabled" /> Create</td>
    81         <td><input type="checkbox"<TMPL_IF i_domdel> checked="checked"</TMPL_IF> disabled="disabled" /> Delete</td>
    82         <!-- td>+ Delegate</td -->
    83 </tr>
    84 <tr>
    85         <td align="right">Domain Record:</td>
    86         <td><input type="checkbox"<TMPL_IF i_reced> checked="checked"</TMPL_IF> disabled="disabled" /> Edit</td>
    87         <td><input type="checkbox"<TMPL_IF i_reccreate> checked="checked"</TMPL_IF> disabled="disabled" /> Create</td>
    88         <td><input type="checkbox"<TMPL_IF i_recdel> checked="checked"</TMPL_IF> disabled="disabled" /> Delete</td>
    89         <!-- td>+ Delegate</td -->
    90 </tr>
    91 <tr>
    92         <td align="right">Self:</td>
    93         <td><input type="checkbox"<TMPL_IF i_edself> checked="checked"</TMPL_IF> disabled="disabled" /> Edit</td>
    94 </tr>
     63<TMPL_VAR NAME=grpperms>
    9564
     65<TMPL_IF is_admin>
    9666<tr class="tableheader">
    9767        <td align="center" colspan="5">
     
    10878        </td>
    10979</tr>
     80</TMPL_IF>
     81
    11082<tr class="tableheader">
    11183        <td align="center" colspan="5">
     
    11385        </td>
    11486</tr>
    115 <TMPL_INCLUDE name="permlist_enabled.tmpl">
     87<TMPL_INCLUDE name="permlist.tmpl">
    11688
    11789</table>
  • trunk/templates/useradmin.tmpl

    r65 r67  
    55<td align="center">
    66
     7<TMPL_IF warnmsg>
     8<div class="warning">Warning: <TMPL_VAR NAME=warnmsg></div>
     9</TMPL_IF>
    710 <TMPL_IF del_failed>
    811  <div class='errmsg'>Error deleting user <TMPL_VAR NAME=delusername>: <TMPL_VAR NAME=errmsg></div>
     
    1922</tr>
    2023<tr><td colspan="3" align="center"><TMPL_INCLUDE NAME="lettsearch.tmpl"></td></tr>
    21 <tr><td colspan="3" align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=newuser">New User</a></td></tr>
     24<tr><td colspan="3" align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=user">New User</a></td></tr>
    2225</table>
    2326
     
    3134<TMPL_LOOP name=usertable>
    3235<tr class="row<TMPL_VAR name=bg>">
    33         <td align="left"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=edituser&amp;user=<TMPL_VAR NAME=userid>"><TMPL_VAR NAME=username></a></td>
     36        <td align="left"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&amp;page=user&amp;action=edit&amp;user=<TMPL_VAR NAME=userid>"><TMPL_VAR NAME=username></a></td>
    3437        <td class="data_nowrap"><TMPL_VAR name=userfull></td>
    3538        <td><TMPL_VAR name=usertype></td>
Note: See TracChangeset for help on using the changeset viewer.