Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {if $action eq 1 or $action eq 2} | |
11 | {include file="CRM/Mailing/Form/Component.tpl"} | |
12 | {else} | |
13 | ||
14 | <div id="ltype"> | |
15 | <p></p> | |
16 | <div class="form-item"> | |
17 | {strip} | |
18 | {* handle enable/disable actions*} | |
4d17a233 | 19 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
20 | <table cellpadding="0" cellspacing="0" border="0"> |
21 | <thead class="sticky"> | |
22 | <th>{ts}Name{/ts}</th> | |
23 | <th>{ts}Type{/ts}</th> | |
24 | <th>{ts}Subject{/ts}</th> | |
6a488035 | 25 | <th>{ts}Body HTML{/ts}</th> |
4d770921 | 26 | <th>{ts}Body Text{/ts}</th> |
6a488035 TO |
27 | <th>{ts}Default?{/ts}</th> |
28 | <th>{ts}Enabled?{/ts}</th> | |
29 | <th></th> | |
30 | </thead> | |
31 | {foreach from=$rows item=row} | |
d615ccf5 CW |
32 | <tr id="mailing_component-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
33 | <td class="crm-editable" data-field="name">{$row.name}</td> | |
6a488035 TO |
34 | <td>{$row.component_type}</td> |
35 | <td>{$row.subject}</td> | |
6a488035 | 36 | <td>{$row.body_html|escape}</td> |
32932014 | 37 | <td>{$row.body_text|escape}</td> |
6a488035 TO |
38 | <td>{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if} </td> |
39 | <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
40 | <td>{$row.action|replace:'xx':$row.id}</td> | |
41 | </tr> | |
42 | {/foreach} | |
43 | </table> | |
44 | {/strip} | |
45 | ||
46 | {if $action ne 1 and $action ne 2} | |
47 | <br/> | |
48 | <div class="action-link"> | |
80bc2820 | 49 | {crmButton q="action=add&reset=1" icon="plus-circle"}{ts}Add Mailing Component{/ts}{/crmButton} |
6a488035 TO |
50 | </div> |
51 | {/if} | |
52 | </div> | |
53 | </div> | |
232624b1 | 54 | {/if} |