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();
 }
 public function toHtml()
 {
     $div = Html::createElement('div')->addCssClass('flowelement temp')->addAttribute('id', $this->id);
     $span = Html::createElement('span')->addCssClass('box')->addInnerHtml($this->text);
     $div->addInnerHtml($span);
     return $div->render();
 }
Exemplo n.º 3
0
 /**
  * @inheritdoc
  */
 public function toDesignModeHtml()
 {
     // TODO: Das muss hier raus, damit man Polymorphie nutzen kann
     if ($this->re_module == '') {
         return new HtmlControl(null);
     }
     $module = Modules::getModule($this->re_module);
     if ($module == null) {
         return new HtmlControl(null);
     }
     $action = $module->getAction($this->re_action);
     $div = Html::createElement('div')->addCssClass('panel panel-info')->addInnerHtml("<div class=\"panel-heading\">\n                    <span class=\"label label-default\">{$module->name}</span>\n                    <em>{$action->description}</em>\n                    <small>[{$this->re_parameter}]</small>\n                </div>");
     $divInner = Html::createElement('div')->addTo($div)->addCssClass('panel-body');
     $btnGroup = new \NewFrontiers\Controls\StdControls\ButtonGroupControl(null, 'btnGroup' . $this->id);
     $divInner->addInnerHtml($btnGroup);
     $btnDelete = new ButtonControl($btnGroup, 'btnDelete' . $this->id);
     $btnDelete->setCaption(' ')->setIcon('minus')->addCssClass('confirm')->addCssClass('btn-danger')->setLink('site', 'deleteRegion', array('id' => $this->id));
     $btnEdit = new ButtonControl($btnGroup, 'btnEdit' . $this->id);
     $btnEdit->setCaption('')->setIcon('edit')->addCssClass('nfs-modal')->addCssClass('btn-primary')->setLink('site', 'editRegion', array('id' => $this->id));
     $btnUp = new ButtonControl($btnGroup, 'btnUp' . $this->id);
     $btnUp->setCaption('')->setIcon('arrow-up')->setLink('site', 'regionUp', array('id' => $this->id));
     $btnDown = new ButtonControl($btnGroup, 'btnDown' . $this->id);
     $btnDown->setCaption('')->setIcon('arrow-down')->setLink('site', 'regionDown', array('id' => $this->id));
     $result = new HtmlControl(null, 'region' . $this->id);
     $result->setInnerHtml($div->render());
     return $result;
 }
 public function toHtml()
 {
     $div = Html::createElement('div')->setId('da-slider')->addCssClass('da-slider');
     foreach ($this->artikel as $current) {
         $slide = Html::createElement('div')->addCssClass('da-slide')->addInnerHtml($current->getText())->addTo($div);
     }
     $arrows = Html::createElement('div')->addCssClass('da-arrows')->addInnerHtml('<span class="da-arrows-prev"></span>')->addInnerHtml('<span class="da-arrows-next"></span>')->addTo($div);
     return $div->render();
 }
 public function toHtml()
 {
     $div = Html::createElement('div')->addCssClass('flowelement ende')->addAttribute('id', $this->id);
     $span = Html::createElement('span')->addCssClass('box')->addInnerHtml('ENDE');
     if ($this->aktivitaet->wa_status >= 100) {
         $span->addCssClass('complete');
     }
     $div->addInnerHtml($span);
     return $div->render();
 }
 public function toHtml()
 {
     if ($this->name == '') {
         $this->name = $this->id;
     }
     $html = Html::createElement('input')->attr('type', 'text')->attr('id', $this->id)->attr('name', $this->name)->attr('value', $this->value)->attr('min', $this->min)->attr('max', $this->max)->attr('step', $this->step)->data('size', $this->size)->addCssClass('rating')->addCssClasses($this->cssClasses);
     if ($this->readOnly) {
         $html->attr('disabled', 'disabled');
     }
     return $html->render();
 }
 /**
  * Gibt den HTML Code für ein ERgebnis-Label aus
  * @param $ergebnis
  * @return string
  */
 public static function ergebnisLabel($ergebnis)
 {
     $label = Html::createElement('span')->addCssClass('label');
     if ($ergebnis == self::ERGEBNIS_FEHLER) {
         $label->addCssClass('label-danger')->addInnerHtml('fehlgeschlagen');
     } elseif ($ergebnis == self::ERGEBNIS_OK) {
         $label->addCssClass('label-success')->addInnerHtml('erfolgreich');
     } else {
         return '';
     }
     return $label->render();
 }
 public function toHtml()
 {
     $html = Html::createElement('input');
     $html->addAttribute('type', 'password')->addAttribute('id', $this->id)->addAttribute('name', $this->id)->addAttribute('value', $this->value)->addCssClass('form-control')->addCssClasses($this->cssClasses);
     if ($this->maxlength > 0) {
         $html->addAttribute('maxlength', $this->maxlength);
     }
     if ($this->readOnly) {
         $html->addAttribute('disabled', 'disabled');
     }
     return $html->render();
 }
 public function toHtml()
 {
     $html = Html::createElement('input');
     $html->addAttribute('type', 'file')->addAttribute('id', $this->id)->addAttribute('name', $this->id)->addCssClasses($this->cssClasses);
     if ($this->readOnly) {
         $html->addAttribute('disabled', 'disabled');
     }
     if ($this->oldMedium) {
         return "<a href='" . $this->oldMedium->getUrl() . "'>" . $this->oldMedium->me_dateiname . "</a><br><br>" . $html->render();
     } else {
         return $html->render();
     }
 }
 public function toHtml()
 {
     $temp = "";
     // Prototypen der Edit-Controls ausgeben
     if ($this->editMode) {
         $add = Html::createElement('a')->addCssClass('add')->addAttribute('id', 'templateAdd')->addAttribute('href', Application::link('workflow', 'newWorkflowaktivitaet'))->addAttribute('style', 'display: block;')->addAttribute('title', 'Aktivität einfügen')->addInnerHtml(Template::img('icons/add.png', true));
         $del = Html::createElement('a')->addCssClass('add')->addAttribute('href', Application::link('workflow', 'deleteWorkflowaktivitaet'))->addAttribute('id', 'templateDel')->addAttribute('title', 'Löschen')->addInnerHtml(Template::img('icons/delete.png', true));
         $edit = Html::createElement('a')->addCssClass('add')->addAttribute('href', Application::link('workflow', 'editWorkflowaktivitaet'))->addAttribute('id', 'templateEdit')->addAttribute('title', 'Bearbeiten')->addInnerHtml(Template::img('icons/page_white_edit.png', true));
         $container = Html::createElement('div')->addAttribute('style', 'display:none;')->addInnerHtml($add)->addInnerHtml($del)->addInnerHtml($edit);
         $temp = $container->render();
     }
     $div = Html::createElement('div')->addCssClass('flowchart')->addAttribute('id', $this->id)->addInnerHtml($this->workflow->getStart()->render());
     return $temp . $div->render();
 }
 public function toHtml()
 {
     $html = Html::createElement('textarea');
     $html->addAttribute('id', $this->id)->addCssClass('form-control')->addAttribute('name', $this->name)->addInnerHtml($this->value)->addCssClasses($this->cssClasses);
     if ($this->readOnly) {
         $html->addAttribute('disabled', 'disabled');
     }
     if ($this->maxlength) {
         $html->addAttribute('maxlength', $this->maxlength);
     }
     if ($this->placeholder != '') {
         $html->addAttribute('placeholder', $this->placeholder);
     }
     return $html->render();
 }
 public function toHtml()
 {
     $div = Html::createElement('div')->addCssClass('flowelement')->addAttribute('id', $this->id);
     $span = Html::createElement('span')->addCssClass('box')->addInnerHtml($this->text . ' ')->addTo($div);
     if ($this->aktivitaet->wa_status >= 100) {
         $img = Html::createElement('img')->addTo($span)->addAttribute('src', Template::img('icons/tick.png'))->addAttribute('title', 'Abgeschlossen am ' . $this->aktivitaet->wa_abschlussdatum . ' von ' . $this->aktivitaet->abschlussbenutzer_vorname . ' ' . $this->aktivitaet->abschlussbenutzer_name);
         $span->addCssClass('complete');
     } elseif ($this->aktivitaet->wa_status >= 0) {
         $span->addInnerHtml('<a href="' . Configuration::get('site.scriptUrl') . '/workflow/finishActivity/id/' . $this->aktivitaet->id . '" class="tick">&nbsp;</a>');
         $span->addCssClass('active');
     } else {
         $span->addCssClass('not_yet');
     }
     return $div->render();
 }
Exemplo n.º 13
0
 public function toHtml()
 {
     $div = Html::createElement('div')->addCssClass('flowelement')->addAttribute('id', $this->id);
     $span = Html::createElement('span')->addCssClass('box')->addInnerHtml('IF')->addTo($div);
     $table = Html::createElement('table')->addCssClass('if')->addTo($div);
     // HEADER
     $tr = Html::createElement('tr')->addCssClass('if_top')->addTo($table);
     $td = Html::createElement('td')->addCssClass('if_links')->addInnerHtml('&nbsp;')->addTo($tr);
     $td = Html::createElement('td')->addCssClass('if_Rechts')->addInnerHtml('&nbsp;')->addTo($tr);
     // DATEN
     $tr = Html::createElement('tr')->addTo($table);
     $td = Html::createElement('td')->addInnerHtml(new WAPlatzhalterControl(null))->addTo($tr);
     $td = Html::createElement('td')->addInnerHtml(new WAPlatzhalterControl(null))->addTo($tr);
     // FOOTER
     $tr = Html::createElement('tr')->addTo($table);
     $td = Html::createElement('td')->addCssClass('if_links')->addInnerHtml('&nbsp;')->addTo($tr);
     $td = Html::createElement('td')->addCssClass('if_Rechts')->addInnerHtml('&nbsp;')->addTo($tr);
     return $div->render();
 }
 public function toHtml()
 {
     $group = Html::create('fieldset');
     if ($this->caption != null) {
         $legend = Html::create('legend')->addInnerHtml($this->caption)->addTo($group);
     }
     foreach ($this->boxen as $box) {
         $input = Html::create('input')->attr('type', 'radio')->attr('id', $this->id . '_' . $box['id'])->attr('name', $this->id)->attr('value', $box['value']);
         $label = Html::create('label')->text($input)->text($box['text'])->addTo($group);
         if ($box['checked']) {
             $input->addAttribute('checked', 'checked');
         }
     }
     if (count($this->boxen) > 5) {
         $outer = Html::createElement('div')->addAttribute('style', 'height: 300px; overflow: auto; margin-bottom: 10px;')->addInnerHtml($group);
         return $outer->render();
     } else {
         return $group->render();
     }
 }
 public function toHtml()
 {
     $div = Html::createElement('div')->addCssClass('checkbox');
     $html = Html::createElement('input')->addTo($div)->addAttribute('type', 'checkbox')->addAttribute('id', $this->id)->addAttribute('name', $this->id . "_box")->addAttribute('value', $this->value)->data('toggle', 'toggle')->data('on', $this->textOn)->data('off', $this->textOff)->addCssClass('checkbox')->addCssClasses($this->cssClasses);
     if ($this->styleOn !== '') {
         $html->data('onstyle', $this->styleOn);
     }
     if ($this->styleOff !== '') {
         $html->data('offstyle', $this->styleOff);
     }
     if ($this->readOnly) {
         $html->addAttribute('disabled', 'disabled');
     }
     $valueStr = 0;
     if ($this->checked) {
         $html->addAttribute('checked', 'checked');
         $valueStr = 1;
     }
     $hidden = Html::createElement('input')->addAttribute('type', 'hidden')->addAttribute('name', $this->id)->addAttribute('id', $this->id . '_hidden')->addAttribute('value', $valueStr);
     return $div->render() . $hidden->render();
 }
 public function toHtml()
 {
     $caption = $this->caption;
     $link = '';
     if ($this->icon !== '' && $this->iconPosition === self::ICON_LEFT) {
         $caption = '<span class="glyphicon glyphicon-' . $this->icon . '"></span> ' . $caption;
     }
     if ($this->icon !== '' && $this->iconPosition === self::ICON_RIGHT) {
         $caption = $caption . ' <span class="glyphicon glyphicon-' . $this->icon . '"></span>';
     }
     if (!$this->isSubmit && !isset($this->onClick)) {
         $link = Routing::appLink($this->module, $this->action, $this->parameter);
     }
     // Link
     if ($this->useAnchor) {
         $html = Html::create('a')->attr('role', 'button')->attr('href', $link)->text($caption);
         if ($this->target != null) {
             $html->addAttribute('target', $this->target);
         }
         if ($this->disabled) {
             $html->addCssclass('disabled');
         }
         // Submit
     } elseif ($this->isSubmit) {
         $html = Html::createElement('button');
         $html->addAttribute('type', 'submit')->addInnerHtml($caption);
         if ($this->disabled) {
             $html->addAttribute('disabled', 'disabled');
         }
         // Button als Link
     } elseif (!isset($this->onClick)) {
         $html = Html::createElement('button');
         $html->addAttribute('type', 'button')->addAttribute('onClick', "location.href='{$link}'")->addInnerHtml($caption);
         if ($this->disabled) {
             $html->addAttribute('disabled', 'disabled');
         }
     } else {
         $html = Html::createElement('button');
         $html->addAttribute('type', 'button')->addAttribute('onClick', $this->onClick)->addInnerHtml($caption);
         if ($this->disabled) {
             $html->addAttribute('disabled', 'disabled');
         }
     }
     if (isset($this->dataTarget)) {
         $html->data('target', $this->dataTarget);
     }
     $html->attr('id', $this->id)->attr('title', $this->title)->css($this->cssClasses)->css('btn')->css('btn-' . $this->buttonClass);
     if ($this->size !== self::SIZE_DEFAULT) {
         $html->css('btn-' . $this->size);
     }
     return $html->render() . ' ';
 }
 public function toHtml()
 {
     $div = Html::createElement('div')->addCssClasses($this->cssClasses)->addAttribute('id', $this->id);
 }
Exemplo n.º 18
0
 /**
  * Gibt das UL-Tag für die Tabs zurück
  * @return Html
  */
 public function getTabHtml()
 {
     $tabs = Html::createElement('ul')->addAttribute('id', $this->id . '_tabs')->addCssClasses($this->cssClasses)->addCssClass('nav');
     if (!$this->usePills) {
         $tabs->addCssClass('nav-tabs');
     } else {
         $tabs->addCssClass('nav-pills');
     }
     $i = 0;
     foreach ($this->tabs as $name => $tab) {
         $key = $this->getKeyFromName($name);
         $li = Html::createElement('li')->addTo($tabs);
         $a = Html::createElement('a')->addAttribute('href', '#' . $key)->addAttribute('data-toggle', 'tab')->text($name)->addTo($li);
         if ($i == $this->initPanel || $key == $this->activePanel) {
             $li->addCssClass('active');
         }
         $i++;
     }
     return $tabs;
 }
 public function toHtml()
 {
     $path = Configuration::get('site.url');
     $script = Configuration::get('site.scriptUrl');
     $this->loadDateien();
     $div = Html::createElement('div')->addAttribute('id', $this->id)->addCssClass('row')->addCssClass('galeriediv')->addCssClass('magnific');
     $i = 0;
     $colWidth = intval(12 / $this->columns);
     foreach ($this->dateien as $akt) {
         //if ($i % $this->columns == 0) {
         //    $outer = Html::createElement('div')->addCssClass('row')->addTo($div);
         //}
         $inner = Html::createElement('div')->addCssClass("col-xs-12 col-sm-" . $colWidth)->addTo($div);
         $element = Html::createElement('div')->addCssClass("thumbnail")->addTo($inner);
         $link = Html::createElement('a')->addTo($element)->addAttribute('id', 'link_img' . $akt->id)->addAttribute('title', $akt->me_titel)->addAttribute('href', $akt->getResizeUrl());
         $image = Html::createElement('div')->addTo($link)->addCssClass('imageContainer')->addAttribute('style', 'height: 200px; overflow: hidden;');
         $thumb = Html::createElement('img')->addTo($image)->addAttribute('src', $akt->getResizeUrl())->addAttribute('alt', $akt->me_titel)->addAttribute('id', 'img' . $akt->id)->addAttribute('style', 'min-height: 100%; max-width: 100%;');
         $iconContainer = Html::createElement('div')->addCssClass('caption')->addAttribute('style', 'text-align: right; padding: 5px 0 0;')->addTo($element);
         if ($this->showSave) {
             $saveLink = HTML::createElement('a')->addTo($iconContainer)->addAttribute('target', '_blank')->addAttribute('style', 'margin-left: 3px;')->addCssClass('btn btn-primary btn-xs')->addAttribute('href', $script . '/medien/download/id/' . $akt->id);
             $icon = HTML::createElement('span')->addTo($saveLink)->addCssClass('glyphicon glyphicon-download-alt');
         }
         if ($this->showDrehen) {
             $drehenLink = HTML::createElement('a')->addTo($iconContainer)->addCssClass('reloadImage')->addCssClass('btn btn-default btn-xs')->addAttribute('data-image', 'img' . $akt->id)->addAttribute('style', 'margin-left: 3px;')->addAttribute('href', $script . '/medien/rotateClockwise/id/' . $akt->id);
             $icon = HTML::createElement('span')->addTo($drehenLink)->addCssClass('glyphicon glyphicon-repeat');
         }
         if ($this->showDelete) {
             $deleteLink = HTML::createElement('a')->addTo($iconContainer)->addCssClass('confirm')->addCssClass('deletelink')->addCssClass('btn btn-danger btn-xs')->addCssClass('sendAndRemove')->addAttribute('style', 'margin-left: 3px;')->addAttribute('href', $script . '/medien/deleteMedien/id/' . $akt->id);
             $icon = HTML::createElement('span')->addTo($deleteLink)->addCssClass('glyphicon glyphicon-remove');
         }
         $i++;
     }
     return $div->render();
 }
 public function toHtml()
 {
     $html = Html::createElement('div')->addAttribute('id', $this->id)->addCssClass('panel')->addCssClass('panel-default')->addCssClasses($this->cssClasses);
     $inner = Html::createElement('div')->addTo($html)->addCssClass('panel-body')->addInnerHtml($this->renderChildren());
     return $html->render();
 }
 public function toHtml()
 {
     $html = Html::createElement('div')->addAttribute('id', $this->id)->addCssClasses($this->cssClasses)->addInnerHtml($this->renderChildren());
     return $html->render();
 }
 public function toHtml()
 {
     return Html::createElement('div')->setId($this->id)->addCssClass('mapControl')->render();
 }