AntonLV пре 7 година
родитељ
комит
469a3ade71
3 измењених фајлова са 16 додато и 1 уклоњено
  1. 2 0
      install/sql/system.sql
  2. 1 1
      template/_header.html
  3. 13 0
      template/scripts/BxBaseTemplateServices.php

+ 2 - 0
install/sql/system.sql

@@ -1447,8 +1447,10 @@ CREATE TABLE `sys_injections` (
 INSERT INTO `sys_injections`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
 ('update_cache', 150, 'injection_head', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:17:"get_cache_updater";s:6:"params";a:0:{}s:5:"class";s:19:"TemplStudioLauncher";}', 0, 1),
 ('sys_head', 0, 'injection_head', 'text', '', 0, 1),
+('sys_body_class', 0, 'injection_body_class', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"get_injection";s:6:"params";a:1:{i:0;s:10:"body_class";}s:5:"class";s:21:"TemplTemplateServices";}', 0, 1),
 ('sys_body', 0, 'injection_footer', 'text', '', 0, 1);
 
+
 -- --------------------------------------------------------
 
 

+ 1 - 1
template/_header.html

@@ -35,7 +35,7 @@
     <bx_injection:injection_head />
     <bx_include_auto:_header_meta.html />
 </head>
-<body class="bx-def-font bx-def-color-bg-page bx-def-image-bg-page" dir="__lang_direction__" <bx_injection:injection_body /> >
+<body class="bx-def-font bx-def-color-bg-page bx-def-image-bg-page <bx_injection:injection_body_class />" dir="__lang_direction__" <bx_injection:injection_body /> >
     __system_injection_header__
     <bx_injection:injection_header />
     <noscript>

+ 13 - 0
template/scripts/BxBaseTemplateServices.php

@@ -30,6 +30,19 @@ class BxBaseTemplateServices extends BxDol
 
         return $aResult;
     }
+
+    public function serviceGetInjection($sName)
+    {
+        $sResult = '';
+
+        switch($sName) {
+            case 'body_class':
+                $sResult = 'bx-user-' . (isLogged() ? '' : 'un') . 'authorized';
+                break;
+        }
+
+        return $sResult;
+    }
 }
 
 /** @} */