Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-10-23-19-26-23
[civicrm-core.git] / templates / CRM / Admin / Page / OptionValue.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 {* Admin page for browsing Option Group value*}
27 {if $action eq 1 or $action eq 2 or $action eq 8}
28 {include file="CRM/Admin/Form/OptionValue.tpl"}
29 {else}
30 <div id="help">
31 {ts}The existing option choices for this option group are listed below. You can add, edit or delete them from this screen.{/ts}
32 </div>
33 {/if}
34
35 {if $rows}
36
37 <div id="browseValues">
38 {strip}
39 {* handle enable/disable actions*}
40 {include file="CRM/common/enableDisable.tpl"}
41 {include file="CRM/common/jsortable.tpl"}
42 <table id="options" class="display">
43 <thead>
44 <tr>
45 <th>{ts}Title{/ts}</th>
46 <th>{ts}Value{/ts}</th>
47 <th>{ts}Description{/ts}</th>
48 <th>{ts}Weight{/ts}</th>
49 {if $showIsDefault}
50 <th>{ts}Default{/ts}</th>
51 {/if}
52 <th>{ts}Reserved?{/ts}</th>
53 <th>{ts}Enabled?{/ts}</th>
54 <th></th>
55 </tr>
56 </thead>
57 {foreach from=$rows item=row}
58 <tr id="row_{$row.id}"class="crm-admin-optionValue {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
59 <td class="crm-admin-optionValue-label">{$row.label}</td>
60 <td class="crm-admin-optionValue-value">{$row.value}</td>
61 <td class="crm-admin-optionValue-description">{$row.description}</td>
62 <td class="nowrap crm-admin-optionValue-weight">{$row.weight}</td>
63 {if $showIsDefault}
64 <td class="crm-admin-optionValue-default_value">{$row.default_value}</td>
65 {/if}
66 <td class="crm-admin-optionValue-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
67 <td id="row_{$row.id}_status" class="crm-admin-optionValue-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
68 <td>{$row.action|replace:'xx':$row.id}</td>
69 </tr>
70 {/foreach}
71 </table>
72 {/strip}
73
74 {if $action eq 16}
75 <div class="action-link">
76 <a href="{crmURL q="action=add&reset=1&gid=$gid"}" id="newOptionValue" class="button"><span><div class="icon add-icon"></div>{ts}Add Option Value{/ts}</span></a>
77 </div>
78 {/if}
79 </div>
80 {elseif $action eq 16}
81 <div class="messages status no-popup">
82 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
83 {capture assign=crmURL}{crmURL p='civicrm/admin/optionValue' q="action=add&reset=1&gid=$gid"}{/capture}
84 {ts 1=$crmURL}There are no option choices entered for this option group. You can <a href='%1'>add one</a>.{/ts}
85 </div>
86 {/if}