Exemple #1
0
<?php

/**
 * @var $this ToolController
 */
$this->pageTitle = Yii::t('dressing', 'Tools');
echo '<h2>' . t('Manage') . '</h2>';
$this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_PILLS, 'items' => SiteMenu::getItemsFromMenu('Manage', SiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Settings') . '</h2>';
$this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_PILLS, 'items' => SiteMenu::getItemsFromMenu('Settings', SiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Reports') . '</h2>';
$this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_PILLS, 'items' => SiteMenu::getItemsFromMenu('Reports', SiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Logs') . '</h2>';
$this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_PILLS, 'items' => SiteMenu::getItemsFromMenu('Logs', SiteMenu::MENU_ADMIN)));
echo '<h2>' . t('Tools') . '</h2>';
$this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_PILLS, 'items' => SiteMenu::getItemsFromMenu('Tools', SiteMenu::MENU_ADMIN)));
Exemple #2
0
<?php

/**
 * @var $this YdLookupController
 * @var $lookup YdLookup
 *
 * @author Brett O'Donnell <*****@*****.**>
 * @author Zain Ul abidin <*****@*****.**>
 * @copyright 2013 Mr PHP
 * @link https://github.com/cornernote/yii-dressing
 * @license BSD-3-Clause https://raw.github.com/cornernote/yii-dressing/master/license.txt
 */
// index
if (!isset($lookup)) {
    $this->menu = SiteMenu::getItemsFromMenu(SiteMenu::MENU_ADMIN);
    return;
    // no more links
}
$menu = array();
// create
if ($lookup->isNewRecord) {
    //$menu[] = array(
    //    'label' => Yii::t('app', 'Create'),
    //    'url' => array('/lookup/create'),
    //);
    return;
    // no more links
}
// view
$menu[] = array('label' => Yii::t('app', 'View'), 'url' => $lookup->getUrl());
// others
  | This library is free software; you can redistribute it and/or        |
  | modify it under the terms of the GNU Lesser General Public           |
  | License as published by the Free Software Foundation; either         |
  | version 2.1 of the License, or (at your option) any later version.   |
  +----------------------------------------------------------------------+
  | Author: John.meng(цот╤РШ)  2006-1-8 15:09:01                        
  +----------------------------------------------------------------------+
*/
/* $Id: SiteMenu.php,v 1.2 2006/01/15 07:02:57 arzen Exp $ */
if (empty($__Version__)) {
    echo "Big error! ";
    exit;
}
include_once "ModuleConfig.php";
include_once "SiteMenu.class.php";
$thisObj = new SiteMenu();
switch ($_REQUEST['Action']) {
    case 'UserList':
        $thisObj->viewList();
        break;
    case 'Add':
        $thisObj->opAdd();
        break;
    case 'Update':
        $thisObj->opAdd();
        break;
    case 'Cancel':
        $thisObj->opCancel();
        break;
    case 'CancelSelected':
        $thisObj->opCancelSelected();