Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
2c4c49ca | 3 | | CiviCRM version 4.7 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
e7112fa7 | 5 | | Copyright CiviCRM LLC (c) 2004-2015 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
9 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
10 | | under the terms of the GNU Affero General Public License | | |
11 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
12 | | | | |
13 | | CiviCRM is distributed in the hope that it will be useful, but | | |
14 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
15 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
16 | | See the GNU Affero General Public License for more details. | | |
17 | | | | |
18 | | You should have received a copy of the GNU Affero General Public | | |
19 | | License and the CiviCRM Licensing Exception along | | |
20 | | with this program; if not, contact CiviCRM LLC | | |
21 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
22 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
23 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
24 | +--------------------------------------------------------------------+ | |
25 | *} | |
26 | {* template for building email block*} | |
27 | <div id="crm-email-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Email"{rdelim}' data-dependent-fields='["#crm-contact-actions-wrapper"]'{/if}> | |
28 | <div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Add or edit email{/ts}"{/if}> | |
29 | {if $permission EQ 'edit'} | |
30 | <div class="crm-edit-help"> | |
31 | <span class="batch-edit"></span>{if empty($email)}{ts}Add email{/ts}{else}{ts}Add or edit email{/ts}{/if} | |
32 | </div> | |
33 | {/if} | |
34 | {if empty($email)} | |
35 | <div class="crm-summary-row"> | |
36 | <div class="crm-label"> | |
37 | {ts}Email{/ts} | |
38 | {if $privacy.do_not_email}<span class="icon privacy-flag do-not-email" title="{ts}Privacy flag: Do Not Email{/ts}"></span>{/if} | |
39 | </div> | |
40 | <div class="crm-content"></div> | |
41 | </div> | |
42 | {/if} | |
43 | {foreach from=$email key="blockId" item=item} | |
44 | {if $item.email} | |
45 | <div class="crm-summary-row {if $item.is_primary eq 1}primary{/if}"> | |
46 | <div class="crm-label"> | |
47 | {$item.location_type} {ts}Email{/ts} | |
48 | {if $privacy.do_not_email}<span class="icon privacy-flag do-not-email" title="{ts}Privacy flag: Do Not Email{/ts}"></span>{elseif $item.on_hold}<span class="icon privacy-flag email-hold" title="{ts}Email on hold - generally due to bouncing.{/ts}"></span>{/if} | |
49 | </div> | |
fba9e4ed | 50 | <div class="crm-content crm-contact_email"> |
8e4aa90c CW |
51 | {if !$item.on_hold and !$privacy.do_not_email} |
52 | <a href="{crmURL p="civicrm/activity/email/add" q="action=add&reset=1&email_id=`$item.id`"}" class="crm-popup" title="{ts 1=$item.email}Send email to %1{/ts}"> | |
53 | {$item.email} | |
54 | </a> | |
55 | {else} | |
56 | {$item.email} | |
57 | {/if} | |
58 | {if $item.on_hold == 2} ({ts}On Hold - Opt Out{/ts}){elseif $item.on_hold} ({ts}On Hold{/ts}){/if}{if $item.is_bulkmail} ({ts}Bulk{/ts}){/if} | |
6a488035 TO |
59 | {if $item.signature_text OR $item.signature_html} |
60 | <span class="signature-link description"> | |
61 | <a href="#" title="{ts}Signature{/ts}" onClick="showHideSignature( '{$blockId}' ); return false;">{ts}(signature){/ts}</a> | |
62 | </span> | |
63 | {/if} | |
64 | <div id="Email_Block_{$blockId}_signature" class="hiddenElement"> | |
65 | <strong>{ts}Signature HTML{/ts}</strong><br />{$item.signature_html}<br /><br /> | |
66 | <strong>{ts}Signature Text{/ts}</strong><br />{$item.signature_text|nl2br}</div> | |
67 | </div> | |
68 | </div> | |
69 | {/if} | |
70 | {/foreach} | |
71 | </div> | |
72 | </div> | |
73 | ||
74 | {literal} | |
75 | <script type="text/javascript"> | |
76 | ||
77 | function showHideSignature( blockId ) { | |
31037a42 | 78 | cj("#Email_Block_" + blockId + "_signature").show( ); |
6a488035 TO |
79 | |
80 | cj("#Email_Block_" + blockId + "_signature").dialog({ | |
81 | title: "Signature", | |
82 | modal: true, | |
6a488035 TO |
83 | width: 900, |
84 | height: 500, | |
6a488035 TO |
85 | beforeclose: function(event, ui) { |
86 | cj(this).dialog("destroy"); | |
87 | }, | |
14022148 | 88 | buttons: { |
31037a42 EM |
89 | "Done": function() { |
90 | cj(this).dialog("destroy"); | |
91 | } | |
92 | } | |
6a488035 TO |
93 | }); |
94 | } | |
95 | </script> | |
96 | {/literal} |