indiantarget / yii-user-management

0 stars 0 forks source link

Suggestion to YumAdmin Menu #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I think that there is a reason to change to do like this in YumAdminMenu.php:

    public function getMenuItems() {
        $yumBaseRoute=Yum::module()->yumBaseRoute;
        return array( 
                array('label'=>'Users', 'items' => array(
                        array('label'=> 'Statistics', 'url'=>array('//'.$yumBaseRoute.'/statistics/index')),
                        array('label' => 'Administration', 'url' => array('//'.$yumBaseRoute.'/user/admin')),
                        array('label' => 'Create new user', 'url' => array('//'.$yumBaseRoute.'/user/create')),
                        array('label' => 'Generate Demo Data', 'url' => array('//'.$yumBaseRoute.'/user/generateData'), 'visible' => Yum::module()->debug),
                        )
                    ),
                array('label'=>'Access control', 'visible' => Yum::module()->enableRoles, 'items' => array(
                        array('label' => 'Roles', 'url' => array('//'.$yumBaseRoute.'/role/admin')),
                        array('label' => 'Create new role', 'url' => array('//'.$yumBaseRoute.'/role/create')),
                        array('label' => 'Permissions', 'url' => array('//'.$yumBaseRoute.'/permission/admin')),
                        array('label' => 'Grant permission', 'url' => array('//'.$yumBaseRoute.'/permission/create')),
                        array('label' => 'Actions', 'url' => array('//'.$yumBaseRoute.'/action/admin')),
                        array('label' => 'Create new action', 'url' => array('//'.$yumBaseRoute.'/action/create')),
                        )
                    ),
                array('label'=>'Membership', 'visible' => Yum::module()->enableMembership, 'items' => array(
                        array('label' => 'Ordered memberships', 'url' => array('//'.$yumBaseRoute.'/membership/admin')),
                        array('label' => 'Payment types', 'url' => array('//'.$yumBaseRoute.'/payment/admin')),
                        array('label' => 'Create new payment type', 'url' => array('//'.$yumBaseRoute.'/payment/create')),
                        )
                    ),
                array('label'=>'Profiles',
                        'visible' => Yum::module()->enableProfiles,
                        'items' => array(
                            array('label' => 'Manage profiles', 'url' => array('//'.$yumBaseRoute.'/profile/admin')),
                            array('label' => 'Show profile visits', 'url' => array('//'.$yumBaseRoute.'/profile/visits')),
                            array('label' => 'Manage profile fields', 'url' => array('//'.$yumBaseRoute.'/fields/admin')),
                            array('label' => 'Create profile field', 'url' => array('//'.$yumBaseRoute.'/fields/create')),
                            array('label' => 'Manage field groups', 'url' => array('//'.$yumBaseRoute.'/fieldsgroup/admin')),
                            array('label' => 'Create new field group', 'url' => array('//'.$yumBaseRoute.'/fieldsgroup/create')),
                            )
                        ),
                array('label' => 'Messages',
                        'visible' => Yum::hasModule('messages'),
                        'items' => array ( 
                            array('label' => 'Admin inbox', 'url' => array('/messages/messages/index')),
                            array('label' => 'Sent messages', 'url' => array('/messages/messages/sent')),
                            array('label' => 'Write a message', 'url' => array('/messages/messages/compose')),
                            array('label' => 'Send message notifier emails', 'url' => array('/messages/messages/sendDigest')),
                            ),
                        ),
                array('label' => 'Module text settings', 'url' => array('//'.$yumBaseRoute.'/yumTextSettings/admin')),
                array('label' => 'Misc', 'items' => array(
                            array('label' => 'Upload avatar for admin', 'url' => array('//'.$yumBaseRoute.'/avatar/editAvatar')),
                            array('label' => 'Change admin Password', 'url' => array('//'.$yumBaseRoute.'/user/changePassword')),
                            array('label' => 'Logout', 'url' => array('//'.$yumBaseRoute.'/user/logout')),
                            )
                        ),
                );

    }

Original issue reported on code.google.com by sergey.m...@gmail.com on 4 May 2011 at 11:46