Parcourir la source

Ticket #4847 - Studio: Layout changes. Stage 3.

AntonLV il y a 1 an
Parent
commit
c40231a229

+ 3 - 1
studio/template/bp_blocks.html

@@ -13,7 +13,9 @@
                     <bx_if:show_link>
                         <a class="text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100" href="javascript:void(0)" onclick="javascript:__onclick__">__title__</a>
                     </bx_if:show_link>
-                    <bx_if:show_text>__title__</bx_if:show_text>
+                    <bx_if:show_text>
+                        <span class="text-gray-800 dark:text-gray-200">__title__</span>
+                    </bx_if:show_text>
                     <bx_if:show_api>
                         <img class="bx-std-api" src="<bx_icon_url:api.svg />" title="<bx_text_attribute:_adm_txt_active_api />" />
                     </bx_if:show_api>

+ 36 - 32
studio/template/scripts/BxBaseStudioBuilderPage.php

@@ -1822,19 +1822,19 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
 
         $oForm = new BxTemplStudioFormView(array());
 
-        $aInputCheckbox = array(
+        $aInputCheckbox = [
             'type' => 'checkbox',
             'name' => 'blocks[]',
-            'attrs' => array(
+            'attrs' => [
                 'onChange' => 'javascript:' . $sJsObject . '.onSelectBlock(this);'
-            ),
+            ],
             'value' => ''
-        );
+        ];
 
-        $aTmplParams = array(
+        $aTmplParams = [
             'html_block_list_id' => $this->aHtmlIds['block_list_id'] . $sModule,
-            'bx_repeat:blocks' => array()
-        );
+            'bx_repeat:blocks' => []
+        ];
 
         $aBlocks = $this->getBlocks($sModule);
         foreach($aBlocks as $aBlock) {
@@ -1842,44 +1842,48 @@ class BxBaseStudioBuilderPage extends BxDolStudioBuilderPage
 
             $aInputCheckbox['value'] = $aBlock['id'];
 
-            $aTmplParams['bx_repeat:blocks'][] = array(
+            $aTmplParams['bx_repeat:blocks'][] = [
                 'js_object' => $sJsObject,
                 'html_id' => $this->aHtmlIds['block_id'] . $aBlock['id'],
                 'bx_if:is_inactive' => array(
                     'condition' => false,
-                    'content' => array()
+                    'content' => [true]
                 ),
-                'bx_if:show_link' => array(
+                'bx_if:show_link' => [
                     'condition' => false,
-                    'content' => array()
-                ),
-                'bx_if:show_text' => array(
+                    'content' => [true]
+                ],
+                'bx_if:show_text' => [
                     'condition' => true,
-                    'content' => array(
+                    'content' => [
                         'title' => _t(!empty($aBlock['title_system']) ? $aBlock['title_system'] : $aBlock['title']),
-                    )
-                ),
-                'bx_if:image' => array (
-	                'condition' => (bool)$sIconUrl,
-	                'content' => array('icon_url' => $sIconUrl),
-	            ),
-				'bx_if:icon' => array (
-	                'condition' => (bool)$sIcon,
-	                'content' => array('icon' => $sIcon),
-	            ),
+                    ]
+                ],
+                'bx_if:show_api' => [
+                    'condition' => false,
+                    'content' => [true]
+                ],
+                'bx_if:image' => [
+                    'condition' => (bool)$sIconUrl,
+                    'content' => array('icon_url' => $sIconUrl),
+                ],
+                'bx_if:icon' => [
+                    'condition' => (bool)$sIcon,
+                    'content' => ['icon' => $sIcon],
+                ],
                 'module' => $this->getModuleTitle($aBlock['module']),
                 'visible_for' => _t('_adm_bp_txt_visible_for', BxDolStudioUtils::getVisibilityTitle($aBlock['visible_for_levels'])),
-                'bx_if:show_checkbox' => array(
+                'bx_if:show_checkbox' => [
                     'condition' => true,
-                    'content' => array(
+                    'content' => [
                         'content' => $oForm->genRow($aInputCheckbox)
-                    )
-                ),
-                'bx_if:show_drag_handle' => array(
+                    ]
+                ],
+                'bx_if:show_drag_handle' => [
                     'condition' => false,
-                    'content' => array()
-                )
-            );
+                    'content' => []
+                ]
+            ];
         }
 
         return $oTemplate->parseHtmlByName('bp_blocks_list.html', $aTmplParams);