[Vtigercrm-commits] [vtiger-commits] r7676 - in /vtigercrm/trunk: Smarty/templates/DetailView.tpl Smarty/templates/DetailViewUI.tpl data/CRMEntity.php modules/Faq/language/en_us.lang.php modules/HelpDesk/language/en_us.lang.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Jun 29 11:48:14 EDT 2006


Author: saraj
Date: Thu Jun 29 09:48:04 2006
New Revision: 7676

Log:
* Modified to display the comments properly where as previously when the language string changes then the comments will not be shown and the add comment value has been emptied because the comments are shown in seperate block

Modified:
    vtigercrm/trunk/Smarty/templates/DetailView.tpl
    vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
    vtigercrm/trunk/data/CRMEntity.php
    vtigercrm/trunk/modules/Faq/language/en_us.lang.php
    vtigercrm/trunk/modules/HelpDesk/language/en_us.lang.php

Modified: vtigercrm/trunk/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailView.tpl Thu Jun 29 09:48:04 2006
@@ -221,7 +221,7 @@
 
 
 							<!-- This is added to display the existing comments -->
-							{if $header eq 'Comments' || $header eq 'Comment Information'}
+							{if $header eq $MOD.LBL_COMMENTS || $header eq $MOD.LBL_COMMENT_INFORMATION}
 							   <tr>
 								<td colspan=4 style="border-bottom:1px solid #999999;padding:5px;" bgcolor="#e5e5e5">
 						        	<b>{$MOD.LBL_COMMENT_INFORMATION}</b>

Modified: vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl Thu Jun 29 09:48:04 2006
@@ -97,6 +97,10 @@
                                                        </div>
                                                   </td>
                                              {elseif $keyid eq '19' || $keyid eq '20'} <!--TextArea/Description-->
+						<!-- we will empty the value of ticket and faq comment -->
+						{if $label eq $MOD.LBL_ADD_COMMENT}
+							{assign var=keyval value=''}
+						{/if}
                                                   <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}" onmouseover="hndMouseOver({$keyid},'{$label}');" onmouseout="fnhide('crmspanid');">&nbsp;<span id="dtlview_{$label}">{$keyval}</span>
                                               		<div id="editarea_{$label}" style="display:none;">
                                               		  <textarea id="txtbox_{$label}" name="{$keyfldname}"  class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$keyval}</textarea>                                            		  

Modified: vtigercrm/trunk/data/CRMEntity.php
==============================================================================
--- vtigercrm/trunk/data/CRMEntity.php (original)
+++ vtigercrm/trunk/data/CRMEntity.php Thu Jun 29 09:48:04 2006
@@ -1000,15 +1000,20 @@
 }
 function insertIntoFAQCommentTable($table_name, $module)
 {
-	 global $log;
+	global $log;
 	$log->info("in insertIntoFAQCommentTable  ".$table_name."    module is  ".$module);
         global $adb;
 
         $current_time = date('Y-m-d H:i:s');
 
-	if($_REQUEST['comments'] != '')
-	{
-		$comment = addslashes($_REQUEST['comments']);
+	if($this->column_fields['comments'] != '')
+		$comment = $this->column_fields['comments'];
+	else
+		$comment = $_REQUEST['comments'];
+
+	if($comment != '')
+	{
+		$comment = addslashes($comment);
 		$sql = "insert into vtiger_faqcomments values('',".$this->id.",'".$comment."','".$current_time."')";
 		$adb->query($sql);
 	}

Modified: vtigercrm/trunk/modules/Faq/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/Faq/language/en_us.lang.php Thu Jun 29 09:48:04 2006
@@ -107,6 +107,7 @@
 'Question'=>'Question',
 'Answer'=>'Answer',
 'Comments'=>'Comments',
+'LBL_COMMENTS'=>'Comments',//give the same value given to the above string 'Comments'
 'Created Time'=>'Created Time',
 'Modified Time'=>'Modified Time',
 
@@ -116,6 +117,7 @@
 'Product Name'=>'Product Name',
 'FAQ Id'=>'FAQ Id',
 'Add Comment'=>'Add Comment',
+'LBL_ADD_COMMENT'=>'Add Comment',//give the same value given to the above string 'Add Comment'
 'LBL_COMMENT_INFORMATION'=>'Comment Information',
 'Status'=>'Status',
 

Modified: vtigercrm/trunk/modules/HelpDesk/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/language/en_us.lang.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/language/en_us.lang.php Thu Jun 29 09:48:04 2006
@@ -136,6 +136,7 @@
 'LBL_TICKET_RESOLUTION'=>'Solution Information',
 'Solution'=>'Solution',
 'Add Comment'=>'Add Comment',
+'LBL_ADD_COMMENT'=>'Add Comment',//give the same value given to the above string 'Add Comment'
 
 //Added for 4.2 Release -- CustomView
 'Ticket ID'=>'Ticket ID',





More information about the vtigercrm-commits mailing list