Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
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 | {* Admin page for browsing Option Group *} | |
27 | {if $action eq 1 or $action eq 2 or $action eq 8} | |
28 | {include file="CRM/Admin/Form/OptionGroup.tpl"} | |
29 | {else} | |
30 | <div id="help"> | |
31 | {ts}CiviCRM stores configurable choices for various drop-down fields as 'option groups'. You can click <strong>Options</strong> to view the available choices.{/ts} | |
32 | <p><div class="icon alert-icon"></div> {ts}WARNING: Many option groups are used programatically and values should be added or modified with caution.{/ts}</p> | |
33 | </div> | |
34 | {/if} | |
35 | ||
36 | {if $rows} | |
37 | ||
38 | <div id="browseValues"> | |
39 | {strip} | |
40 | {* handle enable/disable actions*} | |
4d17a233 CW |
41 | {include file="CRM/common/enableDisableApi.tpl"} |
42 | {include file="CRM/common/crmeditable.tpl"} | |
6a488035 TO |
43 | <table cellpadding="0" cellspacing="0" border="0"> |
44 | <tr class="columnheader"> | |
45 | <th>{ts}Title{/ts}</th> | |
46 | <th>{ts}Name{/ts}</th> | |
47 | <th></th> | |
48 | </tr> | |
49 | {foreach from=$rows item=row} | |
4d17a233 | 50 | <tr id="optionGroup-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
6a488035 TO |
51 | <td class="crm-admin-optionGroup-title">{if $row.title}{$row.title}{else}( {ts}none{/ts} ){/if}</td> |
52 | <td class="crm-admin-optionGroup-name">{$row.name}</td> | |
6c2473d5 | 53 | <td><a href="{crmURL p="civicrm/admin/options" q="gid=`$row.id`&reset=1"}" title="{ts}View and Edit Options{/ts}">{ts}Options{/ts}</a></td> |
6a488035 TO |
54 | </tr> |
55 | {/foreach} | |
56 | </table> | |
57 | {/strip} | |
58 | ||
59 | {if $action ne 1 and $action ne 2} | |
60 | <div class="action-link"> | |
61 | <a href="{crmURL q="action=add&reset=1"}" id="newOptionGroup" class="button"><span><div class="icon add-icon"></div>{ts}Add Option Group{/ts}</span></a> | |
62 | </div> | |
63 | {/if} | |
64 | </div> | |
65 | {elseif $action NEQ 1 && $action NEQ 2} | |
66 | <div class="messages status no-popup"> | |
67 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> | |
68 | {capture assign=crmURL}{crmURL p='civicrm/admin/optionGroup' q="action=add&reset=1"}{/capture} | |
69 | {ts 1=$crmURL}There are no Option Groups entered. You can <a href='%1'>add one</a>.{/ts} | |
70 | </div> | |
71 | {/if} |