- Timestamp:
- 10/13/11 17:52:48 (13 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r140 r142 823 823 } 824 824 825 list_users(); 826 827 # Permissions! 828 $page->param(adduser => $permissions{admin} || $permissions{user_create}); 829 # should we block viewing other users? Vega blocks "editing"... 830 # NB: no "edit self" link as with groups here. maybe there should be? 831 # $page->param(eduser => $permissions{admin} || $permissions{user_edit}); 832 $page->param(deluser => $permissions{admin} || $permissions{user_delete}); 833 834 $page->param(errmsg => $webvar{errmsg}) if $webvar{errmsg}; 825 835 $page->param(curpage => $webvar{page}); 826 827 list_users();828 836 829 837 } elsif ($webvar{page} eq 'user') { … … 1070 1078 $page->param(errmsg => $msg); 1071 1079 list_users($curgroup); 1080 #Error deleting user <TMPL_VAR NAME=delusername>: <TMPL_VAR NAME=errmsg> 1072 1081 } else { 1073 1082 # success. go back to the user list, do not pass "GO" … … 1840 1849 $row{bg} = ($rownum++)%2; 1841 1850 $row{sid} = $sid; 1851 $row{eduser} = ($permissions{admin} || $permissions{user_edit}); 1852 $row{deluser} = ($permissions{admin} || $permissions{user_delete}); 1842 1853 push @userlist, \%row; 1843 1854 } -
trunk/templates/useradmin.tmpl
r139 r142 8 8 <div class="warning">Warning: <TMPL_VAR NAME=warnmsg></div> 9 9 </TMPL_IF> 10 <TMPL_IF del_failed>11 <div class='errmsg'> Error deleting user <TMPL_VAR NAME=delusername>:<TMPL_VAR NAME=errmsg></div>10 <TMPL_IF errmsg> 11 <div class='errmsg'><TMPL_VAR NAME=errmsg></div> 12 12 </TMPL_IF> 13 13 … … 20 20 </tr> 21 21 <tr><td colspan="3" align="center"><TMPL_INCLUDE NAME="lettsearch.tmpl"></td></tr> 22 <TMPL_IF adduser> 22 23 <tr><td colspan="3" align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=user">New User</a></td></tr> 24 </TMPL_IF> 23 25 </table> 24 26 … … 27 29 <TMPL_LOOP NAME=colheads> 28 30 <td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&sortby=<TMPL_VAR NAME=sortby>&order=<TMPL_VAR NAME=order>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP> 29 <td class="datahead_s">Delete</td>31 <TMPL_IF deluser> <td class="datahead_s">Delete</td></TMPL_IF> 30 32 </tr> 31 33 <TMPL_IF name=usertable> 32 34 <TMPL_LOOP name=usertable> 33 35 <tr class="row<TMPL_VAR name=bg>"> 34 <td align="left">< a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=user&action=edit&user=<TMPL_VAR NAME=userid>"><TMPL_VAR NAME=username></a></td>36 <td align="left"><TMPL_IF eduser><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=user&action=edit&user=<TMPL_VAR NAME=userid>"><TMPL_VAR NAME=username></a><TMPL_ELSE><TMPL_VAR NAME=username></TMPL_IF></td> 35 37 <td class="data_nowrap"><TMPL_VAR name=userfull></td> 36 38 <td><TMPL_VAR name=usertype></td> 37 39 <td><TMPL_VAR name=usergroup></td> 38 <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin<TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&id=<TMPL_VAR NAME=userid>&userstatus=<TMPL_IF NAME=active>useroff<TMPL_ELSE>useron</TMPL_IF>"><TMPL_IF NAME=active>enabled<TMPL_ELSE>disabled</TMPL_IF></a></td> 40 <td align="center"> 41 <TMPL_IF eduser> 42 <a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin<TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&id=<TMPL_VAR NAME=userid>&userstatus=<TMPL_IF active>useroff<TMPL_ELSE>useron</TMPL_IF>"><TMPL_IF active>enabled<TMPL_ELSE>disabled</TMPL_IF></a> 43 <TMPL_ELSE> 44 <TMPL_IF active>enabled<TMPL_ELSE>disabled</TMPL_IF> 45 </TMPL_IF> 46 </td> 47 <TMPL_IF deluser> 39 48 <td align="center"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=deluser&id=<TMPL_VAR NAME=userid>"><img src="images/trash2.png" alt="[ Delete ]" /></a></td> 49 </TMPL_IF> 40 50 </tr> 41 51 </TMPL_LOOP>
Note:
See TracChangeset
for help on using the changeset viewer.