Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-04-04-00-48-43
[civicrm-core.git] / templates / CRM / Admin / Page / ContactType.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
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}CiviCRM comes with 3 basic (built-in) contact types: Individual, Household, and Organization. You can create additional contact types based on these types to further differentiate contacts (for example you might create Student, Parent, Staff, and /or Volunteer types from the basic Individual type...).{/ts} {help id="id-contactSubtype-intro"}
28 </div>
29
30 {if $action eq 1 or $action eq 2 or $action eq 8}
31 {include file="CRM/Admin/Form/ContactType.tpl"}
32 {else}
33
34 {if $rows}
35 <div>
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>{ts}Contact Type{/ts}</th>
45 <th>{ts}Based On{/ts}</th>
46 <th id="nosort">{ts}Description{/ts}</th>
47 <th></th>
48 </tr>
49 </thead>
50 {foreach from=$rows item=row}
51 <tr id="contact_type-{$row.id}" class="{cycle values="odd-row,even-row"} {$row.class} crm-contactType crm-entity {if NOT $row.is_active} disabled{/if}">
52 <td class="crm-contactType-label crm-editable" data-field="label">{ts}{$row.label}{/ts}</td>
53 <td class="crm-contactType-parent">{if $row.parent}{ts}{$row.parent_label}{/ts}{else}{ts}(built-in){/ts}{/if}</td>
54 <td class="crm-contactType-description crm-editable" data-field="description" data-type="textarea">{$row.description}</td>
55 <td>{$row.action|replace:'xx':$row.id}</td>
56 </tr>
57 {/foreach}
58 </table>
59 {/strip}
60 {if $action ne 1 and $action ne 2}
61 <div class="action-link">
62 <a href="{crmURL q="action=add&reset=1"}" class="button"><span><div class="icon add-icon"></div>{ts}Add Contact Type{/ts}</span></a>
63 </div>
64 {/if}
65 </div>
66 {else}
67 <div class="messages status no-popup">
68 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
69 {capture assign=crmURL}{crmURL p='civicrm/admin/ContactType' q="action=add&reset=1"}{/capture}
70 {ts 1=$crmURL}There are currently no Contact Types entered. You can <a href='%1'>add one</a>.{/ts}
71 </div>
72 {/if}
73 {/if}