Single group allowed for users, support it via select
authorJoey Schulze <joey@infodrom.org>
Sat, 27 Feb 2010 22:16:49 +0000 (23:16 +0100)
committerJoey Schulze <joey@infodrom.org>
Sat, 27 Feb 2010 22:16:49 +0000 (23:16 +0100)
masks/sys_user.php

index a5a47f6..358975f 100644 (file)
@@ -3,10 +3,12 @@
 $mask = array(
              'table' => 'sys_user',
              'title' => 'Liste der Anwender',
 $mask = array(
              'table' => 'sys_user',
              'title' => 'Liste der Anwender',
+             'join' => array('sys_group ON sys_user.gid = sys_group.id'),
              'list' => array(
                              'id' => array(
                                            'name' => 'ID',
                                            'visible' => false,
              'list' => array(
                              'id' => array(
                                            'name' => 'ID',
                                            'visible' => false,
+                                           'sql' => 'sys_user.id',
                                            ),
                              'login' => array(
                                            'name' => 'Login',
                                            ),
                              'login' => array(
                                            'name' => 'Login',
@@ -15,19 +17,27 @@ $mask = array(
                              'name' => array(
                                            'name' => 'Name',
                                            'width' => 150,
                              'name' => array(
                                            'name' => 'Name',
                                            'width' => 150,
+                                           'sql' => 'sys_user.name',
                                            ),
                              'email' => array(
                                            'name' => 'E-Mail',
                                            'width' => 150,
                                            ),
                                            ),
                              'email' => array(
                                            'name' => 'E-Mail',
                                            'width' => 150,
                                            ),
+                             'gruppe' => array(
+                                           'name' => 'Gruppe',
+                                           'width' => 70,
+                                           'sql' => 'sys_group.name',
+                                           ),
                              'sys_user' => array(
                                            'name' => 'Bearb.',
                                            'width' => 50,
                              'sys_user' => array(
                                            'name' => 'Bearb.',
                                            'width' => 50,
+                                           'sql' => 'sys_user.sys_user',
                                            ),
                              'sys_edit' => array(
                                            'name' => 'Geändert',
                                            'width' => 80,
                                            'type' => 'date',
                                            ),
                              'sys_edit' => array(
                                            'name' => 'Geändert',
                                            'width' => 80,
                                            'type' => 'date',
+                                           'sql' => 'sys_user.sys_edit',
                                            ),
                              ),
              'rows' => 20,
                                            ),
                              ),
              'rows' => 20,
@@ -47,6 +57,11 @@ $mask = array(
                                            'type' => 'text',
                                            'size' => 25,
                                            ),
                                            'type' => 'text',
                                            'size' => 25,
                                            ),
+                             'gid' => array(
+                                           'name' => 'Gruppe',
+                                           'type' => 'select',
+                                           'options' => 'SELECT id,name AS text FROM sys_group ORDER BY name',
+                                           ),
                              'passwd' => array(
                                            'name' => 'Passwort',
                                            'type' => 'passwd',
                              'passwd' => array(
                                            'name' => 'Passwort',
                                            'type' => 'passwd',