public function testWithAccordion() { $this->html = $formPanel = new FormPanel('Episoden verwalten', $this->getTranslationContainer(), $form = new \Psc\CMS\Form(NULL, '/episodes/manager')); $accordion = new \Psc\UI\Accordion(array('autoHeight' => true, 'active' => 0)); $accordion->addSection('Optionen', array()); $accordion->addSection('Meta', array()); $formPanel->addAccordion($accordion); $this->test->css('form.psc-cms-ui-form')->count(1)->hasAttribute('action', '/episodes/manager')->test('div.psc-cms-ui-form-panel')->count(1)->test('.psc-cms-ui-buttonset')->count(1)->end()->test('fieldset.psc-cms-ui-group')->count(1)->test('legend')->count(1)->hasText('Episoden verwalten')->end()->end()->test('.psc-cms-ui-accordion')->count(1)->end(); }
protected function doInit() { // damit die components der form innerhalb des formpanels an der richtigen stelle stehen // holen wir uns diese aus der Componentsform foreach ($this->form->getComponents() as $key => $component) { try { $this->content['component' . $key] = $component->html(); } catch (\Psc\Exception $e) { throw new \Psc\Exception('Component ' . Code::getClass($component) . ' verursachte einen Fehler beim HTML-Erzeugen', 0, $e); } } parent::doInit(); }
public function getEntityGrid(EntityMeta $entityMeta, $entities) { $navController = $this->getController('NavigationNode'); $menu = $navController->getPagesMenu('default'); $footerMenu = $navController->getPagesMenu('footer'); $topMenu = $navController->getPagesMenu($this->metaMenuName); $panel = new FormPanel($this->trans('entities.page.panel', array(), 'cms'), $this->getTranslationContainer()); $panel->setPanelButtons(array('reload')); /* $panel->getPanelButtons()->addNewButton( $entityMeta->getAdapter()->getNewTabButton() ); */ $panel->setWidth(100); $panel->addContent($topMenu->html()); $panel->addContent($menu->html()->setStyle('margin-top', '80px')); $panel->addContent($footerMenu->html()->setStyle('margin-top', '150px')); return $panel; }
protected function doInit() { $this->grid = $grid = new GridTable(); // header $grid->tr(); foreach ($this->columns as $name => $column) { $grid->td()->setContent($column->getLabel())->addClass($this->classify($name))->addClass($column->getClasses()); } $grid->tr(); $panel = new FormPanel($this->label, $this->translationContainer, $this->form = new Form(NULL, $this->getFormRequestMeta()), $this->getPanelButtons()); $panel->setWidth('100%'); $panel->addContent($this->grid); $this->html = $panel->html(); $this->constructParams['grid'] = self::SELF_SELECTOR; $this->constructParams['columns'] = array_keys($this->columns); $this->constructParams['sortable'] = $this->sortable; $this->constructParams['sortableName'] = $this->sortableName; $this->constructParams['eventManager'] = new \Psc\JS\Code('main.getEventManager()'); /* set Parameters for joose */ $this->registerToMain('GridPanel'); $this->autoLoad(); }