protected function createControls()
 {
     $kommentare = $this->controller->kommentare;
     $anzahl = count($kommentare);
     if (!$this->request->ajax) {
         $panel = new CaptionedPanelControl($this, 'pnlKommentare');
         $panel->setCaption('Kommentare (' . $anzahl . ')')->setCollapsed(true);
         $container = new ControlContainer($panel, 'ctnrKommentare');
         $container->setSkin('<div id="ctnrKommentare">{controls}</div>');
     } else {
         $container = $this;
     }
     foreach ($this->controller->kommentare as $kommentar) {
         $control = new KommentarControl($container, 'k' . $kommentar->id);
         $control->setKommentar($kommentar);
     }
     if (!$this->request->ajax) {
         $submit = new SubmitDataControl($panel, 'sbmKommentare');
         $submit->setTarget('ctnrKommentare')->setInline(false)->setModule('Kommentare')->setAction('endEditKommentar')->setHiddenValue('ko_element_tabelle', $this->request->entity)->setHiddenValue('ko_element_id', $this->request->id);
         // Möglichkeit neuen Kommentar zu schreiben
         $edit = new EditControl($submit, 'edtKommentar');
         $edit->setEntity(new Kommentar());
         $edit->addRow('ko_kommentar');
     }
 }
 /**
  * @param User $user
  * @param $betreff
  * @param string $activationLink
  * @param string $template
  * @return bool|string
  */
 public static function activate(User $user, $betreff, $activationLink = '', $template = '')
 {
     if ($user->us_email == '') {
         return false;
     }
     if ($template == '') {
         $template = __DIR__ . '/Mails/UserActivate.template.html';
     }
     if ($activationLink == '') {
         // TODO: Default-Link generieren
     }
     // Mail senden
     $temp = new ControlContainer(null, '');
     $temp->setSkinfile($template);
     $temp->setEntity($user);
     $temp->setVar('activationLink', $activationLink);
     $nachrichttext = $temp->toHtml();
     $empfaenger = $user->us_email;
     return Mailer::getInstance()->sendMail($empfaenger, $betreff, $nachrichttext, $nachrichttext);
 }
 protected function createControls()
 {
     $showNew = true;
     if (isset($this->request->showNew)) {
         $showNew = $this->request->showNew;
     }
     $showUp = true;
     if (isset($this->request->showUp)) {
         $showUp = $this->request->showUp;
     }
     if (!$this->request->ajax) {
         $panel = new CoreControls\ControlContainer($this, 'pnlAjax');
         $panel->setSkin('<div id="pnlAjax">{controls}</div>');
     } else {
         $panel = $this;
     }
     $panel = new CoreControls\ControlContainer($panel, 'panel');
     //$panel->setCaption('Dokumente / Medien');
     //if ($this->controller->kollektion != null) {
     //    $panel->setCaption($this->controller->kollektion->ko_bezeichnung);
     //}
     if ($showNew) {
         $button = new StdControls\ButtonControl($panel, 'btnNeuOrdner');
         $button->setCaption('Neuer Ordner')->addCssClass('btn-small')->addCssClass('nfs-modal');
         if ($this->controller->kollektion != null) {
             $button->setLink('medien', 'newKollektion', array('parent' => $this->controller->kollektion->id));
         } else {
             $button->setLink('medien', 'newKollektion', array('parent' => 0));
         }
     }
     if ($this->controller->kollektion !== null) {
         $uploader = new UploaderControl($this, 'uploader');
         $uploader->setKollektionId($this->controller->kollektion->id);
         //->setNotify('dok');
     } else {
         Javascript::requireLibrary('jqueryuploader');
     }
     $dokumente = new DokumentenControl($panel, 'dok');
     $dokumente->setOrdner($this->controller->kollektion)->setShowUp($showUp)->setAjaxTarget('pnlAjax');
 }
 public function toHtml()
 {
     if ($this->size != '') {
         foreach ($this->children as $child) {
             if ($child instanceof ButtonControl) {
                 $child->setSize($this->size);
             } elseif ($child instanceof DropdownControl) {
                 $child->setSize($this->size);
             }
         }
     }
     return parent::toHtml();
 }
 /**
  * Diese Methode sendet die Mail nach Anforderung des Benutzernamens
  */
 public function sendUsernameMail()
 {
     // Mail senden
     $temp = new ControlContainer(null, '');
     $temp->setSkinFile('modules/default/mails/benutzername.mail');
     $temp->setEntity($this);
     $nachricht = $temp->toHtml();
     $empfaenger = $this->us_email;
     $betreff = utf8_decode('Ihr Benutzername für die Webseite');
     return Mailer::getInstance()->sendMail($empfaenger, $betreff, $nachricht);
 }