<?php

if (Yii::app()->getUser() && Yii::app()->getUser()->isGuest !== true) {
    $route = rtrim($this->route, Yii::app()->controller->action->id);
    $route = rtrim($route, '/');
    $user = yii::app()->user;
    $moduleID = Yii::app()->controller->module->id;
    $items = array(
        array('label' => Yii::t('admin', 'Home'), 'url' => array('/admin/default/index')),

        array('label' => Yii::t('admin', 'Menus'), 'visible' => Yii::app()->user->checkAccess('Fmenu.Menu.*'), 'url' => '#', 'active' => $moduleID == 'admin/fmenu', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Menus'), 'visible' => Yii::app()->user->checkAccess('Fmenu.Menu.*'), 'url' => array('/admin/fmenu/menu/admin')),
                array('label' => Yii::t('admin', 'Create Menu'), 'visible' => Yii::app()->user->checkAccess('Fmenu.Menu.*'), 'url' => array('/admin/fmenu/menu/create')),
            )),

        array('label' => Yii::t('admin', 'Sliders'), 'visible' => Yii::app()->user->checkAccess('Fslider.Slider.*'), 'url' => '#', 'active' => $route == 'admin/fslider/slider', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Sliders'), 'visible' => Yii::app()->user->checkAccess('Fslider.Slider.*'), 'url' => array('/admin/fslider/slider/admin')),
                // array('label' => Yii::t('admin', 'Create Slider'), 'visible' => Yii::app()->user->checkAccess('Fslider.Slider.*'), 'url' => array('/admin/fslider/slider/create')),
            )),

        array('label' => Yii::t('admin', 'Categories'), 'visible' => Yii::app()->user->checkAccess('Admin.Category.*'), 'url' => '#', 'active' => $route == 'admin/category', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Categories'), 'visible' => Yii::app()->user->checkAccess('Admin.Category.*'), 'url' => array('/admin/category/admin')),
                array('label' => Yii::t('admin', 'Create Category'), 'visible' => Yii::app()->user->checkAccess('Admin.Category.*'), 'url' => array('/admin/category/create')),
            )),

        array('label' => Yii::t('admin', 'Articles'), 'visible' => Yii::app()->user->checkAccess('Admin.Article.*'), 'url' => '#', 'active' => $route == 'admin/article', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Articles'), 'visible' => Yii::app()->user->checkAccess('Admin.Article.*'), 'url' => array('/admin/article/admin')),
                array('label' => Yii::t('admin', 'Create Article'), 'visible' => Yii::app()->user->checkAccess('Admin.Article.*'), 'url' => array('/admin/article/create')),
            )),


        array('label' => Yii::t('admin', 'Pages'), 'visible' => Yii::app()->user->checkAccess('Admin.Page.*'), 'url' => '#', 'active' => $route == 'admin/page', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Pages'), 'visible' => Yii::app()->user->checkAccess('Admin.Page.*'), 'url' => array('/admin/page/admin')),
                array('label' => Yii::t('admin', 'Create Page'), 'visible' => Yii::app()->user->checkAccess('Admin.Page.*'), 'url' => array('/admin/page/create')),
            )),

        array('label' => Yii::t('admin', 'Currency'), 'visible' => Yii::app()->user->checkAccess('Currency.Currency.*'), 'url' => '#', 'active' => $route == 'admin/currency', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Currency'), 'visible' => Yii::app()->user->checkAccess('Currency.Currency.*'), 'url' => array('/admin/currency/currency/admin')),
                array('label' => Yii::t('admin', 'Create Currency'), 'visible' => Yii::app()->user->checkAccess('Currency.Currency.*'), 'url' => array('/admin/currency/currency/create')),
                array('label' => Yii::t('admin', 'export'), 'visible' => Yii::app()->user->checkAccess('Currency.Currency.*'), 'url' => array('/admin/currency/currency/export')),
                array('label' => Yii::t('admin', 'import'), 'visible' => Yii::app()->user->checkAccess('Currency.Currency.*'), 'url' => array('/admin/currency/currency/import')),
            )),

        array('label' => Yii::t('admin', 'Profits calculator'), 'visible' => Yii::app()->user->checkAccess('Calculator.CalculatorAverageProfitRate.*'), 'url' => '#', 'active' => $route == 'admin/calculator/calculatorAverageProfitRate', 'items' => array(
                        array('label' => Yii::t('admin', 'Manage profits calculator'), 'visible' => Yii::app()->user->checkAccess('Calculator.CalculatorAverageProfitRate.*'), 'url' => array('/admin/calculator/calculatorAverageProfitRate/admin')),
                        array('label' => Yii::t('admin', 'create Profits'), 'visible' => Yii::app()->user->checkAccess('Calculator.CalculatorAverageProfitRate.*'), 'url' => array('/admin/calculator/calculatorAverageProfitRate/create')),
                        
                    )),
        array('label' => Yii::t('admin', 'Finance calculator'), 'visible' => Yii::app()->user->checkAccess('Calculator.CalculatorFinance.*'), 'url' => '#', 'active' => $route == 'admin/calculator/calculatorFinance', 'items' => array(
                        array('label' => Yii::t('admin', 'Manage Finance'), 'visible' => Yii::app()->user->checkAccess('Calculator.CalculatorFinance.*'), 'url' => array('/admin/calculator/calculatorFinance/admin')),
                        array('label' => Yii::t('admin', 'Create Finance'), 'visible' => Yii::app()->user->checkAccess('Calculator.CalculatorFinance.*'), 'url' => array('/admin/calculator/calculatorFinance/create')),
                        
                    )),

        array('label' => Yii::t('admin', 'Commission'), 'visible' => Yii::app()->user->checkAccess('Commission.Commission.*'), 'url' => '#', 'active' => $route == 'admin/commission', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Commission'), 'visible' => Yii::app()->user->checkAccess('Commission.Commission.*'), 'url' => array('/admin/commission/commission/admin')),
                array('label' => Yii::t('admin', 'Create Commission'), 'visible' => Yii::app()->user->checkAccess('Commission.Commission.*'), 'url' => array('/admin/commission/commission/create')),
                array('label' => Yii::t('admin', 'export'), 'visible' => Yii::app()->user->checkAccess('Commission.Commission.*'), 'url' => array('/admin/commission/commission/export')),
                array('label' => Yii::t('admin', 'import'), 'visible' => Yii::app()->user->checkAccess('Commission.Commission.*'), 'url' => array('/admin/commission/commission/import')),
            )),

        array('label' => Yii::t('admin', 'Questionnaires'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.Questionnaire.*'), 'url' => '#', 'active' => $moduleID == 'admin/questionnaire', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Questionnaires'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.Questionnaire.*'), 'url' => array('/admin/questionnaire/questionnaire/admin')),
                // array('label' => Yii::t('admin', 'Create Questionnaire'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.Questionnaire.*'), 'url' => array('/admin/questionnaire/questionnaire/create')),
                // array('label' => Yii::t('admin', 'Result Questionnaire'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.Questionnaire.*'), 'url' => array('/admin/questionnaire/questionnaire/adminViewResult')),
            )),



        array('label' => Yii::t('admin', 'Person'), 'visible' => Yii::app()->user->checkAccess('person.Person.*'), 'url' => '#', 'active' => $route == 'admin/person', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Person'), 'visible' => Yii::app()->user->checkAccess('person.Person.*'), 'url' => array('/admin/person/person/admin')),
                array('label' => Yii::t('admin', 'Create Person'), 'visible' => Yii::app()->user->checkAccess('person.Person.*'), 'url' => array('/admin/person/person/create')),
            )),

        // array('label' => Yii::t('admin', 'Albums'), 'visible' => Yii::app()->user->checkAccess('Falbums.Album.*'), 'url' => '#', 'active' => $moduleID == 'admin/falbums', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Albums'), 'visible' => Yii::app()->user->checkAccess('Falbums.Album.*'), 'url' => array('/admin/falbums/album/admin')),
        //         array('label' => Yii::t('admin', 'Create Album'), 'visible' => Yii::app()->user->checkAccess('Falbums.Album.*'), 'url' => array('/admin/falbums/album/create')),
        //     )),

        array('label' => Yii::t('admin', 'Files'), 'visible' => Yii::app()->user->checkAccess('File.File.*'), 'url' => '#', 'active' => $moduleID == 'admin/book/book', 'items' => array(
                array('label' => Yii::t('admin', 'Manage files'), 'visible' => Yii::app()->user->checkAccess('File.File.*'), 'url' => array('/admin/file/file/admin')),
                array('label' => Yii::t('admin', 'Create file'), 'visible' => Yii::app()->user->checkAccess('File.File.*'), 'url' => array('/admin/file/file/create')),
            )),
        // array('label' => Yii::t('admin', 'Tabbers'), 'visible' => Yii::app()->user->checkAccess('Ftabber.Tabber.*'), 'url' => '#', 'active' => $route == 'admin/ftabber/tabber', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Tabbers'), 'visible' => Yii::app()->user->checkAccess('Ftabber.Tabber.*'), 'url' => array('/admin/ftabber/tabber/admin')),
        //         array('label' => Yii::t('admin', 'Create Tabber'), 'visible' => Yii::app()->user->checkAccess('Ftabber.Tabber.*'), 'url' => array('/admin/ftabber/tabber/create')),
        //     )),

        

        // array('label' => Yii::t('admin', 'Content Blocks'), 'visible' => Yii::app()->user->checkAccess('Admin.Htmlblock.*'), 'url' => '#', 'active' => $route == 'admin/htmlblock', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Content Blocks'), 'visible' => Yii::app()->user->checkAccess('Admin.Htmlblock.*'), 'url' => array('/admin/htmlblock/admin')),
        //         array('label' => Yii::t('admin', 'Create Content Block'), 'visible' => Yii::app()->user->checkAccess('Admin.Htmlblock.*'), 'url' => array('/admin/htmlblock/create')),
        //     )),

//////////////////////////////////////////////////////////////////////////////////

        array('label' => Yii::t('admin', 'Branches'), 'visible' => Yii::app()->user->checkAccess('branch.Branch.*'), 'url' => '#', 'active' => $route == 'admin/branch', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Branch'), 'visible' => Yii::app()->user->checkAccess('branch.Branch.*'), 'url' => array('/admin/branch/branch/admin')),
                array('label' => Yii::t('admin', 'Create Branch'), 'visible' => Yii::app()->user->checkAccess('branch.Branch.*'), 'url' => array('/admin/branch/branch/create')),
            )),

        array('label' => Yii::t('admin', 'Governorates'), 'visible' => Yii::app()->user->checkAccess('governorate.Governorate.*'), 'url' => '#', 'active' => $route == 'admin/governorate', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Governorate'), 'visible' => Yii::app()->user->checkAccess('governorate.Governorate.*'), 'url' => array('/admin/governorate/governorate/admin')),
                array('label' => Yii::t('admin', 'Create Governorate'), 'visible' => Yii::app()->user->checkAccess('governorate.Governorate.*'), 'url' => array('/admin/governorate/governorate/create')),
            )),

        array('label' => Yii::t('admin', 'Area'), 'visible' => Yii::app()->user->checkAccess('area.Area.*'), 'url' => '#', 'active' => $route == 'admin/area', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Area'), 'visible' => Yii::app()->user->checkAccess('area.Area.*'), 'url' => array('/admin/area/area/admin')),
                array('label' => Yii::t('admin', 'Create Area'), 'visible' => Yii::app()->user->checkAccess('area.Area.*'), 'url' => array('/admin/area/area/create')),
            )),


        array('label' => Yii::t('admin', 'Log'), 'visible' => Yii::app()->user->checkAccess('Admin.Log.*'), 'url' => '#', 'active' => $route == 'admin/log', 'items' => array(
                array('label' => Yii::t('admin', 'Manage log'), 'visible' => Yii::app()->user->checkAccess('Admin.Log.*'), 'url' => array('/admin/log/admin')),
                // array('label' => Yii::t('admin', 'Create Person'), 'visible' => Yii::app()->user->checkAccess('Log.Log.*'), 'url' => array('/admin/log/log/create')),
            )),



        array('label' => Yii::t('admin', 'Video'), 'visible' => Yii::app()->user->checkAccess('Video.Video.*'), 'url' => '#', 'active' => $route == 'admin/video', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Video Categories'), 'visible' => Yii::app()->user->checkAccess('Video.VideoCategory.*'), 'url' => array('/admin/video/videoCategory/admin')),
                array('label' => Yii::t('admin', 'Create Video Categories'), 'visible' => Yii::app()->user->checkAccess('Video.VideoCategory.*'), 'url' => array('/admin/video/videoCategory/create')),
                
                array('label' => Yii::t('admin', 'Manage Videos'), 'visible' => Yii::app()->user->checkAccess('Video.Video.*'), 'url' => array('/admin/video/video/admin')),
                array('label' => Yii::t('admin', 'Create Videos'), 'visible' => Yii::app()->user->checkAccess('Video.Video.*'), 'url' => array('/admin/video/video/create')),
            )),

        array('label' => Yii::t('admin', 'Certificates'), 'visible' => Yii::app()->user->checkAccess('Certificates.Certificates.*'), 'url' => '#', 'active' => $moduleID == 'admin/certificates', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Certificates'), 'visible' => Yii::app()->user->checkAccess('Certificates.Certificates.*'), 'url' => array('/admin/certificates/certificates/admin')),
                array('label' => Yii::t('admin', 'Create Certificates'), 'visible' => Yii::app()->user->checkAccess('Certificates.Certificates.*'), 'url' => array('/admin/certificates/certificates/create')),
            )),








            ///////////////////////////////////////////////
        // array('label' => Yii::t('admin', 'Newsletter'), 'visible' => Yii::app()->user->checkAccess('Admin.Newsletter.*'), 'url' => '#', 'active' => $moduleID == 'admin/fnewsletter', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Newsletter'), 'visible' => Yii::app()->user->checkAccess('Admin.Newsletter.*'), 'url' => array('/admin/fnewsletter/newsletter/admin')),
        //         array('label' => Yii::t('admin', 'Create Newsletter'), 'visible' => Yii::app()->user->checkAccess('Admin.Newsletter.*'), 'url' => array('/admin/fnewsletter/newsletter/create')),
        //         array('label' => Yii::t('admin', 'Manage Newsletter Subscribers'), 'visible' => Yii::app()->user->checkAccess('Admin.NewsletterSubscriber.*'), 'url' => array('/admin/fnewsletter/newsletterSubscriber/admin')),
        //         array('label' => Yii::t('admin', 'Add Newsletter Subscriber'), 'visible' => Yii::app()->user->checkAccess('Admin.NewsletterSubscriber.*'), 'url' => array('/admin/fnewsletter/newsletterSubscriber/create')),
        //     )),
        array('label' => Yii::t('admin', 'Rights'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => '#', 'active' => $moduleID == 'admin/rights', 'items' => array(
                array('label' => Yii::t('admin', 'Assignments'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/assignment/view')),
                array('label' => Yii::t('admin', 'Roles'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/roles')),
                array('label' => Yii::t('admin', 'Create Role'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/create', 'type' => 2)),
                array('label' => Yii::t('admin', 'Permissions'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/permissions')),
                array('label' => Yii::t('admin', 'Tasks'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/tasks')),
                array('label' => Yii::t('admin', 'Create Task'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/create', 'type' => 1)),
                array('label' => Yii::t('admin', 'Operations'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/operations')),
                array('label' => Yii::t('admin', 'Create Operation'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/create', 'type' => 0)),
                array('label' => Yii::t('admin', 'Generate items for controller actions'), 'visible' => Yii::app()->user->checkAccess('Admin'), 'url' => array('/admin/rights/authItem/generate')),
            ),
        ),
        array('label' => Yii::t('admin', 'Users'), 'visible' => Yii::app()->user->checkAccess('User.Admin.*'), 'url' => '#', 'active' => $moduleID == 'admin/user', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Users'), 'visible' => Yii::app()->user->checkAccess('User.Admin.*'), 'url' => array('/admin/user/admin/admin')),
                array('label' => Yii::t('admin', 'Create User'), 'visible' => Yii::app()->user->checkAccess('User.Admin.*'), 'url' => array('/admin/user/admin/create')),
                // array('label' => Yii::t('admin', 'Manage Profile Fields'), 'visible' => Yii::app()->user->checkAccess('User.ProfileField.*'), 'url' => array('/admin/user/profileField/admin')),
                // array('label' => Yii::t('admin', 'Create Profile Field'), 'visible' => Yii::app()->user->checkAccess('User.ProfileField.*'), 'url' => array('/admin/user/profileField/create')),
            )),
        array('label' => Yii::t('admin', 'Translation'), 'visible' => Yii::app()->user->checkAccess('Fmessage.Locale.*'), 'url' => '#', 'active' => $moduleID == 'admin/fmessage', 'items' => array(
                array('label' => Yii::t('admin', 'Manage Translation'), 'visible' => Yii::app()->user->checkAccess('Fmessage.SourceMessage.*'), 'url' => array('/admin/fmessage/sourceMessage/admin')),
                array('label' => Yii::t('admin', 'Create Message'), 'visible' => Yii::app()->user->checkAccess('Fmessage.SourceMessage.*'), 'url' => array('/admin/fmessage/sourceMessage/create')),
                array('label' => Yii::t('admin', 'Translated Messages'), 'visible' => Yii::app()->user->checkAccess('Fmessage.Message.*'), 'url' => array('/admin/fmessage/message/admin')),
                array('label' => Yii::t('admin', 'New Translation Language'), 'visible' => Yii::app()->user->checkAccess('Fmessage.Message.*'), 'url' => array('/admin/fmessage/message/createLanguage')),
                array('label' => Yii::t('admin', 'Site Languages'), 'visible' => Yii::app()->user->checkAccess('Fmessage.Locale.*'), 'url' => array('/admin/fmessage/locale/admin'))
            ),
        ),
        // array('label' => Yii::t('admin', 'Polls'), 'visible' => Yii::app()->user->checkAccess('Poll.Poll.*'), 'url' => '#', 'active' => $moduleID == 'admin/poll', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Polls'), 'visible' => Yii::app()->user->checkAccess('Poll.Poll.*'), 'url' => array('/admin/poll/poll/admin')),
        //         array('label' => Yii::t('admin', 'Create Poll'), 'visible' => Yii::app()->user->checkAccess('Poll.Poll.*'), 'url' => array('/admin/poll/poll/create')),
        //     )),


        array('label' => Yii::t('admin', 'Suggestion'), 'visible' => Yii::app()->user->checkAccess('Suggestions.Suggestions.*'), 'url' => '#', 'active' => $moduleID == 'admin/suggestions', 'items' => array(
                array('label' => Yii::t('admin', 'View Suggestions'), 'visible' => Yii::app()->user->checkAccess('Suggestions.Suggestions.*'), 'url' => array('/admin/suggestions/Suggestions/admin')),
                // array('label' => Yii::t('admin', 'Create Questionnaire'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.Questionnaire.*'), 'url' => array('/admin/questionnaire/questionnaire/create')),
                // array('label' => Yii::t('admin', 'Result Questionnaire'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.QuestionnaireAnswer.*'), 'url' => array('/admin/questionnaire/questionnaireAnswer/admin')),
            )),

             array('label' => Yii::t('admin', 'Related'), 'visible' => Yii::app()->user->checkAccess('Related.Related.*'), 'url' => '#', 'active' => $moduleID == 'admin/related', 'items' => array(
                array('label' => Yii::t('admin', 'View Related'), 'visible' => Yii::app()->user->checkAccess('Related.Related.*'), 'url' => array('/admin/related/Related/admin')),
                array('label' => Yii::t('admin', 'Create Related'), 'visible' => Yii::app()->user->checkAccess('Related.Related.*'), 'url' => array('/admin/related/Related/create')),
                // array('label' => Yii::t('admin', 'Create Questionnaire'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.Questionnaire.*'), 'url' => array('/admin/questionnaire/questionnaire/create')),
                // array('label' => Yii::t('admin', 'Result Questionnaire'), 'visible' => Yii::app()->user->checkAccess('Questionnaire.QuestionnaireAnswer.*'), 'url' => array('/admin/questionnaire/questionnaireAnswer/admin')),
            )),

        array('label' => Yii::t('admin', 'Options'), 'url' => '#', 'active' => $route == 'admin/option', 'visible' => Yii::app()->user->checkAccess('Admin.Option.*'), 'items' => array(
                array('label' => Yii::t('admin', 'Manage Options'), 'visible' => Yii::app()->user->checkAccess('Admin.Option.*'), 'url' => array('/admin/option/admin')),
                array('label' => Yii::t('admin', 'Create Option'), 'visible' => Yii::app()->user->checkAccess('Admin.Option.*'), 'url' => array('/admin/option/create')),
            )),

            
        array('label' => Yii::t('admin', 'FAQ'), 'visible' => Yii::app()->user->checkAccess('FAQ.Faq.*'), 'url' => '#', 'active' => $route == 'admin/FAQ', 'items' => array(
            array('label' => Yii::t('admin', 'Manage FAQ'), 'visible' => Yii::app()->user->checkAccess('FAQ.Faq.*'), 'url' => array('/admin/FAQ/Faq/admin')),
            array('label' => Yii::t('admin', 'Create FAQ'), 'visible' => Yii::app()->user->checkAccess('FAQ.Faq.*'), 'url' => array('/admin/FAQ/Faq/create')),
            )),



        // array('label' => Yii::t('admin', 'Comments'), 'visible' => Yii::app()->user->checkAccess('Admin.Comment.*'), 'url' => '#', 'active' => $route == 'admin/comment', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Comments'), 'visible' => Yii::app()->user->checkAccess('Admin.Comment.*'), 'url' => array('/admin/comment/admin')),
        //     )),
        // array('label' => Yii::t('admin', 'Google Maps'), 'visible' => Yii::app()->user->checkAccess('GoogleMaps.GoogleMap.*'), 'url' => '#', 'active' => $moduleID == 'admin/googleMaps', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Google Maps'), 'visible' => Yii::app()->user->checkAccess('GoogleMaps.GoogleMap.*'), 'url' => array('/admin/googleMaps/googleMap/admin')),
        //         array('label' => Yii::t('admin', 'Create Google Map'), 'visible' => Yii::app()->user->checkAccess('GoogleMaps.GoogleMap.*'), 'url' => array('/admin/googleMaps/googleMap/create')),
        //     ),
        // ),
        // array('label' => Yii::t('admin', 'Widgets'), 'visible' => Yii::app()->user->checkAccess('Widgets.Widget.*'), 'url' => '#', 'active' => $moduleID == 'admin/widgets', 'items' => array(
        //         array('label' => Yii::t('admin', 'Manage Widgets'), 'visible' => Yii::app()->user->checkAccess('Widgets.Widget.*'), 'url' => array('/admin/widgets/widget/admin')),
        //         array('label' => Yii::t('admin', 'Create Widget'), 'visible' => Yii::app()->user->checkAccess('Widgets.Widget.*'), 'url' => array('/admin/widgets/widget/create')),
        //         array('label' => Yii::t('admin', 'Manage Widgets Instances'), 'visible' => Yii::app()->user->checkAccess('Widgets.WidgetInstance.*'), 'url' => array('/admin/widgets/widgetInstance/admin')),
        //         array('label' => Yii::t('admin', 'Create Widget Instance'), 'visible' => Yii::app()->user->checkAccess('Widgets.WidgetInstance.*'), 'url' => array('/admin/widgets/widgetInstance/create')),
        //     ),
        // ),
//        array('url' => Yii::app()->getModule('admin')->getModule('user')->loginUrl, 'label' => Yii::app()->getModule('admin')->getModule('user')->t("Login"), 'visible' => Yii::app()->user->isGuest),
//        array('url' => Yii::app()->getModule('admin')->getModule('user')->registrationUrl, 'label' => Yii::app()->getModule('admin')->getModule('user')->t("Register"), 'visible' => Yii::app()->user->isGuest),
//        array('url' => Yii::app()->getModule('admin')->getModule('user')->profileUrl, 'label' => Yii::app()->getModule('admin')->getModule('user')->t("Profile"), 'visible' => !Yii::app()->user->isGuest),
//        array('url' => Yii::app()->getModule('admin')->getModule('user')->logoutUrl, 'label' => Yii::app()->getModule('admin')->getModule('user')->t("Logout") . ' (' . Yii::app()->user->name . ')', 'visible' => !Yii::app()->user->isGuest),
    );
    foreach ($items as &$value) {
        if (isset($value["items"])) {
            if (isset($value["label"])) {
                $value["label"].="<b class=\"arrow icon-angle-down\"></b>";
                $value["linkOptions"] = array_merge(isset($value["htmlOptions"]) ? $value["htmlOptions"] : array(), array(
                    "class" => "dropdown-toggle",
                    "data-toggle" => "dropdown",
                ));
            }
            foreach ($value["items"] as &$item) {
                if (isset($item["label"])) {
                    $item["label"] = "<i class=\"icon-double-angle-right\"></i>" . $item["label"];
                }
            }
        }
    }
    $this->widget('zii.widget.CMenu', array(
        'htmlOptions' => array(
            'class' => 'nav nav-list',
        ),
        'activeCssClass' => 'active open',
        'submenuHtmlOptions' => array('class' => 'submenu'),
        'encodeLabel' => false,
        'items' => $items,
            )
    );
}
?>