[Vtigercrm-commits] [vtiger-commits] r6788 - in /vtigercrm/trunk: Smarty/templates/ modules/Faq/ modules/HelpDesk/ modules/HelpDesk/language/

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue May 30 16:58:10 EDT 2006


Author: saraj
Date: Tue May 30 14:57:57 2006
New Revision: 6788

Log:
* Modified to display the comment details in Edit and DetailView and in the EditView page, in the comment text area already comment will not be shown now. it will be shown as empty

Modified:
    vtigercrm/trunk/Smarty/templates/DetailView.tpl
    vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
    vtigercrm/trunk/Smarty/templates/DisplayFields.tpl
    vtigercrm/trunk/Smarty/templates/salesEditView.tpl
    vtigercrm/trunk/modules/Faq/DetailView.php
    vtigercrm/trunk/modules/Faq/EditView.php
    vtigercrm/trunk/modules/Faq/Faq.php
    vtigercrm/trunk/modules/HelpDesk/DetailView.php
    vtigercrm/trunk/modules/HelpDesk/EditView.php
    vtigercrm/trunk/modules/HelpDesk/HelpDesk.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 Tue May 30 14:57:57 2006
@@ -189,6 +189,27 @@
                                                {/if}
                                                         </td>
                                                         </tr>
+
+
+
+
+							<!-- This is added to display the existing comments -->
+							{if $header eq 'Comments' || $header eq 'Comment Information'}
+							   <tr>
+								<td colspan=4 style="border-bottom:1px solid #999999;padding:5px;" bgcolor="#e5e5e5">
+						        	<b>{$MOD.LBL_COMMENT_INFORMATION}</b>
+								</td>
+							   </tr>
+							   <tr>
+							   			<td colspan=4 class="dvtCellInfo">{$COMMENT_BLOCK}</td>
+							   </tr>
+							   <tr><td>&nbsp;</td></tr>
+							{/if}
+
+
+
+
+
 						     <tr>{strip}
 						     <td colspan=4 style="border-bottom:1px solid #999999;padding:5px;" bgcolor="#e5e5e5">
 							<b>

Modified: vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DetailViewUI.tpl Tue May 30 14:57:57 2006
@@ -87,6 +87,10 @@
                     </div>
                     </td>
                     {elseif $keyid eq '19' || $keyid eq '20'} <!--TextArea/Description-->
+			<!-- In Add Comment are we should not display anything -->
+			{if $label eq 'Add Comment'}
+				{assign var=keyval value=""}
+			{/if}
                     <td width=25% class="dvtCellInfo" align="left" id="mouseArea_{$label}"><div id="dtlview_{$label}"  onClick="hndMouseOver({$keyid},'{$label}');">&nbsp;{$keyval}</div>
                    	<div id="editarea_{$label}" style="display:none;">
                     <textarea id="txtbox_{$label}" name="txtbox_{$label}"  class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'"onBlur="this.className='detailedViewTextBox'" cols="90" rows="8">{$keyval}</textarea>                                            		  

Modified: vtigercrm/trunk/Smarty/templates/DisplayFields.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/DisplayFields.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/DisplayFields.tpl Tue May 30 14:57:57 2006
@@ -48,6 +48,10 @@
 				<td width=30% align=left class="dvtCellInfo"><input type="text" name="{$fldname}" id ="{$fldname}" value="{$fldvalue}" class=detailedViewTextBox onFocus="this.className='detailedViewTextBoxOn'" onBlur="this.className='detailedViewTextBox'"></td>
 			{/if}
 		{elseif $uitype eq 19 || $uitype eq 20}
+			<!-- In Add Comment are we should not display anything -->
+			{if $fldlabel eq 'Add Comment'}
+				{assign var=fldvalue value=""}
+			{/if}
 			<td width=20% class="dvtCellLabel" align=right>
 				{if $uitype eq 20}
 					<font color="red">*</font>

Modified: vtigercrm/trunk/Smarty/templates/salesEditView.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/salesEditView.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/salesEditView.tpl Tue May 30 14:57:57 2006
@@ -122,7 +122,26 @@
 
 									   <!-- included to handle the edit fields based on ui types -->
 									   {foreach key=header item=data from=$BLOCKS}
-									      </tr>
+
+
+
+							<!-- This is added to display the existing comments -->
+							{if $header eq 'Comments' || $header eq 'Comment Information'}
+							   <tr><td>&nbsp;</td></tr>
+							   <tr>
+								<td colspan=4 style="border-bottom:1px solid #999999;padding:5px;" bgcolor="#e5e5e5">
+						        	<b>{$MOD.LBL_COMMENT_INFORMATION}</b>
+								</td>
+							   </tr>
+							   <tr>
+							   			<td colspan=4 class="dvtCellInfo">{$COMMENT_BLOCK}</td>
+							   </tr>
+							   <tr><td>&nbsp;</td></tr>
+							{/if}
+
+
+
+									      <tr>
 										<td colspan=4 class="detailedViewHeader">
 											<b>{$header}</b>
 										</td>

Modified: vtigercrm/trunk/modules/Faq/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/DetailView.php (original)
+++ vtigercrm/trunk/modules/Faq/DetailView.php Tue May 30 14:57:57 2006
@@ -90,6 +90,9 @@
 $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
-	
+
+//Added to display the Faq comments information
+$smarty->assign("COMMENT_BLOCK",$focus->getFAQComments($_REQUEST['record']));
+
 $smarty->display("DetailView.tpl");
 ?>

Modified: vtigercrm/trunk/modules/Faq/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/EditView.php (original)
+++ vtigercrm/trunk/modules/Faq/EditView.php Tue May 30 14:57:57 2006
@@ -106,7 +106,13 @@
 
 $check_button = Button_Check($module);
 $smarty->assign("CHECK", $check_button);
- 
+
+if($_REQUEST['record'] != '')
+{
+	//Added to display the Faq comments information
+	$smarty->assign("COMMENT_BLOCK",$focus->getFAQComments($_REQUEST['record']));
+}
+
 if($focus->mode == 'edit')
 	$smarty->display("salesEditView.tpl");
 else

Modified: vtigercrm/trunk/modules/Faq/Faq.php
==============================================================================
--- vtigercrm/trunk/modules/Faq/Faq.php (original)
+++ vtigercrm/trunk/modules/Faq/Faq.php Tue May 30 14:57:57 2006
@@ -110,16 +110,19 @@
 			return '';
 		}
 
-		$list .= '<div style="overflow: scroll;height:150;width:100%;">';
+		$list .= '<div style="overflow: auto;height:200px;width:100%;">';
 		for($i=0;$i<$noofrows;$i++)
 		{
 			$comment = $this->db->query_result($result,$i,'comments');
 			$createdtime = $this->db->query_result($result,$i,'createdtime');
 			if($comment != '')
 			{
-				$list .= '<div valign="top" width="70%" class="dataField">&nbsp;&nbsp;'.$comment.'</div>';
-				$list .= '<div valign="top" width="70%" class="dataLabel">'.$mod_strings['Created Time'];
-				$list .= ' : '.$createdtime.'</div>';
+				//this div is to display the comment
+				$list .= '<div valign="top" style="width:99%;padding-top:10px;" class="dataField">'.make_clickable(nl2br($comment)).'</div>';
+				
+				//this div is to display the created time
+				$list .= '<div valign="top" style="width:99%;border-bottom:1px dotted #CCCCCC;padding-bottom:5px;" class="dataLabel"><font color=darkred>'.$mod_strings['Created Time'];
+				$list .= ' : '.$createdtime.'</font></div>';
 			}
 		}
 		$list .= '</div>';

Modified: vtigercrm/trunk/modules/HelpDesk/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/DetailView.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/DetailView.php Tue May 30 14:57:57 2006
@@ -99,6 +99,9 @@
 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
 
+//Added to display the ticket comments information
+$smarty->assign("COMMENT_BLOCK",$focus->getCommentInformation($_REQUEST['record']));
+
 $smarty->assign("MODULE",$currentModule);
 $smarty->display("DetailView.tpl");
 $focus->id = $_REQUEST['record'];

Modified: vtigercrm/trunk/modules/HelpDesk/EditView.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/EditView.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/EditView.php Tue May 30 14:57:57 2006
@@ -102,6 +102,12 @@
 $check_button = Button_Check($module);
 $smarty->assign("CHECK", $check_button);
 
+if($_REQUEST['record'] != '')
+{
+	//Added to display the ticket comments information
+	$smarty->assign("COMMENT_BLOCK",$focus->getCommentInformation($_REQUEST['record']));
+}
+
 if($focus->mode == 'edit')
 	$smarty->display("salesEditView.tpl");
 else

Modified: vtigercrm/trunk/modules/HelpDesk/HelpDesk.php
==============================================================================
--- vtigercrm/trunk/modules/HelpDesk/HelpDesk.php (original)
+++ vtigercrm/trunk/modules/HelpDesk/HelpDesk.php Tue May 30 14:57:57 2006
@@ -358,16 +358,21 @@
 			return '';
 		}
 
-		$list .= '<div style="overflow: scroll;height:200;width:100%;">';
+		$list .= '<div style="overflow: auto;height:200px;width:100%;">';
 		for($i=0;$i<$noofrows;$i++)
 		{
 			if($adb->query_result($result,$i,'comments') != '')
 			{
-				$list .= '<div valign="top" width="70%"class="dataField">';
+				//this div is to display the comment
+				$list .= '<div valign="top" style="width:99%;padding-top:10px;" class="dataField">';
 				$list .= make_clickable(nl2br($adb->query_result($result,$i,'comments')));
 
-				$list .= '</div><div valign="top" width="20%" class="dataLabel"><font color=darkred>';
+				$list .= '</div>';
+
+				//this div is to display the author and time
+				$list .= '<div valign="top" style="width:99%;border-bottom:1px dotted #CCCCCC;padding-bottom:5px;" class="dataLabel"><font color=darkred>';
 				$list .= $mod_strings['LBL_AUTHOR'].' : ';
+
 				if($adb->query_result($result,$i,'ownertype') == 'user')
 					$list .= getUserName($adb->query_result($result,$i,'ownerid'));
 				else
@@ -388,7 +393,7 @@
 	 *      @param  int    $id   - Ticket id
 	 *      @return string $customername - The contact name
 	**/
-function getCustomerName($id)
+	function getCustomerName($id)
 	{
 		global $log;
 		$log->debug("Entering getCustomerName(".$id.") method ...");

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 Tue May 30 14:57:57 2006
@@ -157,6 +157,7 @@
 'LBL_CONVERT_AS_FAQ_BUTTON_KEY'=>'C',
 'LBL_CONVERT_AS_FAQ_BUTTON_LABEL'=>'Convert As FAQ',
 'Attachment'=>'Attachment',
+'LBL_COMMENT_INFORMATION'=>'Comment Information',
 
 );
 





More information about the vtigercrm-commits mailing list