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

Ticket #4118 - Conversations: Collaborators block.

AntonLV 4 лет назад
Родитель
Сommit
cb019472d7

+ 1 - 1
modules/boonex/convos/classes/BxCnvModule.php

@@ -411,7 +411,7 @@ class BxCnvModule extends BxBaseModTextModule
         if (!$aContentInfo)
             return false;
 
-        return $this->_oTemplate->entryCollaborators ($aContentInfo, 5, 'right');
+        return $this->_oTemplate->entryCollaborators ($aContentInfo, 5);
     }
 
     /**

+ 1 - 6
modules/boonex/convos/classes/BxCnvTemplate.php

@@ -23,13 +23,12 @@ class BxCnvTemplate extends BxBaseModTextTemplate
         parent::__construct($oConfig, $oDb);
     }
 
-    public function entryCollaborators ($aContentInfo, $iMaxVisible = 2, $sFloat = 'left')
+    public function entryCollaborators ($aContentInfo, $iMaxVisible = 2)
     {
         $oModule = BxDolModule::getInstance($this->MODULE);
         $CNF = &$oModule->_oConfig->CNF;
 
         $aCollaborators = $this->_oDb->getCollaborators($aContentInfo[$CNF['FIELD_ID']]);
-        //unset($aCollaborators[$aContentInfo[$CNF['FIELD_AUTHOR']]]);
 
         // sort collaborators: first - current user, second - last replier, third - author, all others sorted by max number of posts
         $aCollaborators = $oModule->sortCollaborators($aCollaborators, $aContentInfo['last_reply_profile_id'], $aContentInfo[$CNF['FIELD_AUTHOR']]);
@@ -37,7 +36,6 @@ class BxCnvTemplate extends BxBaseModTextTemplate
 
         // prepare template variables
         $aVarsPopup = array (
-            'float' => 'none',
             'bx_repeat:collaborators' => array(),
             'bx_if:collaborators_more' => array(
                 'condition' => false,
@@ -45,14 +43,12 @@ class BxCnvTemplate extends BxBaseModTextTemplate
             ),
         );
         $aVars = array (
-            'float' => $sFloat,
             'bx_repeat:collaborators' => array(),
             'bx_if:collaborators_more' => array(
                 'condition' => $iCollaboratorsNum > $iMaxVisible,
                 'content' => array(
                     'popup' => '',
                     'title_more' => _t('_bx_cnv_more', $iCollaboratorsNum - $iMaxVisible),
-                    'float' => $sFloat,
                     'id' => $this->MODULE . '-popup-' . $aContentInfo[$CNF['FIELD_ID']],
                 ),
             ),
@@ -65,7 +61,6 @@ class BxCnvTemplate extends BxBaseModTextTemplate
             $aCollaborator = array (
                 'id' => $oProfile->id(),
                 'unit' => $oProfile->getUnit(0, array('template' => 'unit_wo_info')),
-                'float' => $sFloat,
                 'class' => $aContentInfo[$CNF['FIELD_AUTHOR']] == $iProfileId ? 'bx-cnv-collaborator-author' : '',
                 'bx_if:last_replier' => array (
                     'condition' => ($aContentInfo['last_reply_profile_id'] == $iProfileId),

+ 4 - 7
modules/boonex/convos/template/collaborators.html

@@ -1,7 +1,6 @@
-<div class="bx-cnv-collaborators bx-def-margin-sec-right bx-clearfix" style="float:__float__;">
-
+<div class="bx-cnv-collaborators flex justify-end items-center space-x-2">
     <bx_repeat:collaborators>
-        <div class="bx-cnv-collaborator bx-def-margin-sec-__float__-auto __class__">
+        <div class="bx-cnv-collaborator __class__">
             __unit__
             <bx_if:last_replier>
                 <div title="__title__" class="bx-cnv-collaborator-last-replier bx-def-unit-alert p-0 bg-col-blue2-dark"><i class="sys-icon comments bx-def-font-contrasted"></i></div>
@@ -11,12 +10,10 @@
             </bx_if:author>
         </div>
     </bx_repeat:collaborators>
-
     <bx_if:collaborators_more>
-        <div class="bx-cnv-collaborator bx-def-unit bx-def-thumb-size bx-def-margin-sec-__float__-auto">
+        <div class="bx-cnv-collaborator">
             <a href="javascript:void(0);" onclick="$('#__id__').dolPopup({pointer:{el:$(this)}})">__title_more__</a>            
         </div>
         <div id="__id__" style="display:none;">__popup__</div>
     </bx_if:collaborators_more>
-
-</div>
+</div>

+ 5 - 1
modules/boonex/convos/template/css/main.css

@@ -1,8 +1,12 @@
 .bx-cnv-collaborators {
     white-space:nowrap;
 }
+.bx-grid-table .bx-cnv-collaborators {
+    -webkit-justify-content: flex-start;
+    justify-content: flex-start;
+}
 .bx-cnv-collaborator {
-	position:relative;
+    position:relative;
     display:block;
 }
 .bx-cnv-collaborator.bx-def-margin-sec-left-auto {