Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
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 | {if $action eq 1 or $action eq 2 or $action eq 4} | |
27 | {include file="CRM/Custom/Form/Field.tpl"} | |
28 | {elseif $action eq 8} | |
29 | {include file="CRM/Custom/Form/DeleteField.tpl"} | |
30 | {elseif $action eq 1024 } | |
31 | {include file="CRM/Custom/Form/Preview.tpl"} | |
32 | {else} | |
33 | {if $customField} | |
34 | ||
35 | <div id="field_page"> | |
36 | {strip} | |
37 | {* handle enable/disable actions*} | |
12798ddc | 38 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
39 | {include file="CRM/common/jsortable.tpl"} |
40 | <table id="options" class="display"> | |
41 | <thead> | |
42 | <tr> | |
43 | <th>{ts}Field Label{/ts}</th> | |
44 | <th>{ts}Data Type{/ts}</th> | |
45 | <th>{ts}Field Type{/ts}</th> | |
46 | <th id="order" class="sortable">{ts}Order{/ts}</th> | |
47 | <th>{ts}Req?{/ts}</th> | |
48 | <th>{ts}Searchable?{/ts}</th> | |
49 | <th>{ts}Enabled?{/ts}</th> | |
50 | <th></th> | |
51 | <th class="hiddenElement"></th> | |
52 | </tr> | |
53 | </thead> | |
54 | <tbody> | |
55 | {foreach from=$customField item=row} | |
56 | <tr id="CustomField-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {if NOT $row.is_active} disabled{/if}"> | |
57 | <td><span class="crm-editable crmf-label">{$row.label}</span></td> | |
58 | <td>{$row.data_type}</td> | |
59 | <td>{$row.html_type}</td> | |
60 | <td class="nowrap">{$row.order}</td> | |
61 | <td>{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
62 | <td>{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
63 | <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
64 | <td>{$row.action|replace:'xx':$row.id}</td> | |
65 | <td class="order hiddenElement">{$row.weight}</td> | |
66 | </tr> | |
67 | {/foreach} | |
68 | </tbody> | |
69 | </table> | |
70 | {/strip} | |
71 | ||
72 | <div class="action-link"> | |
b7798527 | 73 | <a href="{crmURL p='civicrm/admin/custom/group/field/add' q="reset=1&action=add&gid=$gid"}" id="newCustomField" class="button action-item"><span><div class="icon add-icon"></div>{ts}Add Custom Field{/ts}</span></a> |
6a488035 TO |
74 | </div> |
75 | </div> | |
76 | ||
77 | {else} | |
78 | {if $action eq 16} | |
79 | <div class="messages status no-popup"> | |
80 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> | |
81 | {capture assign=crmURL}{crmURL p='civicrm/admin/custom/group/field/add' q="action=add&reset=1&gid=$gid"}{/capture} | |
b7798527 | 82 | {ts 1=$groupTitle 2=$crmURL}There are no custom fields for custom group '%1', <a class="action-item" href='%2'>add one</a>.{/ts} |
6a488035 TO |
83 | </div> |
84 | {/if} | |
85 | {/if} | |
86 | {/if} | |
87 | ||
88 | {include file="CRM/common/crmeditable.tpl"} | |
89 |