diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-09 10:42:50 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-09 10:42:50 -0400 |
commit | ec6aed847585565f703e0c8bef0b75782bfe4560 (patch) | |
tree | ae8e3a897143ea2198381dfb736ae82b2949dd49 /admin/templates/users.php | |
parent | 9a8eb7298c16ea3c10019d04695be04d6205a701 (diff) | |
parent | 1419d7f2b02a2182eb746443b62572f1b4b3f655 (diff) | |
download | nextcloud-server-ec6aed847585565f703e0c8bef0b75782bfe4560.tar.gz nextcloud-server-ec6aed847585565f703e0c8bef0b75782bfe4560.zip |
Merge branch 'master' into sharing
Diffstat (limited to 'admin/templates/users.php')
-rw-r--r-- | admin/templates/users.php | 148 |
1 files changed, 35 insertions, 113 deletions
diff --git a/admin/templates/users.php b/admin/templates/users.php index 79a4c712049..8e34c908fcd 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -1,117 +1,39 @@ -<fieldset> - <legend><?php echo $l->t( 'Users' ); ?></legend> - <table id="usertable"> - <thead> - <tr> - <th><?php echo $l->t( 'Name' ); ?></th> - <th><?php echo $l->t( 'Groups' ); ?></th> - <th></th> - </tr> - </thead> - <tfoot> - <tr id="createuserform"> - <form id="createuserdata"> - <td> - <input x-use="createuserfield" type="text" name="username" placeholder="<?php echo $l->t( 'Name' ); ?>" /> - <input x-use="createuserfield" type="password" name="password" placeholder="<?php echo $l->t( 'Password' ); ?>" /> - </td> - <td id="createusergroups"> - <?php foreach($_["groups"] as $i): ?> - <input id='newuser_group_<?php echo $i["name"]; ?>' x-use="createusercheckbox" x-gid="<?php echo $i["name"]; ?>" type="checkbox" name="groups[]" value="<?php echo $i["name"]; ?>" /> - <span x-gid="<?php echo $i["name"]; ?>"><label for='newuser_group_<?php echo $i["name"]; ?>'><?php echo $i["name"]; ?></label></span> - <?php endforeach; ?> - </td> - <td> - <input type="submit" id="createuserbutton" value="<?php echo $l->t( 'Add user' ); ?>" /> - </td> - </form> - </tr> - </tfoot> - <tbody> - <?php foreach($_["users"] as $user): ?> - <tr x-uid="<?php echo $user["name"] ?>"> - <td x-use="username"><span x-use="usernamediv"><?php echo $user["name"]; ?></span></td> - <td x-use="usergroups"><div x-use="usergroupsdiv"><?php if( $user["groups"] ){ echo $user["groups"]; }else{echo " ";} ?></div></td> - <td> - <?php if($user['name']!=OC_User::getUser()):?> - <input type="submit" class="removeuserbutton" value="<?php echo $l->t( 'Remove' ); ?>" /> - <?php endif;?> - </td> - </tr> - <?php endforeach; ?> - </tbody> - </table> -</fieldset> - -<fieldset> - <legend><?php echo $l->t( 'Groups' ); ?></legend> - <table id="grouptable"> - <thead> - <tr> - <th><?php echo $l->t( 'Name' ); ?></th> - <th></th> - </tr> - </thead> - <tfoot> - <form id="creategroupdata"> - <tr> - <td><input x-use="creategroupfield" type="text" name="groupname" placeholder="New group" /></td> - <td><input type="submit" id="creategroupbutton" value="<?php echo $l->t( 'Create group' ); ?>" /></td> - </tr> - </form> - </tfoot> - <tbody> - <?php foreach($_["groups"] as $group): ?> - <tr x-gid="<?php echo $group["name"]; ?>"> - <td><?php echo $group["name"] ?></td> - <td> - <?php if( $group["name"] != "admin" ): ?> - <input type="submit" class="removegroupbutton" value="<?php echo $l->t( 'remove' ); ?>" /> - <?php else: ?> - - <?php endif; ?> - </td> - </tr> - <?php endforeach; ?> - </tbody> - </table> -</fieldset> - - -<span id="changegroups" style="display:none"> - <form id="changegroupsform"> - <input id="changegroupuid" type="hidden" name="username" value="" /> - <input id="changegroupgid" type="hidden" name="group" value="" /> - <?php foreach($_["groups"] as $i): ?> - <input x-use="togglegroup" x-gid="<?php echo $i["name"]; ?>" type="checkbox" name="groups[]" value="<?php echo $i["name"]; ?>" /> - <span x-use="togglegroup" x-gid="<?php echo $i["name"]; ?>"><?php echo $i["name"]; ?></span> - <?php endforeach; ?> +<div id="controls"> + <form id="newgroup"> + <input id="newgroupname" placeholder="name"></input> + <input type="submit" value="create"></input> </form> -</span> - -<span id="changepassword" style="display:none"> - <form id="changepasswordform"> - <input id="changepassworduid" type="hidden" name="username" value="" /> - <?php echo $l->t( 'Force new password:' ); ?> - <input id="changepasswordpwd" type="password" name="password" value="" /> - <input type="submit" id="changepasswordbutton" value="<?php echo $l->t( 'Set' ); ?>" /> - </form> -</span> - -<div id="removeuserform" title="Remove user"> - <form id="removeuserdata"> - <?php echo $l->t( 'Do you really want to delete user' ); ?> <span id="deleteuserusername">$user</span>? - <input id="deleteusernamefield" type="hidden" name="username" value=""> - </form> -</div> - -<div id="removegroupform" title="Remove Group"> - <form id="removegroupdata"> - <?php echo $l->t( 'Do you really want to delete group' ); ?> <span id="removegroupgroupname">$group</span>? - <input id="removegroupnamefield" type="hidden" name="groupname" value=""> + <form id="newuser"> + <input id="newusername" placeholder="username"></input> + <input type="password" id="newuserpassword" placeholder="password"></input> + <select id="newusergroups" data-placeholder="groups" title="groups" multiple="multiple"> + <?php foreach($_["groups"] as $group): ?> + <option value="<?php echo $group['name'];?>"><?php echo $group['name'];?></option> + <?php endforeach;?> + </select> + <input type="submit" value="Create"></input> </form> </div> - -<div id="errordialog" title="Error"> - <span id="errormessage"></span> +<ul id="leftcontent"> + <?php foreach($_["groups"] as $group): ?> + <li data-gid="<?php echo $group["name"]; ?>"> + <?php echo $group["name"] ?> + </li> + <?php endforeach; ?> +</ul> +<div id="rightcontent"> + <table> + <?php foreach($_["users"] as $user): ?> + <tr data-uid="<?php echo $user["name"] ?>"> + <td class="select"><input type="checkbox"></input></td> + <td class="name"><?php echo $user["name"]; ?></td> + <td class="groups"><?php if( $user["groups"] ){ echo $user["groups"]; }else{echo " ";} ?></td> + <td class="remove"> + <?php if($user['name']!=OC_User::getUser()):?> + <img alt="Remove" title="Remove" class='svg' src='<?php echo image_path('core','actions/delete.svg') ?>'/> + <?php endif;?> + </td> + </tr> + <?php endforeach; ?> + </table> </div> |