瀏覽代碼

Ticket #807 - usage in Timeline.

AntonLV 9 年之前
父節點
當前提交
37af6b4e56

+ 2 - 1
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -924,7 +924,8 @@ class BxBaseModGeneralModule extends BxDolModule
             $oProfile->getDisplayName(),
             $oProfile->getUrl(),
             $oProfile->getThumb(),
-            $oProfile->getUnit()
+            $oProfile->getUnit(),
+            $oProfile->getUnit(0, array('template' => 'unit_wo_info'))
         );
     }
 

+ 2 - 1
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -683,7 +683,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $sStylePrefix = $this->_oConfig->getPrefix('style');
         $sJsObject = $this->_oConfig->getJsObject('view');
 
-        list($sAuthorName, $sAuthorUrl, $sAuthorIcon) = $oModule->getUserInfo($aEvent['object_owner_id']);
+        list($sAuthorName, $sAuthorUrl, $sAuthorIcon, $sAuthorUnit, $sAuthorUnitShort) = $oModule->getUserInfo($aEvent['object_owner_id']);
         $bAuthorIcon = !empty($sAuthorIcon);
 
         $aTmplVarsMenuItemActions = $this->_getTmplVarsMenuItemActions($aEvent, $aBrowseParams);
@@ -719,6 +719,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
             'item_owner_url' => $sAuthorUrl,
             'item_owner_title' => bx_html_attribute($sAuthorName),
             'item_owner_name' => $sAuthorName,
+            'item_owner_unit' => $sAuthorUnitShort,
             'item_owner_action' => _t($aEvent['sample_action'], _t($aEvent['sample'])),
             'bx_if:show_timeline_owner' => array(
                 'condition' => !empty($aTmplVarsTimelineOwner),

+ 1 - 10
modules/boonex/timeline/template/item_outline.html

@@ -2,16 +2,7 @@
 	<div class="__style_prefix__-item-ind bx-def-padding-sec">
 	    <div class="__style_prefix__-item-cnt bx-def-box bx-def-padding bx-def-round-corners __class_content__">
 	    	<div class="__style_prefix__-item-owner bx-def-margin-bottom"> 
-		       	<div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">
-                    <a href="__item_owner_url__" class="__style_prefix__-owner-avatar" title="__item_owner_title__">
-						<bx_if:show_owner_icon>
-							<img class="bx-def-thumb bx-def-thumb-size" src="__owner_icon__" />
-						</bx_if:show_owner_icon>
-						<bx_if:show_owner_icon_empty>
-							<i class="sys-icon user"></i>
-						</bx_if:show_owner_icon_empty>
-                    </a>
-				</div>
+		       	<div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">__item_owner_unit__</div>
 				<div class="__style_prefix__-owner-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
 				    <!-- NOTE: Spaces after and between elements in 'owner-name' DIV are needed for better line folding -->
 					<div class="__style_prefix__-owner-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">

+ 1 - 10
modules/boonex/timeline/template/item_search.html

@@ -1,16 +1,7 @@
 <div id="__html_id__" class="__style_prefix__-item __class__ bx-def-thumb-size-min-height bx-def-padding-bottom bx-clearfix">
     <div class="__style_prefix__-item-cnt bx-def-box bx-def-padding-topbottom bx-def-round-corners __class_content__">
         <div class="__style_prefix__-item-owner bx-def-margin-leftright"> 
-            <div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">
-                <a href="__item_owner_url__" class="__style_prefix__-owner-avatar" title="__item_owner_title__">
-                    <bx_if:show_owner_icon>
-                        <img class="bx-def-thumb bx-def-thumb-size" src="__owner_icon__" />
-                    </bx_if:show_owner_icon>
-                    <bx_if:show_owner_icon_empty>
-                        <i class="sys-icon user"></i>
-                    </bx_if:show_owner_icon_empty>
-                </a>
-            </div>
+            <div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">__item_owner_unit__</div>
             <div class="__style_prefix__-owner-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
                 <!-- NOTE: Spaces after and between elements in 'owner-name' DIV are needed for better line folding -->
                 <div class="__style_prefix__-owner-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">

+ 1 - 10
modules/boonex/timeline/template/item_timeline.html

@@ -7,16 +7,7 @@
     </div>
     <div class="__style_prefix__-item-cnt bx-def-box bx-def-padding-topbottom bx-def-round-corners __class_content__">
         <div class="__style_prefix__-item-owner bx-def-margin-leftright"> 
-            <div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">
-                <a href="__item_owner_url__" class="__style_prefix__-owner-avatar" title="__item_owner_title__">
-                    <bx_if:show_owner_icon>
-                        <img class="bx-def-thumb bx-def-thumb-size" src="__owner_icon__" />
-                    </bx_if:show_owner_icon>
-                    <bx_if:show_owner_icon_empty>
-                        <i class="sys-icon user"></i>
-                    </bx_if:show_owner_icon_empty>
-                </a>
-            </div>
+            <div class="__style_prefix__-owner-avatar bx-def-thumb bx-def-thumb-size">__item_owner_unit__</div>
             <div class="__style_prefix__-owner-info bx-def-thumb-size-min-height bx-def-thumb-size-left-indent">
                 <!-- NOTE: Spaces after and between elements in 'owner-name' DIV are needed for better line folding -->
                 <div class="__style_prefix__-owner-name bx-def-font-middle bx-def-font-light bx-def-font-grayed">