{* +--------------------------------------------------------------------+ | CiviCRM version 4.5 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2014 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ *} {* this template is used for adding/editing/viewing relationships *} {if $cdType } {include file="CRM/Custom/Form/CustomData.tpl"} {else} {if $action eq 4 } {* action = view *}
{foreach from=$viewRelationship item="row"} {if $isCurrentEmployer} {/if} {if $row.start_date} {/if} {if $row.end_date} {/if} {if $row.description} {/if} {foreach from=$viewNote item="rec"} {if $rec } {/if} {/foreach} {/foreach}
{$row.relation} {$row.name}
{ts}Current Employee?{/ts}{ts}Yes{/ts}
{ts}Start Date{/ts}{$row.start_date|crmDate}
{ts}End Date{/ts}{$row.end_date|crmDate}
{ts}Description{/ts}{$row.description}
{ts}Note{/ts}{$rec}
{if $row.is_permission_a_b or $row.is_permission_b_a} {if $row.is_permission_a_b}
{if $row.rtype EQ 'a_b' AND $is_contact_id_a} {ts 1=$displayName 2=$row.display_name}%1 can view and update information about %2.{/ts} {else} {ts 1=$row.display_name 2=$displayName}%1 can view and update information about %2.{/ts} {/if}
{/if} {if $row.is_permission_b_a}
{if $row.rtype EQ 'a_b' AND $is_contact_id_a} {ts 1=$row.display_name 2=$displayName}%1 can view and update information about %2.{/ts} {else} {ts 1=$displayName 2=$row.display_name}%1 can view and update information about %2.{/ts} {/if}
{/if} {else} {ts}None{/ts} {/if}
{ts}Status{/ts}{if $row.is_active}{ts}Enabled{/ts}{else}{ts}Disabled{/ts}{/if}
{include file="CRM/Custom/Page/CustomDataView.tpl"}
{/if} {if $action eq 2 or $action eq 1} {* add and update actions *}
{capture assign="contact_b"}{if $action eq 1}{ts}selected contact(s){/ts}{else}{$display_name_b}{/if}{/capture}
{$form.relationship_type_id.label} {$form.relationship_type_id.html}
{$form.start_date.label} {include file="CRM/common/jcalendar.tpl" elementName=start_date}{$form.end_date.label} {include file="CRM/common/jcalendar.tpl" elementName=end_date}
{ts}If this relationship has start and/or end dates, specify them here.{/ts}
{$form.description.label} {$form.description.html}
{$form.note.label} {$form.note.html}
{$form.is_permission_a_b.html} {ts 1=$display_name_a 2=$contact_b}%1 can view and update information about %2.{/ts}
{$form.is_permission_b_a.html} {ts 1=$contact_b|ucfirst 2=$display_name_a}%1 can view and update information about %2.{/ts}
{$form.is_active.label} {$form.is_active.html}
{/if} {if ($action EQ 1) OR ($action EQ 2) } {*include custom data js file - setting includeWysiwygEditor=TRUE because it's already been loaded*} {include file="CRM/common/customData.tpl" includeWysiwygEditor=TRUE} {/if} {if $action eq 8}
{ts}Are you sure you want to delete this Relationship?{/ts}
{/if}
{include file="CRM/common/formButtons.tpl" location="bottom"}
{/if} {* close of custom data else*}