ThemeDefault.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. $footerHtml = (file_exists(APP_PATH_ROOT . '/config/.footer.html'))? file_get_contents(APP_PATH_ROOT . '/config/.footer.html') : null;
  22. if ($version || $footerHtml) {
  23. echo '<div style="' . UI::fixFooterPosition('footer_style') . 'border-top:1px solid #ddd; margin-top:10px; padding:0 30px; font-size:xx-small; color:#888">';
  24. if ($version) echo 'version: '.$version . ' ';
  25. if ($footerHtml) echo $footerHtml;
  26. echo '</div>';
  27. }
  28. echo UI::fixFooterPosition('footer_js_tag');
  29. }
  30. function login($data) {
  31. if (is_array($data) && !empty($data)) {
  32. extract($data);
  33. }
  34. include APP_PATH_WWW . '/se-lib/tmpl/login.php';
  35. }
  36. function logout($data) {
  37. if (is_array($data) && !empty($data)) {
  38. extract($data);
  39. }
  40. include APP_PATH_WWW . '/se-lib/tmpl/logout.php';
  41. }
  42. function home($data) {
  43. if (is_array($data) && !empty($data)) {
  44. extract($data);
  45. }
  46. include APP_PATH_WWW . '/se-lib/tmpl/defaultPage.php';
  47. }
  48. function asset($relativeUrl) {
  49. if ('ThemeDefault' === get_class($this)) return $relativeUrl;
  50. $projName = substr(get_class($this), strlen('Theme_'));
  51. return "projects/{$projName}/theme/{$relativeUrl}";
  52. }
  53. }