CustomField Admin - Decouple page code from form code
[civicrm-core.git] / templates / CRM / Custom / Page / Field.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*}
aca7613b 10 {if $customField}
6a488035
TO
11
12 <div id="field_page">
13 {strip}
14 {* handle enable/disable actions*}
12798ddc 15 {include file="CRM/common/enableDisableApi.tpl"}
e5e1786f 16 <table id="options" class="row-highlight">
6a488035
TO
17 <thead>
18 <tr>
3c381762 19 <th>{ts}ID{/ts}</th>
6a488035
TO
20 <th>{ts}Field Label{/ts}</th>
21 <th>{ts}Data Type{/ts}</th>
22 <th>{ts}Field Type{/ts}</th>
e5e1786f 23 <th>{ts}Order{/ts}</th>
6a488035
TO
24 <th>{ts}Req?{/ts}</th>
25 <th>{ts}Searchable?{/ts}</th>
26 <th>{ts}Enabled?{/ts}</th>
27 <th></th>
6a488035
TO
28 </tr>
29 </thead>
30 <tbody>
31 {foreach from=$customField item=row}
b633f8bd 32 <tr id="CustomField-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}{if NOT $row.is_active} disabled{/if}">
3c381762 33 <td>{$row.id}</td>
b633f8bd 34 <td class="crm-editable" data-field="label">{$row.label}</td>
6a488035
TO
35 <td>{$row.data_type}</td>
36 <td>{$row.html_type}</td>
deffb242 37 <td class="nowrap">{$row.weight|smarty:nodefaults}</td>
481461e6
CW
38 <td class="crm-editable" data-type="boolean" data-field="is_required">{if !empty($row.is_required)} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
39 <td class="crm-editable" data-type="boolean" data-field="is_searchable">{if !empty($row.is_searchable)} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
40 <td>{if !empty($row.is_active)} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
deffb242 41 <td>{$row.action|smarty:nodefaults|replace:'xx':$row.id}</td>
6a488035
TO
42 </tr>
43 {/foreach}
44 </tbody>
45 </table>
46 {/strip}
47
6a488035
TO
48 </div>
49
50 {else}
6f231148 51 <div class="messages status no-popup crm-empty-table">
704f21c0 52 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
6f231148 53 {ts}None found.{/ts}
6a488035 54 </div>
6a488035 55 {/if}
704f21c0 56 <div class="action-link">
aca7613b 57 {crmButton p='civicrm/admin/custom/group/field/add' q="reset=1&gid=$gid" id="newCustomField" class="action-item" icon="plus-circle"}{ts}Add Custom Field{/ts}{/crmButton}
80bc2820 58 {crmButton p="civicrm/admin/custom/group" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
704f21c0 59 </div>