protected function createControls()
 {
     $button = new StdControls\NewEntityButtonControl($this, 'btnNew');
     $button->setEntity(new Importtyp());
     $grid = new DataControls\GridControl($this, 'grid');
     $grid->setEntity(new Importtyp(), $this->request)->col('it_bezeichnung')->createColumn(GridColumn::ENTITYOPS);
 }
 protected function createControls()
 {
     $callback = function ($entity) {
         if ($entity->ip_level == 'Warnung') {
             return 'warning';
         } elseif ($entity->ip_level == 'Fehler') {
             return 'danger';
         }
         return '';
     };
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Importprotokoll(), $this->request)->col('ip_zeitpunkt')->col('ip_level')->col('ip_meldung')->setRowClassCallable($callback);
 }
 /**
  * @param GridControl $grid
  * @return $this
  */
 public static function create(GridControl $grid)
 {
     $called = get_called_class();
     $temp = new $called();
     $grid->addColumn($temp);
     return $temp;
 }
 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()
 {
     $button = new NewEntityButtonControl($this, 'buttonNeu');
     $button->setEntity(new Rolle())->addCssClass('nfs-modal');
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Rolle(), $this->request);
     $grid->createColumn(GridColumn::FIELD, 'ro_bezeichnung');
     $grid->createColumn(GridColumn::FIELD, 'ro_schluessel');
     $grid->createColumn(GridColumn::FIELD, 'ro_aktiv');
     $grid->createColumn(GridColumn::FIELD, 'parent');
     $grid->createColumn(GridColumn::ENTITYOPS);
     $grid->groupColumn = 3;
     $grid->setSortable(false);
 }
 protected function createControls()
 {
     $this->setPostback('user', 'endEditUser', array('id' => $this->controller->user->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Benutzer » bearbeiten');
     $lookupSprache = new DataControls\LookupBoxControl(null, 'us_sprache');
     $lookupSprache->setLookupEntity(new Sprache())->setTextfield('sp_bezeichnung')->setValuefield('sp_id')->showNull(0, '-- bitte wählen --')->preSelect($this->controller->user->us_sprache);
     $anreden = new FormControls\InputSelectControl(null, 'us_anrede');
     $anreden->addOption(0, '-- bitte wählen --');
     $anreden->addOption('Firma', 'Firma');
     $anreden->addOption('Frau', 'Frau');
     $anreden->addOption('Herr', 'Herr');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->user)->setHeader('Stammdaten bearbeiten')->addRow('us_benutzername')->addRow('us_aktiv')->addRow('Anrede', $anreden)->addRow('us_vorname')->addRow('us_name')->addRow('us_profilbild')->addRow('us_email')->addRow('Sprache', $lookupSprache)->addRow('us_anonymous')->addRow('us_passwort');
     $button = new SaveButtonControl($panel, 'btnSave');
     if ($this->request->action != 'newUser') {
         $pnlRolle = new CaptionedPanelControl($this, 'pnlRolle');
         $pnlRolle->setCaption('Rollenzuweisung');
         $lookupRolle = new DataControls\LookupBoxControl(null, 'ro_id');
         $lookupRolle->setLookupEntity(new Rolle())->setTextfield('ro_bezeichnung')->setValuefield('ro_id')->showNull(0, '-- bitte wählen --');
         $sbmRolle = new ExtControls\SubmitDataControl($pnlRolle, 'sbmRolle');
         $sbmRolle->setModule('user')->setAction('insertRolle')->setNotify('grid')->setHiddenValue('user', $this->controller->user->id)->add($lookupRolle);
         $grid = new GridControl($pnlRolle, 'grid');
         $grid->setEntity(new UserRolle(), $this->request);
         $grid->setDeleteAction('removeRolle');
         $grid->createColumn(GridColumn::FIELD, 'us_name', '{us_vorname} {us_name}');
         $grid->createColumn(GridColumn::FIELD, 'ro_bezeichnung');
         $grid->createColumn(GridColumn::DELETELINK);
     }
 }
 protected function createControls()
 {
     $button = new StdControls\NewEntityButtonControl($this, 'button');
     $button->setCaption('Neue Kategorie anlegen')->setLink('cms', 'newCmsKategorie');
     $grid = new DataControls\GridControl($this, 'grid');
     $grid->setEntity(new Model\CmsKategorie(), array('typ' => 'norm'));
     $grid->groupColumn = 1;
     $grid->createColumn(GridColumn::FIELD, 'ck_bezeichnung');
     $grid->createColumn(GridColumn::FIELD, 'parent');
     $grid->createColumn(GridColumn::LINK, null, 'Artikel »')->setAppLink('cms', 'showArtikel', array('kategorie' => '{ck_id}'));
     $grid->createColumn(GridColumn::LINK, null, Template::img('icons/sitemap_color.png', true))->setAppLink('site', 'newPage', array('site' => 2, 'mi_module' => 'cms', 'mi_action' => 'blog', 'mi_id' => '{ck_id}', 'text' => '{ck_bezeichnung}'), null, 'Zu Sitemap hinzufügen');
     $grid->createColumn(GridColumn::ENTITYOPS);
 }
 protected function createControls()
 {
     $this->setPostback('User', 'indexUser');
     $searchBox = new SearchBoxControl($this, 'suchbegriff');
     $searchBox->addCssClass('pull-right');
     $button = new NewEntityButtonControl($this, 'button');
     $button->setEntity(new User());
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new User(), $this->request);
     $grid->setDeleteAction('deleteUser');
     $grid->createColumn(GridColumn::FIELD, 'us_benutzername');
     $grid->createColumn(GridColumn::FIELD, 'us_name');
     $grid->createColumn(GridColumn::FIELD, 'us_vorname');
     $grid->createColumn(GridColumn::FIELD, 'us_aktiv');
     GridColumnButtonLink::create($grid)->setButtonLink('Aktivierunsmail senden', 'User', 'aktivierungslinkSenden', ['id' => '{us_id}']);
     $grid->createColumn(GridColumn::ENTITYOPS);
 }
 protected function createControls()
 {
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Page » 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()
 {
     $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);
 }
Exemplo n.º 11
0
 protected function createControls()
 {
     $button = new StdControls\NewEntityButtonControl($this, 'btnNew');
     $button->setEntity(new Site());
     $grid = new GridControl($this, 'grid');
     $grid->setEntity(new Site(), $this->request);
     $grid->createColumn(GridColumn::FIELD, 'si_bezeichnung');
     $grid->col('si_template');
     $grid->createColumn(GridColumn::BUTTONLINK)->setButtonLink('Seiten', 'Site', 'showPage', array('site' => '{si_id}'));
     $grid->createColumn(GridColumn::ENTITYOPS);
 }
Exemplo n.º 12
0
 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;
 }
 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()
 {
     $grid = new DataControls\GridControl($this, 'grid');
     $grid->setEntity(new Historie(), $this->request)->col('hi_timestamp')->col('us_anzeigename')->col('hi_feld')->col('hi_alter_wert')->col('hi_neuer_wert');
 }
 protected function createControls()
 {
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Teilen von Dateien');
     $upload = new UploaderControl($panel);
     $upload->setAction('uploadShare');
     $upload->setNotify('medien');
     $size = "<?php echo round({me_groesse}/1024/1024,1); ?> MB";
     $sendLink = Configuration::get('site.url') . '/index.php/medien/get?token={me_token}';
     $send = "<a class='btn-xs btn-default' href='mailto:?body=" . $sendLink . "'><span class='glyphicon glyphicon-envelope'></span></a>";
     $editLink = Application::routing()->appLink('medien', 'editShare', array('id' => '{me_id}'));
     $edit = "<a class='btn-xs btn-default' href=" . $editLink . "><span class='glyphicon glyphicon-edit'></span></a>";
     $buttons = $send . $edit;
     $token = new InputTextboxControl(null);
     $token->setValue($sendLink)->addCssClass('input-sm');
     $valid = "<?php echo ((strtotime('{me_valid_until}')) < strtotime(date('d.m.Y'))) ? '<span style=\"color: red;\">Abgelaufen</span>' : '{me_valid_until}'; ?>";
     $downloads = "<?php echo '{me_downloads}' == '' ? 0 : {me_downloads}?>";
     $medien = new GridControl($panel, 'medien');
     $medien->setEntity(new Medien(), array('share' => 1));
     $medien->setDeleteAction('deleteMedien');
     $medien->createColumn(GridColumn::LINK, 'me_titel')->setAppLink('medien', 'editShare', array('id' => '{me_id}'));
     $medien->createColumn(GridColumn::FIELD, 'me_erweiterung')->setHeader('Typ');
     $medien->createColumn(GridColumn::FIELD, 'me_groesse', $size);
     $medien->createColumn(GridColumn::FIELD, 'me_token', $token->toHtml())->setHeader('Download-Link');
     $medien->createColumn(GridColumn::FIELD, 'me_downloads', $downloads);
     $medien->createColumn(GridColumn::FIELD, 'me_valid_until', $valid);
     $medien->createColumn(GridColumn::FIELD, 'me_titel', $buttons)->setHeader('');
     $medien->createColumn(GridColumn::DELETELINK);
     $hinweis = new CoreControls\HtmlControl($this);
     $hinweis->setInnerHtml("<span style='color: #AAA;'><b>Hinweis:</b> Abgelaufene Dateien werden nach 14 Tagen automatisch gelöscht.</span>");
 }