Merge pull request #13400 from mfb/format-resource-url
[civicrm-core.git] / templates / CRM / Custom / Page / Group.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
6b83d5bd 5 | Copyright CiviCRM LLC (c) 2004-2019 |
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{* The name "custom data group" is replaced by "custom data set" *}
27{if $action eq 1 or $action eq 2 or $action eq 4}
28 {include file="CRM/Custom/Form/Group.tpl"}
29{elseif $action eq 1024}
30 {include file="CRM/Custom/Form/Preview.tpl"}
31{elseif $action eq 8}
32 {include file="CRM/Custom/Form/DeleteGroup.tpl"}
33{else}
f6eedce7 34 <div class="help">
39dcb36e 35 {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"}
6a488035
TO
36 </div>
37
38 {if $rows}
39 <div class="crm-content-block crm-block">
40 <div id="custom_group">
41 {strip}
42 {* handle enable/disable actions*}
4d17a233 43 {include file="CRM/common/enableDisableApi.tpl"}
e5e1786f 44 <table id="options" class="row-highlight">
6a488035
TO
45 <thead>
46 <tr>
47 <th>{ts}Set{/ts}</th>
48 <th>{ts}Enabled?{/ts}</th>
49 <th>{ts}Used For{/ts}</th>
50 <th>{ts}Type{/ts}</th>
e5e1786f 51 <th>{ts}Order{/ts}</th>
6a488035
TO
52 <th>{ts}Style{/ts}</th>
53 <th></th>
6a488035
TO
54 </tr>
55 </thead>
56 <tbody>
57 {foreach from=$rows item=row}
4b242e82 58 <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}">
b633f8bd 59 <td class="crmf-title crm-editable">{$row.title}</td>
6a488035
TO
60 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
61 <td>{if $row.extends eq 'Contact'}{ts}All Contact Types{/ts}{else}{$row.extends_display}{/if}</td>
62 <td>{$row.extends_entity_column_value}</td>
e5e1786f 63 <td class="nowrap">{$row.weight}</td>
6a488035
TO
64 <td>{$row.style_display}</td>
65 <td>{$row.action|replace:'xx':$row.id}</td>
6a488035
TO
66 </tr>
67 {/foreach}
68 </tbody>
69 </table>
70
71 {if NOT ($action eq 1 or $action eq 2) }
72 <div class="action-link">
80bc2820 73 {crmButton p='civicrm/admin/custom/group' q="action=add&reset=1" id="newCustomDataGroup" icon="plus-circle"}{ts}Add Set of Custom Fields{/ts}{/crmButton}
6a488035
TO
74 </div>
75 {/if}
76
77 {/strip}
78 </div>
79 </div>
80 {else}
81 {if $action ne 1} {* When we are adding an item, we should not display this message *}
82 <div class="messages status no-popup">
83 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> &nbsp;
84 {capture assign=crmURL}{crmURL p='civicrm/admin/custom/group' q='action=add&reset=1'}{/capture}
85 {ts 1=$crmURL}No custom data groups have been created yet. You can <a id="newCustomDataGroup" href='%1'>add one</a>.{/ts}
86 </div>
87 {/if}
88 {/if}
89{/if}