Commit | Line | Data |
---|---|---|
50998125 KJ |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
3 | | CiviCRM version 4.3 | | |
4 | +--------------------------------------------------------------------+ | |
5 | | Copyright CiviCRM LLC (c) 2004-2013 | | |
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 | <div id="help"> | |
636f1cbe | 27 | {ts}Badge Layout screen for creating custom labels{/ts} |
50998125 KJ |
28 | </div> |
29 | ||
30 | {if $action eq 1 or $action eq 2 or $action eq 8} | |
31 | {include file="CRM/Badge/Form/Layout.tpl"} | |
32 | {else} | |
33 | ||
34 | {if $rows} | |
35 | <div id="badge-layout"> | |
36 | {strip} | |
37 | {* handle enable/disable actions*} | |
38 | {include file="CRM/common/enableDisable.tpl"} | |
39 | {include file="CRM/common/jsortable.tpl"} | |
40 | <table id="options" class="display"> | |
41 | <thead> | |
42 | <tr> | |
43 | <th id="sortable">{ts}Title{/ts}</th> | |
44 | <th id="nosort">{ts}Description{/ts}</th> | |
45 | <th>{ts}Enabled?{/ts}</th> | |
46 | <th>{ts}Default?{/ts}</th> | |
47 | <th></th> | |
48 | </tr> | |
49 | </thead> | |
50 | {foreach from=$rows item=row} | |
51 | <tr id="row_{$row.id}" | |
52 | class="{cycle values="odd-row,even-row"} {$row.class} crm-badge-layout {if NOT $row.is_active} disabled{/if}"> | |
53 | <td class="crm-badge-layout-title">{$row.title}</td> | |
54 | <td class="crm-badge-layout-description">{$row.description}</td> | |
55 | <td id="row_{$row.id}_status" class="crm-badge-layout-is_active"> | |
56 | {if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if} | |
57 | </td> | |
58 | <td class="crm-badge-layout-is_default"> | |
59 | {if $row.is_default eq 1} | |
60 | <img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}"/> | |
61 | {/if} | |
62 | </td> | |
63 | <td>{$row.action|replace:'xx':$row.id}</td> | |
64 | </tr> | |
65 | {/foreach} | |
66 | </table> | |
67 | {/strip} | |
68 | ||
69 | {if $action ne 1 and $action ne 2} | |
70 | <div class="action-link"> | |
71 | <a href="{crmURL q="action=add&reset=1"}" id="newbadge-layout" | |
15cb4bd7 | 72 | class="button"><span><div class="icon add-icon"></div> {ts}New Badge Layout{/ts}</span></a> |
50998125 KJ |
73 | </div> |
74 | {/if} | |
75 | </div> | |
76 | {else} | |
77 | <div class="messages status no-popup"> | |
78 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> | |
79 | {capture assign=crmURL}{crmURL p='civicrm/admin/badgelayout' q="action=add&reset=1"}{/capture} | |
80 | {ts 1=$crmURL}There are no Badge Layout entered for this Contact. You can<a href='%1'>add one</a>.{/ts} | |
81 | </div> | |
82 | {/if} | |
83 | {/if} |