コード例 #1
0
ファイル: admin_menu.php プロジェクト: Cheren/union
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Lib\Nav;
//  Global menus navigation.
Nav::add('sidebar', 'extensions.children.modules', ['title' => __d('modules', 'Modules'), 'weight' => 2, 'url' => ['plugin' => 'Union/modules', 'controller' => 'Modules', 'action' => 'index']]);
コード例 #2
0
ファイル: admin_menu.php プロジェクト: Cheren/union
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @coder           Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Lib\Nav;
use Union\Core\Lib\Plugin;
//  Global menus navigation.
Nav::add('sidebar', 'users', ['title' => __d('community', 'Users'), 'icon' => 'group', 'weight' => 10, 'children' => ['roles' => ['title' => __d('community', 'Roles'), 'weight' => 0, 'url' => ['plugin' => 'Union/Community', 'controller' => 'Roles', 'action' => 'index']], 'users' => ['title' => __d('community', 'Users'), 'weight' => 0, 'url' => ['plugin' => 'Union/Community', 'controller' => 'Users', 'action' => 'index']], 'settings' => ['title' => __d('community', 'Settings'), 'weight' => 0, 'icon' => 'cog', 'url' => ['plugin' => 'Union/Extensions', 'controller' => 'Plugins', 'action' => 'config', Plugin::nameToAlias('Union/Community')]]]]);
コード例 #3
0
ファイル: admin_menu.php プロジェクト: Cheren/union
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @coder           Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Lib\Nav;
use Union\Core\Lib\Plugin;
//  Global menus navigation.
Nav::add('sidebar', 'system', ['title' => __d('union', 'System'), 'weight' => 0, 'icon' => 'home', 'children' => ['general_settings' => ['title' => __d('union', 'General settings'), 'weight' => 0, 'url' => ['plugin' => 'Union/Extensions', 'controller' => 'Plugins', 'action' => 'config', Plugin::nameToAlias('Union/Core')]]]]);
コード例 #4
0
ファイル: MenuComponent.php プロジェクト: Cheren/union
 /**
  * Setup menus admin links.
  *
  * @return void
  */
 private function __adminPanelLinks()
 {
     $cacheKey = 'menus_for_admin_layout';
     $menus = $this->_LinksTable->Menus->find('all')->cache($cacheKey, 'menus');
     $view = $this->_controller->createView();
     $homeLink = Cache::read('home_link', 'home_link');
     if (!$homeLink) {
         $homeLink = $this->_LinksTable->find()->where(['home' => PUBLISH_STATUS])->first();
         Cache::write('home_link', $homeLink, 'home_link');
     }
     foreach ($menus as $menu) {
         $linkCount = $view->Admin->badge((int) $menu->link_count, ['type' => 'success']);
         $menuLinks = ['plugin' => 'Union/Menus', 'controller' => 'Links', 'action' => 'index', '?' => ['menu_id' => $menu->id]];
         $before = null;
         if ($homeLink->get('menu_id') == $menu->id) {
             $before = '<i class="fa fa-home um-home-menu"></i>';
         }
         Nav::add('sidebar', 'menus.children.menu_id_' . $menu->id, ['before' => $before, 'title' => $menu->title, 'weight' => 2, 'after' => $linkCount, 'url' => $menuLinks]);
     }
 }
コード例 #5
0
ファイル: UserComponent.php プロジェクト: Cheren/union
 /**
  * Create admin user menu.
  *
  * @return void
  */
 private function __userAdminNavBar()
 {
     $userNav = ['title' => __d('community', 'Hello, {0}', $this->_controller->Auth->user('username')), 'weight' => 10, 'liClass' => 'light-blue', 'children' => ['profile' => ['title' => __d('community', 'My profile'), 'weight' => 10, 'icon' => 'user', 'url' => ['plugin' => $this->plugin, 'controller' => 'Users', 'action' => 'edit', $this->_controller->Auth->user('id')]], 'separator' => ['divider' => true, 'weight' => 20], 'logout' => ['title' => __d('community', 'Logout'), 'icon' => 'power-off', 'weight' => 50, 'url' => ['plugin' => $this->plugin, 'controller' => 'Users', 'action' => 'logout']]]];
     Nav::add('user-nav', 'user-nav', $userNav);
 }
コード例 #6
0
ファイル: admin_menu.php プロジェクト: Cheren/union
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Lib\Nav;
//  Global menus navigation.
Nav::add('sidebar', 'menus', ['title' => __d('menus', 'Menus'), 'icon' => 'list', 'weight' => 10, 'children' => ['list_menu' => ['title' => __d('menus', 'List menu'), 'weight' => 0, 'url' => ['plugin' => 'Union/Menus', 'controller' => 'Menus', 'action' => 'index']]]]);
コード例 #7
0
ファイル: admin_menu.php プロジェクト: Cheren/union
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Lib\Nav;
//  Global menus navigation.
Nav::add('sidebar', 'extensions', ['title' => __d('extensions', 'Extensions manager'), 'icon' => 'magic', 'weight' => 30, 'children' => ['plugins' => ['title' => __d('extensions', 'Plugins'), 'weight' => 0, 'url' => ['plugin' => 'Union/Extensions', 'controller' => 'Plugins', 'action' => 'index']], 'themes' => ['title' => __d('extensions', 'Themes'), 'weight' => 1, 'url' => ['plugin' => 'Union/Extensions', 'controller' => 'Themes', 'action' => 'index']]]]);
コード例 #8
0
ファイル: admin_menu.php プロジェクト: Cheren/union
<?php

/**
 * This is a simple content management system based on CakePHP.
 *
 * @version         1.0.x
 * @copyright       Copyright (C) by cool-code.ru
 * @license         http://www.opensource.org/licenses/mit-license.php MIT License
 * @author          Segrey Kalistratov <*****@*****.**>
 */
use Union\Core\Lib\Nav;
//  Global menus navigation.
Nav::add('sidebar', 'file_manager', ['title' => __d('file_manager', 'File manager'), 'icon' => 'folder', 'weight' => 40, 'children' => ['browse' => ['title' => __d('file_manager', 'Browse'), 'weight' => 0, 'url' => ['plugin' => 'Union/FileManager', 'controller' => 'Manager', 'action' => 'browse']]]]);