protected function createControls()
 {
     $this->setPostback('modView', 'endEditLookup', array('current' => $this->request->current, 'entity' => $this->request->entity, 'initPanel' => 2));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Lookup » bearbeiten');
     // Felder festlegen
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->lookup->name);
     $inputName->addCssClass('required');
     $inputDescription = new InputTextboxControl(null, 'description');
     $inputDescription->setValue($this->controller->lookup->description);
     $inputDescription->addCssClass('required');
     $selectRelation = new InputSelectControl(null, 'relation');
     foreach ($this->controller->entity->relations as $relation) {
         $selectRelation->addOption($relation->name, $relation->name);
     }
     $selectRelation->preSelect($this->controller->lookup->relation);
     $inputField = new InputTextboxControl(null, 'field');
     $inputField->setValue($this->controller->lookup->field);
     $inputField->addCssClass('required');
     // Felder darstellen
     $edit = new EditControl($panel, 'edit');
     $edit->addRow('Name', $inputName)->addRow('Beschreibung', $inputDescription)->addRow('Relation', $selectRelation)->addRow('Feld in Relation', $inputField);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 public function toHtml()
 {
     if (!file_exists('site/templates/' . $this->templateName . '/template.php')) {
         return;
     }
     // Inhalte nach Regionen sortieren
     $inhalte = array();
     foreach ($this->regions as $curRegion) {
         $inhalte[$curRegion->re_name][] = $curRegion;
     }
     foreach ($this->regionsAvailable as $name) {
         $html = '';
         if (array_key_exists($name, $inhalte)) {
             $region = $inhalte[$name];
             foreach ($region as $curContent) {
                 $html .= $curContent->toDesignModeHtml()->toHtml();
             }
         }
         $div = Html::createElement('div')->addCssClass('');
         // Buttons anzeigen
         $btnGroup = new StdControls\ButtonGroupControl(null, 'btnGroup' . $this->id);
         $btnAdd = new StdControls\ButtonControl($btnGroup, 'btnAdd' . $this->id);
         $btnAdd->setCaption('Neues Element')->setIcon('plus')->addCssClass('btn-success')->addCssClass('nfs-modal')->setLink('site', 'newRegion', array('page' => $this->pageId, 'region' => $name));
         $div->addInnerHtml($btnGroup->toHtml());
         $html .= $div->render();
         $this->setVar($name, $html);
     }
     $this->skin = '
        <div class="panel panel-default" style="padding: 10px; margin-top: 20px; overflow: scroll; width: 100%; max-width: 100%;">
        ' . file_get_contents('site/templates/' . $this->templateName . '/template.php') . '
        </div>
     ';
     return $this->renderBySkin();
 }
 protected function createControls()
 {
     $this->relation = $this->controller->relation;
     $this->setPostback('modView', 'endEditRelation', array('current' => $this->request->current, 'entity' => $this->request->entity, 'initPanel' => 2));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Relation &raquo; bearbeiten');
     // Felder festlegen
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->relation->name);
     $inputName->addCssClass('required');
     $selectField = new InputSelectControl(null, 'field');
     foreach ($this->controller->entity->fields as $field) {
         $selectField->addOption($field->name, $field->name);
     }
     $selectField->preSelect($this->controller->relation->field);
     $inputForeignEntity = new InputTextboxControl(null, 'foreignEntity');
     $inputForeignEntity->setValue($this->controller->relation->foreignEntity);
     $inputForeignEntity->addCssClass('required');
     $inputForeignField = new InputTextboxControl(null, 'foreignField');
     $inputForeignField->setValue($this->controller->relation->foreignField);
     $inputForeignField->addCssClass('required');
     $inputJoinCriteria = new InputTextboxControl(null, 'joinCriteria');
     $inputJoinCriteria->setValue($this->controller->relation->joinCriteria);
     $selectJoin = new InputSelectControl(null, 'join');
     $selectJoin->addOption('inner', 'inner')->addOption('left outer', 'left outer')->addOption('right outer', 'right outer')->preSelect($this->controller->relation->join);
     // Felder darstellen
     $edit = new EditControl($panel, 'edit');
     $edit->addRow('Name', $inputName)->addRow('Feld in lokaler Entität', $selectField)->addRow('Fremdentität', $inputForeignEntity)->addRow('Feld in Fremdentität', $inputForeignField)->addRow('Join', $selectJoin)->addRow('On-Bedingung', $inputJoinCriteria)->addRow('Implementierende Klasse', InputTextboxControl::create(null, 'foreignClass')->setValue($this->relation->foreignClass));
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditFeld', array('current' => $this->request->current, 'entity' => $this->request->entity, 'initPanel' => 2));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Feld &raquo; bearbeiten');
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->feld->name);
     $inputName->addCssClass('required');
     $inputDescription = new InputTextboxControl(null, 'description');
     $inputDescription->setValue($this->controller->feld->description);
     $inputMax = new InputTextboxControl(null, 'maxLength');
     $inputMax->setValue($this->controller->feld->maxLength);
     $inputValidation = new InputTextboxControl(null, 'validation');
     $inputValidation->setValue($this->controller->feld->validation);
     $inputFormel = new InputTextboxControl(null, 'formula');
     $inputFormel->setValue($this->controller->feld->getFormula());
     $inputIndex = new InputCheckboxControl(null, 'index');
     $inputIndex->setValue(1);
     $inputIndex->setChecked($this->controller->feld->getIndex() == 1);
     $typ = new InputSelectControl(null, 'type');
     $typ->addOption(ModelField::TYPE_IMAGE, 'Bild')->addOption(ModelField::TYPE_BOOLEAN, 'Boolean')->addOption(ModelField::TYPE_DATE, 'Date')->addOption(ModelField::TYPE_DATETIME, 'Datetime')->addOption(ModelField::TYPE_FLOAT, 'Float')->addOption(ModelField::TYPE_HTML, 'Html')->addOption(ModelField::TYPE_INTEGER, 'Integer')->addOption(ModelField::TYPE_PASSWORD, 'Password')->addOption(ModelField::TYPE_STRING, 'String')->addOption(ModelField::TYPE_TEXT, 'Text')->addOption(ModelField::TYPE_TIME, 'Time')->addOption(ModelField::TYPE_FILE, 'Datei')->addOption(ModelField::TYPE_MARKDOWN, 'Markdown')->addOption(ModelField::TYPE_LABEL, 'Label')->preSelect($this->controller->feld->getType());
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Beschreibung', $inputDescription)->addRow('Datentyp', $typ)->addRow('Länge', $inputMax)->addRow('Validierung', $inputValidation)->addRow('Formel', $inputFormel)->addRow('Index', $inputIndex);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditEntity', array('current' => $this->request->current, 'initPanel' => 2));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Entität &raquo; bearbeiten');
     $inputKlasse = new InputTextboxControl(null, 'klasse');
     $inputKlasse->addCssClass('required');
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->entity->name);
     $inputName->addCssClass('required');
     $inputPrimary = new InputTextboxControl(null, 'primary');
     $inputPrimary->setValue($this->controller->entity->primaryKey);
     $inputPrimary->addCssClass('required');
     $inputExtends = new InputTextboxControl(null, 'extends');
     $inputExtends->setValue($this->controller->entity->extends);
     $inputMatch = new InputTextboxControl(null, 'match');
     $inputMatch->setValue($this->controller->entity->match);
     $edit = new EditControl($panel, 'edit');
     $edit->addRow('Tabellenname', $inputName)->addRow('Primärschlüssel', $inputPrimary)->addRow('Basis-Entität (bei Vererbung)', $inputExtends)->addRow('Match (abweichend von der Tabelle bei Vererbung)', $inputMatch);
     if ($this->request->action == 'newEntity') {
         $edit->addRow('Klassename', $inputKlasse);
     }
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doAnmeldenAls');
     $edit = new EditControl($this, 'editAnmelden');
     $edit->addRow('Benutzer', new InputTextboxControl(null, 'benutzer'));
     $submit = new ButtonControl($this, 'submit');
     $submit->setCaption('Anmelden')->setIsSubmit(true);
 }
 protected function createControls()
 {
     $this->setPostback('medien', 'endEditMedien', array('id' => $this->controller->medien->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Medien &raquo; bearbeiten');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->medien)->addRow('me_titel');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $button = new ButtonControl($this, 'button');
     $button->setCaption('Neues Modul anlegen')->setLink('modView', 'newModule')->setIcon('plus')->addCssClass('nfs-modal')->setButtonClass(ButtonControl::BUTTON_PRIMARY);
     $listView = new ListViewControl($this, 'lv');
     $listView->setSkinfile(__DIR__ . '/ModuleListView.skin');
     $listView->setItemSkinFile(__DIR__ . '/ModuleListItem.skin');
     $listView->setVar('header', '<th>Name</th><th>Beschreibung</th><th>Version</th><th>Autor</th><th>&nbsp;</th>');
     $listView->addItems(Modules::getAllModules());
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endNewCRUD', array('current' => $this->request->current));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Aktionen &raquo; CRUD anlegen');
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Details angeben')->addRow('Entität (logisch)', new InputTextboxControl(null, 'entity'));
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 /**
  *
  */
 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 &raquo; 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 &raquo; 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->setPostback('user', 'endEditRolle', array('id' => $this->controller->rolle->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Rollen &raquo; bearbeiten');
     $lobRolle = new DataControls\LookupBoxControl(null, 'ro_parent');
     $lobRolle->setLookupEntity(new Rolle())->setTextfield('ro_bezeichnung')->setTextfield2('parent')->setGroupfield('parent')->setValuefield('ro_id')->preSelect($this->controller->rolle->ro_parent)->showNull(0, '-- keine --');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->rolle)->addRow('ro_bezeichnung')->addRow('ro_schluessel')->addRow('ro_aktiv')->addRow('ro_neuebenutzer')->addRow('Parent-Rolle', $lobRolle);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doPassword');
     $text = new HilfstextControl($this, 'hilfe');
     $text->setText('USER_KENNWORT_ANFORDERN');
     $input = new InputTextboxControl(null, 'user');
     $input->addCssClass('required');
     $edit = new EditControl($this, 'edt');
     $edit->setMode(EditControl::MODE_VERTICAL)->addRow('ID-Nummer oder Benutzerkennung', $input);
     $submit = new ButtonControl($this, 'submit');
     $submit->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setCaption('Kennwort zurücksetzen')->setIsSubmit(true);
 }
 protected function createControls()
 {
     $this->setPostback('medien', 'endEditKollektion', array('id' => $this->controller->kollektion->id, 'ko_parent' => $this->controller->kollektion->ko_parent, 'projekt' => $this->request->projekt));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Ordner &raquo; bearbeiten');
     $selectTyp = new InputSelectControl(null, 'ko_typ');
     $selectTyp->addOption(0, '-- beliebig --')->addOption(1, 'Bilder')->addOption(2, 'Video')->addOption(3, 'Audio')->addOption(4, 'Dateien (z.B. PDF)')->preSelect($this->controller->kollektion->ko_typ);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->kollektion)->setHeader('Stammdaten bearbeiten')->addRow('ko_bezeichnung')->addRow('Typ', $selectTyp);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->module = $this->controller->current;
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Berechtigungen für ' . $this->module->name);
     $btnDetails = new ButtonControl($panel, 'btnDetails');
     $btnDetails->setCaption('Details')->setLink('modView', 'editModule', array('id' => $this->module->qualifiedName))->setIcon('list-alt');
     $listView = new ListViewControl($panel, 'lv');
     $listView->setSkinfile(__DIR__ . '/ModuleListView.skin');
     $listView->setItemSkinFile(__DIR__ . '/BerechtigungListItem.skin');
     $listView->setVar('header', '<th>Name</th><th>Beschreibung</th><th>Menü</th><th>Berechtigungen</th>');
     $listView->addItems($this->controller->aktionen);
 }
 /**
  * @throws \Exception
  */
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doReset', ['token' => $this->request->token]);
     $text = new HilfstextControl($this, 'hilfe');
     $text->setText('USER_KENNWORT_FESTLEGEN');
     $input = new InputPasswordControl(null, 'pw1');
     $input->addCssClass('required');
     $input2 = new InputPasswordControl(null, 'pw2');
     $input2->addCssClass('required');
     $edit = new EditControl($this, 'edt');
     $edit->setMode(EditControl::MODE_VERTICAL)->addRow('Kennwort', $input)->addRow('Wiederholen', $input2);
     $submit = new ButtonControl($this, 'submit');
     $submit->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setCaption('Kennwort setzen')->setIsSubmit(true);
 }
 protected function createControls()
 {
     $panel = new StdControls\CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Sprachen');
     $button = new StdControls\ButtonControl($panel, 'button');
     $button->setCaption('Neue Sprache anlegen')->setLink('cms', 'newSprache');
     $grid = new DataControls\GridControl($panel, 'grid');
     $grid->setEntity(new Model\Sprache(), $this->request);
     $grid->setDeleteAction('deleteSprache');
     $grid->createColumn(GridColumn::LINK, 'sp_bezeichnung')->setAppLink('cms', 'editSprache', array('id' => '{sp_id}'));
     $grid->createColumn(GridColumn::FIELD, 'sp_aktiv');
     $grid->createColumn(GridColumn::FIELD, 'sp_standard');
     $grid->createColumn(GridColumn::DELETELINK);
 }
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doUsername');
     $wrapper = new WrapperControl($this, 'wrapperIntro');
     $wrapper->setModule('cms')->setAction('show')->addParam('id', 12);
     $panel = new CaptionedPanelControl($this, 'pnl');
     $panel->setCaption('E-Mail-Adresse eingeben');
     $input = new InputTextboxControl(null, 'email');
     $input->addCssClass('required validate-email');
     $edit = new EditControl($panel, 'edt');
     $edit->setEntity(new User());
     $edit->addRow('Ihre Adresse', $input);
     $submit = new ButtonControl($this, 'submit');
     $submit->setCaption('Senden')->setIsSubmit(true)->setAddArrows(false);
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->kategorie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Kategorien &raquo; 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('site', 'endEditRegion', array('id' => $this->controller->region->id, 're_page' => $this->controller->region->re_page, 're_parent' => $this->controller->region->re_parent, 're_name' => $this->controller->region->re_name));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Region &raquo; bearbeiten');
     $modules = new Controls\ListModuleControl(null, 're_module');
     $modules->setNameOfActionBox('re_action');
     $modules->preSelect($this->controller->region->re_module);
     $actions = new Controls\ListActionControl(null, 're_action');
     $actions->setModule($this->controller->region->re_module);
     $actions->preSelect($this->controller->region->re_action);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->region)->addRow('Modul', $modules)->addRow('Action', $actions)->addRow('re_parameter');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
예제 #20
0
 protected function createControls()
 {
     if (isset($this->request->projekt)) {
         $projekt = $this->request->projekt;
     } else {
         $projekt = 0;
     }
     $this->setPostback('medien', 'doUpload', array('kollektion' => $this->request->kollektion, 'projekt' => $projekt), 'multipart/form-data');
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Upload');
     $fileUpload = new InputFileControl(null, 'Filedata');
     $title = new \NewFrontiers\Controls\FormControls\InputTextboxControl(null, 'titel');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->kollektion)->setHeader('Datei hochladen')->addRow('Datei', $fileUpload)->addRow('Titel', $title);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 public function toHtml()
 {
     if (!$this->berechtigt) {
         return;
     } else {
         return parent::toHtml();
     }
 }
 protected function createControls()
 {
     $this->setPostback('medien', 'endEditShare', array('id' => $this->controller->medien->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Eigenschaften bearbeiten');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->medien);
     $edit->addRow('me_titel');
     $edit->addRow('me_valid_until');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIcon('floppy-disk')->setIsSubmit('true');
     $panelZugriffe = new CaptionedPanelControl($this, 'panel2');
     $panelZugriffe->setCaption('Zugriffe');
     $zugriffe = new GridControl($panelZugriffe, 'zugriffe');
     $zugriffe->setEntity(new Download(), array('medium' => $this->controller->medien->id));
     $zugriffe->createColumn(GridColumn::FIELD, 'do_download_am');
     $zugriffe->createColumn(GridColumn::FIELD, 'do_ip');
 }
 protected function createControls()
 {
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Page &raquo; Regionen');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Neue Region anlegen')->setLink('site', 'newRegion', array('page' => $this->controller->page->id));
     $template = '
             {re_position} 
             <a href="' . Application::link('site', 'regionUp') . '/id/{re_id}">' . Template::img('icons/arrow_up.png', true) . '</a>
             <a href="' . Application::link('site', 'regionDown') . '/id/{re_id}">' . Template::img('icons/arrow_down.png', true) . '</a>
         ';
     $grid = new GridControl($panel, 'grid');
     $grid->setEntity(new Region(), $this->request);
     $grid->setDeleteAction('deleteRegion');
     $grid->createColumn(GridColumn::LINK, 're_name')->setAppLink('site', 'editRegion', array('id' => '{re_id}'));
     $grid->createColumn(GridColumn::FIELD, 're_module');
     $grid->createColumn(GridColumn::FIELD, 're_action');
     $grid->createColumn(GridColumn::FIELD, 're_parameter');
     $grid->createColumn(GridColumn::FIELD, 're_position', $template);
     $grid->createColumn(GridColumn::DELETELINK);
 }
 protected function createControls()
 {
     $showNew = true;
     if (isset($this->request->showNew)) {
         $showNew = $this->request->showNew;
     }
     $showUp = true;
     if (isset($this->request->showUp)) {
         $showUp = $this->request->showUp;
     }
     if (!$this->request->ajax) {
         $panel = new CoreControls\ControlContainer($this, 'pnlAjax');
         $panel->setSkin('<div id="pnlAjax">{controls}</div>');
     } else {
         $panel = $this;
     }
     $panel = new CoreControls\ControlContainer($panel, 'panel');
     //$panel->setCaption('Dokumente / Medien');
     //if ($this->controller->kollektion != null) {
     //    $panel->setCaption($this->controller->kollektion->ko_bezeichnung);
     //}
     if ($showNew) {
         $button = new StdControls\ButtonControl($panel, 'btnNeuOrdner');
         $button->setCaption('Neuer Ordner')->addCssClass('btn-small')->addCssClass('nfs-modal');
         if ($this->controller->kollektion != null) {
             $button->setLink('medien', 'newKollektion', array('parent' => $this->controller->kollektion->id));
         } else {
             $button->setLink('medien', 'newKollektion', array('parent' => 0));
         }
     }
     if ($this->controller->kollektion !== null) {
         $uploader = new UploaderControl($this, 'uploader');
         $uploader->setKollektionId($this->controller->kollektion->id);
         //->setNotify('dok');
     } else {
         Javascript::requireLibrary('jqueryuploader');
     }
     $dokumente = new DokumentenControl($panel, 'dok');
     $dokumente->setOrdner($this->controller->kollektion)->setShowUp($showUp)->setAjaxTarget('pnlAjax');
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditAktion', array('current' => $this->request->current, 'initPanel' => $this->request->initPanel));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Aktion &raquo; bearbeiten');
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->action->name);
     $inputName->addCssClass('required');
     $inputDescription = new InputTextboxControl(null, 'description');
     $inputDescription->setValue($this->controller->action->description);
     $inputNextItem = new InputTextboxControl(null, 'nextItem');
     $inputNextItem->setValue($this->controller->action->nextItem);
     $addToMenu = new InputCheckboxControl(null, 'addToMenu');
     $addToMenu->setChecked($this->controller->action->addToMenu);
     $security = new InputSelectControl(null, 'securityLevel');
     $security->addOption(Action::LEVEL_ALL, 'Alle')->addOption(Action::LEVEL_LOGGEDIN, 'Angemeldete Benutzer')->addOption(Action::LEVEL_CONFIG, 'Rechtevergabe')->preSelect($this->controller->action->securityLevel);
     $next = new InputSelectControl(null, 'next');
     $next->addOption(Action::NEXT_NOTHING, 'Nichts')->addOption(Action::NEXT_ACTION, 'Aktion ausführen')->addOption(Action::NEXT_VIEW, 'View anzeigen')->preSelect($this->controller->action->next);
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Beschreibung', $inputDescription)->addRow('In Menü?', $addToMenu)->addRow('Berechtigung', $security)->addRow('Folgeaktion', $next)->addRow('Folgeelement', $inputNextItem);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $grp = new ButtonGroupControl($this, 'btngrp');
     $button = new ButtonControl($grp, 'button');
     $button->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setCaption('Neue Seite anlegen')->setIcon('plus')->setLink('site', 'newPage', array('site' => $this->controller->site->id));
     $button = new ButtonControl($grp, 'btnSort');
     $button->setCaption('Seiten neu sortieren')->setLink('site', 'sortPages', array('site' => $this->controller->site->id));
     $button = new ButtonControl($grp, 'btnFlush');
     $button->setCaption('Cache leeren')->setLink('site', 'flushCache', array('site' => $this->controller->site->id));
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Page(), $this->request);
     $grid->setDeleteAction('deletePage');
     $grid->setSortable(false);
     $template = '
             {pa_pos} 
             <a href="' . Application::link('site', 'pageUp') . '/id/{pa_id}">' . Template::img('icons/arrow_up.png', true) . '</a>
             <a href="' . Application::link('site', 'pageDown') . '/id/{pa_id}">' . Template::img('icons/arrow_down.png', true) . '</a>
         ';
     $grid->createColumn(GridColumn::LINK, 'pa_bezeichnung')->setAppLink('site', 'editPage', array('id' => '{pa_id}'));
     $grid->createColumn(GridColumn::FIELD, 'parent');
     $grid->createColumn(GridColumn::FIELD, 'pa_pos', $template);
     $grid->createColumn(GridColumn::DELETELINK);
     $grid->groupColumn = 1;
 }
예제 #27
0
 protected function createControls()
 {
     /**
      * @var CmsArtikel $artikel
      */
     $artikel = $this->controller->artikel;
     $titel = Text::get($artikel->getElementId() . '.titel', $_SESSION['sp_id'])->te_text;
     $text = Text::get($artikel->getElementId() . '.intro', $_SESSION['sp_id'])->te_text;
     $wiki = new CmsArtikelWikiLinks();
     $wiki->setKategorieId(2);
     // TODO
     $wiki->setText($text);
     $text = $wiki->getText();
     if (Application::isAdmin()) {
         $editButton = new ButtonControl($this, 'btnEdit' . $artikel->id);
         $editButton->setCaption('Bearbeiten')->setIcon('pencil')->setLink('Cms', 'editArtikel', ['id' => $artikel->id])->setButtonClass(ButtonControl::BUTTON_WARNING)->setSize(ButtonControl::SIZE_EXTRASMALL)->addCssClass('pull-right');
     }
     // TODO
     if (false) {
         // ($titel != '') {
         $artikelPanel = new CaptionedPanelControl($this, 'artikel_' . $artikel->id);
         $artikelPanel->setCaption($titel);
         if ($artikel->ca_hauptbild == '') {
             $artikelText = new HtmlControl($artikelPanel, 'text_' . $artikel->id);
             $artikelText->setInnerHtml($text);
         } else {
             $artikelText = new HtmlControl($artikelPanel, 'text_' . $artikel->id);
             $artikelText->setInnerHtml('
                 <img src="' . $artikel->ca_hauptbild . '" class="blogimage" />
             ' . $text);
         }
     } else {
         $artikelText = new HtmlControl($this, 'text_' . $artikel->id);
         $artikelText->setInnerHtml($text);
     }
 }
 protected function createControls()
 {
     $this->setPostback('cms', 'endEditArtikel', array('id' => $this->controller->artikel->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Artikel &raquo; 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);
     }
 }
 protected function createControls()
 {
     $button = new ButtonControl($this, 'button');
     $button->setCaption('Neuen Artikel anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('cms', 'newArtikel', array('kategorie' => $this->controller->kategorie->id));
     $button = new ButtonControl($this, 'btnSort');
     $button->setCaption('Artikel neu sortieren')->setLink('cms', 'sortArtikel', array('kategorie' => $this->controller->kategorie->id));
     $template = '
             {ca_pos}
             <a href="' . Application::link('cms', 'posUp') . '/id/{ca_id}">' . Template::img('icons/arrow_up.png', true) . '</a>
             <a href="' . Application::link('cms', 'posDown') . '/id/{ca_id}">' . Template::img('icons/arrow_down.png', true) . '</a>
         ';
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Model\CmsArtikel(), $this->request);
     $grid->setDeleteAction('deleteArtikel');
     $grid->setSortable(true);
     $grid->createColumn(GridColumn::LINK, 'ca_bezeichnung')->setAppLink('cms', 'editArtikel', array('id' => '{ca_id}'));
     $grid->createColumn(GridColumn::FIELD, 'ca_aktiv');
     $grid->createColumn(GridColumn::FIELD, 'autor');
     $grid->createColumn(GridColumn::FIELD, 'ca_geschrieben_am');
     $grid->createColumn(GridColumn::FIELD, 'ca_lastedit');
     $grid->createColumn(GridColumn::FIELD, 'ca_pos', $template);
     $grid->createColumn(GridColumn::LINK, null, Template::img('icons/sitemap_color.png', true))->setAppLink('site', 'newPage', array('site' => 2, 'mi_module' => 'cms', 'mi_action' => 'show', 'mi_id' => '{ca_id}', 'text' => '{ca_bezeichnung}'), null, 'Zu Sitemap hinzufügen');
     $grid->createColumn(GridColumn::DELETELINK);
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditModule', array('initPanel' => $this->request->initPanel));
     $panel = new CaptionedTabPanelControl($this, 'pnlStammdaten');
     $panel->setCaption('Details zu Modul ' . $this->controller->current->name);
     $tabStamm = $panel->tabs->addTab('Stammdaten');
     $tabAction = $panel->tabs->addTab('Actions');
     $tabEntity = $panel->tabs->addTab('Entitäten');
     $panel->tabs->setInitPanel($this->request->initPanel);
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->current->name)->setReadOnly(true);
     $inputQualifiedName = new InputTextboxControl(null, 'qualifiedName');
     $inputQualifiedName->setValue($this->controller->current->qualifiedName)->setReadOnly(true);
     $inputNamespace = new InputTextboxControl(null, 'name');
     $inputNamespace->setValue($this->controller->current->namespace)->setReadOnly(true);
     $inputDescription = new InputTextboxControl(null, 'description');
     $inputDescription->setValue($this->controller->current->description);
     $inputAuthor = new InputTextboxControl(null, 'author');
     $inputAuthor->setValue($this->controller->current->author);
     $inputVersion = new InputTextboxControl(null, 'version');
     $inputVersion->setValue($this->controller->current->version);
     $panel = $tabStamm;
     $btnGroup = new ButtonGroupControl($panel, 'btnGroup');
     $btnForward = new ButtonControl($btnGroup, 'btnInstall');
     $btnForward->setCaption('Installieren')->setButtonClass(ButtonControl::BUTTON_WARNING)->setLink('modView', 'install', array('id' => $this->request->id))->setIcon('arrow-right');
     $btnForward = new ButtonControl($btnGroup, 'btnBerechtigungen');
     $btnForward->setCaption('Berechtigungen')->setButtonClass(ButtonControl::BUTTON_DANGER)->setLink('modView', 'berechtigungen', array('id' => $this->request->id))->setIcon('lock');
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Namespace', $inputNamespace)->addRow('Qualified-Name', $inputQualifiedName)->addRow('Beschreibung', $inputDescription)->addRow('Autor', $inputAuthor)->addRow('Version', $inputVersion);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     // --------------------------------------------------------------------------------------------------
     $panel = $tabAction;
     $btnGroupAction = new ButtonGroupControl($panel, 'btnGroupAction');
     $btnNeu = new ButtonControl($btnGroupAction, 'btnNeu');
     $btnNeu->setCaption('Neue Aktion anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('modView', 'newAktion', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $btnCRUD = new ButtonControl($btnGroupAction, 'btnCRUD');
     $btnCRUD->setCaption('CRUD Aktionen anlegen')->setIcon('plus')->setLink('modView', 'newCRUD', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $listView = new ListViewControl($panel, 'lv');
     $listView->setSkinFile(__DIR__ . '/ModuleListView.skin');
     $listView->setItemSkinFile(__DIR__ . '/AktionListItem.skin');
     $listView->setVar('header', '<th>Name</th><th>Beschreibung</th><th>Menü</th><th>Sec-Level</th><th>Next-Typ</th><th>Next-Item</th><th>&nbsp;</th>');
     $listView->addItems($this->controller->aktionen);
     $panelEnt = $tabEntity;
     $panel = $panelEnt;
     $btnGroup = new ButtonGroupControl($panel, 'btnGroupEntity');
     $btnNeu = new ButtonControl($btnGroup, 'btnNeuEntity');
     $btnNeu->setCaption('Neue Entität anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('modView', 'newEntity', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $btnForward = new ButtonControl($btnGroup, 'btnForward');
     $btnForward->setCaption('DB aktualisieren')->setLink('modView', 'forwardEngineerAll', array('id' => $this->request->id))->setIcon('arrow-right');
     foreach ($this->controller->entities as $name => $entity) {
         $btnEdit = new ButtonControl(null, 'btnEdit');
         $btnEdit->setLink('ModView', 'editEntity', ['current' => $this->request->id, 'id' => $name])->setIcon('pencil')->setCaption('Bearbeiten')->setSize(ButtonControl::SIZE_EXTRASMALL)->addCssClass('nfs-modal');
         $btnDelete = new ButtonControl(null, 'btnDelete');
         $btnDelete->setLink('ModView', 'deleteEntity', ['current' => $this->request->id, 'id' => $name])->setIcon('trash')->setCaption('Löschen')->setButtonClass(ButtonControl::BUTTON_DANGER)->setSize(ButtonControl::SIZE_EXTRASMALL);
         $panel = new CaptionedPanelControl($panelEnt, '');
         if ($this->request->hash == 'entity_' . $name) {
             $panel->setCaption('<a data-toggle="collapse" href="#entity_' . $name . '"><b>' . $name . '</b> ' . $entity['extends'] . '</a>
             <div class="pull-right">' . $btnEdit->toHtml() . $btnDelete->toHtml() . '</div>');
             $panel->setSkin('<div class="panel panel-default {css}">
               <div class="panel-heading">
                 <h3 class="panel-title">{caption}</h3>
               </div>
               <div id="entity_' . $name . '" class="panel-collapse collapse in">
                   <div class="panel-body">
                     {controls}
                   </div>
               </div>
             </div>');
         } else {
             $panel->setCaption('<a class="collapsed" data-toggle="collapse" href="#entity_' . $name . '"><b>' . $name . '</b> ' . $entity['extends'] . '</a>
             <div class="pull-right">' . $btnEdit->toHtml() . $btnDelete->toHtml() . '</div>');
             $panel->setSkin('<div class="panel panel-default {css}">
               <div class="panel-heading">
                 <h3 class="panel-title">{caption}</h3>
               </div>
               <div id="entity_' . $name . '" class="panel-collapse collapse">
                   <div class="panel-body">
                     {controls}
                   </div>
               </div>
             </div>');
         }
         $btnGroup = new ButtonGroupControl($panel, '');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu');
         $btnNeu->setCaption('Neues Feld')->setIcon('plus')->setLink('modView', 'newFeld', array('current' => $this->request->id, 'entity' => $name))->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu2');
         $btnNeu->setCaption('Neue Relation')->setIcon('plus')->setLink('modView', 'newRelation', array('current' => $this->request->id, 'entity' => $name))->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu3');
         $btnNeu->setCaption('Neues Lookup')->setIcon('plus')->setLink('modView', 'newLookup', array('current' => $this->request->id, 'entity' => $name))->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnForward');
         $btnNeu->setCaption('In DB anlegen')->setIcon('arrow-right')->setLink('modView', 'forwardEngineer', array('current' => $this->request->id, 'id' => $name))->setSize(ButtonControl::SIZE_SMALL);
         $btnCRUD = new ButtonControl($btnGroup, 'btnBackward');
         $btnCRUD->setCaption('XML erzeugen')->setIcon('arrow-left')->setLink('modView', 'backwardEngineer', array('current' => $this->request->id, 'id' => $name))->setSize(ButtonControl::SIZE_SMALL);
         $listView = new ListViewControl($panel, '');
         $listView->setSkinfile(__DIR__ . '/FeldListView.template.html');
         $listView->setItemSkinFile(__DIR__ . '/FeldListItem.skin');
         $listView->setVar('moduleName', $this->request->id);
         $listView->setVar('entityName', $name);
         $listView->addItems($entity['felder']);
     }
 }