示例#1
0
 /**
  * Add default toolbar commands
  * .
  * @param	Library\CommandContext	$context A command context object
  */
 protected function _afterControllerBrowse(Library\CommandContext $context)
 {
     parent::_afterControllerBrowse($context);
     $this->addSeparator();
     $this->addEnable(array('label' => 'publish', 'attribs' => array('data-data' => '{published:1}')));
     $this->addDisable(array('label' => 'unpublish', 'attribs' => array('data-data' => '{published:0}')));
 }
示例#2
0
 /**
  * Add default toolbar commands
  * .
  * @param	Library\CommandContext	$context A command context object
  */
 protected function _afterControllerBrowse(Library\CommandContext $context)
 {
     parent::_afterControllerBrowse($context);
     $this->addSeparator();
     $this->addEnable();
     $this->addDisable();
 }
示例#3
0
 /**
  * Add default toolbar commands
  * .
  * @param	Library\CommandContext	$context A command context object
  */
 protected function _afterControllerBrowse(Library\CommandContext $context)
 {
     parent::_afterControllerBrowse($context);
     $this->addSave();
     $this->addApply();
     $this->addCancel(array('attribs' => array('data-novalidate' => 'novalidate')));
 }
示例#4
0
 public function getCommands()
 {
     $controller = $this->getController();
     if ($controller->canAdd()) {
         $this->addCommand('upload');
         $this->addNew(array('label' => 'New Folder'));
     }
     if ($controller->canDelete()) {
         $this->addDelete();
     }
     return parent::getCommands();
 }
示例#5
0
 protected function _afterControlerBrowse(Library\CommandContext $context)
 {
     $controller = $this->getController();
     $view = $controller->getView();
     if ($view->getLayout() != 'form' && $controller->isEditable() && $controller->canEdit()) {
         $article = $controller->getModel()->getRow();
         $route = $controller->getView()->getTemplate()->getHelper('route')->article(array('row' => $article, 'layout' => 'form'));
         $this->addCommand('edit', array('href' => (string) $route));
     } else {
         parent::_afterControlerBrowse($context);
     }
 }
示例#6
0
 /**
  * Add default toolbar commands
  * .
  * @param	Library\CommandContext	$context A command context object
  */
 protected function _afterControllerBrowse(Library\CommandContext $context)
 {
     parent::_afterControllerBrowse($context);
     $this->reset();
 }
示例#7
0
 public function getCommands()
 {
     $this->addPurge();
     return parent::getCommands();
 }
 public function getCommands()
 {
     $this->addCommand('profile');
     $this->addCommand('logout');
     return parent::getCommands();
 }