Selaa lähdekoodia

#26 - Temporary integration of Share and Votes

AntonLV 13 vuotta sitten
vanhempi
sitoutus
43e95b1f80

+ 9 - 0
modules/boonex/notes/classes/BxNotesTemplate.php

@@ -91,6 +91,15 @@ class BxNotesTemplate extends BxDolModuleTemplate {
         $aVars = $aData;
         $aVars['entry_title'] = $aData[BxNotesConfig::$FIELD_TITLE];
         $aVars['entry_text'] = $aData[BxNotesConfig::$FIELD_TEXT];
+
+        //TODO: Rebuild using menus engine when it will be ready for such elements like Vote, Share, etc. 
+        bx_import('BxDolVote');
+        $oVotes = BxDolVote::getObjectInstance(BxNotesConfig::$OBJECT_VOTES, $aData[BxNotesConfig::$FIELD_ID]);
+        $aVars['entry_actions'] = $oVotes->getElementBlock();
+
+        if(BxDolRequest::serviceExists('bx_timeline', 'get_share_element_block'))
+        	$aVars['entry_actions'] .= BxDolService::call('bx_timeline', 'get_share_element_block', array(bx_get_logged_profile_id(), 'bx_notes', 'added', $aData[BxNotesConfig::$FIELD_ID]));
+
         return $this->parseHtmlByName($sTemplateName, $aVars);
     }
 

+ 9 - 0
modules/boonex/notes/template/css/main.css

@@ -15,3 +15,12 @@
     float:right;
 }
 
+/* view page */
+.bx-notes-entity-actions .bx-vote,
+.bx-notes-entity-actions .bx-tl-share {
+	position: relative;
+	float: left;
+}
+.bx-notes-entity-actions .bx-tl-share {
+	margin-left: 20px;
+}

+ 1 - 1
modules/boonex/notes/template/entry-text.html

@@ -4,5 +4,5 @@
     <h1>__title__</h1>
 
     __text__
-
 </div>
+<div class="bx-notes-entity-actions bx-clearfix">__entry_actions__</div>