Merge pull request #16394 from demeritcowboy/extdir-links
[civicrm-core.git] / templates / CRM / Admin / Page / RelationshipType.tpl
CommitLineData
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*}
10{capture assign=customURL}{crmURL p='civicrm/admin/custom/group' q="reset=1"}{/capture}
11{capture assign=docLink}{docURL page="user/organising-your-data/relationships"}{/capture}
6a488035
TO
12
13{if $action eq 1 or $action eq 2 or $action eq 4 or $action eq 8}
14 {include file="CRM/Admin/Form/RelationshipType.tpl"}
15{else}
f6eedce7 16 <div class="help">
52395565
CW
17 <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 &gt;-&lt; Child, Employer &gt;-&lt; Employee). For some types of relationships, the labels may be the same in both directions (e.g. Spouse &gt;-&lt; Spouse).{/ts} {$docLink}</p>
18 <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 &raquo; Custom Data</a>.{/ts}{help id='id-relationship-types'} </p>
19 </div>
a5175109
MR
20
21<div class="crm-content-block crm-block">
6a488035
TO
22{if $rows}
23{if !($action eq 1 and $action eq 2)}
24 <div class="action-link">
80bc2820 25 {crmButton q="action=add&reset=1" class="newRelationshipType" icon="plus-circle"}{ts}Add Relationship Type{/ts}{/crmButton}
6a488035
TO
26 </div>
27{/if}
28
29<div id="ltype">
30
31 {strip}
32 {* handle enable/disable actions*}
4d17a233 33 {include file="CRM/common/enableDisableApi.tpl"}
6a488035
TO
34 {include file="CRM/common/jsortable.tpl"}
35 <table id="options" class="display">
36 <thead>
37 <tr>
2d13b854 38 <th id="sortable">{ts}Relationship A to B{/ts}</th>
6a488035
TO
39 <th>{ts}Relationship B to A{/ts}</th>
40 <th>{ts}Contact Type A{/ts}</th>
41 <th>{ts}Contact Type B{/ts}</th>
99543b4e 42 <th>{ts}Enabled?{/ts}</th>
6a488035
TO
43 <th></th>
44 </tr>
45 </thead>
46 {foreach from=$rows item=row}
4d17a233
CW
47 <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">
48 <td class="crm-relationship-label_a_b crm-editable" data-field="label_a_b">{$row.label_a_b}</td>
49 <td class="crm-relationship-label_b_a crm-editable" data-field="label_b_a">{$row.label_b_a}</td>
6a488035
TO
50 <td class="crm-relationship-contact_type_a_display">
51 {if $row.contact_type_a_display} {$row.contact_type_a_display}
52 {if $row.contact_sub_type_a} - {$row.contact_sub_type_a} {/if}{else} {ts}All Contacts{/ts} {/if} </td>
53 <td class="crm-relationship-contact_type_b_display">
54 {if $row.contact_type_b_display} {$row.contact_type_b_display}
55 {if $row.contact_sub_type_b} - {$row.contact_sub_type_b}{/if} {else} {ts}All Contacts{/ts} {/if} </td>
fc723d57 56 <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
57 <td>{$row.action|replace:'xx':$row.id}</td>
58 </tr>
59 {/foreach}
60 </table>
61 {/strip}
62
6a488035
TO
63</div>
64{else}
65 <div class="messages status no-popup">
e2046b33
CW
66 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
67 {ts}None found.{/ts}
6a488035
TO
68 </div>
69{/if}
e2046b33 70 <div class="action-link">
80bc2820
AH
71 {crmButton q="action=add&reset=1" class="newRelationshipType" icon="plus-circle"}{ts}Add Relationship Type{/ts}{/crmButton}
72 {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
e2046b33 73 </div>
232624b1 74{/if}
a5175109 75</div>