public function preDispatch()
 {
     $this->_helper->authCheck();
     $this->_helper->aclCheck();
     $this->_helper->layout->setLayout('admin');
     parent::preDispatch();
 }
 public function init()
 {
     $this->_formClassName = 'Auth_Form_Model_Permission';
     $this->_displays = array('name' => array('type' => self::COL_TYPE_FIRSTCOL, 'label' => $this->view->translate('Name'), 'param' => array('title' => 'name', 'cover' => null, 'subtitle' => null)), 'description' => 'Description');
     $this->view->placeholder('headling_1_content')->set($this->view->translate('Manage permissions'));
     parent::init();
 }
Esempio n. 3
0
 public function deleteAction($rowset = null)
 {
     if ($this->_getParam('id', 0) === Centurion_Auth::getInstance()->getIdentity()->id) {
         Zend_Controller_Action_HelperBroker::getStaticHelper('redirector')->gotoSimple('unauthorized', 'error', 'admin');
     } else {
         parent::deleteAction($rowset);
     }
 }
 public function init()
 {
     $this->_helper->authCheck();
     $this->_helper->aclCheck();
     $this->_formClassName = "Cms_Form_Model_FlatpageTemplate";
     $this->_displays = array('name' => $this->view->translate('Name@backoffice,cms'), 'view_script' => $this->view->translate('View script@backoffice,cms'));
     $this->view->placeholder('headling_1_content')->set($this->view->translate('Manage flatpage templates@backoffice,cms'));
     parent::init();
 }
Esempio n. 5
0
 public function init()
 {
     $this->_formClassName = 'Media_Form_Model_Admin_File';
     $this->_layout = 'media';
     $this->_displays = array('image' => array('label' => $this->view->translate('Image'), 'type' => Centurion_Controller_CRUD::COLS_CALLBACK, 'callback' => array($this, 'showImage')), 'filename' => array('label' => ''));
     //TODO: behaviour => behavior
     $this->_filters = array('filename' => array('type' => self::FILTER_TYPE_TEXT, 'behavior' => self::FILTER_BEHAVIOR_CONTAINS, 'label' => $this->view->translate('File name')));
     $this->view->placeholder('headling_1_content')->set($this->view->translate('Manage media'));
     parent::init();
 }
Esempio n. 6
0
 public function init()
 {
     $this->_helper->authCheck();
     $this->_helper->aclCheck();
     $this->_formClassName = 'Auth_Form_Model_User';
     $this->_layout = 'media';
     $this->_displays = array('id' => 'ID', 'username' => $this->view->translate('name'), 'switch' => array('type' => self::COL_TYPE_ONOFF, 'column' => 'is_active', 'label' => $this->view->translate('Is active'), 'onoffLabel' => array($this->view->translate('Active'), $this->view->translate('Not active'))));
     //TODO: behaviour => behavior
     $this->_filters = array('username' => array('type' => self::FILTER_TYPE_TEXT, 'behavior' => self::FILTER_BEHAVIOR_CONTAINS, 'label' => $this->view->translate('Username')), 'is_active' => array('type' => self::FILTER_TYPE_RADIO, 'label' => $this->view->translate('Status'), 'data' => array($this->view->translate('Yes') => 1, $this->view->translate('No') => 0)), 'between' => array('type' => self::FILTER_TYPE_BETWEEN_DATE, 'column' => 'created_at', 'label' => $this->view->translate('date')));
     $this->view->placeholder('headling_1_content')->set($this->view->translate('Manage users'));
     parent::init();
 }
 public function init()
 {
     $this->_helper->authCheck();
     $this->_helper->aclCheck();
     $this->_model = Centurion_Db::getSingleton('cms/flatpage');
     $this->_formClassName = 'Cms_Form_Model_Flatpage';
     /*$this->setOptions(array(
           'titleColumn'        =>  'title',
           'publishColumn'      =>  'is_published',
           'publishDateColumn'  =>  'published_at'
       ));*/
     $this->view->placeholder('headling_1_content')->set($this->view->translate('Manage flatpage@backoffice,cms'));
     $this->view->placeholder('headling_1_add_button')->set($this->view->translate('flatpage@backoffice,cms'));
     parent::init();
 }
 public function init()
 {
     $this->view->noAddButton = true;
     $this->_formClassName = 'Translation_Form_Translation';
     $this->_displays = array('uid' => array('label' => $this->view->translate('Reference text'), 'type' => self::COLS_CALLBACK), 'translations' => array('label' => $this->view->translate('Translations'), 'type' => self::COLS_CALLBACK));
     $languageData = array();
     $languageName = array_flip(Zend_Locale_Data_Translation::$languageTranslation);
     foreach (Centurion_Db::getSingleton('translation/language')->fetchAll() as $language) {
         $languageData[$language->id] = $languageName[$language->locale];
     }
     $referenceData = array_merge(array(0 => 'Original'), $languageData);
     $tagData = array();
     foreach (Centurion_Db::getSingleton('translation/tag')->fetchAll() as $tag) {
         $tagData[$tag->id] = ucfirst($tag->tag);
     }
     $this->_filters = array('uid' => array('behavior' => self::FILTER_BEHAVIOR_CALLBACK, 'label' => $this->view->translate('Id'), 'callback' => array($this, 'filterCaseInsensitive')), 'reference' => array('behavior' => self::FILTER_BEHAVIOR_NOTHING, 'type' => self::FILTER_TYPE_RADIO, 'label' => $this->view->translate('Reference language'), 'data' => $referenceData), 'show' => array('behavior' => self::FILTER_BEHAVIOR_NOTHING, 'type' => self::FILTER_TYPE_CHECKBOX, 'label' => $this->view->translate('Language to translate'), 'data' => $languageData, 'column' => 'languages'), 'tags__id' => array('behavior' => self::FILTER_BEHAVIOR_IN, 'type' => self::FILTER_TYPE_CHECKBOX, 'label' => $this->view->translate('Tags'), 'data' => $tagData));
     parent::init();
     $this->view->placeholder('headling_1_content')->set($this->view->translate('Manage translation'));
 }
 public function switchAction()
 {
     $name = $this->_getParam('name');
     Centurion_Auth::getInstance()->getIdentity()->name;
     parent::switchAction();
 }