Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
6a488035 TO |
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 | {capture assign=customURL}{crmURL p='civicrm/admin/custom/group' q="reset=1"}{/capture} | |
27 | {capture assign=docLink}{docURL page="user/organising-your-data/relationships"}{/capture} | |
6a488035 TO |
28 | |
29 | {if $action eq 1 or $action eq 2 or $action eq 4 or $action eq 8} | |
30 | {include file="CRM/Admin/Form/RelationshipType.tpl"} | |
31 | {else} | |
f6eedce7 | 32 | <div class="help"> |
52395565 CW |
33 | <p>{ts}Relationship types describe relationships between people, households and organizations. Relationship types labels describe the relationship from the perspective of each of the two entities (e.g. Parent >-< Child, Employer >-< Employee). For some types of relationships, the labels may be the same in both directions (e.g. Spouse >-< Spouse).{/ts} {$docLink}</p> |
34 | <p>{ts 1=$customURL}You can define as many additional relationships types as needed to cover the types of relationships you want to track. Once a relationship type is created, you may also define custom fields to extend relationship information for that type from <a href='%1'>Administer CiviCRM » Custom Data</a>.{/ts}{help id='id-relationship-types'} </p> | |
35 | </div> | |
a5175109 MR |
36 | |
37 | <div class="crm-content-block crm-block"> | |
6a488035 TO |
38 | {if $rows} |
39 | {if !($action eq 1 and $action eq 2)} | |
40 | <div class="action-link"> | |
80bc2820 | 41 | {crmButton q="action=add&reset=1" class="newRelationshipType" icon="plus-circle"}{ts}Add Relationship Type{/ts}{/crmButton} |
6a488035 TO |
42 | </div> |
43 | {/if} | |
44 | ||
45 | <div id="ltype"> | |
46 | ||
47 | {strip} | |
48 | {* handle enable/disable actions*} | |
4d17a233 | 49 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
50 | {include file="CRM/common/jsortable.tpl"} |
51 | <table id="options" class="display"> | |
52 | <thead> | |
53 | <tr> | |
2d13b854 | 54 | <th id="sortable">{ts}Relationship A to B{/ts}</th> |
6a488035 TO |
55 | <th>{ts}Relationship B to A{/ts}</th> |
56 | <th>{ts}Contact Type A{/ts}</th> | |
57 | <th>{ts}Contact Type B{/ts}</th> | |
99543b4e | 58 | <th>{ts}Enabled?{/ts}</th> |
6a488035 TO |
59 | <th></th> |
60 | </tr> | |
61 | </thead> | |
62 | {foreach from=$rows item=row} | |
4d17a233 CW |
63 | <tr id="relationship_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if} crm-relationship"> |
64 | <td class="crm-relationship-label_a_b crm-editable" data-field="label_a_b">{$row.label_a_b}</td> | |
65 | <td class="crm-relationship-label_b_a crm-editable" data-field="label_b_a">{$row.label_b_a}</td> | |
6a488035 TO |
66 | <td class="crm-relationship-contact_type_a_display"> |
67 | {if $row.contact_type_a_display} {$row.contact_type_a_display} | |
68 | {if $row.contact_sub_type_a} - {$row.contact_sub_type_a} {/if}{else} {ts}All Contacts{/ts} {/if} </td> | |
69 | <td class="crm-relationship-contact_type_b_display"> | |
70 | {if $row.contact_type_b_display} {$row.contact_type_b_display} | |
71 | {if $row.contact_sub_type_b} - {$row.contact_sub_type_b}{/if} {else} {ts}All Contacts{/ts} {/if} </td> | |
fc723d57 | 72 | <td class="crm-relationship-is_active" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
6a488035 TO |
73 | <td>{$row.action|replace:'xx':$row.id}</td> |
74 | </tr> | |
75 | {/foreach} | |
76 | </table> | |
77 | {/strip} | |
78 | ||
6a488035 TO |
79 | </div> |
80 | {else} | |
81 | <div class="messages status no-popup"> | |
e2046b33 CW |
82 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> |
83 | {ts}None found.{/ts} | |
6a488035 TO |
84 | </div> |
85 | {/if} | |
e2046b33 | 86 | <div class="action-link"> |
80bc2820 AH |
87 | {crmButton q="action=add&reset=1" class="newRelationshipType" icon="plus-circle"}{ts}Add Relationship Type{/ts}{/crmButton} |
88 | {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton} | |
e2046b33 | 89 | </div> |
232624b1 | 90 | {/if} |
a5175109 | 91 | </div> |