protected function renderMessageAboveCanvas() { if (empty($this->actionCompletionMessage)) { return null; } // if $appLocale = $this->getAppLocale(); $str = OpfHelperHtmlSite::messageInYellowishBox($appLocale[Localization::SUCCESS], $this->actionCompletionMessage, '100%'); return $str; }
public function render() { $appCtxt = $this->getApplicationContext(); $personObjid = $appCtxt->getCurrentUserObjid(); $str = '<div id="' . self::DIV_CARD . '">'; if (isset($this->tableStyle)) { $str .= '<table'; foreach ($this->tableStyle as $att => $val) { $str .= ' ' . $att . '="' . $val . '" '; } // foreach $str .= '>'; } else { $str .= OpfHelperHtmlSite::tableHeaderPadded('100%'); } if (!isset($this->dataList)) { $this->loadData(); } // if $tdWidth = null; if ($this->maxPerRow > 1) { $tdWidth = 100 / $this->maxPerRow; } // if $columnIndex = 0; $rowIndex = 0; $str .= '<tr>'; if (!is_null($this->dataList)) { foreach ($this->dataList as $data) { /* start new row if reached the max per row */ if ($columnIndex >= $this->maxPerRow) { $str .= '</tr><tr>'; $columnIndex = 0; $rowIndex++; } // if $img = $this->renderCardImage($data[TableCard::FIELD_PICTURE_URL]); $str .= '<td vAlign="top" align="center" class="' . self::CLASS_CARD_LIST . '"'; if (!is_null($tdWidth)) { $str .= ' width="' . $tdWidth . '%"'; } // if $str .= '>' . $img . $this->renderCardDetails($data); $objid = $data[TableCard::FIELD_OBJID]; $actionStr = $this->renderCardButtons($personObjid, $objid, $data); if (!is_null($actionStr)) { $str .= '<br>' . $actionStr; } // if $str .= '</td>' . $this->renderPossessionDetails($data); $columnIndex += 1; } // foreach } // if $str .= '</tr></table></div>'; return $str; }
public function renderImg($src, $title, $htmlClass, $onclick = null) { return OpfHelperHtmlSite::renderImg($src, $title, $htmlClass, $onclick); }
private function renderCurrentCanvas() { $subCanvas = $this->getCurrentCanvas(); $ds = $this->getDataSource(); if ($ds->isAppAdded() == 0) { if ($this->mustInstallBeforeUse($subCanvas)) { $msg1 = $this->lookUpLocale(OpfLocalization::MSG_PLEASE_INSTALL_FIRST); $msg2 = $this->lookUpLocale(OpfLocalization::MSG_YOU_MUST_INSTALL_FIRST); $buttonStr = $ds->renderHrefInString($ds->getAddApplicationURLBase(), null, ucwords($this->lookUpLocale(OpfLocalization::MSG_INSTALL)), self::CLASS_EMPHASIZELINK, null, null); $str = OpfHelperHtmlSite::messageInYellowishBox($msg1, $msg2 . '<br>' . $buttonStr, '100%'); return $str; } // if } // if if (!is_null($subCanvas)) { return $subCanvas->render(); } else { return null; } // if }