ThemeDefault.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. class ThemeDefault {
  3. function __construct() {
  4. DBG::log("ThemeDefault()...");
  5. }
  6. function head() { // inside UI::gora()
  7. // echo '<link rel="stylesheet" href="stuff/bootstrap/css/bootstrap-theme.min.css" type="text/css" />'; // TODO: dodać bootsrap-theme?
  8. }
  9. function top() {
  10. // echo ''; // TODO: UI::menu + breacrumbs
  11. Lib::loadClass('ProcesMenu');
  12. $procesMenu = ProcesMenu::getInstance();
  13. $procesMenu->show();
  14. // if (!V::get('MENU_INIT', '', $_GET)) {
  15. // Lib::loadClass('UserActivity');
  16. // //echo UserActivity::showListInContainer();
  17. // }
  18. }
  19. function footer() { // inside UI::dol()
  20. $version = (file_exists(APP_PATH_ROOT . '/VERSION'))? file_get_contents(APP_PATH_ROOT . '/VERSION') : null;
  21. if ($version) {
  22. echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">version: '.$version.'</div>';
  23. }
  24. echo UI::fixFooterPosition('footer_js_tag');
  25. }
  26. function login($data) {
  27. if (is_array($data) && !empty($data)) {
  28. extract($data);
  29. }
  30. include APP_PATH_WWW . '/se-lib/tmpl/login.php';
  31. }
  32. function logout($data) {
  33. if (is_array($data) && !empty($data)) {
  34. extract($data);
  35. }
  36. include APP_PATH_WWW . '/se-lib/tmpl/logout.php';
  37. }
  38. function home($data) {
  39. if (is_array($data) && !empty($data)) {
  40. extract($data);
  41. }
  42. include APP_PATH_WWW . '/se-lib/tmpl/defaultPage.php';
  43. }
  44. function asset($relativeUrl) {
  45. if ('ThemeDefault' === get_class($this)) return $relativeUrl;
  46. $projName = substr(get_class($this), strlen('Theme_'));
  47. return "projects/{$projName}/theme/{$relativeUrl}";
  48. }
  49. }