Repository URL to install this package:
|
Version:
0.0.1-0 ▾
|
zendcddemo-apps-gotcms-project
/
zendcddemo-files
/
apps
/
gotcms_project
/
module
/
Development
/
views
/
development-menu.phtml
|
|---|
<?php
/**
* This source file is part of GotCms.
*
* GotCms 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 3 of the License, or
* (at your option) any later version.
*
* GotCms is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along
* with GotCms. If not, see <http://www.gnu.org/licenses/lgpl-3.0.html>.
*
* PHP Version >=5.3
*
* @category Gc
* @package Development
* @subpackage Design
* @author Pierre Rambaud (GoT) <pierre.rambaud86@gmail.com>
* @license GNU/LGPL http://www.gnu.org/licenses/lgpl-3.0.html
* @link http://www.got-cms.com
*/
/** @var $this \Zend\View\Renderer\PhpRenderer */
?>
<?php $controller = empty($this->layout()->routeParams['controller']) ? null : $this->layout()->routeParams['controller']; ?>
<?php $action = empty($this->layout()->routeParams['action']) ? null : $this->layout()->routeParams['action']; ?>
<?php
$pages = array(
array(
'type' => 'document-type',
'controller' => 'DocumentTypeController',
'title' => 'Document types',
'icon' => 'glyphicon-road',
),
array(
'type' => 'view',
'controller' => 'ViewController',
'title' => 'Views',
'icon' => 'glyphicon-tags',
),
array(
'type' => 'layout',
'controller' => 'LayoutController',
'title' => 'Layouts',
'icon' => 'glyphicon-screenshot',
),
array(
'type' => 'script',
'controller' => 'ScriptController',
'title' => 'Scripts',
'icon' => 'glyphicon-qrcode',
),
array(
'type' => 'datatype',
'controller' => 'DatatypeController',
'title' => 'Datatypes',
'icon' => 'glyphicon-hdd',
),
);
?>
<ul class="nav nav-list">
<?php foreach ($pages as $page): ?>
<?php if ($this->acl('development', $page['type'])): ?>
<li<?php if ($controller === $page['controller']): ?> class="open active"<?php endif; ?>>
<a class="menu-toggle" href="#">
<i class="glyphicon <?php echo $page['icon']; ?>"></i>
<span class="menu-text"><?php echo $this->escapeHtml($this->translate($page['title'])); ?></span>
<span class="caret"></span>
</a>
<ul class="submenu">
<?php if ($this->acl('development', $page['type'] . '/create')): ?>
<li<?php if ($controller === $page['controller'] and $action === 'create'): ?> class="active"<?php endif; ?>>
<a href="<?php echo $this->url('development/' . $page['type'] . '/create'); ?>">
<i class="glyphicon glyphicon-arrow-right"></i>
<?php echo $this->escapeHtml($this->translate('Create')); ?>
</a>
</li>
<?php endif; ?>
<?php if ($this->acl('development', $page['type'] . '/list')): ?>
<li<?php if ($controller === $page['controller'] and $action === 'index'): ?> class="active"<?php endif; ?>>
<a href="<?php echo $this->url('development/' . $page['type']); ?>">
<i class="glyphicon glyphicon-arrow-right"></i>
<?php echo $this->escapeHtml($this->translate('List')); ?>
</a>
</li>
<?php endif; ?>
</ul>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>