AntonLV %!s(int64=6) %!d(string=hai) anos
pai
achega
d96717e551

+ 5 - 1
inc/classes/BxDolGridConnectionIn.php

@@ -91,7 +91,11 @@ class BxDolGridConnectionIn extends BxTemplGrid
         if (!$oProfile)
             return _t('_sys_txt_error_occured');
 
-        return parent::_getCellDefault ($oProfile->getUnit(), $sKey, $aField, $aRow);
+        $aParams = array('template' => array('name' => 'unit', 'size' => 'thumb'));
+        if(BxDolModule::getInstance($oProfile->getModule()) instanceof BxBaseModGroupsModule)
+            $aParams['template']['name'] = 'unit_wo_cover';
+
+        return parent::_getCellDefault ($oProfile->getUnit(0, $aParams), $sKey, $aField, $aRow);
     }
 
     public function performActionAdd()

+ 19 - 0
modules/base/groups/classes/BxBaseModGroupsTemplate.php

@@ -16,6 +16,8 @@ class BxBaseModGroupsTemplate extends BxBaseModProfileTemplate
 {
     protected $_iUnitCharsSummary;
 
+    protected $_sUnitClassWoCover;
+
     function __construct(&$oConfig, &$oDb)
     {
         parent::__construct($oConfig, $oDb);
@@ -23,6 +25,7 @@ class BxBaseModGroupsTemplate extends BxBaseModProfileTemplate
         $this->_bLetterAvatar = true;
         $this->_iUnitCharsSummary = 50;
 
+        $this->_sUnitClassWoCover = $this->_sUnitClass; //--- Save default 'Unit' class (from BxBaseModProfileTemplate) as 'Unit W\O Cover' class here.
         $this->_sUnitClassWithCover .= ' bx-base-groups-unit-with-cover';
         $this->_sUnitClass = $this->_sUnitClassWithCover;
         $this->_sUnitClassWoInfo .= ' bx-base-groups-unit-wo-info'; 
@@ -54,6 +57,22 @@ class BxBaseModGroupsTemplate extends BxBaseModProfileTemplate
         return $aVars;
     }
 
+    protected function _getUnitClass($aData, $sTemplateName = 'unit.html')
+    {
+        $sResult = '';
+        
+        switch($sTemplateName) {
+            case 'unit_wo_cover.html':
+                $sResult = $this->_sUnitClassWoCover;
+                break;
+
+            default:
+                $sResult = parent::_getUnitClass($aData, $sTemplateName);
+        }
+
+        return $sResult;
+    }
+
     protected function _getUnitSize($aData, $sTemplateName = 'unit.html')
     {
         $sResult = '';

+ 5 - 2
modules/base/profile/classes/BxBaseModProfileModule.php

@@ -1669,9 +1669,12 @@ class BxBaseModProfileModule extends BxBaseModGeneralModule implements iBxDolCon
             if(!$oProfile)
                 continue;
 
-            $aUnitParams = array();
+            $aUnitParams = array('template' => array('name' => 'unit', 'size' => 'thumb'));
+            if(BxDolModule::getInstance($oProfile->getModule()) instanceof BxBaseModGroupsModule)
+                $aUnitParams['template']['name'] = 'unit_wo_cover';
+
             if($bProfile && is_array($mixedProfile['info']))
-                $aUnitParams = array('template' => array('vars' => $mixedProfile['info']));
+                $aUnitParams['template']['vars'] = $mixedProfile['info'];
 
             $s .= $oProfile->getUnit(0, $aUnitParams);
         }