Merge pull request #17314 from jitendrapurohit/dev-1758
[civicrm-core.git] / templates / CRM / Mailing / Page / Component.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
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 |
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*}
19 {include file="CRM/common/enableDisableApi.tpl"}
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>
25 <th>{ts}Body HTML{/ts}</th>
26 <th>{ts}Body Text{/ts}</th>
27 <th>{ts}Default?{/ts}</th>
28 <th>{ts}Enabled?{/ts}</th>
29 <th></th>
30 </thead>
31 {foreach from=$rows item=row}
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>
34 <td>{$row.component_type}</td>
35 <td>{$row.subject}</td>
36 <td>{$row.body_html|escape}</td>
37 <td>{$row.body_text|escape}</td>
38 <td>{icon condition=$row.is_default}{ts}Default{/ts}{/icon}&nbsp;</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">
49 {crmButton q="action=add&reset=1" icon="plus-circle"}{ts}Add Mailing Component{/ts}{/crmButton}
50 </div>
51 {/if}
52 </div>
53 </div>
54 {/if}