First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
|
@ -0,0 +1,86 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="section-shown">
|
||||
{if !$groupSmart AND !$groupParent}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}This contact does not currently belong to any smart groups.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $groupSmart}
|
||||
<div class="ht-one"></div>
|
||||
<div class="description">
|
||||
{ts 1=$displayName}%1 is currently included in these Smart group(s) (e.g. saved searches).{/ts}
|
||||
</div>
|
||||
{strip}
|
||||
<table id="smart_group" class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Description{/ts}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$groupSmart item=row}
|
||||
<tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
|
||||
<td class="bold">
|
||||
<a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.id`"}">
|
||||
{$row.title}
|
||||
</a>
|
||||
</td>
|
||||
<td>{$row.description}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{/if}
|
||||
{if $groupParent}
|
||||
<div class="ht-one"></div>
|
||||
<h3>{ts}Parent Groups{/ts}</h3>
|
||||
<div class="description">
|
||||
{ts 1=$displayName}%1 is included in these Parent group(s) based on belonging to group(s) which are their
|
||||
children.{/ts}
|
||||
</div>
|
||||
{strip}
|
||||
<table id="parent_group" class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Group{/ts}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$groupParent item=row}
|
||||
<tr id="grp_{$row.id}" class="{cycle values="odd-row,even-row"}">
|
||||
<td class="bold">
|
||||
<a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.id`"}">
|
||||
{$row.title}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{/if}
|
||||
</div>
|
|
@ -0,0 +1,100 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* template for custom data *}
|
||||
{assign var="customDataGroupName" value=$customDataGroup.name}
|
||||
{strip}
|
||||
{if $displayStyle neq 'tableOriented' and ($action eq 16 or $action eq 4)} {* Browse or View actions *}
|
||||
{assign var="customGroupDisplayDone" value=1}
|
||||
<div class="form-item">
|
||||
{include file="CRM/Custom/Page/CustomDataView.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
{/strip}
|
||||
{if $displayStyle eq 'tableOriented'}
|
||||
{include file='CRM/Profile/Page/MultipleRecordFieldsListing.tpl' showListing=1 dontShowTitle=1 pageViewType='customDataView'}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
var $table = $("#{/literal}custom-{$customGroupId}-table-wrapper{literal}");
|
||||
$('a.delete-custom-row', $table).on('click', function(e) {
|
||||
deleteRow($(this));
|
||||
e.preventDefault();
|
||||
});
|
||||
$(".crm-multifield-selector").on('click', '.delete-custom-row', function (e) {
|
||||
deleteRow($(this));
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
function deleteRow($el) {
|
||||
CRM.confirm({
|
||||
message: '{/literal}{ts escape='js'}Are you sure you want to delete this record?{/ts}{literal}'
|
||||
}).on('crmConfirm:yes', function() {
|
||||
var postUrl = {/literal}"{crmURL p='civicrm/ajax/customvalue' h=0 }"{literal};
|
||||
var request = $.post(postUrl, $el.data('delete_params'));
|
||||
CRM.status({/literal}"{ts escape='js'}Record Deleted{/ts}"{literal}, request);
|
||||
request.done(function() {
|
||||
CRM.refreshParent($el);
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
||||
|
||||
{* Todo: Comment on which part custom data gets displayed from the below code. *}
|
||||
{foreach from=$viewCustomData item=customGroupWrapper}
|
||||
{foreach from=$customGroupWrapper item=customGroup key=customGroupId}
|
||||
{assign var="customRegion" value='contact-custom-data-'|cat:$customGroup.name}
|
||||
{crmRegion name=$customRegion}
|
||||
{if $customGroup.help_pre and !$customGroupDisplayDone}
|
||||
<div class="messages help">{$customGroup.help_pre}</div>
|
||||
{/if}
|
||||
{if $action eq 0 or $action eq 1 or $action eq 2 or $recordActivity}
|
||||
{include file="CRM/Contact/Form/CustomData.tpl" mainEdit=$mainEditForm}
|
||||
{/if}
|
||||
{if $mainEditForm}
|
||||
<script type="text/javascript">
|
||||
var showBlocks1 = new Array({$showBlocks1});
|
||||
var hideBlocks1 = new Array({$hideBlocks1});
|
||||
|
||||
on_load_init_blocks(showBlocks1, hideBlocks1);
|
||||
</script>
|
||||
{else}
|
||||
<script type="text/javascript">
|
||||
var showBlocks = new Array({$showBlocks});
|
||||
var hideBlocks = new Array({$hideBlocks});
|
||||
|
||||
{* hide and display the appropriate blocks as directed by the php code *}
|
||||
on_load_init_blocks(showBlocks, hideBlocks);
|
||||
</script>
|
||||
{/if}
|
||||
{if $customGroup.help_post and !$customGroupDisplayDone}
|
||||
<div class="messages help">{$customGroup.help_post}</div>
|
||||
{/if}
|
||||
{/crmRegion}
|
||||
{/foreach}
|
||||
{/foreach}
|
|
@ -0,0 +1,62 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div id="custom-set-content-{$customGroupId}" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_CustomData", "groupID": "{$customGroupId}", "customRecId": "{$customRecId}", "cgcount" : "{$cgcount}"{rdelim}'{/if}>
|
||||
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Edit{/ts}"{/if}>
|
||||
{if $permission EQ 'edit'}
|
||||
<div class="crm-edit-help">
|
||||
<span class="crm-i fa-pencil"></span> {ts}Edit{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{foreach from=$cd_edit.fields item=element key=field_id}
|
||||
<div class="crm-summary-row">
|
||||
{if $element.options_per_line != 0}
|
||||
<div class="crm-label">{$element.field_title}</div>
|
||||
<div class="crm-content crm-custom_data">
|
||||
{* sort by fails for option per line. Added a variable to iterate through the element array*}
|
||||
{foreach from=$element.field_value item=val}
|
||||
{$val}
|
||||
{/foreach}
|
||||
</div>
|
||||
{else}
|
||||
<div class="crm-label">{$element.field_title}</div>
|
||||
{if $element.field_data_type EQ 'ContactReference' && $element.contact_ref_id}
|
||||
{*Contact ref id passed if user has sufficient permissions - so make a link.*}
|
||||
<div class="crm-content crm-custom-data crm-contact-reference">
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$element.contact_ref_id`"}" title="view contact">{$element.field_value}</a>
|
||||
</div>
|
||||
{elseif $element.field_data_type EQ 'Memo'}
|
||||
<div class="crm-content crm-custom-data">{$element.field_value|nl2br}</div>
|
||||
{elseif $element.field_data_type EQ 'Money'}
|
||||
<div class="crm-content crm-custom-data">{$element.field_value|crmMoney}</div>
|
||||
{else}
|
||||
<div class="crm-content crm-custom-data">{$element.field_value}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,49 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Custom Data view mode*}
|
||||
{assign var="customGroupCount" value = 1}
|
||||
{foreach from=$viewCustomData item=customValues key=customGroupId}
|
||||
{assign var="cgcount" value=1}
|
||||
{assign var="count" value=$customGroupCount%2}
|
||||
{if ($count eq $side) or $skipTitle }
|
||||
{foreach from=$customValues item=cd_edit key=cvID}
|
||||
<div class="customFieldGroup crm-collapsible{if $cd_edit.collapse_display} collapsed{/if} ui-corner-all {$cd_edit.name} crm-custom-set-block-{$customGroupId}">
|
||||
<div class="collapsible-title">
|
||||
{$cd_edit.title}
|
||||
</div>
|
||||
{if $cvID eq 0}
|
||||
{assign var='cvID' value='-1'}
|
||||
{/if}
|
||||
<div class="crm-summary-block" id="custom-set-block-{$customGroupId}-{$cvID}">
|
||||
{include file="CRM/Contact/Page/View/CustomDataFieldView.tpl" customGroupId=$customGroupId customRecId=$cvID cgcount=$cgcount}
|
||||
</div>
|
||||
</div>
|
||||
{assign var="cgcount" value=$cgcount+1}
|
||||
{/foreach}
|
||||
{/if}
|
||||
{assign var="customGroupCount" value = $customGroupCount+1}
|
||||
{/foreach}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Confirmation of contact deletes *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
<p>{ts 1=$displayName}Are you sure you want to delete the contact record and all related information for <strong>%1</strong>?{/ts}</p>
|
||||
<p>{ts}This action cannot be undone.{/ts}</p>
|
||||
</div>
|
||||
<p>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
|
|
@ -0,0 +1,38 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="form-item">
|
||||
<fieldset>
|
||||
<legend>{ts}Sent Email Message{/ts}</legend>
|
||||
<dl>
|
||||
<dt>{ts}Date Sent{/ts}</dt><dd>{$sentDate|crmDate}</dd>
|
||||
<dt>{ts}From{/ts}</dt><dd>{if $fromName}{$fromName|escape}{else}{ts}(display name not available){/ts}{/if}</dd>
|
||||
<dt>{ts}To{/ts}</dt><dd>{$toName|escape}</dd>
|
||||
<dt>{ts}Subject{/ts}</dt><dd>{$subject}</dd>
|
||||
<dt>{ts}Message{/ts}</dt><dd>{$message}</dd>
|
||||
<dt> </dt><dd>{crmButton class="cancel" icon="times" p='civicrm/contact/view' q="history=1&show=1&selectedChild=activity"}">{ts}Done{/ts}{/crmButton}</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
|
@ -0,0 +1,59 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div id="name" class="section-hidden section-hidden-border form-item">
|
||||
<p>
|
||||
<label>{$displayName}</label>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="groupContact">
|
||||
<p>
|
||||
<div class="form-item">
|
||||
{if $groupCount > 0 }
|
||||
<table>
|
||||
<tr class="columnheader"><th>{ts}Group Listings{/ts}</th><th>{ts}In Date{/ts}</th><th>{ts}Out Date{/ts}</th><th></th></tr>
|
||||
{foreach from=$groupContact item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td> {$row.name}</td>
|
||||
<td>{$row.in_date|crmDate}</td>
|
||||
<td>{$row.out_date|crmDate}</td>
|
||||
<td><a href="#">{ts}View{/ts}</a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}This contact does not belong to any groups.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</p>
|
||||
<span class="float-right">
|
||||
<a href="#">{ts}Add this contact to one or more groups...{/ts}</a>
|
||||
</span>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,216 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="view-content view-contact-groups">
|
||||
{if $groupCount eq 0}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}This contact does not currently belong to any groups.{/ts}
|
||||
</div>
|
||||
{else}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
{/if}
|
||||
|
||||
{* Include 'add to new group' form if session has edit contact permissions *}
|
||||
{if $permission EQ 'edit'}
|
||||
{include file="CRM/Contact/Form/GroupContact.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $groupIn }
|
||||
<div class="ht-one"></div>
|
||||
<h3>{ts}Regular Groups{/ts}</h3>
|
||||
<div class="description">{ts 1=$displayName}%1 has joined or been added to these group(s).{/ts}</div>
|
||||
{strip}
|
||||
<table id="current_group" class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Date Added{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$groupIn item=row}
|
||||
<tr id="group_contact-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}">
|
||||
<td class="bold">
|
||||
<a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">
|
||||
{$row.title}
|
||||
</a>
|
||||
</td>
|
||||
<td>{ts 1=$row.in_method}Added (by %1){/ts}</td>
|
||||
<td>{$row.in_date|crmDate}</td>
|
||||
<td>
|
||||
{if $permission EQ 'edit'}
|
||||
<a class="action-item crm-hover-button" href="#Removed" title="{ts 1=$displayName 2=$row.title}Remove %1 from %2? (status in this group will be changed to 'Removed').{/ts}">
|
||||
{ts}Remove{/ts}</a>
|
||||
<a class="action-item crm-hover-button" href="#Deleted" title="{ts 1=$displayName 2=$row.title}Delete %1 from %2? (remove contact AND delete their record of having been in this group).{/ts}">
|
||||
{ts}Delete{/ts}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{/if}
|
||||
|
||||
{if $contactSmartGroupSettings neq 3}
|
||||
<div class="spacer" style="height: 1.5em;"></div>
|
||||
<div class="accordion ui-accordion ui-widget ui-helper-reset">
|
||||
<div class="crm-accordion-wrapper crm-ajax-accordion crm-smartgroup-accordion {if $contactSmartGroupSettings eq 1}collapsed{/if}">
|
||||
<div class="crm-accordion-header" id="crm-contact_smartgroup" contact_id="{$contactId}">
|
||||
{ts}Smart Groups{/ts}
|
||||
</div>
|
||||
<!-- /.crm-accordion-header -->
|
||||
<div class="crm-accordion-body">
|
||||
<div class="crm-contact_smartgroup" style="min-height: 3em;"></div>
|
||||
</div>
|
||||
<!-- /.crm-accordion-body -->
|
||||
</div>
|
||||
<!-- /.crm-accordion-wrapper -->
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $groupPending}
|
||||
<div class="ht-one"></div>
|
||||
<h3 class="status-pending">{ts}Pending{/ts}</h3>
|
||||
<div class="description">{ts}Joining these group(s) is pending confirmation by this contact.{/ts}</div>
|
||||
{strip}
|
||||
<table id="pending_group" class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Date Pending{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$groupPending item=row}
|
||||
<tr id="group_contact-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}">
|
||||
<td class="bold">
|
||||
<a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">
|
||||
{$row.title}
|
||||
</a>
|
||||
</td>
|
||||
<td>{ts 1=$row.pending_method}Pending (by %1){/ts}</td>
|
||||
<td>{$row.pending_date|crmDate}</td>
|
||||
<td>
|
||||
{if $permission EQ 'edit'}
|
||||
<a class="action-item crm-hover-button" href="#Removed" title="{ts 1=$displayName 2=$row.title}Remove %1 from %2? (status in this group will be changed to 'Removed').{/ts}">
|
||||
{ts}Remove{/ts}</a>
|
||||
<a class="action-item crm-hover-button" href="#Deleted" title="{ts 1=$displayName 2=$row.title}Delete %1 from %2? (this group will no longer be listed under Pending Groups){/ts}">
|
||||
{ts}Delete{/ts}</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{/if}
|
||||
|
||||
{if $groupOut}
|
||||
<div class="ht-one"></div>
|
||||
<h3 class="status-removed">{ts}Past Groups{/ts}</h3>
|
||||
<div class="description">{ts 1=$displayName}%1 is no longer part of these group(s).{/ts}</div>
|
||||
{strip}
|
||||
<table id="past_group" class="display">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Date Added{/ts}</th>
|
||||
<th>{ts}Date Removed{/ts}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{foreach from=$groupOut item=row}
|
||||
<tr id="group_contact-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"}">
|
||||
<td class="bold">
|
||||
<a href="{crmURL p='civicrm/group/search' q="reset=1&force=1&context=smog&gid=`$row.group_id`"}">
|
||||
{$row.title}
|
||||
</a>
|
||||
</td>
|
||||
<td class="status-removed">{ts 1=$row.out_method}Removed (by %1){/ts}</td>
|
||||
<td data-order="{$row.date_added}">{$row.date_added|crmDate}</td>
|
||||
<td data-order="{$row.out_date}">{$row.out_date|crmDate}</td>
|
||||
<td>{if $permission EQ 'edit'}
|
||||
<a class="action-item crm-hover-button" href="#Added" title="{ts 1=$displayName 2=$row.title}Add %1 back into %2?{/ts}">
|
||||
{ts}Rejoin Group{/ts}</a>
|
||||
<a class="action-item crm-hover-button" href="#Deleted" title="{ts 1=$displayName 2=$row.title}Delete %1 from %2? (this group will no longer be listed under Past Groups).{/ts}">
|
||||
{ts}Delete{/ts}</a>{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// load panes function calls for snippet based on id of crm-accordion-header
|
||||
function loadPanes() {
|
||||
var $el = $(this).parent().find('div.crm-contact_smartgroup');
|
||||
var contactId = $(this).attr('contact_id');
|
||||
if (!$el.html()) {
|
||||
CRM.loadPage(CRM.url('civicrm/contact/view/smartgroup', {cid: contactId}), {target: $el});
|
||||
}
|
||||
}
|
||||
// bind first click of accordion header to load crm-accordion-body with snippet
|
||||
$('.view-contact-groups .crm-ajax-accordion.collapsed .crm-accordion-header').one('click', loadPanes);
|
||||
$('.view-contact-groups .crm-ajax-accordion:not(.collapsed) .crm-accordion-header').each(loadPanes);
|
||||
// Handle enable/delete links
|
||||
var that;
|
||||
function refresh() {
|
||||
CRM.refreshParent(that);
|
||||
}
|
||||
function enableDisableGroup() {
|
||||
var params = {
|
||||
id: $(that).closest('.crm-entity').attr('id').split('-')[1],
|
||||
method: 'Admin'
|
||||
};
|
||||
var status = that.href.split('#')[1];
|
||||
if (status === 'Deleted') {
|
||||
params.skip_undelete = true;
|
||||
} else {
|
||||
params.status = status;
|
||||
}
|
||||
// This api is weird - 'delete' actually works for updating as well as deleting
|
||||
// Normally you wouldn't put a variable within ts() but this works due to smarty hack below
|
||||
CRM.api3('group_contact', 'delete', params, {success: ts(status)}).done(refresh);
|
||||
}
|
||||
$('.view-contact-groups a.action-item').click(function() {
|
||||
that = this;
|
||||
CRM.confirm(enableDisableGroup, {message: this.title});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
{/literal}
|
||||
// Hack to ensure status msg is properly translated
|
||||
CRM.strings.Added = "{ts escape='js'}Added{/ts}";
|
||||
CRM.strings.Removed = "{ts escape='js'}Removed{/ts}";
|
||||
CRM.strings.Deleted = "{ts escape='js'}Deleted{/ts}";
|
||||
</script>
|
|
@ -0,0 +1,76 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div id="changeLog" class="view-content">
|
||||
<p></p>
|
||||
<div class="bold">{ts}Change Log:{/ts} {$displayName}</div>
|
||||
{if $useLogging}
|
||||
<br />
|
||||
<div class='instance_data'><div class="crm-loading-element"></div></div>
|
||||
{else}
|
||||
<div class="form-item">
|
||||
{if $logCount > 0 }
|
||||
<table>
|
||||
<tr class="columnheader"><th>{ts}Changed By{/ts}</th><th>{ts}Change Date{/ts}</th></tr>
|
||||
{foreach from=$log item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td> {$row.image} <a href="{crmURL p='civicrm/contact/view' q="action=view&reset=1&cid=`$row.id`"}">{$row.name}</a></td>
|
||||
<td>{$row.date|crmDate}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}None found.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{if $useLogging}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$('#changeLog .instance_data').on('crmLoad', function(e, data) {
|
||||
CRM.tabHeader.updateCount('#tab_log', data.totalRows);
|
||||
});
|
||||
CRM.reloadChangeLogTab = function(url) {
|
||||
if (url) {
|
||||
$('#changeLog .instance_data').crmSnippet({url: url});
|
||||
}
|
||||
$('#changeLog .instance_data').crmSnippet('refresh');
|
||||
};
|
||||
CRM.incrementChangeLogTab = function() {
|
||||
CRM.tabHeader.updateCount('#tab_log', 1 + CRM.tabHeader.getCount('#tab_log'));
|
||||
};
|
||||
CRM.reloadChangeLogTab({/literal}"{$instanceUrl}"{literal});
|
||||
});
|
||||
|
||||
</script>
|
||||
{/literal}
|
||||
{/if}
|
|
@ -0,0 +1,264 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="view-content">
|
||||
{if $action eq 4}{* when action is view *}
|
||||
{if $notes}
|
||||
<div class="crm-block crm-content-block crm-note-view-block">
|
||||
<table class="crm-info-panel">
|
||||
<tr><td class="label">{ts}Subject{/ts}</td><td>{$note.subject}</td></tr>
|
||||
<tr><td class="label">{ts}Date:{/ts}</td><td>{$note.modified_date|crmDate}</td></tr>
|
||||
<tr><td class="label">{ts}Privacy:{/ts}</td><td>{$note.privacy}</td></tr>
|
||||
<tr><td class="label">{ts}Note:{/ts}</td><td>{$note.note|nl2br}</td></tr>
|
||||
|
||||
{if $currentAttachmentInfo}
|
||||
{include file="CRM/Form/attachment.tpl"}
|
||||
{/if}
|
||||
</table>
|
||||
<div class="crm-submit-buttons">
|
||||
{crmButton class="cancel" icon="times" p='civicrm/contact/view' q="selectedChild=note&reset=1&cid=`$contactId`"}{ts}Done{/ts}{/crmButton}
|
||||
</div>
|
||||
|
||||
{if $comments}
|
||||
<fieldset>
|
||||
<legend>{ts}Comments{/ts}</legend>
|
||||
<table class="display">
|
||||
<thead>
|
||||
<tr><th>{ts}Comment{/ts}</th><th>{ts}Created By{/ts}</th><th>{ts}Date{/ts}</th></tr>
|
||||
</thead>
|
||||
{foreach from=$comments item=comment}
|
||||
<tr class="{cycle values='odd-row,even-row'}"><td>{$comment.note}</td><td>{$comment.createdBy}</td><td>{$comment.modified_date}</td></tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
{elseif $action eq 1 or $action eq 2} {* action is add or update *}
|
||||
<div class="crm-block crm-form-block crm-note-form-block">
|
||||
<div class="content crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout">
|
||||
<tr>
|
||||
<td class="label">{$form.subject.label}</td>
|
||||
<td>
|
||||
{$form.subject.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{$form.privacy.label}</td>
|
||||
<td>
|
||||
{$form.privacy.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{$form.note.label}</td>
|
||||
<td>
|
||||
{$form.note.html}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="crm-activity-form-block-attachment">
|
||||
<td colspan="2">
|
||||
{include file="CRM/Form/attachment.tpl"}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="crm-section note-buttons-section no-label">
|
||||
<div class="content crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if ($action eq 8)}
|
||||
<div class=status>{ts 1=$notes.$id.note}Are you sure you want to delete the note '%1'?{/ts}</div>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl"}</div>
|
||||
|
||||
{/if}
|
||||
|
||||
{if $permission EQ 'edit' AND ($action eq 16)}
|
||||
<div class="action-link">
|
||||
<a accesskey="N" href="{crmURL p='civicrm/contact/view/note' q="cid=`$contactId`&action=add"}" class="button medium-popup"><span><i class="crm-i fa-comment"></i> {ts}Add Note{/ts}</span></a>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
{/if}
|
||||
<div class="crm-content-block">
|
||||
|
||||
{if $notes and $action eq 16}
|
||||
|
||||
<script type="text/javascript">
|
||||
var commentAction = '{$commentAction|escape:quotes}'
|
||||
|
||||
{literal}
|
||||
var commentRows = {};
|
||||
|
||||
function showHideComments( noteId ) {
|
||||
|
||||
elRow = cj('tr#cnote_'+ noteId)
|
||||
|
||||
if (elRow.hasClass('view-comments')) {
|
||||
cj('tr.note-comment_'+ noteId).remove()
|
||||
commentRows['cnote_'+ noteId] = {};
|
||||
cj('tr#cnote_'+ noteId +' span.icon_comments_show').show();
|
||||
cj('tr#cnote_'+ noteId +' span.icon_comments_hide').hide();
|
||||
elRow.removeClass('view-comments');
|
||||
} else {
|
||||
var getUrl = {/literal}"{crmURL p='civicrm/ajax/rest' h=0}"{literal};
|
||||
cj.post(getUrl, { fnName: 'civicrm/note/tree_get', json: 1, id: noteId, sequential: 1 }, showComments, 'json' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function showComments (response) {
|
||||
var urlTemplate = '{/literal}{crmURL p='civicrm/contact/view' q="reset=1&cid=" h=0 }{literal}'
|
||||
if (response['values'][0] && response['values'][0].entity_id) {
|
||||
var noteId = response['values'][0].entity_id
|
||||
var row = cj('tr#cnote_'+ noteId);
|
||||
|
||||
row.addClass('view-comments');
|
||||
|
||||
if (row.hasClass('odd') ) {
|
||||
var rowClassOddEven = 'odd'
|
||||
} else {
|
||||
var rowClassOddEven = 'even'
|
||||
}
|
||||
|
||||
if ( commentRows['cnote_'+ noteId] ) {
|
||||
for ( var i in commentRows['cnote_'+ noteId] ) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
commentRows['cnote_'+ noteId] = {};
|
||||
}
|
||||
for (i in response['values']) {
|
||||
if ( response['values'][i].id ) {
|
||||
if ( commentRows['cnote_'+ noteId] &&
|
||||
commentRows['cnote_'+ noteId][response['values'][i].id] ) {
|
||||
continue;
|
||||
}
|
||||
str = '<tr id="cnote_'+ response['values'][i].id +'" class="'+ rowClassOddEven +' note-comment_'+ noteId +'">'
|
||||
+ '<td></td>'
|
||||
+ '<td style="padding-left: 2em">'
|
||||
+ response['values'][i].note
|
||||
+ '</td><td>'
|
||||
+ response['values'][i].subject
|
||||
+ '</td><td>'
|
||||
+ response['values'][i].modified_date
|
||||
+ '</td><td>'
|
||||
+ '<a href="'+ urlTemplate + response['values'][i].createdById +'">'+ response['values'][i].createdBy +'</a>'
|
||||
+ '</td><td>'
|
||||
+ response['values'][i].attachment
|
||||
+ '</td><td>'+ commentAction.replace(/{cid}/g, response['values'][i].createdById).replace(/{id}/g, response['values'][i].id) +'</td></tr>'
|
||||
|
||||
commentRows['cnote_'+ noteId][response['values'][i].id] = str;
|
||||
}
|
||||
}
|
||||
drawCommentRows('cnote_'+ noteId);
|
||||
|
||||
cj('tr#cnote_'+ noteId +' span.icon_comments_show').hide();
|
||||
cj('tr#cnote_'+ noteId +' span.icon_comments_hide').show();
|
||||
} else {
|
||||
CRM.alert('{/literal}{ts escape="js"}There are no comments for this note{/ts}{literal}', '{/literal}{ts escape="js"}None Found{/ts}{literal}', 'alert');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function drawCommentRows(rowId) {
|
||||
if (rowId) {
|
||||
row = cj('tr#'+ rowId)
|
||||
for (i in commentRows[rowId]) {
|
||||
row.after(commentRows[rowId][i]);
|
||||
row = cj('tr#cnote_'+ i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
<div class="crm-results-block">
|
||||
{* show browse table for any action *}
|
||||
<div id="notes">
|
||||
{strip}
|
||||
<table id="options" class="display crm-sortable" data-order='[[3,"desc"]]'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-orderable="false"></th>
|
||||
<th>{ts}Note{/ts}</th>
|
||||
<th>{ts}Subject{/ts}</th>
|
||||
<th>{ts}Date{/ts}</th>
|
||||
<th>{ts}Created By{/ts}</th>
|
||||
<th data-orderable="false">{ts}Attachment(s){/ts}</th>
|
||||
<th data-orderable="false"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
{foreach from=$notes item=note}
|
||||
<tr id="cnote_{$note.id}" class="{cycle values="odd-row,even-row"} crm-note">
|
||||
<td class="crm-note-comment">
|
||||
{if $note.comment_count}
|
||||
<span id="{$note.id}_show" style="display:block" class="icon_comments_show">
|
||||
<a href="#" onclick="showHideComments({$note.id}); return false;" title="{ts}Show comments for this note.{/ts}"><i class="crm-i fa-caret-right"></i></span></a>
|
||||
</span>
|
||||
<span id="{$note.id}_hide" style="display:none" class="icon_comments_hide">
|
||||
<a href="#" onclick="showHideComments({$note.id}); return false;" title="{ts}Hide comments for this note.{/ts}"><i class="crm-i fa-caret-down"></i></span></a>
|
||||
</span>
|
||||
{else}
|
||||
<span class="crm-i fa-caret-right" id="{$note.id}_hide" style="display:none"></span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="crm-note-note">
|
||||
{$note.note|mb_truncate:80:"...":false|nl2br}
|
||||
{* Include '(more)' link to view entire note if it has been truncated *}
|
||||
{assign var="noteSize" value=$note.note|count_characters:true}
|
||||
{if $noteSize GT 80}
|
||||
<a class="crm-popup" href="{crmURL p='civicrm/contact/view/note' q="action=view&selectedChild=note&reset=1&cid=`$contactId`&id=`$note.id`"}">{ts}(more){/ts}</a>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="crm-note-subject">{$note.subject}</td>
|
||||
<td class="crm-note-modified_date" data-order="{$note.modified_date}">{$note.modified_date|crmDate}</td>
|
||||
<td class="crm-note-createdBy">
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$note.contact_id`"}">{$note.createdBy}</a>
|
||||
</td>
|
||||
<td class="crm-note-attachment">
|
||||
{foreach from=$note.attachment item=fileinfo}
|
||||
{$fileinfo}
|
||||
{/foreach}
|
||||
</td>
|
||||
<td class="nowrap">{$note.action|replace:'xx':$note.id}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{elseif ($action eq 16)}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}There are no Notes for this contact.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,56 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Contact Summary template to print contact information *}
|
||||
{literal}
|
||||
<style type="text/css" media="screen, print">
|
||||
<!--
|
||||
#crm-container div {
|
||||
font-size: 12px;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
{/literal}
|
||||
<form action="{crmURL p='civicrm/contact/view' q="&cid=`$contactId`&reset=1"}" method="post" id="Print1" >
|
||||
<div class="form-item">
|
||||
<span class="element-right"><input onclick="window.print(); return false" class="crm-form-submit default" name="_qf_Print_next" value="{ts}Print{/ts}" type="submit" /> <input class="crm-form-submit" name="_qf_Print_back" value="{ts}Done{/ts}" type="submit" /></span>
|
||||
</div>
|
||||
</form>
|
||||
<br />
|
||||
<div class="solid-border-top"><br />
|
||||
{include file="CRM/Contact/Page/View/Summary.tpl"}
|
||||
<form action="{crmURL p='civicrm/contact/view' q="&cid=`$contactId`&reset=1"}" method="post" id="Print2" >
|
||||
<div class="form-item">
|
||||
<span class="element-right"><input onclick="window.print(); return false" class="crm-form-submit default" name="_qf_Print_next" value="{ts}Print{/ts}" type="submit" /> <input class="crm-form-submit" name="_qf_Print_back" value="{ts}Done{/ts}" type="submit" /></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
cj('#mainTabContainer').children(':first').remove();
|
||||
cj('#contact-summary' ).children(':first').remove();
|
||||
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,65 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Relationship tab within View Contact - browse, and view relationships for a contact *}
|
||||
{if $action neq 16} {* add, update or view *}
|
||||
{include file="CRM/Contact/Form/Relationship.tpl"}
|
||||
{else}
|
||||
<div id="contact-summary-relationship-tab" class="view-content">
|
||||
{if $permission EQ 'edit'}
|
||||
<div class="action-link">
|
||||
{crmButton accesskey="N" p='civicrm/contact/view/rel' q="cid=`$contactId`&action=add&reset=1" icon="plus-circle"}{ts}Add Relationship{/ts}{/crmButton}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* display current relationships *}
|
||||
<h3>{ts}Current Relationships{/ts}</h3>
|
||||
{include file="CRM/Contact/Page/View/RelationshipSelector.tpl" context="current"}
|
||||
<div id="permission-legend" class="crm-content-block">
|
||||
<span class="crm-marker">* </span>
|
||||
{ts}Indicates a permissioned relationship. This contact can be viewed and updated by the other.{/ts}
|
||||
</div>
|
||||
|
||||
<div class="spacer"></div>
|
||||
<p></p>
|
||||
{* display past relationships *}
|
||||
<div class="label font-red">{ts}Inactive Relationships{/ts}</div>
|
||||
<div class="description">{ts}These relationships are Disabled OR have a past End Date.{/ts}</div>
|
||||
{include file="CRM/Contact/Page/View/RelationshipSelector.tpl" context="past"}
|
||||
</div>
|
||||
|
||||
{include file="CRM/common/enableDisableApi.tpl"}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
// Changing relationships may affect related members and contributions. Ensure they are refreshed.
|
||||
$('#contact-summary-relationship-tab').on('crmPopupFormSuccess', function() {
|
||||
CRM.tabHeader.resetTab('#tab_contribute');
|
||||
CRM.tabHeader.resetTab('#tab_member');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
{/if} {* close of custom data else*}
|
|
@ -0,0 +1,45 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* relationship selector *}
|
||||
<div class="crm-contact-relationship-{$context}">
|
||||
<table
|
||||
class="crm-contact-relationship-selector-{$context} crm-ajax-table"
|
||||
data-ajax="{crmURL p="civicrm/ajax/contactrelationships" q="context=$context&cid=$contactId"}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-data="relation" class='crm-contact-relationship-type'>{ts}Relationship{/ts}</th>
|
||||
<th data-data="sort_name" class='crm-contact-relationship-contact_name'> </th>
|
||||
<th data-data="start_date" class='crm-contact-relationship-start_date'>{ts}Start{/ts}</th>
|
||||
<th data-data="end_date" class='crm-contact-relationship-end_date'>{ts}End{/ts}</th>
|
||||
<th data-data="city" class='crm-contact-relationship-city'>{ts}City{/ts}</th>
|
||||
<th data-data="state" class='crm-contact-relationship-state'>{ts}State/Prov{/ts}</th>
|
||||
<th data-data="email" class='crm-contact-relationship-email'>{ts}Email{/ts}</th>
|
||||
<th data-data="phone" class='crm-contact-relationship-phone'>{ts}Phone{/ts}</th>
|
||||
<th data-data="links" data-orderable="false" class='crm-contact-relationship-links'></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
|
@ -0,0 +1,40 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="form-item">
|
||||
<fieldset>
|
||||
<legend>{ts}Sent SMS Message{/ts}</legend>
|
||||
<dl>
|
||||
<dt>{ts}Date Sent{/ts}</dt><dd>{$sentDate|crmDate}</dd>
|
||||
<dt>{ts}From{/ts}</dt><dd>{if $fromName}{$fromName}{else}{ts}(display name not available){/ts}{/if}</dd>
|
||||
<dt>{ts}To{/ts}</dt><dd>{$toName}</dd>
|
||||
<dt>{ts}Message{/ts}</dt><dd>{$message}</dd>
|
||||
<dt> </dt>
|
||||
<dd class="crm-submit-buttons">
|
||||
{crmButton class="cancel" icon="times" p='civicrm/contact/view/activity' q="history=1&show=1"}">{ts}Done{/ts}{/crmButton}
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</div>
|
|
@ -0,0 +1,31 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{htxt id="id-next-prev-buttons-title"}
|
||||
{ts}Navigation{/ts}
|
||||
{/htxt}
|
||||
{htxt id="id-next-prev-buttons"}
|
||||
{ts}Next/Previous buttons are not available for searches which are sorted by email, phone or address fields.{/ts}
|
||||
{/htxt}
|
|
@ -0,0 +1,384 @@
|
|||
// http://civicrm.org/licensing
|
||||
(function($, _) {
|
||||
// FIXME: Much of this code is redundant with CRM.loadForm
|
||||
|
||||
var ajaxFormParams = {
|
||||
dataType:'json',
|
||||
beforeSubmit: function(arr, $form, options) {
|
||||
$form.block();
|
||||
},
|
||||
success: requestHandler,
|
||||
error: errorHandler
|
||||
};
|
||||
|
||||
function crmFormInline(o) {
|
||||
var data = o.data('edit-params');
|
||||
if (o.is('.crm-edit-ready .crm-inline-edit') && data) {
|
||||
o.animate({height: '+=50px'}, 200);
|
||||
data.snippet = 6;
|
||||
data.reset = 1;
|
||||
o.addClass('form');
|
||||
$('.crm-edit-ready').removeClass('crm-edit-ready');
|
||||
o.block();
|
||||
$.getJSON(CRM.url('civicrm/ajax/inline', data))
|
||||
.fail(errorHandler)
|
||||
.done(function(response) {
|
||||
o.unblock();
|
||||
o.css('overflow', 'hidden').wrapInner('<div class="inline-edit-hidden-content" style="display:none" />').append(response.content);
|
||||
// Smooth resizing
|
||||
var newHeight = $('.crm-container-snippet', o).height();
|
||||
var diff = newHeight - parseInt(o.css('height'), 10);
|
||||
if (diff < 0) {
|
||||
diff = 0 - diff;
|
||||
}
|
||||
o.animate({height: '' + newHeight + 'px'}, diff * 2, function() {
|
||||
o.removeAttr('style');
|
||||
});
|
||||
$('form', o).validate(CRM.validate.params);
|
||||
ajaxFormParams.data = data;
|
||||
$('form', o).ajaxForm(ajaxFormParams);
|
||||
o.trigger('crmLoad').trigger('crmFormLoad');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function reloadBlock(el) {
|
||||
return $(el).each(function() {
|
||||
var data = $(this).data('edit-params');
|
||||
data.snippet = data.reset = 1;
|
||||
data.class_name = data.class_name.replace('Form', 'Page');
|
||||
data.type = 'page';
|
||||
$(this).closest('.crm-summary-block').load(CRM.url('civicrm/ajax/inline', data), function() {$(this).trigger('crmLoad');});
|
||||
});
|
||||
}
|
||||
|
||||
function requestHandler(response) {
|
||||
var o = $('div.crm-inline-edit.form');
|
||||
$('form', o).ajaxFormUnbind();
|
||||
|
||||
if (response.status == 'success' || response.status == 'cancel') {
|
||||
o.trigger('crmFormSuccess', [response]);
|
||||
$('.crm-inline-edit-container').addClass('crm-edit-ready');
|
||||
var data = o.data('edit-params');
|
||||
var dependent = $((o.data('dependent-fields') || []).join(','));
|
||||
// Clone the add-new link if replacing it, and queue the clone to be refreshed as a dependent block
|
||||
if (o.hasClass('add-new') && response.addressId) {
|
||||
data.aid = response.addressId;
|
||||
var clone = o.closest('.crm-summary-block').clone();
|
||||
o.data('edit-params', data);
|
||||
$('form', clone).remove();
|
||||
if (clone.hasClass('contactCardLeft')) {
|
||||
clone.removeClass('contactCardLeft').addClass('contactCardRight');
|
||||
}
|
||||
else if (clone.hasClass('contactCardRight')) {
|
||||
clone.removeClass('contactCardRight').addClass('contactCardLeft');
|
||||
}
|
||||
var cl = $('.crm-inline-edit', clone);
|
||||
var clData = cl.data('edit-params');
|
||||
var locNo = clData.locno++;
|
||||
cl.attr('id', cl.attr('id').replace(locNo, clData.locno)).removeClass('form');
|
||||
o.closest('.crm-summary-block').after(clone);
|
||||
dependent = dependent.add($('.crm-inline-edit', clone));
|
||||
}
|
||||
$('a.ui-notify-close', '#crm-notification-container').click();
|
||||
// Delete an address
|
||||
if (o.hasClass('address') && !o.hasClass('add-new') && !response.addressId) {
|
||||
o.parent().remove();
|
||||
CRM.status(ts('Address Deleted'));
|
||||
}
|
||||
else {
|
||||
// Reload this block plus all dependent blocks
|
||||
reloadBlock(dependent.add(o));
|
||||
CRM.status(ts('Saved'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
// Handle formRule error
|
||||
$('.crm-container-snippet', o).replaceWith(response.content);
|
||||
$('form', o).validate(CRM.validate.params);
|
||||
$('form', o).ajaxForm(ajaxFormParams);
|
||||
o.trigger('crmFormError', [response]).trigger('crmFormLoad').trigger('crmLoad');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure optimistic locking mechanism for inplace editing
|
||||
*
|
||||
* options.ignoreLabel: string, text for a button
|
||||
* options.reloadLabel: string, text for a button
|
||||
*/
|
||||
$.fn.crmFormContactLock = function(options) {
|
||||
var form = this;
|
||||
// AFTER ERROR: Render any "Ignore" and "Restart" buttons
|
||||
return this.on('crmFormError', function(event, obj, status) {
|
||||
var o = $(event.target);
|
||||
var data = o.data('edit-params');
|
||||
var errorTag = o.find('.update_oplock_ts');
|
||||
if (errorTag.length > 0) {
|
||||
$('<span>')
|
||||
.addClass('crm-lock-button css_right')
|
||||
.appendTo(errorTag);
|
||||
|
||||
var buttonContainer = o.find('.crm-lock-button');
|
||||
$('<button>')
|
||||
.addClass('crm-button')
|
||||
.text(options.saveAnywayLabel)
|
||||
.click(function() {
|
||||
$(form).find('input[name=oplock_ts]').val(errorTag.attr('data:update_oplock_ts'));
|
||||
errorTag.parent().hide();
|
||||
$(this).closest('form').find('.crm-form-submit.default').first().click();
|
||||
return false;
|
||||
})
|
||||
.appendTo(buttonContainer)
|
||||
;
|
||||
$('<button>')
|
||||
.addClass('crm-button')
|
||||
.text(options.reloadLabel)
|
||||
.click(function() {
|
||||
window.location.reload();
|
||||
return false;
|
||||
})
|
||||
.appendTo(buttonContainer)
|
||||
;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function errorHandler(response) {
|
||||
CRM.alert(ts('Unable to reach the server. Please refresh this page in your browser and try again.'), ts('Network Error'), 'error');
|
||||
$('.crm-inline-edit.form form').unblock();
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// don't perform inline edit during print mode
|
||||
if (CRM.summaryPrint.mode) {
|
||||
$('div').removeClass('crm-inline-edit');
|
||||
$('.crm-inline-block-content > div.crm-edit-help').remove();
|
||||
$('div.crm-inline-block-content').removeAttr('title');
|
||||
}
|
||||
// Set page title
|
||||
var oldName = 'CiviCRM';
|
||||
var nameTitle = $('#crm-remove-title');
|
||||
if (nameTitle.length > 0) {
|
||||
oldName = nameTitle.text();
|
||||
nameTitle.parent('h1').remove();
|
||||
}
|
||||
else {
|
||||
$('h1').each(function() {
|
||||
if ($(this).text() == oldName) {
|
||||
$(this).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
function refreshTitle() {
|
||||
var contactName = $('.crm-summary-display_name').text();
|
||||
contactName = $.trim(contactName);
|
||||
document.title = $('title').html().replace(oldName, contactName);
|
||||
oldName = contactName;
|
||||
}
|
||||
$('#contactname-block').load(refreshTitle);
|
||||
refreshTitle();
|
||||
|
||||
var clicking;
|
||||
$('.crm-inline-edit-container')
|
||||
.addClass('crm-edit-ready')
|
||||
// Allow links inside edit blocks to be clicked without triggering edit
|
||||
.on('mousedown', '.crm-inline-edit:not(.form) a, .crm-inline-edit:not(.form) .crm-accordion-header, .crm-inline-edit:not(.form) .collapsible-title', function(event) {
|
||||
if (event.which == 1) {
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
}
|
||||
})
|
||||
// Respond to a click (not drag, not right-click) of crm-inline-edit blocks
|
||||
.on('mousedown', '.crm-inline-edit:not(.form)', function(button) {
|
||||
if (button.which == 1) {
|
||||
clicking = this;
|
||||
setTimeout(function() {clicking = null;}, 500);
|
||||
}
|
||||
})
|
||||
.on('mouseup', '.crm-inline-edit:not(.form)', function(button) {
|
||||
if (clicking === this && button.which == 1) {
|
||||
crmFormInline($(this));
|
||||
}
|
||||
})
|
||||
// Inline edit form cancel button
|
||||
.on('click', '.crm-inline-edit :submit[name$=cancel]', function() {
|
||||
var container = $(this).closest('.crm-inline-edit.form');
|
||||
$('form', container).ajaxFormUnbind();
|
||||
$('.inline-edit-hidden-content', container).nextAll().remove();
|
||||
$('.inline-edit-hidden-content > *:first-child', container).unwrap();
|
||||
container.removeClass('form');
|
||||
$('.crm-inline-edit-container').addClass('crm-edit-ready');
|
||||
$('a.ui-notify-close', '#crm-notification-container').click();
|
||||
return false;
|
||||
})
|
||||
// Switch tabs when clicking tag link
|
||||
.on('click', '#tagLink a', function() {
|
||||
$('#tab_tag a').click();
|
||||
return false;
|
||||
})
|
||||
// make sure only one is_primary radio is checked
|
||||
.on('change', '[class$=is_primary] input', function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('[class$=is_primary] input', $(this).closest('form')).not(this).prop('checked', false);
|
||||
}
|
||||
})
|
||||
// make sure only one builk_mail radio is checked
|
||||
.on('change', '.crm-email-bulkmail input', function(){
|
||||
if ($(this).is(':checked')) {
|
||||
$('.crm-email-bulkmail input').not(this).prop('checked', false);
|
||||
}
|
||||
})
|
||||
// handle delete link within blocks
|
||||
.on('click', '.crm-delete-inline', function(e) {
|
||||
var row = $(this).closest('tr');
|
||||
var form = $(this).closest('form');
|
||||
row.hide();
|
||||
$('input', row).val('');
|
||||
//if the primary is checked for deleted block
|
||||
//unset and set first as primary
|
||||
if ($('[class$=is_primary] input:checked', row).length > 0) {
|
||||
$('[class$=is_primary] input', row).prop('checked', false);
|
||||
$('[class$=is_primary] input:first', form).prop('checked', true );
|
||||
}
|
||||
$('.add-more-inline', form).show();
|
||||
e.preventDefault();
|
||||
})
|
||||
// Delete an address
|
||||
.on('click', '.crm-inline-edit.address .delete-button', function(e) {
|
||||
var $block = $(this).closest('.crm-inline-edit.address');
|
||||
CRM.confirm({message: ts('Are you sure you want to delete this address?')})
|
||||
.on('crmConfirm:yes', function() {
|
||||
CRM.api3('address', 'delete', {id: $block.data('edit-params').aid}, true)
|
||||
.done(function(data) {
|
||||
$('.crm-inline-edit-container').addClass('crm-edit-ready');
|
||||
$block.remove();
|
||||
reloadBlock('.crm-inline-edit.address:not(.add-new)');
|
||||
});
|
||||
});
|
||||
e.preventDefault();
|
||||
})
|
||||
// add more and set focus to new row
|
||||
.on('click', '.add-more-inline', function(e) {
|
||||
var form = $(this).closest('form');
|
||||
var row = $('tr[class="hiddenElement"]:first', form);
|
||||
row.removeClass('hiddenElement');
|
||||
$('input:focus', form).blur();
|
||||
$('input:first', row).focus();
|
||||
if ($('tr[class="hiddenElement"]').length < 1) {
|
||||
$(this).hide();
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
// Trigger cancel button on esc keypress
|
||||
$(document).keydown(function(key) {
|
||||
if (key.which == 27) {
|
||||
$('.crm-inline-edit.form :submit[name$=cancel]').click();
|
||||
}
|
||||
});
|
||||
$('#crm-container')
|
||||
// Switch tabs when clicking log link
|
||||
.on('click', '#crm-record-log a.crm-log-view', function() {
|
||||
$('#tab_log a').click();
|
||||
return false;
|
||||
})
|
||||
// Handle action links in popup
|
||||
.on('click', '.crm-contact_actions-list a, .crm-contact_activities-list a', function(e) {
|
||||
$('#crm-contact-actions-list').hide();
|
||||
if ($(this).attr('href') === '#') {
|
||||
var $tab = $('#tab_' + ($(this).data('tab') || 'summary'));
|
||||
CRM.tabHeader.focus($tab);
|
||||
e.preventDefault();
|
||||
} else {
|
||||
CRM.popup.call(this, e);
|
||||
}
|
||||
})
|
||||
.on('crmPopupFormSuccess', '.crm-contact_actions-list a, .crm-contact_activities-list a', function() {
|
||||
var $tab = $('#tab_' + ($(this).data('tab') || 'summary'));
|
||||
CRM.tabHeader.resetTab($tab);
|
||||
CRM.tabHeader.focus($tab);
|
||||
});
|
||||
$(document)
|
||||
// Actions menu
|
||||
.on('click', function(e) {
|
||||
if ($(e.target).is('#crm-contact-actions-link, #crm-contact-actions-link *')) {
|
||||
$('#crm-contact-actions-list').show();
|
||||
return false;
|
||||
}
|
||||
$('#crm-contact-actions-list').hide();
|
||||
})
|
||||
.on('crmFormSuccess crmLoad', function(e, data) {
|
||||
// Update changelog tab and contact footer
|
||||
if (data && data.changeLog) {
|
||||
if (data.changeLog.count) {
|
||||
CRM.tabHeader.updateCount('#tab_log', data.changeLog.count);
|
||||
}
|
||||
if (data.changeLog.markup) {
|
||||
$("#crm-record-log").replaceWith(data.changeLog.markup);
|
||||
}
|
||||
}
|
||||
})
|
||||
.on('crmFormSuccess', function(e, data) {
|
||||
// Advanced logging... just increment the changelog tab count to avoid the overhead of reloading the data
|
||||
if (CRM.incrementChangeLogTab) {
|
||||
CRM.incrementChangeLogTab();
|
||||
}
|
||||
// Refresh changelog tab next time it is opened
|
||||
CRM.tabHeader.resetTab('#tab_log');
|
||||
// Refresh dependent blocks
|
||||
if (data && data.reloadBlocks) {
|
||||
reloadBlock(data.reloadBlocks.join(','));
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Make contact summary fit in small screens
|
||||
*/
|
||||
function onResize() {
|
||||
var contactwidth = $('#crm-container #mainTabContainer').width();
|
||||
if (contactwidth < 600) {
|
||||
$('#crm-container #mainTabContainer').addClass('narrowpage');
|
||||
$('#crm-container #mainTabContainer.narrowpage #contactTopBar td').each(function (index) {
|
||||
if (index > 1) {
|
||||
if (index % 2 === 0) {
|
||||
$(this).parent().after('<tr class="narrowadded"></tr>');
|
||||
}
|
||||
var item = $(this);
|
||||
$(this).parent().next().append(item);
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$('#crm-container #mainTabContainer.narrowpage').removeClass('narrowpage');
|
||||
$('#crm-container #mainTabContainer #contactTopBar tr.narrowadded td').each(function () {
|
||||
var nitem = $(this);
|
||||
var parent = $(this).parent();
|
||||
$(this).parent().prev().append(nitem);
|
||||
if (parent.children().size() === 0) {
|
||||
parent.remove();
|
||||
}
|
||||
});
|
||||
$('#crm-container #mainTabContainer.narrowpage #contactTopBar tr.added').detach();
|
||||
}
|
||||
var cformwidth = $('#crm-container #Contact .contact_basic_information-section').width();
|
||||
|
||||
if (cformwidth < 720) {
|
||||
$('#crm-container .contact_basic_information-section').addClass('narrowform');
|
||||
$('#crm-container .contact_basic_information-section table.form-layout-compressed td .helpicon').parent().addClass('hashelpicon');
|
||||
if (cformwidth < 480) {
|
||||
$('#crm-container .contact_basic_information-section').addClass('xnarrowform');
|
||||
}
|
||||
else {
|
||||
$('#crm-container .contact_basic_information-section.xnarrowform').removeClass('xnarrowform');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$('#crm-container .contact_basic_information-section.narrowform').removeClass('narrowform');
|
||||
$('#crm-container .contact_basic_information-section.xnarrowform').removeClass('xnarrowform');
|
||||
}
|
||||
}
|
||||
|
||||
onResize();
|
||||
$(window).resize(onResize);
|
||||
});
|
||||
})(CRM.$, CRM._);
|
|
@ -0,0 +1,339 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* Contact Summary template for new tabbed interface. Replaces Basic.tpl *}
|
||||
{if $action eq 2}
|
||||
{include file="CRM/Contact/Form/Contact.tpl"}
|
||||
{else}
|
||||
|
||||
<div class="crm-summary-contactname-block crm-inline-edit-container">
|
||||
<div class="crm-summary-block" id="contactname-block">
|
||||
{include file="CRM/Contact/Page/Inline/ContactName.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{if !$summaryPrint}
|
||||
<div class="crm-actions-ribbon">
|
||||
<ul id="actions">
|
||||
{assign var='urlParams' value="reset=1"}
|
||||
{if $searchKey}
|
||||
{assign var='urlParams' value=$urlParams|cat:"&key=$searchKey"}
|
||||
{/if}
|
||||
{if $context}
|
||||
{assign var='urlParams' value=$urlParams|cat:"&context=$context"}
|
||||
{/if}
|
||||
|
||||
{* CRM-12735 - Conditionally include the Actions and Edit buttons if contact is NOT in trash.*}
|
||||
{if !$isDeleted}
|
||||
{if call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')}
|
||||
<li class="crm-contact-activity crm-summary-block">
|
||||
{include file="CRM/Contact/Page/Inline/Actions.tpl"}
|
||||
</li>
|
||||
{/if}
|
||||
{* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. CRM_Contact_Page_View::checkUserPermission handles this and assigns $permission true as needed. *}
|
||||
{if $permission EQ 'edit'}
|
||||
<li>
|
||||
{crmButton p='civicrm/contact/add' q="$urlParams&action=update&cid=$contactId" class="edit"}
|
||||
{ts}Edit{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{* Check for permissions to provide Restore and Delete Permanently buttons for contacts that are in the trash. *}
|
||||
{if call_user_func(array('CRM_Core_Permission','check'), 'access deleted contacts') and $is_deleted}
|
||||
<li class="crm-contact-restore">
|
||||
{crmButton p='civicrm/contact/view/delete' q="reset=1&cid=$contactId&restore=1" class="delete" icon="undo"}
|
||||
{ts}Restore from Trash{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
|
||||
{if call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
|
||||
<li class="crm-contact-permanently-delete">
|
||||
{crmButton p='civicrm/contact/view/delete' q="reset=1&delete=1&cid=$contactId&skip_undelete=1" class="delete" icon="trash"}
|
||||
{ts}Delete Permanently{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{elseif call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
|
||||
<li class="crm-delete-action crm-contact-delete">
|
||||
{crmButton p='civicrm/contact/view/delete' q="&reset=1&delete=1&cid=$contactId" class="delete" icon="trash"}
|
||||
{ts}Delete Contact{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
{/if}
|
||||
|
||||
{* Previous and Next contact navigation when accessing contact summary from search results. *}
|
||||
{if $nextPrevError}
|
||||
<li class="crm-next-action">
|
||||
{help id="id-next-prev-buttons"}
|
||||
</li>
|
||||
{else}
|
||||
{if $nextContactID}
|
||||
<li class="crm-next-action">
|
||||
{crmButton p='civicrm/contact/view' q="$urlParams&cid=$nextContactID" class="view" title=$nextContactName icon="chevron-right"}
|
||||
{ts}Next{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
{/if}
|
||||
{if $prevContactID}
|
||||
<li class="crm-previous-action">
|
||||
{crmButton p='civicrm/contact/view' q="$urlParams&cid=$prevContactID" class="view" title=$prevContactName icon="chevron-left"}
|
||||
{ts}Previous{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if !empty($groupOrganizationUrl)}
|
||||
<li class="crm-contact-associated-groups">
|
||||
{crmButton href=$groupOrganizationUrl class="associated-groups" icon="cubes"}
|
||||
{ts}Associated Multi-Org Group{/ts}
|
||||
{/crmButton}
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
</div><!-- .crm-actions-ribbon -->
|
||||
{/if}
|
||||
|
||||
<div class="crm-block crm-content-block crm-contact-page crm-inline-edit-container">
|
||||
<div id="mainTabContainer">
|
||||
<ul class="crm-contact-tabs-list">
|
||||
{foreach from=$allTabs key=tabName item=tabValue}
|
||||
<li id="tab_{$tabValue.id}" class="crm-tab-button ui-corner-all crm-count-{$tabValue.count}{if isset($tabValue.class)} {$tabValue.class}{/if}">
|
||||
<a href="{$tabValue.url}" title="{$tabValue.title|escape}">
|
||||
{$tabValue.title}
|
||||
{if empty($tabValue.hideCount)}<em>{$tabValue.count}</em>{/if}
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
|
||||
<div id="contact-summary" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
|
||||
{if (isset($hookContentPlacement) and ($hookContentPlacement neq 3)) or empty($hookContentPlacement)}
|
||||
|
||||
{if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 2}
|
||||
{include file="CRM/Contact/Page/View/SummaryHook.tpl"}
|
||||
{/if}
|
||||
|
||||
<div class="contactTopBar contact_panel">
|
||||
<div class="contactCardLeft">
|
||||
{crmRegion name="contact-basic-info-left"}
|
||||
<div class="crm-summary-contactinfo-block">
|
||||
<div class="crm-summary-block" id="contactinfo-block">
|
||||
{include file="CRM/Contact/Page/Inline/ContactInfo.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
{/crmRegion}
|
||||
</div> <!-- end of left side -->
|
||||
<div class="contactCardRight">
|
||||
{crmRegion name="contact-basic-info-right"}
|
||||
{if !empty($imageURL)}
|
||||
<div id="crm-contact-thumbnail">
|
||||
{include file="CRM/Contact/Page/ContactImage.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="{if !empty($imageURL)} float-left{/if}">
|
||||
<div class="crm-clear crm-summary-block">
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label" id="tagLink">
|
||||
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contactId&selectedChild=tag"}"
|
||||
title="{ts}Edit Tags{/ts}">{ts}Tags{/ts}</a>
|
||||
</div>
|
||||
<div class="crm-content" id="tags">
|
||||
{foreach from=$contactTag item=tagName key=tagId}
|
||||
<span class="crm-tag-item" {if !empty($allTags.$tagId.color)}style="background-color: {$allTags.$tagId.color}; color: {$allTags.$tagId.color|colorContrast};"{/if} title="{$allTags.$tagId.description|escape}">
|
||||
{$tagName}
|
||||
</span>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{ts}Contact Type{/ts}</div>
|
||||
<div class="crm-content crm-contact_type_label">
|
||||
{if isset($contact_type_label)}{$contact_type_label}{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">
|
||||
{ts}Contact ID{/ts}{if !empty($userRecordUrl)} / {ts}User ID{/ts}{/if}
|
||||
</div>
|
||||
<div class="crm-content">
|
||||
<span class="crm-contact-contact_id">{$contactId}</span>
|
||||
{if !empty($userRecordUrl)}
|
||||
<span class="crm-contact-user_record_id">
|
||||
/ <a title="View user record" class="user-record-link"
|
||||
href="{$userRecordUrl}">{$userRecordId}</a>
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="crm-summary-row">
|
||||
<div class="crm-label">{ts}External ID{/ts}</div>
|
||||
<div class="crm-content crm-contact_external_identifier_label">
|
||||
{if isset($external_identifier)}{$external_identifier}{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/crmRegion}
|
||||
</div>
|
||||
<!-- end of right side -->
|
||||
</div>
|
||||
<div class="contact_details">
|
||||
<div class="contact_panel">
|
||||
<div class="contactCardLeft">
|
||||
{crmRegion name="contact-details-left"}
|
||||
<div >
|
||||
{if $showEmail}
|
||||
<div class="crm-summary-email-block crm-summary-block" id="email-block">
|
||||
{include file="CRM/Contact/Page/Inline/Email.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
{if $showWebsite}
|
||||
<div class="crm-summary-website-block crm-summary-block" id="website-block">
|
||||
{include file="CRM/Contact/Page/Inline/Website.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/crmRegion}
|
||||
</div><!-- #contactCardLeft -->
|
||||
|
||||
<div class="contactCardRight">
|
||||
{crmRegion name="contact-details-right"}
|
||||
<div>
|
||||
{if $showPhone}
|
||||
<div class="crm-summary-phone-block crm-summary-block" id="phone-block">
|
||||
{include file="CRM/Contact/Page/Inline/Phone.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
{if $showIM}
|
||||
<div class="crm-summary-im-block crm-summary-block" id="im-block">
|
||||
{include file="CRM/Contact/Page/Inline/IM.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
{if $showOpenID}
|
||||
<div class="crm-summary-openid-block crm-summary-block" id="openid-block">
|
||||
{include file="CRM/Contact/Page/Inline/OpenID.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/crmRegion}
|
||||
</div><!-- #contactCardRight -->
|
||||
|
||||
<div class="clear"></div>
|
||||
</div><!-- #contact_panel -->
|
||||
{if $showAddress}
|
||||
<div class="contact_panel">
|
||||
{crmRegion name="contact-addresses"}
|
||||
{assign var='locationIndex' value=1}
|
||||
{if $address}
|
||||
{foreach from=$address item=add key=locationIndex}
|
||||
<div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address_{$locationIndex} crm-address-block crm-summary-block">
|
||||
{include file="CRM/Contact/Page/Inline/Address.tpl"}
|
||||
</div>
|
||||
{/foreach}
|
||||
{assign var='locationIndex' value=$locationIndex+1}
|
||||
{/if}
|
||||
{* add new link *}
|
||||
{if $permission EQ 'edit'}
|
||||
{assign var='add' value=0}
|
||||
<div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address-block crm-summary-block">
|
||||
{include file="CRM/Contact/Page/Inline/Address.tpl"}
|
||||
</div>
|
||||
{/if}
|
||||
{/crmRegion}
|
||||
</div> <!-- end of contact panel -->
|
||||
{/if}
|
||||
<div class="contact_panel">
|
||||
{if $showCommunicationPreferences}
|
||||
<div class="contactCardLeft">
|
||||
{crmRegion name="contact-comm-pref"}
|
||||
<div class="crm-summary-comm-pref-block">
|
||||
<div class="crm-summary-block" id="communication-pref-block" >
|
||||
{include file="CRM/Contact/Page/Inline/CommunicationPreferences.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
{/crmRegion}
|
||||
</div> <!-- contactCardLeft -->
|
||||
{/if}
|
||||
{if $contact_type eq 'Individual' AND $showDemographics}
|
||||
<div class="contactCardRight">
|
||||
{crmRegion name="contact-demographic"}
|
||||
<div class="crm-summary-demographic-block">
|
||||
<div class="crm-summary-block" id="demographic-block">
|
||||
{include file="CRM/Contact/Page/Inline/Demographics.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
{/crmRegion}
|
||||
</div> <!-- contactCardRight -->
|
||||
{/if}
|
||||
<div class="clear"></div>
|
||||
<div class="separator"></div>
|
||||
</div> <!-- contact panel -->
|
||||
</div><!--contact_details-->
|
||||
|
||||
{if $showCustomData}
|
||||
<div id="customFields">
|
||||
<div class="contact_panel">
|
||||
<div class="contactCardLeft">
|
||||
{include file="CRM/Contact/Page/View/CustomDataView.tpl" side='1'}
|
||||
</div><!--contactCardLeft-->
|
||||
<div class="contactCardRight">
|
||||
{include file="CRM/Contact/Page/View/CustomDataView.tpl" side='0'}
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 1}
|
||||
{include file="CRM/Contact/Page/View/SummaryHook.tpl"}
|
||||
{/if}
|
||||
{else}
|
||||
{include file="CRM/Contact/Page/View/SummaryHook.tpl"}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div><!-- /.crm-content-block -->
|
||||
{/if}
|
||||
|
||||
{* CRM-10560 *}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$('.crm-inline-edit-container').crmFormContactLock({
|
||||
ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}",
|
||||
saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}",
|
||||
reloadLabel: "{/literal}{ts escape='js'}Reload Page{/ts}{literal}"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
|
@ -0,0 +1,28 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div id="hook-content" class="ui-corner-all">
|
||||
{$hookContent}
|
||||
</div>
|
|
@ -0,0 +1,28 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* call the file that is use to build the form for tags*}
|
||||
{include file="CRM/Tag/Form/Tag.tpl"}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<table class="dashboard-elements">
|
||||
{if $showGroup}
|
||||
<tr class="crm-dashboard-groups">
|
||||
<td>
|
||||
<div class="header-dark">
|
||||
{ts}Your Group(s){/ts}
|
||||
</div>
|
||||
{include file="CRM/Contact/Page/View/UserDashBoard/GroupContact.tpl"}
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
{foreach from=$dashboardElements item=element}
|
||||
<tr{if isset($element.class)} class="{$element.class}"{/if}>
|
||||
<td>
|
||||
<div class="header-dark">{$element.sectionTitle}</div>
|
||||
{include file=$element.templatePath}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
|
@ -0,0 +1,133 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div id="groupContact">
|
||||
<div class="view-content">
|
||||
{if $groupCount eq 0 }
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}You are not currently subscribed to any Groups.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $groupIn }
|
||||
<div class="form-item">
|
||||
<div>
|
||||
{strip}
|
||||
<table class="selector">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Date Added{/ts}</th>
|
||||
{if $edit}
|
||||
<th></th>
|
||||
{/if}
|
||||
</tr>
|
||||
{foreach from=$groupIn item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td><strong>{$row.title}</strong></td>
|
||||
<td>{ts 1=$row.in_method}Added (by %1){/ts}</td>
|
||||
<td>{$row.in_date|crmDate}</td>
|
||||
{if $edit}
|
||||
<td><a href="{crmURL p='civicrm/user/group' q="gcid=`$row.id`&action=delete&st=o"}" onclick ="return confirm('{ts 1=$row.title}Are you sure you want to unsubscribe from %1?{/ts}');">[ {ts}Unsubscribe{/ts} ]</a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $edit}
|
||||
{* Include 'Join a Group' form *}
|
||||
{include file="CRM/Contact/Form/GroupContact.tpl"}
|
||||
{/if}
|
||||
|
||||
{if $groupPending }
|
||||
<div class="form-item">
|
||||
<div class="label status-pending">{ts}Pending Subscriptions{/ts}</div>
|
||||
<div class="description">{ts}Your subscription to these group(s) is pending confirmation.{/ts}</div>
|
||||
<div>
|
||||
{strip}
|
||||
<table class="selector">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Date Pending{/ts}</th>
|
||||
{if $edit}
|
||||
<th></th>
|
||||
{/if}
|
||||
</tr>
|
||||
{foreach from=$groupPending item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td><strong>{$row.title}</strong></td>
|
||||
<td>{ts 1=$row.pending_method}Pending (by %1){/ts}</td>
|
||||
<td>{$row.pending_date|crmDate}</td>
|
||||
{if $edit}
|
||||
<td><a href="{crmURL p='civicrm/user/group' q="gcid=`$row.id`&action=delete&st=i"}" onclick ="return confirm('{ts 1=$row.title}Are you sure you want to confirm subscription for %1?{/ts}');">[ {ts}Confirm{/ts} ]</a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $groupOut }
|
||||
<div class="form-item">
|
||||
<div class="label status-removed">{ts}Unsubscribed Groups{/ts}</div>
|
||||
<div class="description">{ts}You are no longer subscribed to these group(s). Click Rejoin Group if you want to re-subscribe.{/ts}</div>
|
||||
<div>
|
||||
{strip}
|
||||
<table class="selector">
|
||||
<tr class="columnheader">
|
||||
<th>{ts}Group{/ts}</th>
|
||||
<th>{ts}Status{/ts}</th>
|
||||
<th>{ts}Date Added{/ts}</th>
|
||||
<th>{ts}Date Removed{/ts}</th>
|
||||
{if $edit}
|
||||
<th></th>
|
||||
{/if}
|
||||
</tr>
|
||||
{foreach from=$groupOut item=row}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
<td><strong>{$row.title}</strong></td>
|
||||
<td class="status-removed">{ts 1=$row.out_method}Removed (by %1){/ts}</td>
|
||||
<td>{$row.date_added|crmDate}</td>
|
||||
<td>{$row.out_date|crmDate}</td>
|
||||
{if $edit}
|
||||
<td><a href="{crmURL p='civicrm/user/group' q="gcid=`$row.id`&action=delete&st=i"}" onclick ="return confirm('{ts 1=$row.title}Are you sure you want to add back into %1?{/ts}');">[ {ts}Rejoin Group{/ts} ]</a></td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,51 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
<div class="crm-block crm-form-block crm-useradd-form-block">
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
<td class="label">{$form.name.label}</td><td>{$form.name.html}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{$form.cms_name.label}</td><td>{$form.cms_name.html} <a id="checkavailability" href="#" onClick="return false;">{ts}<strong>Check Availability</strong>{/ts}</a> <span id="msgbox" style="display:none"></span><br />
|
||||
<span class="description">{ts}Select a username; punctuation is not allowed except for periods, hyphens, and underscores.{/ts}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{$form.cms_pass.label}</td><td>{$form.cms_pass.html}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{$form.cms_confirm_pass.label}</td><td>{$form.cms_confirm_pass.html}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">{$form.email.label}</td><td>{$form.email.html}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
{include file="CRM/common/checkUsernameAvailable.tpl"}
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue