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();
 }
 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);
 }