Ian province abbreviation patch - issue 724
[civicrm-core.git] / templates / CRM / Admin / Page / OptionGroup.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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 ui-icon-alert"></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*}
41 {include file="CRM/common/enableDisableApi.tpl"}
42 <table cellpadding="0" cellspacing="0" border="0">
43 <tr class="columnheader">
44 <th>{ts}Title{/ts}</th>
45 <th>{ts}Name{/ts}</th>
46 <th></th>
47 </tr>
48 {foreach from=$rows item=row}
49 <tr id="optionGroup-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
50 <td class="crm-admin-optionGroup-title">{if $row.title}{$row.title}{else}( {ts}none{/ts} ){/if}</td>
51 <td class="crm-admin-optionGroup-name">{$row.name}</td>
52 <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>
53 </tr>
54 {/foreach}
55 </table>
56 {/strip}
57
58 {if $action ne 1 and $action ne 2}
59 <div class="action-link">
60 {crmButton q="action=add&reset=1" id="newOptionGroup" icon="circle-plus"}{ts}Add Option Group{/ts}{/crmButton}
61 {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="close"}{ts}Done{/ts}{/crmButton}
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}