AntonLV 10 лет назад
Родитель
Сommit
0b669a2b9d

+ 5 - 0
modules/boonex/convos/classes/BxCnvConfig.php

@@ -47,6 +47,7 @@ class BxCnvConfig extends BxBaseModTextConfig
             'URI_ADD_ENTRY' => 'start-convo',
 
             'URL_HOME' => 'modules/?r=convos/folder/1',
+        	'URL_FOLDER' => 'modules/?r=convos/folder/',
 
             // some params
             'PARAM_CHARS_SUMMARY' => '',
@@ -83,6 +84,10 @@ class BxCnvConfig extends BxBaseModTextConfig
             // some language keys
             'T' => array (
                 'txt_sample_single' => '_bx_cnv_txt_sample_single',
+            	'txt_folder_' . BX_CNV_FOLDER_INBOX => '_bx_cnv_folder_inbox',
+	            'txt_folder_' . BX_CNV_FOLDER_DRAFTS => '_bx_cnv_folder_drafts',
+	            'txt_folder_' . BX_CNV_FOLDER_SPAM => '_bx_cnv_folder_spam',
+	            'txt_folder_' . BX_CNV_FOLDER_TRASH => '_bx_cnv_folder_trash',
             ),
         );
 

+ 24 - 0
modules/boonex/convos/classes/BxCnvTemplate.php

@@ -244,6 +244,30 @@ class BxCnvTemplate extends BxBaseModTextTemplate
     {
         return '';
     }
+
+	public function entryBreadcrumb($aContentInfo, $aTmplVarsItems = array())
+    {
+        $CNF = &BxDolModule::getInstance($this->MODULE)->_oConfig->CNF;
+
+        $oPermalink = BxDolPermalinks::getInstance();
+
+        $oAuthor = BxDolProfile::getInstance($aContentInfo[$CNF['FIELD_AUTHOR']]);
+		if(!$oAuthor)
+			$oAuthor = BxDolProfileUndefined::getInstance();
+
+        $sText = strmaxtextlen($aContentInfo[$CNF['FIELD_TEXT']], 50);
+        $iFolder = $this->_oDb->getConversationFolder($aContentInfo[$CNF['FIELD_ID']], bx_get_logged_profile_id());
+
+    	$aTmplVarsItems = array(array(
+        	'url' => BX_DOL_URL_ROOT . $oPermalink->permalink($CNF['URL_FOLDER'] . $iFolder),
+        	'title' => _t($CNF['T']['txt_folder_' . $iFolder])
+        ), array(
+        	'url' => BX_DOL_URL_ROOT . $oPermalink->permalink('page.php?i=' . $CNF['URI_VIEW_ENTRY'] . '&id=' . $aContentInfo[$CNF['FIELD_ID']]),
+        	'title' => $sText ? $sText : $oAuthor->getDisplayName(),
+        ));
+
+    	return parent::entryBreadcrumb($aContentInfo, $aTmplVarsItems);
+    }
 }
 
 /** @} */

+ 1 - 0
modules/boonex/convos/install/langs/en.xml

@@ -39,6 +39,7 @@
 	<string name="_bx_cnv_page_block_title_entry_text"><![CDATA[Text]]></string>
     <string name="_bx_cnv_page_block_title_entry_author"><![CDATA[Author]]></string>
     <string name="_bx_cnv_page_block_title_entry_actions"><![CDATA[Actions]]></string>
+    <string name="_bx_cnv_page_block_title_entry_breadcrumb"><![CDATA[Breadcrumb]]></string>
     <string name="_bx_cnv_page_block_title_entry_comments"><![CDATA[Replies ({0})]]></string>
     <string name="_bx_cnv_page_block_title_entry_collaborators"><![CDATA[Participants]]></string>
     <string name="_bx_cnv_page_title_sys_folder"><![CDATA[Conversations in folder]]></string>

+ 2 - 1
modules/boonex/convos/install/sql/enable.sql

@@ -33,7 +33,8 @@ INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title`, `designb
 INSERT INTO `sys_objects_page`(`object`, `uri`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
 ('bx_convos_view_entry', 'view-convo', '_bx_cnv_page_title_sys_view_entry', '_bx_cnv_page_title_view_entry', 'bx_convos', 10, 2147483647, 1, '', '', '', '', 0, 1, 0, 'BxCnvPageEntry', 'modules/boonex/convos/classes/BxCnvPageEntry.php');
 
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES 
+INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `order`) VALUES
+('bx_convos_view_entry', 1, 'bx_convos', '_bx_cnv_page_block_title_entry_breadcrumb', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_convos";s:6:"method";s:17:"entity_breadcrumb";}', 0, 0, 1, 0),
 ('bx_convos_view_entry', 4, 'bx_convos', '_bx_cnv_page_block_title_entry_text', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_convos\";s:6:\"method\";s:17:\"entity_text_block\";}', 0, 0, 1, 0),
 ('bx_convos_view_entry', 3, 'bx_convos', '_bx_cnv_page_block_title_entry_collaborators', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_convos\";s:6:\"method\";s:20:\"entity_collaborators\";}', 0, 0, 1, 0),
 ('bx_convos_view_entry', 2, 'bx_convos', '_bx_cnv_page_block_title_entry_author', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_convos\";s:6:\"method\";s:13:\"entity_author\";}', 0, 0, 1, 0),

+ 1 - 0
modules/boonex/convos/template/breadcrumb.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/breadcrumb.html />

+ 1 - 0
modules/boonex/russian/data/langs/bx_convos/ru.xml

@@ -39,6 +39,7 @@
 	<string name="_bx_cnv_page_block_title_entry_text"><![CDATA[Текст]]></string>
     <string name="_bx_cnv_page_block_title_entry_author"><![CDATA[Автор]]></string>
     <string name="_bx_cnv_page_block_title_entry_actions"><![CDATA[Действия]]></string>
+    <string name="_bx_cnv_page_block_title_entry_breadcrumb"><![CDATA["Хлебные крошки"]]></string>
     <string name="_bx_cnv_page_block_title_entry_comments"><![CDATA[Ответов ({0})]]></string>
     <string name="_bx_cnv_page_block_title_entry_collaborators"><![CDATA[Адресаты]]></string>
     <string name="_bx_cnv_page_title_sys_folder"><![CDATA[Сообщений в папке]]></string>