Sfoglia il codice sorgente

Merge branch 'master' of https://github.com/unaio/una

AntonLV 3 anni fa
parent
commit
3265c0c369
2 ha cambiato i file con 31 aggiunte e 5 eliminazioni
  1. 1 1
      template/scripts/BxBaseCmtsServices.php
  2. 30 4
      template/scripts/BxBasePage.php

+ 1 - 1
template/scripts/BxBaseCmtsServices.php

@@ -458,7 +458,7 @@ class BxBaseCmtsServices extends BxDol
         
         $aParams['parent_id'] = !isset($aParams['parent_id']) ? 0 : $aParams['parent_id'];
         $aParams['start_from'] = !isset($aParams['start_from']) ? 0 : $aParams['start_from'];
-        $aParams['order_way'] = !isset($aParams['order_way']) ? 'desc' : $aParams['order_way'];
+        $aParams['order_way'] = !isset($aParams['order_way']) ? 'asc' : $aParams['order_way'];
         $aParams['is_form'] = !isset($aParams['is_form']) ? true : $aParams['is_form'];
         $aParams['insert'] = 'before';
         

+ 30 - 4
template/scripts/BxBasePage.php

@@ -406,15 +406,41 @@ class BxBasePage extends BxDolPage
             'uri' => $this->_aObject['uri'],
             'author' => $this->_aObject['author'],
             'added' => $this->_aObject['added'],
-            'module' => $this->getModule (),
+            'module' => $this->getModule(),
             'type' => $this->getType (),
             'layout' => $this->_aObject['layout_id'],
-            'elements' => $this->getPageBlocksAPI(),
+            'cover_block' => '',
             'menu_top' => '',
             'menu' => '',
-            'menu_bottom' => ''
+            'menu_bottom' => '',
+            'elements' => $this->getPageBlocksAPI(),
         ];
-
+        
+        
+        if (BxDolCover::getInstance($this)->isCover() && $this->_aProfileInfo){
+            
+            $oModule = BxDolModule::getInstance($this->getModule());
+            
+            $a['cover_block'] = [
+                'profile' => BxDolProfile::getInstance()->getData($this->_aProfileInfo['id']),
+                'actions_menu' => '',
+                'meta_menu' => '',
+                'cover' => $oModule->serviceGetCover($this->_aProfileInfo['content_id'])
+            ];
+            
+            $CNF = $oModule->_oConfig->CNF;
+            
+            if(!empty($CNF['OBJECT_MENU_VIEW_ENTRY_META'])){
+                $oMetaMenu = BxTemplMenu::getObjectInstance($CNF['OBJECT_MENU_VIEW_ENTRY_META']);
+                $a['cover_block']['meta_menu'] =  $oMetaMenu->getCodeAPI();
+            }
+            
+            if(!empty($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY'])){
+                $oActionMenu = BxTemplMenu::getObjectInstance($CNF['OBJECT_MENU_ACTIONS_VIEW_ENTRY']);
+                $a['cover_block']['actions_menu'] = $oActionMenu->getCodeAPI();
+            }  
+        }
+        
         if (($oMenuTop = BxDolMenu::getObjectInstance('sys_site')) !== false)
             $a['menu_top'] = $oMenuTop->getCodeAPI();