AntonLV 12 лет назад
Родитель
Сommit
c90b0bd939

+ 4 - 1
template/comment_actions.html

@@ -1,6 +1,9 @@
 <div class="__style_prefix__-actions bx-def-margin-sec-top bx-clearfix">
 	<div class="__style_prefix__-ago bx-def-margin-right">
-		<a class="__style_prefix__-ago" href="__view_link__" rel="nofollow">__ago__</a>
+		<bx_if:show_ago_link>
+			<a class="__style_prefix__-ago" href="__view_link__" rel="nofollow">__ago__</a>
+		</bx_if:show_ago_link>
+		<bx_if:show_ago_text>__ago__</bx_if:show_ago_text>
 	</div>
 	__menu_actions__
 </div>

+ 20 - 6
template/scripts/BxBaseCmts.php

@@ -418,16 +418,30 @@ class BxBaseCmts extends BxDolCmts {
 			$sMenuManage = BxTemplFunctions::getInstance()->transBox($this->_sSystem . '-manage-' . $aCmt['cmt_id'], $sMenuManage, true);
 		}
 
+		$sAgo = bx_time_js($aCmt['cmt_time']);
+		$bObjectTitle = !empty($this->_aSystem['trigger_field_title']);
         return $oTemplate->parseHtmlByName('comment_actions.html', array(
         	'id' => $aCmt['cmt_id'],
         	'js_object' => $this->_sJsObjName,
         	'style_prefix' => $this->_sStylePrefix,
-        	'view_link' => bx_append_url_params($this->_sViewUrl, array(
-        		'sys' => $this->_sSystem,
-        		'id' => $this->_iId,
-        		'cmt_id' => $aCmt['cmt_id']
-        	)),
-        	'ago' => bx_time_js($aCmt['cmt_time']),
+        	'bx_if:show_ago_link' => array(
+        		'condition' => $bObjectTitle,
+        		'content' => array(
+        			'style_prefix' => $this->_sStylePrefix,
+        			'view_link' => bx_append_url_params($this->_sViewUrl, array(
+		        		'sys' => $this->_sSystem,
+		        		'id' => $this->_iId,
+		        		'cmt_id' => $aCmt['cmt_id']
+		        	)),
+		        	'ago' => $sAgo
+        		)
+        	),
+        	'bx_if:show_ago_text' => array(
+        		'condition' => !$bObjectTitle,
+        		'content' => array(
+        			'ago' => $sAgo
+        		)
+        	),
         	'menu_actions' => $sMenuActions,
 /*
         	'bx_if:hide_rate_count' => array(

+ 3 - 1
template/scripts/BxBaseCmtsMenu.php

@@ -36,12 +36,14 @@ class BxBaseCmtsMenu extends BxTemplMenu
 		if($oVote !== false)
 			$sVotesOnclick = $oVote->getJsClick();
 
+		$sJsObject = $oCmts->getJsObjectName();
 		$this->addMarkers(array(
+			'js_object' => $sJsObject,
 			'cmt_system' => $this->_oCmts->getSystemName(),
 			'cmt_id' => $this->_oCmts->getId(),
 			'content_id' => $iCmtId,
 			'vote_onclick' => $sVotesOnclick,
-			'rate_onclick' => $oCmts->getJsObjectName() . '.toggleReply(this, ' . $iCmtId . ')',
+			'reply_onclick' => $sJsObject . '.toggleReply(this, ' . $iCmtId . ')'
     	));
     }