/**
  * @covers \NewFrontiers\Framework\Output\Template::img
  */
 public function testImg()
 {
     Template::load('bootadmin', true);
     $baseUrl = Configuration::get('site.internalUrl') . '/templates/bootadmin';
     $imgString = Template::img('image.png', false, null);
     $this->assertEquals($baseUrl . '/img/image.png', $imgString);
     $imgString = Template::img('image.png', true, null);
     $this->assertEquals('<img src="' . $baseUrl . '/img/image.png" />', $imgString);
     $imgString = Template::img('image.png', true, 'meineId');
     $this->assertEquals('<img src="' . $baseUrl . '/img/image.png" id="meineId"/>', $imgString);
 }
 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);
 }
 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;
 }
echo $_SESSION['name'];
?>
</strong>
                             </span> <span class="text-muted text-xs block">Mitarbeiter <b class="caret"></b></span> </span> </a>

                            <!-- Dropdown Profile -->
                            <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                <li><a href="#">Profil</a></li>
                                <li class="divider"></li>
                                <li><a href="#">Abmelden</a></li>
                            </ul>
                    </div>

                    <div class="logo-element">
                        <img src="<?php 
echo Template::img('logo.png');
?>
">
                    </div>

                </li>


                <!-- Main-Menu -->
                <?php 
$menu = new SiteMenuControl(null, 'menuMain1');
$menu->display();
?>

            </ul>