Procházet zdrojové kódy

#42 - convos module - small updates

Alex Trofimov před 12 roky
rodič
revize
9c5d011c77

+ 25 - 0
modules/boonex/convos/classes/BxCnvCmts.php

@@ -45,6 +45,31 @@ class BxCnvCmts extends BxTemplCmts
     {
     {
         return _t('_sys_txt_access_denied');
         return _t('_sys_txt_access_denied');
     }
     }
+
+    public function isEditAllowed ($aCmt, $isPerformAction = false)
+    {
+        return $this->isRemoveAllowed ($aCmt, $isPerformAction);
+    }
+
+    public function msgErrEditAllowed ()
+    {
+        return $this->msgErrRemoveAllowed ();
+    }
+
+    protected function _getFormObject($sAction, $iId)
+    {
+        $oForm = parent::_getFormObject($sAction, $iId);
+        $oForm->aInputs['cmt_submit']['value'] = _t('_sys_send');
+        return $oForm;
+    }
+
+    function getCommentsBlock($iParentId = 0, $iVParentId = 0, $bInDesignbox = true)
+    {
+        $mixedBlock = parent::getCommentsBlock($iParentId, $iVParentId, $bInDesignbox);
+        if (is_array($mixedBlock) && isset($mixedBlock['title']))
+            $mixedBlock['title'] = _t('_bx_cnv_page_block_title_entry_comments', $this->getCommentsCount());
+        return $mixedBlock;
+    }
 }
 }
 
 
 /** @} */
 /** @} */

+ 2 - 2
modules/boonex/convos/install/langs/en.xml

@@ -37,7 +37,7 @@
 	<string name="_bx_cnv_page_block_title_entry_text"><![CDATA[Text]]></string>
 	<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_author"><![CDATA[Author]]></string>
     <string name="_bx_cnv_page_block_title_entry_actions"><![CDATA[Actions]]></string>
     <string name="_bx_cnv_page_block_title_entry_actions"><![CDATA[Actions]]></string>
-    <string name="_bx_cnv_page_block_title_entry_comments"><![CDATA[Comments]]></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_block_title_entry_collaborators"><![CDATA[Participants]]></string>
     <string name="_bx_cnv_page_title_sys_folder"><![CDATA[Convos in folder]]></string>
     <string name="_bx_cnv_page_title_sys_folder"><![CDATA[Convos in folder]]></string>
     <string name="_bx_cnv_page_title_folder"><![CDATA[Folder: {folder}]]></string>
     <string name="_bx_cnv_page_title_folder"><![CDATA[Folder: {folder}]]></string>
@@ -82,7 +82,7 @@
     <string name="_bx_cnv_field_collaborators"><![CDATA[Participants]]></string>
     <string name="_bx_cnv_field_collaborators"><![CDATA[Participants]]></string>
 
 
     <string name="_bx_cnv_grid_action_delete"><![CDATA[Delete]]></string>
     <string name="_bx_cnv_grid_action_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_cnv_grid_action_compose"><![CDATA[Start new convo]]></string>
+    <string name="_bx_cnv_grid_action_compose"><![CDATA[Compose]]></string>
 
 
     <string name="_bx_cnv_collaborator_info"><![CDATA[{0} ({1})]]></string>
     <string name="_bx_cnv_collaborator_info"><![CDATA[{0} ({1})]]></string>
     <string name="_bx_cnv_collaborator_author"><![CDATA[author]]></string>
     <string name="_bx_cnv_collaborator_author"><![CDATA[author]]></string>

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

@@ -112,7 +112,7 @@ INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `tit
 -- GRID
 -- GRID
 
 
 INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_mode`, `sorting_fields`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
 INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_mode`, `sorting_fields`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
-('bx_convos', 'Sql', 'SELECT `c`.`id`, `c`.`author`, `c`.`text`, `c`.`added`, `c`.`comments`, `f`.`read_comments`, `last_reply_timestamp`, `last_reply_profile_id` FROM `bx_convos_conversations` AS `c` INNER JOIN `bx_convos_conv2folder` AS `f` ON (`c`.`id` = `f`.`conv_id` AND `f`.`folder_id` = {folder_id} AND `f`.`collaborator` = {profile_id})', 'bx_convos_conversations', 'id', 'last_reply_timestamp', '', 10, NULL, 'start', '', 'text', 'auto', 'comments,last_reply_timestamp', 64, 'BxCnvGrid', 'modules/boonex/convos/classes/BxCnvGrid.php');
+('bx_convos', 'Sql', 'SELECT `c`.`id`, `c`.`author`, `c`.`text`, `c`.`added`, `c`.`comments`, `f`.`read_comments`, `last_reply_timestamp`, `last_reply_profile_id` FROM `bx_convos_conversations` AS `c` INNER JOIN `bx_convos_conv2folder` AS `f` ON (`c`.`id` = `f`.`conv_id` AND `f`.`folder_id` = {folder_id} AND `f`.`collaborator` = {profile_id})', 'bx_convos_conversations', 'id', 'last_reply_timestamp', '', 10, NULL, 'start', '', 'text', 'auto', 'comments,last_reply_timestamp', 2147483646, 'BxCnvGrid', 'modules/boonex/convos/classes/BxCnvGrid.php');
 
 
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
 INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `params`, `order`) VALUES
 ('bx_convos', 'checkbox', '_sys_select', '2%', '', 1),
 ('bx_convos', 'checkbox', '_sys_select', '2%', '', 1),

+ 1 - 0
modules/boonex/english/data/langs/system.xml

@@ -1818,6 +1818,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_request_method_not_found_cnt"><![CDATA[Method({0}) was not found in module({1})]]></string>
 	<string name="_sys_request_method_not_found_cnt"><![CDATA[Method({0}) was not found in module({1})]]></string>
 	<string name="_sys_search_main_title"><![CDATA[Search Home]]></string>
 	<string name="_sys_search_main_title"><![CDATA[Search Home]]></string>
 	<string name="_sys_select"><![CDATA[Select]]></string>
 	<string name="_sys_select"><![CDATA[Select]]></string>
+	<string name="_sys_send"><![CDATA[Send]]></string>
 	<string name="_sys_spam_detected"><![CDATA[Sorry, it looks like you are trying to submit spam]]></string>
 	<string name="_sys_spam_detected"><![CDATA[Sorry, it looks like you are trying to submit spam]]></string>
 	<string name="_sys_spam_detected_contact"><![CDATA[Sorry, it looks like you are trying to submit spam, if you believe that it is not spam please submit false positive report here: {0}]]></string>
 	<string name="_sys_spam_detected_contact"><![CDATA[Sorry, it looks like you are trying to submit spam, if you believe that it is not spam please submit false positive report here: {0}]]></string>
 	<string name="_sys_splash_btn_start"><![CDATA[Start]]></string>
 	<string name="_sys_splash_btn_start"><![CDATA[Start]]></string>