Example #1
0
 /**
  * display the content of this View
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $od->addContent(Html::startTag('div', ['class' => 'news']));
     /** @var News $news */
     foreach ($this->controller->getModelData() as $news) {
         /** @var base_date_model_DateTime $firstEditTime */
         $firstEditTime = $news['firstEditTime'];
         $table = new base_html_model_Table();
         $table->setCssClass('news');
         $table->setId(get_class($news) . '_' . $news->getLogicalKey());
         $row = new base_html_model_table_Row();
         $row->setRowType(base_html_model_table_Row::ROWTAG_HEAD);
         $timeCell = new base_html_model_table_Cell();
         $timeCell->setCssClass('firstEditorTime');
         $timeCell->setContent($firstEditTime->display('d.m.y'));
         $titleCell = new base_html_model_table_Cell();
         $titleCell->setCssClass('title');
         $titleCell->setContent($news['title']);
         $row->addCell($timeCell);
         $row->addCell($titleCell);
         $table->addHeadRow($row);
         $this->_createContentRow($news, $table);
         $od->addContent($table->toString());
     }
     $od->addContent(Html::endTag('div'));
 }
Example #2
0
    /**
     * implements the content of the viewed page
     *
     * @param OutputDevice $od
     */
    protected function addPageContent(OutputDevice $od)
    {
        $table = new base_html_model_Table();
        $form = new base_html_model_Form();

        $cellUsernameLabel = new base_html_model_table_Cell();
        $cellUsernameLabel->setContent($form->label('Benutzername', 'userName'));

        $cellUsernameInput = new base_html_model_table_Cell();
        $cellUsernameInput->setContent($form->textInput('userName'));

        $cellPasswordLabel = new base_html_model_table_Cell();
        $cellPasswordLabel->setContent($form->label('Passwort', 'password'));

        $cellPasswordInput = new base_html_model_table_Cell();
        $cellPasswordInput->setContent($form->passwordInput('password'));

        $row = new base_html_model_table_Row();
        $row->addCell($cellUsernameLabel);
        $row->addCell($cellUsernameInput);

        $row1 = new base_html_model_table_Row();
        $row1->addCell($cellPasswordLabel);
        $row1->addCell($cellPasswordInput);

        $table->addRow($row);
        $table->addRow($row1);

        $od->addContent($form->start(HTML_ROOT . '/de/ajax.php?class=base_login_ajax_DoLogin', 'post', array('class' => 'ajaxForm', 'id' => 'login')));
        $od->addContent($table->toString());
        $od->addContent($form->submitButton('login', 'Einloggen'));
        $od->addContent($form->end());
    }
Example #3
0
 /**
  * display the content of this View
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     /** @var base_form_View $formView */
     $formView = $this->controller->getModelData();
     $od->addContent($formView->showStartTag());
     $od->addContent($formView->showBody());
     $od->addContent($formView->showSubmit());
 }
Example #4
0
    public function display(OutputDevice $od)
    {
        $od->addContent(Html::startTag('div', ['class' => 'leftNavigation']));
        foreach ($this->getNaviStructure() as $category => $entries) {
            $od->addContent(Html::startTag('h3') . $category . Html::endTag('h3'));
            $od->addContent(Html::startTag('div'));
            $od->addContent(Html::startTag('ul'));
            foreach ($entries as $entryName => $url) {
                $od->addContent(Html::startTag('li') . Html::url(HTML_ROOT . "/de/acp/$url", $entryName) . Html::endTag('li'));
            }
            $od->addContent(Html::endTag('ul'));
            $od->addContent(Html::endTag('div'));
        }
//        $od->addContent(Html::startTag('div', ['id' => 'leftNavigation']));
//        $od->addContent(Html::startTag('ul', ['id' => 'leftNavigation']));
//        foreach ($this->getNaviStructure() as $category => $content) {
//            if (is_string($content)) {
//                $od->addContent(Html::startTag('li') . Html::url(HTML_ROOT . "/de/acp/$content", $category) . Html::endTag('li'));
//                continue;
//            }
//            $od->addContent(Html::startTag('li') . $category);
//            $od->addContent(Html::startTag('ul'));
//            foreach ($content as $name => $url) {
//                $od->addContent(Html::startTag('li') . Html::url(HTML_ROOT . "/de/acp/$url", $name) . Html::endTag('li'));
//            }
//            $od->addContent(Html::endTag('ul'));
//            $od->addContent(Html::endTag('li'));
//        }
//        $od->addContent(Html::endTag('ul'));
//        $od->addContent('<br style="clear:both" />');

        $od->addContent(Html::endTag('div'));
    }
Example #5
0
 /**
  * manages all page subelements and is defined in the different views
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $this->data = $this->controller->getModelData();
     $this->showColumns = $this->controller->getColLabelNamesConnection();
     $od->addContent($this->_setFilterOptions());
     $table = new base_html_model_Table();
     $table->setCssClass('search');
     $this->_setTableHead($table);
     foreach ($this->data as $obj) {
         $this->_setTableRow($table, $obj);
     }
     $od->addContent($table->toString());
 }
Example #6
0
 protected function displayListEntries(OutputDevice $od)
 {
     $counter = 0;
     $actualState = array_search(strtolower(Configuration::get()->getEntry('configStep')), $this->_getSetupSteps());
     $entries = '';
     foreach ($this->getNavigationEntries() as $link) {
         $displayName = $link->getDisplayName();
         if ($counter < $actualState) {
             $class = self::STATE_FINISHED;
         } elseif ($counter == $actualState) {
             $class = self::STATE_EDIT;
         } else {
             $entries .= Html::startTag('li', array('class' => 'naviStep', 'id' => "naviStep_{$link->getControllerName()}"));
             $entries .= $displayName;
             $entries .= Html::endTag('li');
             $counter++;
             continue;
         }
         $attributes = array('class' => $class);
         $href = $link->getHtmlTag($attributes);
         $entries .= Html::startTag('li', array('class' => 'naviStep', 'id' => "naviStep_{$link->getControllerName()}"));
         $entries .= $href;
         $entries .= Html::endTag('li');
         $counter++;
     }
     $od->addContent($entries);
 }
Example #7
0
 /**
  * display the footer section of the page
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $od->addContent(Html::startTag('div', ['style' => 'clear:both']) . Html::endTag('div'));
     $od->addContent(Html::startTag('div', array('class' => $this->getCssClass())));
     $od->addContent($this->getContent());
     $od->addContent(Html::endTag('div'));
     $od->addContent(Html::endTag('div'));
     $od->addContent(Html::endTag('body'));
 }
Example #8
0
 /**
  * create a string for output with all header information
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $header = $this->getDoctypeTag() . "\n";
     $header .= $this->getHtmlTag() . "\n";
     $header .= Html::startTag('head') . "\n";
     $header .= "\t" . $this->getEncodingTag() . "\n";
     $header .= "\t" . $this->getTitleTag() . "\n";
     $header .= "\t" . $this->getDescriptionTag() . "\n";
     $header .= "\t" . $this->getCSSLink();
     $header .= "\t" . $this->getScripts();
     $header .= Html::endTag('head') . "\n";
     $od->addContent($header);
 }
Example #9
0
 /**
  * display the header div
  *
  * @param OutputDevice $od
  */
 public function display(OutputDevice $od)
 {
     $od->addContent(Html::startTag('body'));
     $od->addContent(Html::startTag('div', array('class' => 'pageStructure')) . "\n");
     $od->addContent(Html::startTag('div', array('class' => $this->getCssClass())) . "\n");
     $od->addContent($this->getContent());
     $od->addContent(Html::endTag('div'));
 }
Example #10
0
 public function displayEntries(OutputDevice $od)
 {
     $output = '';
     foreach ($this->naviStructure as $catName => $entries) {
         $output .= Html::startTag('div', array('class' => 'naviEntry', 'id' => "entryCategoryLK_{$this->catLKName[$catName]}"));
         $output .= Html::startTag('ul', array('class' => 'naviEntries'));
         foreach ($entries as $entry) {
             $output .= $this->_displayEntry($entry);
         }
         $output .= Html::endTag('ul');
         $output .= Html::endTag('div');
     }
     $od->addContent($output);
 }
Example #11
0
File: ACP.php Project: kafruhs/fws
 /**
  * ends the main content section of the page
  *
  * @param OutputDevice $od
  */
 public static function endMainContent(OutputDevice $od)
 {
     $od->addContent(Html::endTag('div'));
 }
Example #12
0
 /**
  * print out a given message to inform the user during installation progress
  *
  * @param string        $message
  * @param OutputDevice  $od
  */
 public static function printOut($message, OutputDevice $od)
 {
     $od->addContent('[' . date('Y/m/d H:i:s') . '] ' . $message . "<br />");
 }