| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- class ThemeDefault {
- function __construct() {
- DBG::log("ThemeDefault()...");
- }
- function head() { // inside UI::gora()
- // echo '<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap-theme.min.css" type="text/css" />'; // TODO: dodać bootsrap-theme?
- }
- function top() {
- // echo ''; // TODO: UI::menu + breacrumbs
- Lib::loadClass('ProcesMenu');
- $procesMenu = ProcesMenu::getInstance();
- $procesMenu->show();
- // if (!V::get('MENU_INIT', '', $_GET)) {
- // Lib::loadClass('UserActivity');
- // //echo UserActivity::showListInContainer();
- // }
- }
- function footer() { // inside UI::dol()
- $version = (file_exists(APP_PATH_ROOT . '/VERSION'))? file_get_contents(APP_PATH_ROOT . '/VERSION') : null;
- $footerHtml = (file_exists(APP_PATH_ROOT . '/config/.footer.html'))? file_get_contents(APP_PATH_ROOT . '/config/.footer.html') : null;
- if ($version || $footerHtml) {
- echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">';
- if ($version) echo 'version: '.$version . ' ';
- if ($footerHtml) echo $footerHtml;
- echo '</div>';
- }
- echo UI::fixFooterPosition('footer_js_tag');
- }
- function login($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_WWW . '/se-lib/tmpl/login.php';
- }
- function logout($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_WWW . '/se-lib/tmpl/logout.php';
- }
- function home($data) {
- if (is_array($data) && !empty($data)) {
- extract($data);
- }
- include APP_PATH_WWW . '/se-lib/tmpl/defaultPage.php';
- }
- function asset($relativeUrl) {
- if ('ThemeDefault' === get_class($this)) return $relativeUrl;
- $projName = substr(get_class($this), strlen('Theme_'));
- return "projects/{$projName}/theme/{$relativeUrl}";
- }
- }
|