/** * Change main (start or parent) breadcrumbs and/or title for this backend * constructor. * * @access protected * @since 1.2.0-dev * @version 1.2.0-dev */ protected function alterBreadcrumbsTitleMain() { // parent call parent::alterBreadcrumbsTitleMain(); // remove last breadcrumb $this->removeBreadcrumb(); // add new breadcrumb $sControllerOriginal = Router::getControllerName(); $sURL = Route::backendUrl($sControllerOriginal, 'index'); $sControllerName = strtolower($sControllerOriginal); $this->addBreadCrumb(__('section.' . $sControllerName), $sURL); }
<?php defined('PATH_ROOT') or die('No direct script access.'); return array('users' => array('parent' => 'system', 'url' => \Plethora\Route::backendUrl('user', 'list'), 'priority' => 1), 'roles_list' => array('parent' => 'system', 'url' => \Plethora\Route::backendUrl('user\\role', 'list'), 'priority' => 2), 'permission_list' => array('parent' => 'system', 'url' => \Plethora\Route::backendUrl('user\\permission', 'list'), 'priority' => 2)); /** * CHANGELOG: * 2015-01-10: Dodanie listy ról i uprawnień. */
<?php # get logged user $user = Model\User::getLoggedUser(); # register date $registerDate = $user->getRegisterDate()->format('Y-m-d'); # avatar $userImage = $user->getImageStyled(); # logout anchor $logoutHelper = \Plethora\Helper\Link::factory(); $logoutHelper->getAttributes()->addToAttribute('class', 'btn btn-default btn-flat'); $logout = $logoutHelper->code(__('Logout'), Route::factory('logout')->url()); ?> <a href="<?php echo Route::backendUrl(); ?> " class="logo"> <span class="logo-mini"><b>Pl</b></span> <span class="logo-lg"><b>Plethora</b></span> </a> <nav class="navbar navbar-static-top" role="navigation"> <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <span class="sr-only"><?php echo __('Toggle navigation'); ?> </span> </a> <div class="navbar-custom-menu">
<?php return array('i18n_list' => array('parent' => 'system', 'url' => \Plethora\Route::backendUrl('i18n', 'index'), 'priority' => 1));
<?php defined('PATH_ROOT') or die('No direct script access.'); return array('pages_add' => array('parent' => 'contents', 'url' => \Plethora\Route::backendUrl('pages', 'add'), 'priority' => 1), 'pages_list' => array('parent' => 'contents', 'url' => \Plethora\Route::backendUrl('pages', 'list'), 'priority' => 1));
<?php defined('PATH_ROOT') or die('No direct script access.'); return array('dbupdate' => array('parent' => 'system', 'url' => \Plethora\Route::backendUrl('dbupdate'), 'priority' => 2));
/** * This method generates actions in each row of the entity list. By default, * there are two actions: "edit" and "delete". * * @access protected * @since 1.0.0-alpha * @version 1.0.0-alpha */ protected function alterListActions() { $sControllerParam = Router::getParam('controller'); $this->addListOption(Route::backendUrl($sControllerParam, 'edit', '{id}'), __('edit'), 'pencil'); $this->addListOption(Route::backendUrl($sControllerParam, 'delete', '{id}'), __('delete'), 'trash'); }
/** * * @access protected * @since 1.1.3-dev, 2015-08-20 * @version 1.1.3-dev, 2015-08-20 */ protected function alterBreadcrumbsTitleMain() { parent::alterBreadcrumbsTitleMain(); $this->removeBreadcrumb(); $this->addBreadCrumb(__('Menu list'), Route::backendUrl('menu', 'list')); }
<?php return ['dashboard' => ['parent' => 'system', 'url' => \Plethora\Route::backendUrl('dashboard'), 'priority' => 1], 'run_cron' => ['parent' => 'system', 'url' => \Plethora\Route::backendUrl('cron', 'runCron'), 'priority' => 2], 'files_list' => ['parent' => 'system', 'url' => \Plethora\Route::backendUrl('files', 'list'), 'priority' => 3]];
/** * Change main (start or parent) breadcrumbs and/or title for this backend * constructor. * * @access protected * @since 1.1.3-dev, 2015-08-20 * @version 1.2.0-dev */ protected function alterBreadcrumbsTitleMain() { parent::alterBreadcrumbsTitleMain(); $this->setTitle(__('Management panel') . ' - '); $iMenuID = Router::getParam('id'); $sAction = Router::getParam('action'); if ($iMenuID === FALSE || $sAction === FALSE) { throw new Exception\Code404(); } if ($sAction === 'edit') { $oItem = DB::find('\\Model\\Menu\\Item', $iMenuID); /* @var $oItem \Model\Menu\Item */ $iMenuID = $oItem->getMenu()->getId(); } $this->removeBreadcrumb(); $this->addBreadCrumb(__('Menu list'), Route::backendUrl('menu', 'list')); $this->addBreadCrumb(__('Menu items list'), Route::backendUrl(Router::getControllerName(), 'list', $iMenuID)); }
?> <li id="object_<?php echo $data['object']->id; ?> "> <div class="content"> <span class="move glyphicon glyphicon-move"></span> <a class="glyphicon glyphicon-pencil" href="<?php echo Route::backendUrl($controller, 'edit', $data['object']->id); ?> " title="<?php echo __('edit'); ?> "></a> <a class="glyphicon glyphicon-trash" href="<?php echo Route::backendUrl($controller, 'delete', $data['object']->id); ?> " title="<?php echo __('delete'); ?> "></a> <span><?php echo $data['object']->{$sColumn}; ?> </span> </div> <?php echo \Plethora\View::factory('base/backend/list_sort_group')->bind('aList', $data['siblings'])->bind('oModel', $oModel)->bind('sColumn', $sColumn)->render(); ?> </li> <?php