Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
6a488035 TO |
10 | {if $action eq 1 or $action eq 2 or $action eq 8} |
11 | {include file="CRM/Admin/Form/LocationType.tpl"} | |
12 | {else} | |
f6eedce7 | 13 | <div class="help"> |
60158442 CW |
14 | {ts}Location types provide convenient labels to differentiate contacts' location(s). Administrators may define as many additional types as appropriate for your constituents (examples might be Main Office, School, Vacation Home...).{/ts} |
15 | </div> | |
6a488035 | 16 | |
51180095 | 17 | <div class="crm-block crm-content-block"> |
e2046b33 CW |
18 | {if $rows} |
19 | <div id="ltype"> | |
6a488035 TO |
20 | {strip} |
21 | {* handle enable/disable actions*} | |
4d17a233 | 22 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
23 | {include file="CRM/common/jsortable.tpl"} |
24 | <table id="options" class="display"> | |
25 | <thead> | |
51180095 MR |
26 | <tr> |
27 | <th id="sortable">{ts}Name{/ts}</th> | |
28 | <th>{ts}Display Name{/ts}</th> | |
29 | <th>{ts}vCard{/ts}</th> | |
30 | <th id="nosort">{ts}Description{/ts}</th> | |
31 | <th>{ts}Enabled?{/ts}</th> | |
32 | <th>{ts}Default?{/ts}</th> | |
33 | <th></th> | |
34 | </tr> | |
6a488035 TO |
35 | </thead> |
36 | {foreach from=$rows item=row} | |
4b242e82 | 37 | <tr id="location_type-{$row.id}" data-action="setvalue" class="{cycle values="odd-row,even-row"} {$row.class} crm-entity {if NOT $row.is_active} disabled{/if}"> |
e2046b33 CW |
38 | <td class="crmf-name">{$row.name}</td> |
39 | <td class="crmf-display_name crm-editable">{$row.display_name}</td> | |
b633f8bd | 40 | <td class="crmf-vcard_name crm-editable">{$row.vcard_name}</td> |
e2046b33 CW |
41 | <td class="crmf-description crm-editable">{$row.description}</td> |
42 | <td id="row_{$row.id}_status" class="crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
43 | <td class="crmf-is_default" >{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if} </td> | |
6a488035 TO |
44 | <td>{$row.action|replace:'xx':$row.id}</td> |
45 | </tr> | |
46 | {/foreach} | |
47 | </table> | |
48 | {/strip} | |
e2046b33 CW |
49 | </div> |
50 | {else} | |
6a488035 | 51 | <div class="messages status no-popup"> |
e2046b33 CW |
52 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> |
53 | {ts}None found.{/ts} | |
6a488035 | 54 | </div> |
e2046b33 CW |
55 | {/if} |
56 | <div class="action-link"> | |
80bc2820 AH |
57 | {crmButton q="action=add&reset=1" id="newLocationType" icon="plus-circle"}{ts}Add Option{/ts}{/crmButton} |
58 | {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton} | |
e2046b33 | 59 | </div> |
51180095 | 60 | </div> |
6a488035 | 61 | {/if} |