CRM-14015 - Extend everywhere via regex
[civicrm-core.git] / templates / CRM / Admin / Page / LocationType.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 <div id="help">
27 {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}
28 </div>
29
30 {if $action eq 1 or $action eq 2 or $action eq 8}
31 {include file="CRM/Admin/Form/LocationType.tpl"}
32 {else}
33
34 {if $rows}
35 <div id="ltype">
36 {strip}
37 {* handle enable/disable actions*}
38 {include file="CRM/common/enableDisableApi.tpl"}
39 {include file="CRM/common/crmeditable.tpl"}
40 {include file="CRM/common/jsortable.tpl"}
41 <table id="options" class="display">
42 <thead>
43 <tr>
44 <th id="sortable">{ts}Name{/ts}</th>
45 <th>{ts}Display Name{/ts}</th>
46 <th>{ts}vCard{/ts}</th>
47 <th id="nosort">{ts}Description{/ts}</th>
48 <th>{ts}Enabled?{/ts}</th>
49 <th>{ts}Default?{/ts}</th>
50 <th></th>
51 </tr>
52 </thead>
53 {foreach from=$rows item=row}
54 <tr id="location_type-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-entity {if NOT $row.is_active} disabled{/if}">
55 <td class="crm-locationType-name">{$row.name}</td>
56 <td class="crm-locationType-display_name">{$row.display_name}</td>
57 <td class="crm-locationType-vcard_name">{$row.vcard_name}</td>
58 <td class="crm-locationType-description">{$row.description}</td>
59 <td id="row_{$row.id}_status" class="crm-locationType-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
60 <td class="crm-locationType-is_default" >{if $row.is_default eq 1}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}&nbsp;</td>
61 <td>{$row.action|replace:'xx':$row.id}</td>
62 </tr>
63 {/foreach}
64 </table>
65 {/strip}
66
67 {if $action ne 1 and $action ne 2}
68 <div class="action-link">
69 <a href="{crmURL q="action=add&reset=1"}" id="newLocationType" class="button"><span>&raquo; {ts}New Location Type{/ts}</span></a>
70 </div>
71 {/if}
72 </div>
73 {else}
74 <div class="messages status no-popup">
75 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
76 {capture assign=crmURL}{crmURL p='civicrm/admin/locationType' q="action=add&reset=1"}{/capture}
77 {ts 1=$crmURL}There are no Location Types entered for this Contact. You can <a href='%1'>add one</a>.{/ts}
78 </div>
79 {/if}
80 {/if}