コード例 #1
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('localisation::abcs.title.abcs'), function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->authorize();
             $item->item(trans('localisation::countries.title.countries'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.localisation.country.create');
                 $item->route('admin.localisation.country.index');
                 $item->authorize($this->auth->hasAccess('localisation.countries.index'));
             });
             $item->item(trans('localisation::zones.title.zones'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(1);
                 $item->append('admin.localisation.zone.create');
                 $item->route('admin.localisation.zone.index');
                 $item->authorize($this->auth->hasAccess('localisation.zones.index'));
             });
             // append
         });
     });
     return $menu;
 }
コード例 #2
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item('Knowledgebase', function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->authorize();
             $item->item(trans('knowledgebase::articles.title.articles'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.knowledgebase.article.create');
                 $item->route('admin.knowledgebase.article.index');
                 $item->authorize($this->auth->hasAccess('knowledgebase.articles.index'));
             });
             $item->item(trans('knowledgebase::categories.title.categories'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.knowledgebase.category.create');
                 $item->route('admin.knowledgebase.category.index');
                 $item->authorize($this->auth->hasAccess('knowledgebase.categories.index'));
             });
             // append
         });
     });
     return $menu;
 }
コード例 #3
0
ファイル: SidebarExtender.php プロジェクト: mahmouddev/Blog
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('blog::blog.title'), function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(0);
             $item->item(trans('blog::post.title.post'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.blog.post.create');
                 $item->route('admin.blog.post.index');
                 $item->authorize($this->auth->hasAccess('blog.posts.index'));
             });
             $item->item(trans('blog::tag.title.tag'), function (Item $item) {
                 $item->icon('fa fa-tags');
                 $item->weight(0);
                 $item->append('admin.blog.tag.create');
                 $item->route('admin.blog.tag.index');
                 $item->authorize($this->auth->hasAccess('blog.tags.index'));
             });
             $item->item(trans('blog::category.title.category'), function (Item $item) {
                 $item->icon('fa fa-file-text');
                 $item->weight(1);
                 $item->route('admin.blog.category.index');
                 $item->append('admin.blog.category.create');
                 $item->authorize($this->auth->hasAccess('blog.categories.index'));
             });
             $item->authorize($this->auth->hasAccess('blog.tags.index') || $this->auth->hasAccess('blog.posts.index') || $this->auth->hasAccess('blog.categories.index'));
         });
     });
     return $menu;
 }
コード例 #4
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item('Staff', function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->authorize();
             $item->item(trans('staff::departments.title.departments'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.staff.department.create');
                 $item->route('admin.staff.department.index');
                 $item->authorize($this->auth->hasAccess('staff.departments.index'));
             });
             $item->item(trans('staff::employees.title.employees'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.staff.employee.create');
                 $item->route('admin.staff.employee.index');
                 $item->authorize($this->auth->hasAccess('staff.employees.index'));
             });
             // append
         });
     });
     return $menu;
 }
コード例 #5
0
ファイル: SidebarExtender.php プロジェクト: ruscon/Workshop
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('workshop::workshop.title'), function (Group $group) {
         $group->weight(100);
         $group->item(trans('workshop::workshop.modules'), function (Item $item) {
             $item->icon('fa fa-cogs');
             $item->weight(100);
             $item->route('admin.workshop.modules.index');
             $item->authorize($this->auth->hasAccess('workshop.modules.index'));
         });
         $group->item(trans('workshop::workshop.themes'), function (Item $item) {
             $item->icon('fa fa-cogs');
             $item->weight(101);
             $item->route('admin.workshop.themes.index');
             $item->authorize($this->auth->hasAccess('workshop.themes.index'));
         });
         //            $group->item(trans('workshop::workshop.title'), function (Item $item) {
         //                $item->weight(100);
         //                $item->authorize(
         //                    $this->auth->hasAccess('workshop.modules.index') or $this->auth->hasAccess('workshop.themes.index')
         //                );
         //                $item->item(trans('workshop::workshop.modules'), function (Item $item) {
         //                    $item->icon('fa fa-cogs');
         //                    $item->weight(100);
         //                    $item->route('admin.workshop.modules.index');
         //                    $item->authorize(
         //                        $this->auth->hasAccess('workshop.modules.index')
         //                    );
         //                });
         //            });
     });
     return $menu;
 }
コード例 #6
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item('Customers', function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->authorize();
             $item->item(trans('customers::companies.title.companies'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.customers.company.create');
                 $item->route('admin.customers.company.index');
                 $item->authorize($this->auth->hasAccess('customers.companies.index'));
             });
             $item->item(trans('customers::members.title.members'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.customers.member.create');
                 $item->route('admin.customers.member.index');
                 $item->authorize($this->auth->hasAccess('customers.members.index'));
             });
             // append
         });
     });
     return $menu;
 }
コード例 #7
0
ファイル: AdminSidebar.php プロジェクト: SocietyCMS/Core
 /**
  * Build your sidebar implementation here.
  */
 public function build()
 {
     foreach ($this->modules->enabled() as $module) {
         $name = studly_case($module->getName());
         $class = 'Modules\\' . $name . '\\MenuExtenders\\SidebarExtender';
         if (class_exists($class)) {
             $extender = $this->container->make($class);
             $this->menu->add($extender->extendWith($this->menu));
         }
     }
 }
コード例 #8
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.collaboration'), function (Group $group) {
         $group->weight(12);
         $group->item(trans('documents::module.title'), function (Item $item) {
             $item->route('backend::documents.documents.index');
             $item->authorize($this->auth->can('documents::access-documents'));
         });
     });
     return $menu;
 }
コード例 #9
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $container = m::mock('Illuminate\\Contracts\\Container\\Container');
     $group = new DefaultGroup($container);
     $group->name('new from extender');
     $menu->addGroup($group);
     $group = new DefaultGroup($container);
     $group->name('original');
     $menu->addGroup($group);
     return $menu;
 }
コード例 #10
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Setting
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('workshop::workshop.title'), function (Group $group) {
         $group->item(trans('setting::settings.title.settings'), function (Item $item) {
             $item->icon('fa fa-cog');
             $item->weight(50);
             $item->route('admin.setting.settings.index');
             $item->authorize($this->auth->hasAccess('setting.settings.index'));
         });
     });
     return $menu;
 }
コード例 #11
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Website
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('entry::entries.title.entries'), function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(0);
             $item->route('admin.entry.entry.index');
             $item->authorize(true);
         });
     });
     return $menu;
 }
コード例 #12
0
ファイル: SidebarExtender.php プロジェクト: bitsoflove/Site
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group('Content', function (Group $group) {
         $group->item(trans('Sites'), function (Item $item) {
             $item->icon('fa fa-sitemap');
             $item->weight(0);
             $item->route('admin.site.site.index');
             $item->authorize($this->auth->hasAccess('site.sites.index'));
         });
     });
     return $menu;
 }
コード例 #13
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->weight(10);
         $group->item(trans('calendar::calendar.title.calendar'), function (Item $item) {
             $item->weight(10);
             $item->route('backend::calendar.calendar.index');
             $item->authorize($this->auth->can('calendar::manage-calendar'));
         });
     });
     return $menu;
 }
コード例 #14
0
ファイル: SidebarExtender.php プロジェクト: codewithtony/tags
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('tags::tag.title.tags'), function (Item $item) {
             $item->weight(2);
             $item->icon('fa fa-tags');
             $item->route('admin.tags.tag.index');
             $item->authorize($this->auth->hasAccess('tags.tags.index'));
         });
     });
     return $menu;
 }
コード例 #15
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Website
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item('Documentation', function (Item $item) {
             $item->icon('fa fa-files-o');
             $item->weight(0);
             $item->route('admin.docs.index');
             $item->authorize(true);
         });
     });
     return $menu;
 }
コード例 #16
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.workshop'), function (Group $group) {
         $group->weight(20);
         $group->item(trans('setting::module.title'), function (Item $item) {
             $item->weight(10);
             $item->icon('fa fa-gear');
             $item->route('backend::setting.settings.index');
             $item->authorize($this->auth->can('setting::manage-setting'));
         });
     });
     return $menu;
 }
コード例 #17
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Website
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('gallery::galleries.title.galleries'), function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->append('admin.gallery.gallery.create');
             $item->route('admin.gallery.gallery.index');
             $item->authorize($this->auth->hasAccess('gallery.galleries.index'));
         });
     });
     return $menu;
 }
コード例 #18
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Menu
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->weight(90);
         $group->item(trans('menu::menu.title'), function (Item $item) {
             $item->weight(3);
             $item->icon('fa fa-bars');
             $item->route('admin.menu.menu.index');
             $item->authorize($this->auth->hasAccess('menu.menus.index'));
         });
     });
     return $menu;
 }
コード例 #19
0
ファイル: SidebarExtender.php プロジェクト: SocietyCMS/Page
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->weight(10);
         $group->item(trans('page::module.title'), function (Item $item) {
             $item->weight(12);
             $item->icon('fa fa-file');
             $item->route('backend::page.pages.index');
             $item->authorize($this->auth->can('page::manage-page'));
         });
     });
     return $menu;
 }
コード例 #20
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->weight(10);
         $group->item(trans('gallery::module.title'), function (Item $item) {
             $item->weight(20);
             $item->icon('fa fa-picture-o');
             $item->route('backend::gallery.gallery.index');
             $item->authorize($this->auth->can('gallery::manage-gallery'));
         });
     });
     return $menu;
 }
コード例 #21
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('dynamicfield::dynamicfield.title.dynamicfield'), function (Item $item) {
             $item->icon('fa fa-cubes');
             $item->weight(50);
             $item->append('admin.dynamicfield.group.create');
             $item->route('admin.dynamicfield.group.index');
             $item->authorize($this->auth->hasAccess('dynamicfield.group.index'));
         });
     });
     return $menu;
 }
コード例 #22
0
ファイル: SidebarExtender.php プロジェクト: WellCoded/website
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item('Podcasts', function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->append('admin.podcast.podcast.create');
             $item->route('admin.podcast.podcast.index');
             $item->authorize($this->auth->hasAccess('podcast.podcasts.index'));
         });
     });
     return $menu;
 }
コード例 #23
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Dashboard
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('dashboard::dashboard.name'), function (Group $group) {
         $group->weight(0);
         $group->hideHeading();
         $group->item(trans('dashboard::dashboard.name'), function (Item $item) {
             $item->icon('fa fa-dashboard');
             $item->route('dashboard.index');
             $item->isActiveWhen(route('dashboard.index', null, false));
             $item->authorize($this->auth->hasAccess('dashboard.index'));
         });
     });
     return $menu;
 }
コード例 #24
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Block
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('block::blocks.title.blocks'), function (Item $item) {
             $item->authorize($this->auth->hasAccess('block.blocks.index'));
             $item->icon('fa fa-cube');
             $item->weight(0);
             $item->append('admin.block.block.create');
             $item->route('admin.block.block.index');
             $item->authorize($this->auth->hasAccess('block.blocks.index'));
         });
     });
     return $menu;
 }
コード例 #25
0
 /**
  * Build your sidebar implementation here
  */
 public function build()
 {
     $sidebars = array_merge($this->config->get('administr.modules'), $this->config->get('administr.sidebars'));
     foreach ($sidebars as $module) {
         $class = studly_case($module);
         if (!class_exists($class)) {
             $class = "Administr\\{$class}\\SidebarExtender";
         }
         if (!class_exists($class)) {
             continue;
         }
         $extender = $this->app->make($class);
         $this->menu->add($extender->extendWith($this->menu));
     }
 }
コード例 #26
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     if (false === config('asgard.translation.config.translations-gui')) {
         return $menu;
     }
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('translation::translations.title.translations'), function (Item $item) {
             $item->icon('fa fa-globe');
             $item->weight(10);
             $item->route('admin.translation.translation.index');
             $item->authorize($this->auth->hasAccess('translation.translations.index'));
         });
     });
     return $menu;
 }
コード例 #27
0
ファイル: SidebarExtender.php プロジェクト: Houbsi/Page
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('page::pages.title.pages'), function (Item $item) {
             $item->icon('fa fa-file');
             $item->weight(1);
             $item->route('admin.page.page.index');
             $item->badge(function (Badge $badge, PageRepository $page) {
                 $badge->setClass('bg-green');
                 $badge->setValue($page->countAll());
             });
             $item->authorize($this->auth->hasAccess('page.pages.index'));
         });
     });
     return $menu;
 }
コード例 #28
0
ファイル: SidebarExtender.php プロジェクト: SocietyCMS/User
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.workshop'), function (Group $group) {
         $group->weight(20);
         $group->item(trans('user::users.title.users'), function (Item $item) {
             $item->weight(0);
             $item->icon('fa fa-user');
             $item->route('backend::user.user.index');
             $item->authorize($this->auth->can('user::manage-user'));
         });
         $group->item(trans('user::roles.title.roles'), function (Item $item) {
             $item->weight(1);
             $item->icon('fa fa-users');
             $item->route('backend::user.role.index');
             $item->authorize($this->auth->can('user::manage-role'));
         });
     });
     return $menu;
 }
コード例 #29
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('core::sidebar.content'), function (Group $group) {
         $group->item(trans('jorocustommodule::abcs.title.abcs'), function (Item $item) {
             $item->icon('fa fa-copy');
             $item->weight(10);
             $item->authorize();
             $item->item(trans('jorocustommodule::jcms.title.jcms'), function (Item $item) {
                 $item->icon('fa fa-copy');
                 $item->weight(0);
                 $item->append('admin.jorocustommodule.jcm.create');
                 $item->route('admin.jorocustommodule.jcm.index');
                 $item->authorize($this->auth->hasAccess('jorocustommodule.jcms.index'));
             });
             // append
         });
     });
     return $menu;
 }
コード例 #30
0
 /**
  * @param Menu $menu
  *
  * @return Menu
  */
 public function extendWith(Menu $menu)
 {
     $menu->group(trans('elegant::elegant.title.main'), function (Group $group) {
         foreach ($this->navigation->getNavigation() as $navItem) {
             $group->item(str_plural(class_basename($navItem['class_name'])), function (Item $item) use(&$navItem) {
                 $item->icon('fa fa-book');
                 $item->weight(45);
                 $item->route('admin.elegant.elegant.index', ['elegant_model' => $navItem['slug']]);
                 $item->authorize($this->auth->hasAccess("elegant.{$navItem['slug']}.index"));
                 unset($navItem);
             });
         }
         $group->item(trans('elegant::modelsettings.title.modelsettings'), function (Item $item) {
             $item->icon('fa fa-cog');
             $item->weight(50);
             $item->route('admin.elegant.modelsettings.index');
             $item->authorize($this->auth->hasAccess('elegant.modelsettings.index'));
         });
     });
     return $menu;
 }