anton1.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. // TODO: file and class name must have the same name as project
  3. class Theme_anton1 extends ThemeDefault {
  4. function head() {
  5. // echo ''; // TODO: dodać bootsrap-theme-anton1
  6. echo '<meta name="robots" content="noindex, nofollow">';
  7. UI::inlineCSS(dirname(__FILE__) . '/assets/css/styles.css');
  8. // main color: #d7142d - red
  9. echo UI::h('style', [ 'type' => "text/css" ], "
  10. .AjaxTable { font-size:14px }
  11. .AjaxTable .tblAjax__head__filter .stickyCol1 button { padding:1px 3px }
  12. .AjaxTable tbody .stickyCol1 { font-size:12px }
  13. .popover-content li { text-align:left; font-size:14px }
  14. .bi-btn-primary { padding:6px 12px; font-size:14px; background-color:#fff; color:#d7142d; border-color:#d7142d; }
  15. .bi-btn-primary:hover { background-color:#d7142d; color:#fff; border-color:#d7142d; }
  16. .bi-btn-primary .badge { background-color:#d7142d; color:#fff; border-color:#d7142d; }
  17. .bi-btn-primary:hover .badge { background-color:#fff; color:#d7142d; border-color:#d7142d; }
  18. .bi-btn-disabled-group-label { cursor: default; padding:6px 12px; font-size:14px; background-color:#fff; color:#d7142d; border-color:#d7142d; }
  19. .btn-primary .badge { background-color:#d7142d; color:#fff; }
  20. .btn-primary:hover .badge { background-color:#fff; color:#d7142d; }
  21. .btn-xs { padding:6px 12px; }
  22. .btn-xs .badge { padding:2px 5px; }
  23. ");
  24. UI::inlineRawJS(dirname(__FILE__) . '/assets/js/graph/d3.v3.min.js');
  25. UI::inlineRawJS(dirname(__FILE__) . '/assets/js/graph/csaladenes/sankey/sankey.js');
  26. // UI::inlineRawJS(dirname(__FILE__) . '/assets/js/graph/csaladenes/sankey/sankey-init.js');
  27. UI::inlineRawJS(dirname(__FILE__) . '/assets/js/graph/sankey-init-widget.js');
  28. }
  29. function top() {
  30. include dirname(__FILE__) . '/view/top.php';
  31. //todo: demo load data for graph :DELETE line if tested
  32. // UI::inlineRawJS(dirname(__FILE__) . '/demoGraph/sampleData/sampleData.js');
  33. // UI::inlineRawJS(dirname(__FILE__) . '/assets/js/graph/GetFeature.js');
  34. // UI::inlineRawJS(dirname(__FILE__) . '/assets/js/graph/parser.js');
  35. }
  36. function footer() {
  37. include dirname(__FILE__) . '/view/footer.php';
  38. //todo: ujednolicic wczytanie themy widoków i css w jednym katalogu(obecnie css w katalogu static a widoki w katalogu tmp )
  39. UI::inlineRawJS(dirname(__FILE__) . '/assets/js/scripts.js');
  40. if ('ViewTableAjax' === V::get('_route', '', $_GET)
  41. && 'default_db/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA/BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA' === V::get('namespace', '', $_GET)
  42. ) {
  43. UI::inlineJS(dirname(__FILE__) . '/assets/js/updateRaportProgress.js', [
  44. 'DBG' => (V::get('DBG', '', $_GET)),
  45. 'DBG_FAKE_ANIM' => (V::get('DBG_FAKE_ANIM', '', $_GET)),
  46. 'URL_FETCH_BI_AUDIT_PROGRESS' => Router::getRoute('UrlAction_Anton1')->getLink('fetchProgressAjax', [ 'SKIP_TIMER' => "1" ])
  47. ]);
  48. }
  49. UI::inlineJS(dirname(__FILE__) . '/assets/js/updateLastRaportProgress.js', [
  50. 'DBG' => (V::get('DBG', '', $_GET)),
  51. 'DBG_FAKE_ANIM' => (V::get('DBG_FAKE_ANIM', '', $_GET)),
  52. 'URL_FETCH_BI_AUDIT_PROGRESS' => Router::getRoute('UrlAction_Anton1')->getLink('fetchProgressAjax', [ 'SKIP_TIMER' => "1" ]),
  53. 'URL_BI_AUDIT_RESULT' => Router::getRoute('UrlAction_BiAuditGenerate')->getLink(''),
  54. 'ID_ARG_BI_AUDIT_RESULT' => 'ID_BI_audit_ENERGA_RUM_KONTRAHENCI_POWIAZANIA'
  55. ]);
  56. }
  57. function login($data) {
  58. if (is_array($data) && !empty($data)) {
  59. extract($data);
  60. }
  61. include dirname(__FILE__) . '/view/login.php';
  62. }
  63. function logout($data) {
  64. if (is_array($data) && !empty($data)) {
  65. extract($data);
  66. }
  67. include dirname(__FILE__) . '/view/logout.php';
  68. }
  69. function home($data) {
  70. if (is_array($data) && !empty($data)) {
  71. extract($data);
  72. }
  73. include dirname(__FILE__) . '/view/home.php';
  74. }
  75. }