/** * */ protected function createControls() { $this->page = $this->controller->page; $this->setPostback('site', 'endEditPage', array('id' => $this->page->id, 'pa_site' => $this->page->pa_site, 'pa_module' => 'site', 'pa_action' => $this->page->pa_action, 'initPanel' => $this->request->initPanel)); $panel = new CaptionedTabPanelControl($this, 'panel'); $panel->setCaption('Seite » bearbeiten'); $tabStammdaten = $panel->tabs->addTab('Stammdaten'); $tabLayout = $panel->tabs->addTab('Layout'); $lookup = new LookupBoxControl(null, 'pa_parent'); $lookup->setLookupEntity(new Page())->setTextfield('pa_bezeichnung')->setValuefield('pa_id')->setGroupfield('parent')->setFilter(array('site' => $this->page->pa_site))->showNull(0, '-- Kein Parent --')->preSelect($this->page->pa_parent); $edit = new EditControl($tabStammdaten, 'edit'); $edit->setEntity($this->page)->addRow('pa_ausblenden')->addRow('pa_bezeichnung')->addRow('Parent-Page', $lookup)->addRow('pa_css')->addRow('-')->addRow('pa_link')->addRow('pa_description')->addRow('pa_keywords')->addRow('pa_icon'); $button = new SaveButtonControl($tabStammdaten, 'button'); // region Texte $texte = new TranslatedTextControl($tabStammdaten, 'texte'); $texte->setCaption('Angezeiger Text im Menü'); $texte->setElement($this->page->getElementId()); if ($this->request->action === 'newPage' && isset($this->request->text)) { $texte->setText($this->request->text); } // endregion // region Rechte $panelRechte = new CaptionedPanelControl($tabStammdaten, 'panelRechte'); $panelRechte->setCaption('Seiten » Berechtigungen'); $security = new SecurityCheckboxControl($panelRechte, 'berechtigung'); $security->setElement($this->page->getElementId()); // endregion // region Layout (Neu) if ($this->page->pa_action == 'composePage') { $rootRegions = Region::loadByPageAndParent($this->page->id, 0); foreach ($rootRegions as $region) { $block = $region->getBlock(); if ($block !== null) { $control = $block->toDesignModeHtml(); $tabLayout->add($control); } } $addRegion = new Controls\ChooseLayoutBlockControl($tabLayout, 'choose'); $addRegion->setPage($this->page); } // endregion // region Layout (alt) if ($this->page->pa_action == 'useInnerTemplate') { $choose = new Controls\ChooseTemplateControl($tabLayout, 'pa_innertemplate'); $choose->setChosenTemplate($this->page->pa_innertemplate); $choose->setOuterTemplate(Template::load($this->controller->site->si_template)); $edit = new Controls\EditRegionsControl($tabLayout, 'editInPlace'); $edit->setPageId($this->page->id); $edit->setRegions($this->page->getRegions()); $edit->setTemplate($this->page->pa_innertemplate); $button = new ButtonControl($tabLayout, 'button2'); $button->setCaption('Speichern')->setOnClick("\$('#initPanel').val(1); \$('#postback').submit();"); } // endregion }
protected function createControls() { $this->setPostbackUrl(EntityLinks::update($this->controller->kategorie)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Kategorien » bearbeiten'); $lookup = new LookupBoxControl(null, 'ck_parent'); $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->setGroupfield('parent')->showNull(0, '-- Kein Parent --')->preSelect($this->controller->kategorie->ck_parent); $edit = new EditControl($panel, 'edit'); $edit->setEntity($this->controller->kategorie)->setHeader('Stammdaten bearbeiten')->addRow('ck_bezeichnung')->addRow('Parent', $lookup); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); $texte = new TranslatedTextControl($this, 'texte'); $texte->setCaption('Angezeiger Text'); $texte->setElement($this->controller->kategorie->getElementId()); }
protected function createControls() { $this->setPostback('cms', 'endEditArtikel', array('id' => $this->controller->artikel->id)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Artikel » bearbeiten'); $lookup = new LookupBoxControl(null, 'ca_kategorie'); $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->showNull(0, '-- bitte wählen --')->preSelect($this->controller->artikel->ca_kategorie); $edit = new EditControl($panel, 'edit'); $edit->setEntity($this->controller->artikel)->setHeader('Stammdaten bearbeiten')->addRow('ca_bezeichnung')->addRow('Kategorie', $lookup)->addRow('ca_aktiv')->addRow('ca_geschrieben_am')->addRow('ca_anzeigen_ab_dem')->addRow('ca_anzeigen_bis_zum'); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); $texte = new Controls\TranslatedTextControl($this, 'titel'); $texte->setCaption('Titel'); $texte->setElement($this->controller->artikel->getElementId() . '.titel'); $texte = new Controls\TranslatedTextControl($this, 'intro'); $texte->setCaption('Text'); $texte->setElement($this->controller->artikel->getElementId() . '.intro'); $texte->setWYSIWYG(true); // Bilder if ($this->request->action != 'newArtikel') { $wrapper = new WrapperControl($this, 'wrapGalerie'); $wrapper->setModule('medien')->setAction('galerie')->addParam('showDrehen', true)->addParam('showSave', true)->addParam('showDelete', true)->addParam('upload', true)->addParam('id', $this->controller->artikel->ca_kollektion); } }