| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?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>';
- }
- if (User::logged() && '1' === V::get('TEST_FEEDBACK', '', $_GET)) {
- echo UI::h('script', [ 'type' => "text/javascript", 'src' => "https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.min.js" ]);
- UI::inlineJS(APP_PATH_ROOT . '/static/p5UI/feedback.js');
- }
- 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}";
- }
- }
|