Merge remote-tracking branch 'upstream/4.5' into 4.5-master-2014-09-18-12-25-20
[civicrm-core.git] / templates / CRM / Custom / Page / Field.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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*}
38 {include file="CRM/common/enableDisableApi.tpl"}
39 <table id="options" class="row-highlight">
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>
45 <th>{ts}Order{/ts}</th>
46 <th>{ts}Req?{/ts}</th>
47 <th>{ts}Searchable?{/ts}</th>
48 <th>{ts}Enabled?{/ts}</th>
49 <th></th>
50 </tr>
51 </thead>
52 <tbody>
53 {foreach from=$customField item=row}
54 <tr id="CustomField-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {if NOT $row.is_active} disabled{/if}">
55 <td><span class="crm-editable crmf-label">{$row.label}</span></td>
56 <td>{$row.data_type}</td>
57 <td>{$row.html_type}</td>
58 <td class="nowrap">{$row.weight}</td>
59 <td>{if $row.is_required eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
60 <td>{if $row.is_searchable eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
61 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
62 <td>{$row.action|replace:'xx':$row.id}</td>
63 </tr>
64 {/foreach}
65 </tbody>
66 </table>
67 {/strip}
68
69 </div>
70
71 {else}
72 {if $action eq 16}
73 <div class="messages status no-popup crm-empty-table">
74 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
75 {ts}None found.{/ts}
76 </div>
77 {/if}
78 {/if}
79 <div class="action-link">
80 <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>
81 </div>
82 {/if}
83
84 {include file="CRM/common/crmeditable.tpl"}
85