Ian province abbreviation patch - issue 724
[civicrm-core.git] / templates / CRM / Custom / Page / Field.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
2c4c49ca 3 | CiviCRM version 4.7 |
6a488035 4 +--------------------------------------------------------------------+
e7112fa7 5 | Copyright CiviCRM LLC (c) 2004-2015 |
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"}
e5e1786f 39 <table id="options" class="row-highlight">
6a488035
TO
40 <thead>
41 <tr>
42 <th>{ts}Field Label{/ts}</th>
43 <th>{ts}Data Type{/ts}</th>
44 <th>{ts}Field Type{/ts}</th>
e5e1786f 45 <th>{ts}Order{/ts}</th>
6a488035
TO
46 <th>{ts}Req?{/ts}</th>
47 <th>{ts}Searchable?{/ts}</th>
48 <th>{ts}Enabled?{/ts}</th>
49 <th></th>
6a488035
TO
50 </tr>
51 </thead>
52 <tbody>
53 {foreach from=$customField item=row}
b633f8bd
CW
54 <tr id="CustomField-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}{if NOT $row.is_active} disabled{/if}">
55 <td class="crm-editable" data-field="label">{$row.label}</td>
6a488035
TO
56 <td>{$row.data_type}</td>
57 <td>{$row.html_type}</td>
e5e1786f 58 <td class="nowrap">{$row.weight}</td>
b633f8bd
CW
59 <td class="crm-editable" data-type="boolean" data-field="is_required">{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
60 <td class="crm-editable" data-type="boolean" data-field="is_searchable">{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
61 <td>{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
6a488035 62 <td>{$row.action|replace:'xx':$row.id}</td>
6a488035
TO
63 </tr>
64 {/foreach}
65 </tbody>
66 </table>
67 {/strip}
68
6a488035
TO
69 </div>
70
71 {else}
72 {if $action eq 16}
6f231148 73 <div class="messages status no-popup crm-empty-table">
704f21c0 74 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
6f231148 75 {ts}None found.{/ts}
6a488035
TO
76 </div>
77 {/if}
78 {/if}
704f21c0 79 <div class="action-link">
f7296a9a
CW
80 {crmButton p='civicrm/admin/custom/group/field/add' q="reset=1&action=add&gid=$gid" id="newCustomField" class="action-item" icon="circle-plus"}{ts}Add Custom Field{/ts}{/crmButton}
81 {crmButton p="civicrm/admin/custom/group" q="reset=1" class="cancel" icon="close"}{ts}Done{/ts}{/crmButton}
704f21c0 82 </div>
6a488035
TO
83{/if}
84
6a488035 85