Merge pull request #16394 from demeritcowboy/extdir-links
[civicrm-core.git] / templates / CRM / Admin / Page / OptionGroup.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {* Admin page for browsing Option Group *}
11 {if $action eq 1 or $action eq 2 or $action eq 8}
12 {include file="CRM/Admin/Form/OptionGroup.tpl"}
13 {else}
14 <div class="help">
15 {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}
16 <p><i class="crm-i fa-exclamation-triangle"></i> {ts}WARNING: Many option groups are used programatically and values should be added or modified with caution.{/ts}</p>
17 </div>
18 {/if}
19
20 {if $rows}
21
22 <div id="browseValues">
23 {if $action ne 1 and $action ne 2}
24 <div class="action-link">
25 {crmButton q="action=add&reset=1" id="newOptionGroup" icon="plus-circle"}{ts}Add Option Group{/ts}{/crmButton}
26 {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
27 </div>
28 {/if}
29
30 {strip}
31 {* handle enable/disable actions*}
32 {include file="CRM/common/enableDisableApi.tpl"}
33 <table cellpadding="0" cellspacing="0" border="0">
34 <tr class="columnheader">
35 <th>{ts}Title{/ts}</th>
36 <th>{ts}Name{/ts}</th>
37 <th>{ts}Reserved{/ts}</th>
38 <th>{ts}Enabled?{/ts}</th>
39 <th></th>
40 </tr>
41 {foreach from=$rows item=row}
42 <tr id="optionGroup-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
43 <td class="crm-admin-optionGroup-title">{if $row.title}{$row.title}{else}( {ts}none{/ts} ){/if}</td>
44 <td class="crm-admin-optionGroup-name">{$row.name}</td>
45 <td class="crm-admin-optionGroup-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
46 <td class="crm-admin-optionGroup-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
47 <td>
48 <a href="{crmURL p="civicrm/admin/options" q="id=`$row.id`&action=update&reset=1"}" class="action-item crm-hover-button" title="{ts}OptionGroup settings{/ts}">{ts}Settings{/ts}</a>
49 <a href="{crmURL p="civicrm/admin/options" q="gid=`$row.id`&reset=1"}" class="action-item crm-hover-button" title="{ts}View and Edit Options{/ts}">{ts}Edit Options{/ts}</a>
50 </td>
51 </tr>
52 {/foreach}
53 </table>
54 {/strip}
55
56 {if $action ne 1 and $action ne 2}
57 <div class="action-link">
58 {crmButton q="action=add&reset=1" id="newOptionGroup" icon="plus-circle"}{ts}Add Option Group{/ts}{/crmButton}
59 {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
60 </div>
61 {/if}
62 </div>
63 {elseif $action ne 1 and $action ne 2}
64 <div class="messages status no-popup">
65 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
66 {capture assign=crmURL}{crmURL p='civicrm/admin/optionGroup' q="action=add&reset=1"}{/capture}
67 {ts 1=$crmURL}There are no Option Groups entered. You can <a href='%1'>add one</a>.{/ts}
68 </div>
69 {/if}