[Vtigercrm-commits] [vtiger-commits] r10169 - in /vtigercrm/branches/5.0.3: Smarty/templates/DetailView.tpl modules/Accounts/DetailView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Feb 12 03:59:07 EST 2007
Author: saraj
Date: Mon Feb 12 01:59:00 2007
New Revision: 10169
Log:
SendMail button in detailview of Accounts. Fixes #2992
Modified:
vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl
vtigercrm/branches/5.0.3/modules/Accounts/DetailView.php
Modified: vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl
==============================================================================
--- vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl (original)
+++ vtigercrm/branches/5.0.3/Smarty/templates/DetailView.tpl Mon Feb 12 01:59:00 2007
@@ -179,6 +179,11 @@
<input title="{$APP.LBL_SENDMAIL_BUTTON_TITLE}" accessKey="{$APP.LBL_SENDMAIL_BUTTON_KEY}" class="crmbutton small edit" onclick="if(checkEmailid('{$MODULE}','{$EMAIL}','{$YAHOO}')){ldelim}fnvshobj(this,'sendmail_cont');sendmail('{$MODULE}',{$ID}){rdelim}else{ldelim}return false{rdelim}" type="button" name="SendMail" value="{$APP.LBL_SENDMAIL_BUTTON_LABEL}">
{/if}
{/if}
+ {if $MODULE eq 'Accounts'}
+ {if $SENDMAILBUTTON eq 'permitted'}
+ <input title="{$APP.LBL_SENDMAIL_BUTTON_TITLE}" accessKey="{$APP.LBL_SENDMAIL_BUTTON_KEY}" class="crmbutton small edit" onclick="if(checkEmailid('{$MODULE}','{$EMAIL1}','{$EMAIL2}')){ldelim}fnvshobj(this,'sendmail_cont');sendmail('{$MODULE}',{$ID}){rdelim}else{ldelim}return false{rdelim}" type="button" name="SendMail" value="{$APP.LBL_SENDMAIL_BUTTON_LABEL}">
+ {/if}
+ {/if}
{if $MODULE eq 'Quotes' || $MODULE eq 'PurchaseOrder' || $MODULE eq 'SalesOrder' || $MODULE eq 'Invoice'}
{if $CREATEPDF eq 'permitted'}
<input title="Export To PDF" accessKey="Alt+e" class="crmbutton small create" onclick="this.form.return_module.value='{$MODULE}'; this.form.return_action.value='DetailView'; this.form.return_id.value='{$ID}'; this.form.module.value='{$MODULE}'; {if $MODULE eq 'SalesOrder'} this.form.action.value='CreateSOPDF'" {else} this.form.action.value='CreatePDF'" {/if} type="submit" name="Export To PDF" value="{$APP.LBL_EXPORT_TO_PDF}">
@@ -332,6 +337,11 @@
<input title="{$APP.LBL_SENDMAIL_BUTTON_TITLE}" accessKey="{$APP.LBL_SENDMAIL_BUTTON_KEY}" class="crmbutton small edit" onclick="if(checkEmailid('{$MODULE}','{$EMAIL}','{$YAHOO}')){ldelim}fnvshobj(this,'sendmail_cont');sendmail('{$MODULE}',{$ID}){rdelim}else{ldelim}return false{rdelim}" type="button" name="SendMail" value="{$APP.LBL_SENDMAIL_BUTTON_LABEL}">
{/if}
{/if}
+ {if $MODULE eq 'Accounts'}
+ {if $SENDMAILBUTTON eq 'permitted'}
+ <input title="{$APP.LBL_SENDMAIL_BUTTON_TITLE}" accessKey="{$APP.LBL_SENDMAIL_BUTTON_KEY}" class="crmbutton small edit" onclick="if(checkEmailid('{$MODULE}','{$EMAIL1}','{$EMAIL2}')){ldelim}fnvshobj(this,'sendmail_cont');sendmail('{$MODULE}',{$ID}){rdelim}else{ldelim}return false{rdelim}" type="button" name="SendMail" value="{$APP.LBL_SENDMAIL_BUTTON_LABEL}">
+ {/if}
+ {/if}
{if $MODULE eq 'Quotes' || $MODULE eq 'PurchaseOrder' || $MODULE eq 'SalesOrder' || $MODULE eq 'Invoice'}
{if $CREATEPDF eq 'permitted'}
<input title="Export To PDF" accessKey="Alt+e" class="crmbutton small create" onclick="this.form.return_module.value='{$MODULE}'; this.form.return_action.value='DetailView'; this.form.return_id.value='{$ID}'; this.form.module.value='{$MODULE}'; {if $MODULE eq 'SalesOrder'} this.form.action.value='CreateSOPDF'" {else} this.form.action.value='CreatePDF'" {/if} type="submit" name="Export To PDF" value="{$APP.LBL_EXPORT_TO_PDF}">
Modified: vtigercrm/branches/5.0.3/modules/Accounts/DetailView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/DetailView.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/DetailView.php Mon Feb 12 01:59:00 2007
@@ -80,6 +80,13 @@
if(isPermitted("Accounts","Delete",$_REQUEST['record']) == 'yes')
$smarty->assign("DELETE","permitted");
+if(isPermitted("Emails","EditView",'') == 'yes')
+{
+ $smarty->assign("SENDMAILBUTTON","permitted");
+ $smarty->assign("EMAIL1", $focus->column_fields['email1']);
+ $smarty->assign("EMAIL2", $focus->column_fields['email2']);
+}
+
if(isPermitted("Accounts","Merge",'') == 'yes')
{
$smarty->assign("MERGEBUTTON","permitted");
More information about the vtigercrm-commits
mailing list