AntonLV 7 年 前
親
コミット
c8977ad501

+ 1 - 0
modules/boonex/lucid/install/langs/en.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <resources name="en" flag="gb" title="English">
 <resources name="en" flag="gb" title="English">
+        <string name="_bx_lucid"><![CDATA[Lucid]]></string>
 	<string name="_bx_lucid_wgt_cpt"><![CDATA[Lucid]]></string>
 	<string name="_bx_lucid_wgt_cpt"><![CDATA[Lucid]]></string>
 
 
 	<string name="_bx_lucid_stg_cpt_type"><![CDATA[Lucid]]></string>
 	<string name="_bx_lucid_stg_cpt_type"><![CDATA[Lucid]]></string>

+ 6 - 3
studio/classes/BxDolStudioBuilderPageQuery.php

@@ -455,10 +455,13 @@ class BxDolStudioBuilderPageQuery extends BxDolStudioPageQuery
         return (int)$this->query($sSql) > 0;
         return (int)$this->query($sSql) > 0;
     }
     }
 
 
-    function getMenus()
+    function getMenus($bFull = false)
     {
     {
-        $sSql = "SELECT `object`, `title` FROM `sys_objects_menu` WHERE 1";
-        return $this->getPairs($sSql, 'object', 'title');
+        $sSql = "SELECT * FROM `sys_objects_menu` WHERE 1 ORDER BY `module`, `object`";
+        if($bFull)
+            return $this->getAllWithKey($sSql, 'object');
+        else
+            return $this->getPairs($sSql, 'object', 'title');
     }
     }
 }
 }
 
 

+ 13 - 4
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -1531,11 +1531,20 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
                     )
                     )
                 );
                 );
 
 
-                $aMenus = $this->oDb->getMenus();
-                foreach($aMenus as $sKey => $sValue)
-                    $aFields['content']['values'][$sKey] = _t($sValue);
+                $sGroup = '';
+                $aMenus = $this->oDb->getMenus(true);
+                foreach($aMenus as $sKey => $aMenu) {
+                    if($sGroup != $aMenu['module']) {
+                        if(!empty($sGroup))
+                            $aFields['content']['values'][$sGroup . '_end'] = array('type' => 'group_end');
+
+                        $sGroup = $aMenu['module'];
+                        $aFields['content']['values'][$sGroup . '_beg'] = array('type' => 'group_header', 'value' => BxDolStudioUtils::getModuleTitle($sGroup));
+                    }
+
+                    $aFields['content']['values'][$sKey] = _t($aMenu['title']);
+                }
 
 
-                asort($aFields['content']['values']);
                 $aFields['content']['values'] = array_merge(array('' => _t('_adm_bp_txt_block_content_menu_empty')), $aFields['content']['values']);
                 $aFields['content']['values'] = array_merge(array('' => _t('_adm_bp_txt_block_content_menu_empty')), $aFields['content']['values']);
                 break;
                 break;