/**
  *
  */
 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->setPostback('site', 'endEditSite', array('id' => $this->controller->site->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Sitemaps » bearbeiten');
     $selTemplate = new InputSelectControl(null, 'si_template');
     $selTemplate->addOptions(Template::listTemplates());
     $selTemplate->preSelect($this->controller->site->si_template);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->site)->setHeader('Stammdaten bearbeiten')->addRow('si_bezeichnung')->addRow('si_name')->addRow('Template', $selTemplate)->addRow('si_urlpattern');
     $button = new SaveButtonControl($panel, 'button');
 }
 public function toHtml()
 {
     $path = Configuration::get('site.url');
     $iconPath = Template::getInstance()->imgDirectory;
     $script = Configuration::get('site.scriptUrl');
     $this->unterordner = new Kollektion();
     $this->unterordner = $this->unterordner->filter(['parent' => $this->ordner]);
     $this->dateien = new Medien();
     $this->dateien = $this->dateien->filter(['kollektion' => $this->ordner]);
     $div = Html::create('div')->addAttribute('id', $this->id);
     $table = Html::create('table')->css('table')->css('table-striped')->css('table-hover')->addTo($div);
     // HEADER
     $thead = Html::create('thead')->addTo($table);
     $tr = Html::create('tr')->addTo($thead);
     $th = Html::create('th')->addTo($tr)->addInnerHtml('Titel');
     $th = Html::create('th')->addTo($tr)->addInnerHtml('Dateiname');
     $th = Html::create('th')->addTo($tr)->addInnerHtml('Größe');
     $th = Html::create('th')->addTo($tr)->addCssClass('icon')->addInnerHtml(' ');
     // BODY
     $tbody = Html::create('tbody')->addTo($table);
     // Ebene nach oben
     if ($this->ordnerObj != null && $this->ordnerObj->ko_parent > 0 && $this->showUp) {
         $tr = Html::create('tr')->addTo($tbody);
         $td = Html::create('td')->addTo($tr)->addInnerHtml('<a class="nfs-ajax" data-target="' . $this->ajaxTarget . '" href="' . $script . '/medien/showKollektion/id/' . $this->ordnerObj->ko_parent . '"><img src="' . $iconPath . '/icons/folder_up.png" /> zurück...</a>');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
     } elseif ($this->ordnerObj != null && $this->showUp) {
         $tr = Html::create('tr')->addTo($tbody);
         $td = Html::create('td')->addTo($tr)->addInnerHtml('<a class="nfs-ajax" data-target="' . $this->ajaxTarget . '" href="' . $script . '/medien/showKollektion"><img src="' . $iconPath . '/icons/folder_up.png" /> zurück...</a>');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
     }
     foreach ($this->unterordner as $akt) {
         $tr = Html::create('tr')->addTo($tbody);
         $td = Html::create('td')->addTo($tr)->addInnerHtml('<a class="nfs-ajax" data-target="' . $this->ajaxTarget . '" href="' . $script . '/medien/showKollektion/id/' . $akt->id . '"><img src="' . $iconPath . '/files/folder.png" /> ' . $akt->ko_bezeichnung . "</a> <a href=\"" . $script . "/medien/editKollektion/id/" . $akt->id . "\">[Edit]</a>");
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
         $td = Html::create('td')->addTo($tr)->addInnerHtml('');
         $td = Html::create('td')->addTo($tr)->addCssClass('icons')->addInnerHtml('<a class="nfs-ajax" data-target="' . $this->ajaxTarget . '" href="' . $script . '/medien/deleteKollektion/id/' . $akt->id . '"><img src="' . $iconPath . '/icons/delete.png" /></a>');
     }
     foreach ($this->dateien as $akt) {
         $tr = Html::create('tr')->addTo($tbody);
         // TODO: Bilder und andere Dokumente unterscheiden
         $td = Html::create('td')->addTo($tr)->addInnerHtml('<a class="magnigic-popup" href="' . $path . '/medien/' . $akt->me_kollektion . '/' . $akt->me_dateiname . '"><img src="' . $iconPath . '/files/' . $akt->me_erweiterung . '.png" /> ' . $akt->me_titel . "</a>&nbsp;&nbsp;&nbsp; <a href=\"" . $script . "/medien/editMedien/id/" . $akt->id . "\">[Edit]</a>");
         $td = Html::create('td')->addTo($tr)->addInnerHtml($akt->me_dateiname);
         $td = Html::create('td')->addTo($tr)->addInnerHtml(intval($akt->me_groesse / 1024) . ' KB');
         $td = Html::create('td')->addTo($tr)->addCssClass('icons')->addInnerHtml('<a href="' . $script . '/medien/deleteMedien/id/' . $akt->id . '"><img src="' . $iconPath . '/icons/delete.png" /></a> ');
     }
     $script = Html::create('script')->addInnerHtml("\n            \$('.magnific-popup').magnificPopup({\n                type: 'image'\n            });\n          ");
     return $table->render() . $script->render();
 }
 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 &raquo;')->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);
 }
 /**
  * @param $outerTemplate
  */
 public function __construct($outerTemplate = '')
 {
     if ($outerTemplate != '') {
         $templateToUse = Template::load($outerTemplate);
     } else {
         $templateToUse = Template::getInstance();
     }
     // Default Templates
     $this->readTemplatesInPath('site/templates');
     // Theme Templates
     //if (file_exists($templateToUse->getTemplateDirectory())) {
     //    $this->readTemplatesInPath($templateToUse->getTemplateDirectory());
     //}
 }
 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();
 }
 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()
 {
     $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;
 }
 /**
  * Diese Methode lädt den Inhalt einer Skin-Datei in die Skin-Property der
  * Klasse. Dabei wird zuerst geschaut, ob es im aktuellen Template-Verzeichnis
  * eine entsprechende Datei gibt. Wenn nicht wird das Default-Skin geladen.
  * Die Skin eines Controls wird im Cache hinterlegt, um die Festplattten-
  * zugriffe zu minimieren. Dies kann zu Problemem führen, wenn im gleichen
  * Request zwei verschiedene Templates angesprochen werden. Aktuell ist dies
  * nicht vorgesehen.
  */
 protected function loadSkin()
 {
     // 1. Schritt -> Versuch aus Template zu lesen
     // 2. Schritt -> Default lesen
     if ($this->skin === null) {
         $this->skin = Cache::get($this->getCacheId(), Template::loadSkin($this));
         if ($this->skin === null && $this->defaultSkinFile !== '') {
             $this->skin = file_get_contents($this->defaultSkinFile);
         }
         Cache::set($this->getCacheId(), $this->skin);
     }
 }
 /**
  * @covers \NewFrontiers\Framework\Output\Template::listTemplates
  */
 public function testListTemplates()
 {
     $template = Template::load('test', true);
     static::assertEquals(array("another", "test"), Template::listTemplates());
 }
 /**
  * Äußeres Template ausgeben
  * @param View $view
  */
 protected function display(View $view)
 {
     Profiler::startSection('Application.display');
     // Gibt es überhaupt was zum Ausgeben? Übertragen von displayMain
     if ($view !== null) {
         $this->view = $view;
         if ($this->template === null) {
             $this->template = Configuration::get('template');
         }
         Template::load($this->template, true);
         Template::display();
     } else {
         Logging::error('Kein View zum Anzeigen gefunden');
         $this->showError();
     }
     Profiler::endSection('Application.display');
 }
Esempio n. 12
0
    <!-- /.modal-dialog -->
</div>


<?php 
Template::js('jquery-2.1.1.js');
Template::js('bootstrap.min.js');
Template::js('plugins/metisMenu/jquery.metisMenu.js');
Template::js('plugins/slimscroll/jquery.slimscroll.min.js');
Template::js('inspinia.js');
Template::js('plugins/pace/pace.min.js');
Template::js('plugins/jvectormap/jquery-jvectormap-2.0.2.min.js');
Template::js('plugins/jvectormap/jquery-jvectormap-world-mill-en.js');
Template::js('ModalizerControl.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('GridControl.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('spin.js', Configuration::get('site.internalUrl') . '/bower_components/spin.js');
Template::js('jquery.spin.js', Configuration::get('site.internalUrl') . '/bower_components/spin.js');
Template::js('jquery.validate.min.js', Configuration::get('site.internalUrl') . '/bower_components/jquery-validation/dist');
Template::js('globalize.js', Configuration::get('site.internalUrl') . '/bower_components/globalize/lib');
Template::js('globalize.culture.de-DE.js', Configuration::get('site.internalUrl') . '/bower_components/globalize/lib/cultures');
Template::js('validator.languages.de.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('jquery.validate.globalize.min.js', Configuration::get('site.internalUrl') . '/assets');
Template::js('Chart.min.js', Configuration::get('site.internalUrl') . '/bower_components/Chart.js/dist');
Debug::showDebugConsole();
Javascript::display();
?>

</body>

</html>
Esempio n. 13
0
    <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

    <?php 
Template::css('default.css?v2');
?>
    <?php 
Template::css('bootstrap-datetimepicker.min.css');
?>
    <?php 
Template::css('jquery.fileupload.css');
?>
    <?php 
Template::css('typeahead.css');
?>
    <?php 
Template::css('bootstrap-slider.min.css');
?>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->

    <script src="//code.jquery.com/jquery-1.11.2.min.js"></script>


</head>
<body style="padding-top: 70px;">

Esempio n. 14
0
<!DOCTYPE html>
<html>
<head lang="de">
    <meta charset="UTF-8">
    <title>Ausdruck</title>
    <?php 
use NewFrontiers\Framework\Core\Application;
use NewFrontiers\Framework\Output\Template;
Template::css('default.css?v2');
?>
</head>
<body>

<?php 
Application::getInstance()->displayMain();
?>

</body>
</html>