Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-01-13-11-57-38
[civicrm-core.git] / templates / CRM / Custom / Page / Option.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 or $action eq 8}
27 {include file="CRM/Custom/Form/Option.tpl"}
28 {/if}
29
30 {if $customOption}
31 {if $reusedNames}
32 <div class="message status">
33 <div class="icon inform-icon"></div> &nbsp; {ts 1=$reusedNames}These Multiple Choice Options are shared by the following custom fields: %1{/ts}
34 </div>
35 {/if}
36
37 <div id="field_page">
38 <p></p>
39 <div class="form-item">
40 {strip}
41 {* handle enable/disable actions*}
42 {include file="CRM/common/enableDisableApi.tpl"}
43 {include file="CRM/common/crmeditable.tpl"}
44 <table class="selector">
45 <tr class="columnheader">
46 <th>{ts}Label{/ts}</th>
47 <th>{ts}Value{/ts}</th>
48 <th>{ts}Default{/ts}</th>
49 <th>{ts}Order{/ts}</th>
50 <th>{ts}Enabled?{/ts}</th>
51 <th>&nbsp;</th>
52 </tr>
53 {foreach from=$customOption item=row key=id}
54 <tr id="OptionValue-{$id}"class="crm-entity {cycle values="odd-row,even-row"} {$row.class} crm-custom_option {if NOT $row.is_active} disabled{/if}">
55 <td><span class="crm-custom_option-label crm-editable crmf-label">{$row.label}</span></td>
56 <td><span class="crm-custom_option-value disabled-crm-editable" data-field="value" data-action="update">{$row.value}</span></td>
57 <td class="crm-custom_option-default_value crmf-value">{$row.default_value}</td>
58 <td class="nowrap crm-custom_option-weight crmf-weight">{$row.weight}</td>
59 <td id="row_{$id}_status" class="crm-custom_option-is_active crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
60 <td>{$row.action|replace:'xx':$id}</td>
61 </tr>
62 {/foreach}
63 </table>
64 {/strip}
65
66 <div class="action-link">
67 <a href="{crmURL q="reset=1&action=add&fid=$fid&gid=$gid"}" class="button action-item"><span><div class="icon add-icon"></div> {ts 1=$fieldTitle}Add Option for '%1'{/ts}</span></a>
68 </div>
69 </div>
70 </div>
71
72 {else}
73 {if $action eq 16}
74 <div class="messages status no-popup">
75 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
76 {capture assign=crmURL}{crmURL p='civicrm/admin/custom/group/field/option' q="action=add&fid=$fid&gid=$gid"}{/capture}{ts 1=$fieldTitle 2=$crmURL}There are no multiple choice options for the custom field '%1', <a href='%2' class="action-item">add one</a>.{/ts}
77 </div>
78 {/if}
79 {/if}