CRM-13863 - Get rid of double title for forms that use popups
[civicrm-core.git] / templates / CRM / Admin / Page / RelationshipType.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
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}
52395565
CW
32 <div id="help">
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 &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>
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 &raquo; Custom Data</a>.{/ts}{help id='id-relationship-types'} </p>
35 </div>
6a488035
TO
36{if $rows}
37{if !($action eq 1 and $action eq 2)}
38 <div class="action-link">
2d13b854 39 <a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
6a488035
TO
40 </div>
41{/if}
42
43<div id="ltype">
44
45 {strip}
46 {* handle enable/disable actions*}
4d17a233
CW
47 {include file="CRM/common/enableDisableApi.tpl"}
48 {include file="CRM/common/crmeditable.tpl"}
6a488035
TO
49 {include file="CRM/common/jsortable.tpl"}
50 <table id="options" class="display">
51 <thead>
52 <tr>
2d13b854 53 <th id="sortable">{ts}Relationship A to B{/ts}</th>
6a488035
TO
54 <th>{ts}Relationship B to A{/ts}</th>
55 <th>{ts}Contact Type A{/ts}</th>
56 <th>{ts}Contact Type B{/ts}</th>
99543b4e 57 <th>{ts}Enabled?{/ts}</th>
6a488035
TO
58 <th></th>
59 </tr>
60 </thead>
61 {foreach from=$rows item=row}
4d17a233
CW
62 <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">
63 <td class="crm-relationship-label_a_b crm-editable" data-field="label_a_b">{$row.label_a_b}</td>
64 <td class="crm-relationship-label_b_a crm-editable" data-field="label_b_a">{$row.label_b_a}</td>
6a488035
TO
65 <td class="crm-relationship-contact_type_a_display">
66 {if $row.contact_type_a_display} {$row.contact_type_a_display}
67 {if $row.contact_sub_type_a} - {$row.contact_sub_type_a} {/if}{else} {ts}All Contacts{/ts} {/if} </td>
68 <td class="crm-relationship-contact_type_b_display">
69 {if $row.contact_type_b_display} {$row.contact_type_b_display}
70 {if $row.contact_sub_type_b} - {$row.contact_sub_type_b}{/if} {else} {ts}All Contacts{/ts} {/if} </td>
fc723d57 71 <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
72 <td>{$row.action|replace:'xx':$row.id}</td>
73 </tr>
74 {/foreach}
75 </table>
76 {/strip}
77
6a488035
TO
78</div>
79{else}
80 <div class="messages status no-popup">
e2046b33
CW
81 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
82 {ts}None found.{/ts}
6a488035
TO
83 </div>
84{/if}
e2046b33
CW
85 <div class="action-link">
86 <a href="{crmURL q="action=add&reset=1"}" class="button newRelationshipType"><span><div class="icon add-icon"></div>{ts}Add Relationship Type{/ts}</span></a>
87 </div>
232624b1 88{/if}