Inheritance: extends CWebModule
Example #1
0
<?php

$this->breadcrumbs = array(Yii::t('app', MenuModule::t('Menu')) => array('/menu'), Yii::t('app', $model->name), Yii::t('app', MenuModule::t('Settings')));
$this->menu = array(array('label' => MenuModule::t('Manage Menus'), 'url' => array('/menu')), array('label' => MenuModule::t('Create New Menu'), 'url' => array('/menu/menu/create')));
?>

<h1> <?php 
echo $model->name . MenuModule::t(' Menu Settings');
?>
</h1>
<?php 
$this->renderPartial('_form', array('model' => $model));
Example #2
0
<?php

$this->breadcrumbs = array(Yii::t('app', 'Menus') => array('/menu'), Yii::t('app', 'Create'));
$this->menu = array(array('label' => MenuModule::t('Manage Menus'), 'url' => array('/menu')), array('label' => MenuModule::t('Create New Menu')));
?>

<h1> Create New Menu </h1>
<?php 
$this->renderPartial('_form', array('model' => $model, 'buttons' => 'create'));
 public function AddLink($Group, $Text, $Url, $Permission = False, $Attributes = '', $AnchorAttributes = '')
 {
     parent::AddLink($Group, $Text, $Url, $Permission, $Attributes, $AnchorAttributes);
     // Compability
     $this->_Sender->Data['Breadcrumbs'][] = array('Name' => $Text, 'Url' => $Url);
 }
Example #4
0
<?php

$this->breadcrumbs = array('Menus' => array('/' . $this->module->id), Menu::model()->findByPk($id)->name);
$this->menu = array(array('label' => MenuModule::t('Manage Menus'), 'url' => array('/menu')), array('label' => MenuModule::t('Create New Menu'), 'url' => array('/menu/menu/create')));
?>

<a class="button" href="<?php 
echo $this->createUrl('/' . $this->module->id . '/item/create/' . $id);
?>
"><?php 
echo MenuModule::t("Create New Menu Item", array(), "actions");
?>
</a>
<br/><br/>

<?php 
Yii::app()->clientScript->registerScriptFile($this->module->assetsDirectory . "/libs/json/json2.min.js");
?>

<?php 
$this->widget('application.modules.menu.extensions.ItemList', array('items' => $items, 'activeId' => $activeId));
?>

<script type="text/javascript">
    $('ol.sortable').nestedSortable({
        handle: 'div',
        helper:	'clone',
        opacity: .5,
        revert: 250,
        tolerance: 'pointer',
        toleranceElement: '> div',
Example #5
0
    <title><?php 
echo CHtml::encode($this->pageTitle);
?>
</title>
</head>
<body>

<?php 
$items = array();
foreach (array_keys($this->module->controllerMap) as $controllerName) {
    $items[] = array('label' => Yii::t('menu', ucfirst($controllerName)), 'url' => Yii::app()->getUser()->getState('index.menu' . ucfirst($controllerName), array($controllerName . '/index')), 'active' => $this->id == $controllerName);
}
$this->widget('bootstrap.widgets.TbNavbar', array('brandLabel' => $this->module->getName(), 'brandUrl' => array('/' . $this->module->id), 'items' => array(array('class' => 'bootstrap.widgets.TbNav', 'items' => $items), array('class' => 'bootstrap.widgets.TbNav', 'htmlOptions' => array('class' => 'pull-right'), 'items' => array(array('label' => Yii::app()->name, 'url' => Yii::app()->homeUrl))))));
echo CHtml::tag('div', array('class' => 'container'), $this->widget('bootstrap.widgets.TbBreadcrumb', array('links' => array_merge($this->getBreadcrumbs(), array($this->pageTitle))), true));
echo $content;
?>

<div id="footer" class="container small text-center">
    <?php 
if (Yii::app()->hasModule('audit')) {
    $this->renderPartial('audit.views.request.__footer');
    echo '<br/>';
}
echo MenuModule::powered();
echo '<br/>A product of <a href="http://mrphp.com.au">Mr PHP</a>.';
?>
</div>

</body>
</html>