Merge pull request #2133 from colemanw/master
[civicrm-core.git] / templates / CRM / Custom / Page / Option.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
232624b1 3 | CiviCRM version 4.4 |
6a488035
TO
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/enableDisable.tpl"}
43 <table class="selector">
44 <tr class="columnheader">
45 <th>{ts}Label{/ts}</th>
46 <th>{ts}Value{/ts}</th>
47 <th>{ts}Default{/ts}</th>
48 <th>{ts}Order{/ts}</th>
49 <th>{ts}Enabled?{/ts}</th>
50 <th>&nbsp;</th>
51 </tr>
52 {foreach from=$customOption item=row key=id}
53 <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}">
54 <td><span class="crm-custom_option-label crm-editable crmf-label">{$row.label}</span></td>
65bdfcdc 55 <td><span class="crm-custom_option-value disabled-crm-editable" data-field="value" data-action="update">{$row.value}</span></td>
6a488035
TO
56 <td class="crm-custom_option-default_value crmf-value">{$row.default_value}</td>
57 <td class="nowrap crm-custom_option-weight crmf-weight">{$row.weight}</td>
58 <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>
59 <td>{$row.action|replace:'xx':$id}</td>
60 </tr>
61 {/foreach}
62 </table>
63 {/strip}
64
65 <div class="action-link">
fa3a5fe2 66 <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>
6a488035
TO
67 </div>
68 </div>
69 </div>
70
71{else}
72 {if $action eq 16}
73 <div class="messages status no-popup">
74 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
fa3a5fe2 75 {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}
6a488035
TO
76 </div>
77 {/if}
78{/if}
79
80{include file="CRM/common/crmeditable.tpl"}
81