CustomField Admin - Decouple page code from form code
[civicrm-core.git] / templates / CRM / Custom / Page / Group.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 {* The name "custom data group" is replaced by "custom data set" *}
11 <div class="help">
12 {ts}Custom data is stored in custom fields. Custom fields are organized into logically related custom data sets (e.g. Volunteer Info). Use custom fields to collect and store custom data which are not included in the standard CiviCRM forms. You can create one or many sets of custom fields.{/ts} {docURL page="user/organising-your-data/creating-custom-fields"}
13 </div>
14
15 {if $rows}
16 <div class="crm-content-block crm-block">
17 <div id="custom_group">
18 {strip}
19 {* handle enable/disable actions*}
20 {include file="CRM/common/enableDisableApi.tpl"}
21 <table id="options" class="row-highlight">
22 <thead>
23 <tr>
24 <th>{ts}ID{/ts}</th>
25 <th>{ts}Set{/ts}</th>
26 <th>{ts}Enabled?{/ts}</th>
27 <th>{ts}Used For{/ts}</th>
28 <th>{ts}Type{/ts}</th>
29 <th>{ts}Order{/ts}</th>
30 <th>{ts}Style{/ts}</th>
31 <th></th>
32 </tr>
33 </thead>
34 <tbody>
35 {foreach from=$rows item=row}
36 <tr id="CustomGroup-{$row.id}" data-action="setvalue" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
37 <td>{$row.id}</td>
38 <td class="crmf-title crm-editable">{$row.title}</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>{if $row.extends eq 'Contact'}{ts}All Contact Types{/ts}{else}{$row.extends_display}{/if}</td>
41 <td>{if !empty($row.extends_entity_column_value)}{$row.extends_entity_column_value}{/if}</td>
42 <td class="nowrap">{$row.weight|smarty:nodefaults}</td>
43 <td>{$row.style_display}</td>
44 <td>{$row.action|smarty:nodefaults|replace:'xx':$row.id}</td>
45 </tr>
46 {/foreach}
47 </tbody>
48 </table>
49
50 <div class="action-link">
51 {crmButton p='civicrm/admin/custom/group/edit' q="action=add&reset=1" id="newCustomDataGroup" icon="plus-circle"}{ts}Add Set of Custom Fields{/ts}{/crmButton}
52 </div>
53
54 {/strip}
55 </div>
56 </div>
57 {else}
58 <div class="messages status no-popup">
59 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> &nbsp;
60 {capture assign=crmURL}{crmURL p='civicrm/admin/custom/group/edit' q='action=add&reset=1'}{/capture}
61 {ts 1=$crmURL}No custom data groups have been created yet. You can <a id="newCustomDataGroup" href='%1'>add one</a>.{/ts}
62 </div>
63 {/if}