Просмотр исходного кода

Ticket #5184 - Add pissibility to use another iconset.

AntonLV 1 год назад
Родитель
Сommit
5e48df0d0a

+ 3 - 0
install/sql/system.sql

@@ -2152,6 +2152,9 @@ CREATE TABLE `sys_injections_admin` (
   PRIMARY KEY (`id`)
 );
 
+INSERT INTO `sys_injections_admin`(`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
+('sys_footer', 0, 'injection_footer', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_injection_studio";s:6:"params";a:1:{i:0;s:6:"footer";}s:5:"class";s:21:"TemplTemplateServices";}', 0, 1);
+
 -- --------------------------------------------------------
 
 

+ 1 - 1
template/scripts/BxBaseMenu.php

@@ -295,7 +295,7 @@ class BxBaseMenu extends BxDolMenu
                 'title' => _t($a['title']),
                 'info' => isset($a['info']) ? _t($a['info']) : '',
                 'link' => isset($a['link']) ? $a['link'] : '',
-                'icon' => $sIcon ? $sIcon : ($sIconHtml ? $sIconHtml : ''),
+                'icon' => $sIcon ? bx_gen_method_name($sIcon, ['_', '-']) : ($sIconHtml ? $sIconHtml : ''),
                 'image' => $sIconUrl ? $sIconUrl : '',
                 'submenu' => !empty($a['submenu_object']) ? $a['submenu_object'] : '',
                 'addon' => $this->_bDisplayAddons ? $this->_getMenuAddon($a) : '',

+ 14 - 0
template/scripts/BxBaseTemplateServices.php

@@ -63,6 +63,20 @@ class BxBaseTemplateServices extends BxDol
 
         return $sResult;
     }
+
+    public function serviceGetInjectionStudio($sName)
+    {
+        $sResult = '';
+
+        switch($sName) {
+            case 'footer':
+                if(($sCode = BxDolIconset::getObjectInstance()->getCode()) !== false)
+                    $sResult = $sCode;
+                break;
+        }
+
+        return $sResult;
+    }
 }
 
 /** @} */