Merge pull request #17314 from jitendrapurohit/dev-1758
[civicrm-core.git] / templates / CRM / Mailing / Page / Component.tpl
CommitLineData
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>
f4388b57 38 <td>{icon condition=$row.is_default}{ts}Default{/ts}{/icon}&nbsp;</td>
6a488035
TO
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}