First commit

This commit is contained in:
Theodotos Andreou 2018-01-14 13:10:16 +00:00
commit c6e2478c40
13918 changed files with 2303184 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* This form is for displaying contact Image *}
<div class="crm-contact_image crm-contact_image-block">
{$imageURL}
</div>
{if $action eq 0 or $action eq 2}
<div class='crm-contact_image-block crm-contact_image crm-contact_image-delete'>{$deleteURL}</div>
{/if}

View file

@ -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 |
+--------------------------------------------------------------------+
*}
{htxt id="id-custom-searches-title"}
{ts}Custom Search{/ts}
{/htxt}
{htxt id="id-custom-searches"}
<p>
{ts}These are developed and contributed by members of the CiviCRM community. Consider adding any custom searches which you use often to your Search menu (from Administer > Customize Data and Screens > Navigation Menu). As new custom searches become available they can be viewed (and installed if useful) from Administer > System Settings > Manage Extensions.{/ts}
</p>
<p>{docURL page="Create a Custom-Search Extension" resource="wiki"}</p>
</p>
<p>
{ts}NOTE: Some of these searches may rely on specific site configurations - and may not work as expected on your site.{/ts}
</p>
{/htxt}

View file

@ -0,0 +1,43 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{strip}
<fieldset>
<div id="help" class="messages help">
<div class="icon info-icon"></div>&nbsp;
{ts}Custom searches are developed and contributed by members of the CiviCRM community.{/ts} {help id="id-custom-searches"}
</div>
{if $rows}
{foreach from=$rows item=customTitle key=csid}
<div class="action-link">
<a href="{crmURL p="civicrm/contact/search/custom" q="csid=`$csid`&reset=1"}" title="{ts}Use this search{/ts}">&raquo; {$customTitle}</a>
</div>
{/foreach}
{else}
{capture assign=infoTitle}{ts}There are currently no Custom Searches{/ts}{/capture}
{include file="CRM/common/info.tpl" infoType="info" infoMessage=""}
{/if}
</fieldset>
{/strip}

View file

@ -0,0 +1,43 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{if empty($hookContent)}
{include file="CRM/Contact/Page/DashBoardDashlet.tpl"}
{else}
{if $hookContentPlacement != 2 && $hookContentPlacement != 3}
{include file="CRM/Contact/Page/DashBoardDashlet.tpl"}
{/if}
{foreach from=$hookContent key=title item=content}
<fieldset><legend>{$title}</legend>
{$content}
</fieldset>
{/foreach}
{if $hookContentPlacement == 2}
{include file="CRM/Contact/Page/DashBoardDashlet.tpl"}
{/if}
{/if}

View file

@ -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 |
+--------------------------------------------------------------------+
*}
{include file="CRM/common/dashboard.tpl"}
{include file="CRM/common/openFlashChart.tpl"}
{* Alerts for critical configuration settings. *}
{$communityMessages}
<div class="crm-submit-buttons crm-dashboard-controls">
<a href="#" id="crm-dashboard-configure" class="crm-hover-button show-add">
<i class="crm-i fa-wrench"></i> {ts}Configure Your Dashboard{/ts}
</a>
<a style="float:right;" href="#" class="crm-hover-button show-refresh" style="margin-left: 6px;">
<i class="crm-i fa-refresh"></i> {ts}Refresh Dashboard Data{/ts}
</a>
</div>
<div class="clear"></div>
<div class="crm-block crm-content-block">
{* Welcome message appears when there are no active dashlets for the current user. *}
<div id="empty-message" class='hiddenElement'>
<div class="status">
<div class="font-size12pt bold">{ts}Welcome to your Home Dashboard{/ts}</div>
<div class="display-block">
{ts}Your dashboard provides a one-screen view of the data that's most important to you. Graphical or tabular data is pulled from the reports you select, and is displayed in 'dashlets' (sections of the dashboard).{/ts} {help id="id-dash_welcome" file="CRM/Contact/Page/Dashboard.hlp"}
</div>
</div>
</div>
<div id="configure-dashlet" class='hiddenElement' style="min-height: 20em;"></div>
<div id="civicrm-dashboard">
{* You can put anything you like here. jQuery.dashboard() will remove it. *}
<noscript>{ts}Javascript must be enabled in your browser in order to use the dashboard features.{/ts}</noscript>
</div>
<div class="clear"></div>
{literal}
<script type="text/javascript">
CRM.$(function($) {
$('#crm-dashboard-configure').click(function(e) {
e.preventDefault();
$(this).hide();
if ($("#empty-message").is(':visible')) {
$("#empty-message").fadeOut(400);
}
$("#civicrm-dashboard").fadeOut(400, function() {
$(".crm-dashboard-controls").hide();
$("#configure-dashlet").fadeIn(400);
});
CRM.loadPage(CRM.url('civicrm/dashlet', 'reset=1'), {target: $("#configure-dashlet")});
});
});
</script>
{/literal}
</div>

View file

@ -0,0 +1,69 @@
{*
+--------------------------------------------------------------------+
| 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-dash_welcome-title"}
{ts}Dashboard{/ts}
{/htxt}
{htxt id="id-dash_welcome"}
<p>
{ts}To include a dashlet report click "Configure Dashboard" and drag the desired dashlet from the "Available Dashlets" block to one of the columns (use the right column for a better fit).{/ts}
</p>
<p>
{ts}To add reports to your dashboard:{/ts}
<ul>
<li>{ts}Navigate to a report instance and verify the report filters and display type (Tabular, Bar or Pie Chart). OR create a new report instance from the Reports menu » Create Reports from Templates.{/ts}</li>
<li>{ts}Expand the 'Report Settings' section, and click 'Include Report on Dashboard'.{/ts}</li>
<li>{ts}Click 'Update Report'.{/ts}</li>
<li>{ts}Repeat for each report you want to include on your dashboard.{/ts}</li>
<li>{ts}Navigate back to the 'Home' dashboard and click 'Configure Dashboard' again.{/ts}</li>
<li>{ts}You can now drag the reports onto the right or left columns and click 'Done' to save your layout.{/ts}</li>
</ul>
</p>
{/htxt}
{htxt id="id-dash_configure-title"}
{ts}Configuration{/ts}
{/htxt}
{htxt id="id-dash_configure"}
<p>
{ts}To include a dashlet report drag it from the "Available Dashlets" block to one of the two columns (use the right column for a better fit).{/ts}
</p>
<p>
{ts}To add reports to your dashboard:{/ts}
<ul>
<li>{ts}Navigate to a report instance and verify the report filters and display type (Tabular, Bar or Pie Chart). OR create a new report instance from the Reports menu &raquo; Create Reports from Templates.{/ts}</li>
<li>{ts}Expand the 'Report Settings' section, and click 'Include Report on Dashboard'.{/ts}</li>
<li>{ts}Click 'Update Report'.{/ts}</li>
<li>{ts}Repeat for each report your want to include on your dashboard.{/ts}</li>
<li>{ts}Navigate back to the 'Home' dashboard and click 'Configure Dashboard' again.{/ts}</li>
<li>{ts}You can now drag the reports onto the right or left columns and click 'Done' to save your layout.{/ts}</li>
</ul>
</p>
{if $params.admin}
<p>
{ts}If you want to remove dashlets from the set of 'Available Dashlets' you can click the 'x' in the right corner of any dashlet. This will also remove the dashlet from any users' dashboards that currently include it. You can make a dashlet available again by checking the 'Available for Dashboard' box in the Report Settings of the associated report instance.{/ts}
</p>
{/if}
{/htxt}

View file

@ -0,0 +1,131 @@
{*
+--------------------------------------------------------------------+
| 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-submit-buttons">{crmButton p="civicrm/dashboard" q="reset=1" icon="check"}{ts}Done{/ts}{/crmButton}</div>
<div id="help" style="padding: 1em;">
{ts}Available dashboard elements - dashlets - are displayed in the dark gray top bar. Drag and drop dashlets onto the left or right columns below to add them to your dashboard. Changes are automatically saved. Click 'Done' to return to the normal dashboard view.{/ts}
{help id="id-dash_configure" file="CRM/Contact/Page/Dashboard.hlp" admin=$admin}
</div><br/>
<div class="dashlets-header">{ts}Available Dashlets{/ts}</div>
<div id="available-dashlets" class="dash-column">
{foreach from=$availableDashlets item=row key=dashID}
<div class="portlet">
<div class="portlet-header" id="{$dashID}">{$row.label}{if $admin and !$row.is_reserved}&nbsp;<a class="crm-i fa-times delete-dashlet"></a>{/if}</div>
</div>
{/foreach}
</div>
<br/>
<div class="clear"></div>
<div id="dashlets-header-col-0" class="dashlets-header">{ts}Left Column{/ts}</div>
<div id="dashlets-header-col-1" class="dashlets-header">{ts}Right Column{/ts}</div>
<div id="existing-dashlets-col-0" class="dash-column">
{foreach from=$contactDashlets.0 item=row key=dashID}
<div class="portlet">
<div class="portlet-header" id="{$dashID}">{$row.label}{if $admin and !$row.is_reserved}&nbsp;<a class="crm-i fa-times delete-dashlet"></a>{/if}</div>
</div>
{/foreach}
</div>
<div id="existing-dashlets-col-1" class="dash-column">
{foreach from=$contactDashlets.1 item=row key=dashID}
<div class="portlet">
<div class="portlet-header" id="{$dashID}">{$row.label}{if $admin and !$row.is_reserved}&nbsp;<a class="crm-i fa-times delete-dashlet"></a>{/if}</div>
</div>
{/foreach}
</div>
<div class="clear"></div>
{literal}
<script type="text/javascript">
CRM.$(function($) {
var currentReSortEvent;
$(".dash-column").sortable({
connectWith: '.dash-column',
update: saveSorting
});
$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix ui-corner-all")
.find(".portlet-header")
.addClass("ui-widget-header ui-corner-all")
.end()
.find(".portlet-content");
$(".dash-column").disableSelection();
function saveSorting(e, ui) {
// this is to prevent double post call
if (!currentReSortEvent || e.originalEvent != currentReSortEvent) {
currentReSortEvent = e.originalEvent;
// Build a list of params to post to the server.
var params = {};
// post each columns
dashletColumns = Array();
// build post params
$('div[id^=existing-dashlets-col-]').each( function( i ) {
$(this).find('.portlet-header').each( function( j ) {
var elementID = this.id;
var idState = elementID.split('-');
params['columns[' + i + '][' + idState[0] + ']'] = idState[1];
});
});
// post to server
var postUrl = {/literal}"{crmURL p='civicrm/ajax/dashboard' h=0 }"{literal};
params['op'] = 'save_columns';
params['key'] = {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal};
CRM.status({}, $.post(postUrl, params));
}
}
$('.delete-dashlet').click( function( ) {
var $dashlet = $(this).closest('.portlet-header');
CRM.confirm({
title: {/literal}'{ts escape="js"}Remove Permanently?{/ts}'{literal},
message: {/literal}'{ts escape="js"}Do you want to remove this dashlet as an "Available Dashlet", AND delete it from all user dashboards?{/ts}'{literal}
})
.on('crmConfirm:yes', function() {
var dashletID = $dashlet.attr('id');
var idState = dashletID.split('-');
// Build a list of params to post to the server.
var params = {dashlet_id: idState[0]};
// delete dashlet
var postUrl = {/literal}"{crmURL p='civicrm/ajax/dashboard' h=0 }"{literal};
params['op'] = 'delete_dashlet';
params['key'] = {/literal}"{crmKey name='civicrm/ajax/dashboard'}"{literal};
CRM.status({}, $.post(postUrl, params));
$dashlet.parent().fadeOut('fast', function() {
$(this).remove();
});
});
});
});
</script>
{/literal}

View file

@ -0,0 +1,81 @@
{*
+--------------------------------------------------------------------+
| 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-accordion-header">
{ts}Filter Contacts{/ts}
</div>
<div class="crm-accordion-body">
<table class="no-border form-layout-compressed" id="searchOptions" style="width:100%;">
<tr>
<td class="crm-contact-form-block-contact1">
<label for="contact1">{ts}Contact 1{/ts}</label><br />
<input type="text" placeholder="Search Contact1" search-column="0" />
</td>
<td class="crm-contact-form-block-contact2">
<label for="contact2">{ts}Contact 2{/ts}</label><br />
<input type="text" placeholder="Search Contact2" search-column="1" />
</td>
</tr>
</table>
</div>
<table id="dedupeExceptions" class="display crm-sortable" data-searching='true' data=filter='false'>
<thead>
<tr class="columnheader">
<th>{ts}Contact 1{/ts}</th>
<th>{ts}Contact 2 (Duplicate){/ts}</th>
<th data-orderable="false"></th>
</tr>
</thead>
<tbody>
{foreach from=$dedupeExceptions item=exception key=id}
<tr id="dupeRow_{$id}" class="{cycle values="odd-row,even-row"}">
<td><a href ={crmURL p='civicrm/contact/view' q="reset=1&cid=`$exception.main.id`"}>{$exception.main.name}</a></td>
<td><a href ={crmURL p='civicrm/contact/view' q="reset=1&cid=`$exception.other.id`"}>{$exception.other.name}</a></td>
<td><a id='duplicateContacts' href="#" title={ts}Remove Exception{/ts} onClick="processDupes( {$exception.main.id}, {$exception.other.id}, 'nondupe-dupe', 'dedupe-exception' );return false;">&raquo; {ts}Remove Exception{/ts}</a></td>
</tr>
{/foreach}
</tbody>
</table>
<div class="clear"><br /></div>
<div class="action-link">
{crmButton p="civicrm/contact/deduperules" q="reset=1" icon="times"}{ts}Done{/ts}{/crmButton}
</div>
{* process the dupe contacts *}
{include file="CRM/common/dedupe.tpl"}
{literal}
<script type="text/javascript">
(function($) {
var table = CRM.$('table#dedupeExceptions').DataTable();
// apply the search
$('#searchOptions input').on( 'keyup change', function () {
table
.column($(this).attr('search-column'))
.search(this.value)
.draw();
});
})(CRM.$);
</script>
{/literal}

View file

@ -0,0 +1,343 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{if $action eq 2 || $action eq 16}
<div class="form-item">
<div class="crm-accordion-wrapper crm-search_filters-accordion">
<div class="crm-accordion-header">
{ts}Filter Contacts{/ts}</a>
</div><!-- /.crm-accordion-header -->
<div class="crm-accordion-body">
<table class="no-border form-layout-compressed" id="searchOptions" style="width:100%;">
<tr>
<td class="crm-contact-form-block-contact1">
<label for="contact1">{ts}Contact 1{/ts}</label><br />
<input type="text" placeholder="Search Contact1" search-column="2" />
</td>
<td class="crm-contact-form-block-contact2">
<label for="contact2">{ts}Contact 2{/ts}</label><br />
<input type="text" placeholder="Search Contact2" search-column="4" />
</td>
<td class="crm-contact-form-block-email1">
<label for="email1">{ts}Email 1{/ts}</label><br />
<input type="text" placeholder="Search Email1" search-column="5" />
</td>
<td class="crm-contact-form-block-email2">
<label for="email2">{ts}Email 2{/ts}</label><br />
<input type="text" placeholder="Search Email2" search-column="6" />
</td>
</tr>
<tr>
<td class="crm-contact-form-block-street-address1">
<label for="street-adddress1">{ts}Street Address 1{/ts}</label><br />
<input type="text" placeholder="Search Street Address1" search-column="7" />
</td>
<td class="crm-contact-form-block-street-address2">
<label for="street-adddress2">{ts}Street Address 2{/ts}</label><br />
<input type="text" placeholder="Search Street Address2" search-column="8" />
</td>
<td class="crm-contact-form-block-postcode1">
<label for="postcode1">{ts}Postcode 1{/ts}</label><br />
<input type="text" placeholder="Search Postcode1" search-column="9" />
</td>
<td class="crm-contact-form-block-postcode2">
<label for="postcode2">{ts}Postcode 2{/ts}</label><br />
<input type="text" placeholder="Search Postcode2" search-column="10" />
</td>
</tr>
</table>
</div><!-- /.crm-accordion-body -->
</div><!-- /.crm-accordion-wrapper -->
<div>
Show / Hide columns:
<input type='checkbox' id ='steet-address' class='toggle-vis' data-column-main="7" data-column-dupe="8" >
<label for="steet-address">{ts}Street Address{/ts}&nbsp;</label>
<input type='checkbox' id ='post-code' class='toggle-vis' data-column-main="9" data-column-dupe="10" >
<label for="post-code">{ts}Post Code{/ts}&nbsp;</label>
<input type='checkbox' id ='conflicts' class='toggle-vis' data-column-main="11" >
<label for="conflicts">{ts}Conflicts{/ts}&nbsp; </label>
<input type='checkbox' id ='threshold' class='toggle-vis' data-column-main="12" >
<label for="threshold">{ts}Threshold{/ts}&nbsp;</label>
</div><br/>
<span id="dupePairs_length_selection">
<input type='checkbox' id ='crm-dedupe-display-selection' name="display-selection">
<label for="display-selection">{ts}Within Selections{/ts}&nbsp;</label>
</span>
<table id="dupePairs"
class="nestedActivitySelector crm-ajax-table"
cellspacing="0"
width="100%"
data-page-length="10",
data-searching='true',
data-dom='flrtip',
data-order='[]',
data-column-defs='{literal}[{"targets": [0,1,3,13], "orderable":false}, {"targets": [7,8,9,10,11,12], "visible":false}]{/literal}'>
<thead>
<tr class="columnheader">
<th data-data="is_selected_input" class="crm-dedupe-selection"><input type="checkbox" value="0" name="pnid_all" class="crm-dedupe-select-all"></th>
<th data-data="dst_image" class="crm-empty">&nbsp;</th>
<th data-data="dst" class="crm-contact">{ts}Contact{/ts} 1</th>
<th data-data="src_image" class="crm-empty">&nbsp;</th>
<th data-data="src" class="crm-contact-duplicate">{ts}Contact{/ts} 2 ({ts}Duplicate{/ts})</th>
<th data-data="dst_email" class="crm-contact">{ts}Email{/ts} 1</th>
<th data-data="src_email" class="crm-contact-duplicate">{ts}Email{/ts} 2 ({ts}Duplicate{/ts})</th>
<th data-data="dst_street" class="crm-contact">{ts}Street Address{/ts} 1</th>
<th data-data="src_street" class="crm-contact-duplicate">{ts}Street Address{/ts} 2 ({ts}Duplicate{/ts})</th>
<th data-data="dst_postcode" class="crm-contact">{ts}Postcode{/ts} 1</th>
<th data-data="src_postcode" class="crm-contact-duplicate">{ts}Postcode{/ts} 2 ({ts}Duplicate{/ts})</th>
<th data-data="conflicts" class="crm-contact-conflicts">{ts}Conflicts{/ts}</th>
<th data-data="weight" class="crm-threshold">{ts}Threshold{/ts}</th>
<th data-data="actions" class="crm-empty">&nbsp;</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
{if $context eq 'search'}
{crmButton href=$backURL icon="times"}{ts}Done{/ts}{/crmButton}
{elseif $context eq 'conflicts'}
{if call_user_func(array('CRM_Core_Permission','check'), 'force merge duplicate contacts')}
{capture assign=backURL}{crmURL p="civicrm/contact/dedupemerge" q="`$urlQuery`&action=map&mode=aggressive" a=1}{/capture}
<a href="{$backURL}" title="{ts}Force Merge Selected Duplicates{/ts}" onclick="return confirm('{ts escape="js"}This will run the batch merge process on the selected duplicates. The operation will run in force merge mode - all selected duplicates will be merged into main contacts even in case of any conflicts. Click OK to proceed if you are sure you wish to run this operation.{/ts}');" class="button"><span><i class="crm-i fa-bolt"></i> {ts}Force Merge Selected Duplicates{/ts}</span></a>
{capture assign=backURL}{crmURL p="civicrm/contact/dedupemerge" q="`$urlQuery`&action=map" a=1}{/capture}
<a href="{$backURL}" title="{ts}Safe Merge Selected Duplicates{/ts}" onclick="return confirm('{ts escape="js"}This will run the batch merge process on the selected duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation.{/ts}');" class="button"><span><i class="crm-i fa-compress"></i> {ts}Safe Merge Selected Duplicates{/ts}</span></a>
{/if}
{capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="`$urlQuery`&action=update" a=1}{/capture}
<a href="{$backURL}" title="{ts}List All Duplicates{/ts}" class="button"><span><i class="crm-i fa-refresh"></i> {ts}List All Duplicates{/ts}</span></a>
{else}
{capture assign=backURL}{crmURL p="civicrm/contact/dedupefind" q="`$urlQuery`&action=renew" a=1}{/capture}
<a href="{$backURL}" title="{ts}Refresh List of Duplicates{/ts}" onclick="return confirm('{ts escape="js"}This will refresh the duplicates list. Click OK to proceed.{/ts}');" class="button">
<span><i class="crm-i fa-refresh"></i> {ts}Refresh Duplicates{/ts}</span>
</a>
{capture assign=backURL}{crmURL p="civicrm/contact/dedupemerge" q="`$urlQuery`&action=map" a=1}{/capture}
<a href="{$backURL}" title="{ts}Batch Merge Duplicate Contacts{/ts}" onclick="return confirm('{ts escape="js"}This will run the batch merge process on the selected duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation.{/ts}');" class="button"><span><i class="crm-i fa-compress"></i> {ts}Batch Merge Selected Duplicates{/ts}</span></a>
{capture assign=backURL}{crmURL p="civicrm/contact/dedupemerge" q=$urlQuery a=1}{/capture}
<a href="{$backURL}" title="{ts}Batch Merge Duplicate Contacts{/ts}" onclick="return confirm('{ts escape="js"}This will run the batch merge process on the listed duplicates. The operation will run in safe mode - only records with no direct data conflicts will be merged. Click OK to proceed if you are sure you wish to run this operation.{/ts}');" class="button"><span><i class="crm-i fa-compress"></i> {ts}Batch Merge All Duplicates{/ts}</span></a>
<a href='#' title="{ts}Flip Selected Duplicates{/ts}" class="crm-dedupe-flip-selections button"><span><i class="crm-i fa-exchange"></i> {ts}Flip Selected Duplicates{/ts}</span></a>
{capture assign=backURL}{crmURL p="civicrm/contact/deduperules" q="reset=1" a=1}{/capture}
<a href="{$backURL}" class="button crm-button-type-cancel">
<span><i class="crm-i fa-times"></i> {ts}Done{/ts}</span>
</a>
{/if}
<div style="clear: both;"></div>
{else}
{include file="CRM/Contact/Form/DedupeFind.tpl"}
{/if}
{* process the dupe contacts *}
{include file='CRM/common/dedupe.tpl'}
{literal}
<script type="text/javascript">
(function($) {
CRM.$('table#dupePairs').data({
"ajax": {
"url": {/literal}'{$sourceUrl}'{literal}
},
"retrieve": true,
"processing": true,
"serverSide": true,
rowCallback: function (row, data) {
// Set the checked state of the checkbox in the table
$('input.crm-dedupe-select', row).prop('checked', data.is_selected == 1);
if (data.is_selected == 1) {
$(row).toggleClass('crm-row-selected');
}
// for action column at the last, set nowrap
$('td:last', row).attr('nowrap','nowrap');
// for conflicts column
var col = CRM.$('table#dupePairs thead th.crm-contact-conflicts').index();
$('td:eq(' + col + ')', row).attr('nowrap','nowrap');
}
});
$(function($) {
$('.button').click(function() {
// no unsaved changes confirmation dialogs
$('[data-warn-changes=true]').attr('data-warn-changes', 'false');
});
var sourceUrl = {/literal}'{$sourceUrl}'{literal};
var context = {/literal}'{$context}'{literal};
// redraw datatable if searching within selected records
$('#crm-dedupe-display-selection').on('click', function(){
reloadUrl = sourceUrl;
if($(this).prop('checked')){
reloadUrl = sourceUrl+'&selected=1';
}
CRM.$('table#dupePairs').DataTable().ajax.url(reloadUrl).draw();
});
$('#dupePairs_length_selection').appendTo('#dupePairs_length');
// apply selected class on click of a row
$('#dupePairs tbody').on('click', 'tr', function(e) {
$(this).toggleClass('crm-row-selected');
$('input.crm-dedupe-select', this).prop('checked', $(this).hasClass('crm-row-selected'));
var ele = $('input.crm-dedupe-select', this);
toggleDedupeSelect(ele, 0);
});
// when select-all checkbox is checked
$('#dupePairs thead tr .crm-dedupe-selection').on('click', function() {
var checked = $('.crm-dedupe-select-all').prop('checked');
if (checked) {
$("#dupePairs tbody tr input[type='checkbox']").prop('checked', true);
$("#dupePairs tbody tr").addClass('crm-row-selected');
}
else{
$("#dupePairs tbody tr input[type='checkbox']").prop('checked', false);
$("#dupePairs tbody tr").removeClass('crm-row-selected');
}
var ele = $('#dupePairs tbody tr');
toggleDedupeSelect(ele, 1);
});
// inline search boxes placed in tfoot
$('#dupePairsColFilters thead th').each( function () {
var title = $('#dupePairs thead th').eq($(this).index()).text();
if (title.length > 1) {
$(this).html( '<input type="text" placeholder="Search '+title+'" />' );
}
});
// apply the search
$('#searchOptions input').on( 'keyup change', function () {
$('table#dupePairs').DataTable()
.column($(this).attr('search-column'))
.search(this.value)
.draw();
});
// show / hide columns
$('input.toggle-vis').on('click', function (e) {
var column = $('table#dupePairs').DataTable().column( $(this).attr('data-column-main') );
column.visible( ! column.visible() );
// nowrap to conflicts column is applied only during initial rendering
// for show / hide clicks we need to set it explicitly
var col = CRM.$('table#dupePairs thead th.crm-contact-conflicts').index() + 1;
if (col > 0) {
CRM.$('table#dupePairs tbody tr td:nth-child(' + col + ')').attr('nowrap','nowrap');
}
if ($(this).attr('data-column-dupe')) {
column = $('table#dupePairs').DataTable().column( $(this).attr('data-column-dupe') );
column.visible( ! column.visible() );
}
});
// keep the conflicts checkbox checked when context is "conflicts"
if(context == 'conflicts') {
$('#conflicts').attr('checked', true);
var column = $('table#dupePairs').DataTable().column( $('#conflicts').attr('data-column-main') );
column.visible( ! column.visible() );
}
// on click of flip link of a row
$('#dupePairs tbody').on('click', 'tr .crm-dedupe-flip', function(e) {
e.stopPropagation();
var $el = $(this);
var $elTr = $(this).closest('tr');
var postUrl = {/literal}"{crmURL p='civicrm/ajax/flipDupePairs' h=0 q='snippet=4'}"{literal};
var request = $.post(postUrl, {pnid : $el.data('pnid')});
request.done(function(dt) {
var mapper = {1:3, 2:4, 5:6, 7:8, 9:10}
var idx = $('table#dupePairs').DataTable().row($elTr).index();
$.each(mapper, function(key, val) {
var v1 = $('table#dupePairs').DataTable().cell(idx, key).data();
var v2 = $('table#dupePairs').DataTable().cell(idx, val).data();
$('table#dupePairs').DataTable().cell(idx, key).data(v2);
$('table#dupePairs').DataTable().cell(idx, val).data(v1);
});
// keep the checkbox checked if needed
$('input.crm-dedupe-select', $elTr).prop('checked', $elTr.hasClass('crm-row-selected'));
});
});
$(".crm-dedupe-flip-selections").on('click', function(e) {
var ids = [];
$('.crm-row-selected').each(function() {
var ele = CRM.$('input.crm-dedupe-select', this);
ids.push(CRM.$(ele).attr('name').substr(5));
});
if (ids.length > 0) {
var dataUrl = {/literal}"{crmURL p='civicrm/ajax/flipDupePairs' h=0 q='snippet=4'}"{literal};
CRM.$.post(dataUrl, {pnid: ids}, function (response) {
var mapper = {1:3, 2:4, 5:6, 7:8, 9:10}
$('.crm-row-selected').each(function() {
var idx = $('table#dupePairs').DataTable().row(this).index();
$.each(mapper, function(key, val) {
var v1 = $('table#dupePairs').DataTable().cell(idx, key).data();
var v2 = $('table#dupePairs').DataTable().cell(idx, val).data();
$('table#dupePairs').DataTable().cell(idx, key).data(v2);
$('table#dupePairs').DataTable().cell(idx, val).data(v1);
});
// keep the checkbox checked if needed
$('input.crm-dedupe-select', this).prop('checked', $(this).hasClass('crm-row-selected'));
});
}, 'json');
}
});
});
})(CRM.$);
function toggleDedupeSelect(element, isMultiple) {
if (!isMultiple) {
var is_selected = CRM.$(element).prop('checked') ? 1: 0;
var id = CRM.$(element).prop('name').substr(5);
}
else {
var id = [];
CRM.$(element).each(function() {
var pnName = CRM.$('input.crm-dedupe-select', this).prop('name');
if (pnName !== undefined) {
id.push(pnName.substr(5));
}
});
var is_selected = CRM.$('.crm-dedupe-select-all').prop('checked') ? 1 : 0;
}
var dataUrl = {/literal}"{crmURL p='civicrm/ajax/toggleDedupeSelect' h=0 q='snippet=4'}"{literal};
var rgid = {/literal}"{$rgid}"{literal};
var gid = {/literal}"{$gid}"{literal};
rgid = rgid.length > 0 ? rgid : 0;
gid = gid.length > 0 ? gid : 0;
CRM.$.post(dataUrl, {pnid: id, rgid: rgid, gid: gid, is_selected: is_selected}, function (data) {
// nothing to do for now
}, 'json');
}
</script>
{/literal}

View file

@ -0,0 +1,25 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}

View file

@ -0,0 +1,58 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{capture assign=docLink}{docURL page="user/common-workflows/deduping-and-merging"}{/capture}
{htxt id="id-dedupe-intro-title"}
{ts}Duplicate Contacts{/ts}
{/htxt}
{htxt id="id-dedupe-intro"}
<p>{ts}Manage the rules used to identify potentially duplicate contact records. Scan for duplicates using a selected rule and merge duplicate contact data as needed. Click <strong>Edit Rule</strong> to review or modify the rules for each type of contact. You will generally want to maintain both 'Supervised' and 'Unsupervised' rules for each contact type.{/ts}</p>
<p>{ts}The 'Unsupervised' rule for each contact type is automatically used when new contacts are created through online registrations including Events, Membership, Contributions and Profile pages. They are also selected by default when you Import contacts. They are generally configured with a narrow definition of what constitutes a duplicate.{/ts}</p>
<p>{ts}The 'Supervised' rule for each contact type is automatically used to check for possible duplicates when contacts are added or edited via the user interface. Supervised Rules should be configured with a broader definition of what constitutes a duplicate.{/ts}</p>
<p>{ts}You can configure any number of additional 'General' rules to provide other criteria to scan for possible duplicates. Click <strong>Use Rule</strong> to start a scan.{/ts}</p>
<p>{$docLink}</p>
{/htxt}
{htxt id="id-rules-title"}
{ts}Duplicate Rules{/ts}
{/htxt}
{htxt id="id-rules"}
<p>{ts}Configure up to five fields to evaluate when searching for 'suspected' duplicate contact records. For each field, set a numeric <strong>Weight</strong> which determines the relative importance of a match on that field.{/ts}</p>
<p>{ts}You can also set a <strong>Length</strong> value which determines how many characters in the field should be compared.{/ts}</p>
<p>{ts}EXAMPLE: If you set a length of 8 on 'Street Address', then '101 Delaplane Ave.' would match '101 Delaplain St.' because the first 8 characters are the same. If Length is left blank, then the comparison is done on the entire field value.{/ts}</p>
<p>{ts}The 'Unsupervised' rule for each contact type is automatically used when new contacts are created through online registrations including Events, Membership, Contributions and Profile pages. They are also selected by default when you Import contacts. They are generally configured with a narrow definition of what constitutes a duplicate.{/ts}</p>
<p>{ts}The 'Supervised' rule for each contact type is automatically used to check for possible duplicates when contacts are added or edited via the user interface. Supervised Rules should be configured with a broader definition of what constitutes a duplicate.{/ts}</p>
<p>{ts}You can configure any number of additional 'General' rules to provide other criteria to scan for possible duplicates.{/ts}</p>
<p>{$docLink}</p>
{/htxt}
{htxt id="id-rule-used-title"}
{ts}Rule Usage{/ts}
{/htxt}
{htxt id="id-rule-used"}
<p>{ts}The 'Unsupervised' rule for each contact type is automatically used when new contacts are created through online registrations including Events, Membership, Contributions and Profile pages. They are also selected by default when you Import contacts. They are generally configured with a narrow definition of what constitutes a duplicate.{/ts}</p>
<p>{ts}The 'Supervised' rule for each contact type is automatically used to check for possible duplicates when contacts are added or edited via the user interface. Supervised Rules should be configured with a broader definition of what constitutes a duplicate.{/ts}</p>
<p>{ts}You can only configure one 'Unsupervised' and one 'Supervised' rule for each contact type, but you can configure any number of additional 'General' rules to provide other criteria to scan for possible duplicates.{/ts}</p>
{/htxt}

View file

@ -0,0 +1,70 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{if $action eq 1 or $action eq 2}
{include file="CRM/Contact/Form/DedupeRules.tpl"}
{elseif $action eq 4}
{include file="CRM/Contact/Form/DedupeFind.tpl"}
{else}
<div class="help">
{ts}Manage the rules used to identify potentially duplicate contact records. Scan for duplicates using a selected rule and merge duplicate contact data as needed.{/ts} {help id="id-dedupe-intro"}
</div>
{if $hasperm_administer_dedupe_rules}
<div class="action-link">
<a href="{crmURL p='civicrm/dedupe/exception' q='reset=1'}" class="button"><span>{ts}View the Dedupe Exceptions{/ts}</span></a>
</div>
{/if}
{if $brows}
{include file="CRM/common/jsortable.tpl"}
{foreach from=$brows key=contactType item=rows}
<div id="browseValues_{$contactType}">
<div>
{strip}
<table id="options_{$contactType}" class="display mergecontact">
<thead>
<tr>
<th>{ts 1=$contactType}%1 Rules{/ts}</th>
<th>{ts}Usage{/ts}</th>
<th></th>
</tr>
</thead>
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"}">
<td>{$row.title}</td>
<td>{$row.used_display}</td>
<td>{$row.action|replace:'xx':$row.id}</td>
</tr>
{/foreach}
</table>
{/strip}
</div>
<div style="float:right">
{crmButton q="action=add&contact_type=$contactType&reset=1" icon="plus-circle"}{ts 1=$contactType}Add Rule for %1s{/ts}{/crmButton}
</div>
</div>
{/foreach}
{/if}
{/if}

View file

@ -0,0 +1,68 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* this template is used for the dropdown menu of the "Actions" button on contacts. *}
<div id="crm-contact-actions-wrapper" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Page_Inline_Actions"{rdelim}'>
{crmButton id="crm-contact-actions-link" href="#" icon="bars"}
{ts}Actions{/ts}
{/crmButton}
<div class="ac_results" id="crm-contact-actions-list">
<div class="crm-contact-actions-list-inner">
<div class="crm-contact_activities-list">
{include file="CRM/Activity/Form/ActivityLinks.tpl" as_select=false}
</div>
<div class="crm-contact_print-list">
<ul class="contact-print">
{foreach from=$actionsMenuList.otherActions item='row'}
{if !empty($row.href) or !empty($row.tab)}
<li class="crm-contact-{$row.ref}">
<a href="{if !empty($row.href)}{$row.href}{if strstr($row.href, '?')}&cid={$contactId}{/if}{else}#{/if}" title="{$row.title|escape}" data-tab="{$row.tab}" {if !empty($row.class)}class="{$row.class}"{/if}>
<span><i {if !empty($row.icon)}class="{$row.icon}"{/if}></i> {$row.title}</span>
</a>
</li>
{/if}
{/foreach}
</ul>
</div>
<div class="crm-contact_actions-list">
<ul class="contact-actions">
{foreach from=$actionsMenuList.moreActions item='row'}
{if !empty($row.href) or !empty($row.tab)}
<li class="crm-action-{$row.ref}">
<a href="{if !empty($row.href)}{$row.href}{if strstr($row.href, '?')}&cid={$contactId}{/if}{else}#{/if}" title="{$row.title|escape}" data-tab="{$row.tab}" {if !empty($row.class)}class="{$row.class}"{/if}>{$row.title}</a>
</li>
{/if}
{/foreach}
</ul>
</div>
<div class="clear"></div>
</div>
</div>
</div>
{literal}
{/literal}

View file

@ -0,0 +1,84 @@
{*
+--------------------------------------------------------------------+
| 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 a single address block*}
<div id="address-block-{$locationIndex}" class="address {if $add}crm-address_type_{$add.location_type}{else}add-new{/if}{if $permission EQ 'edit'} crm-inline-edit" data-dependent-fields='["#crm-contactinfo-content", ".crm-inline-edit.address:not(.add-new)"]' data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Address", "locno": "{$locationIndex}", "aid": "{if $add}{$add.id}{else}0{/if}"{rdelim}' data-location-type-id="{if $add}{$add.location_type_id}{else}0{/if}{/if}">
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{if $add}{ts}Edit address{/ts}{else}{ts}Add address{/ts}{/if}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {if $add}{ts}Edit address{/ts}{else}{ts}Add address{/ts}{/if}
</div>
{/if}
{if $add }
<div class="crm-summary-row {if $add.is_primary eq 1} primary{/if}">
<div class="crm-label">
{ts 1=$add.location_type}%1 Address{/ts}
{if $privacy.do_not_mail}<span class="icon privacy-flag do-not-mail" title="{ts}Privacy flag: Do Not Mail{/ts}"></span>{/if}
{if $config->mapProvider AND
!empty($add.geo_code_1) AND
is_numeric($add.geo_code_1) AND
!empty($add.geo_code_2) AND
is_numeric($add.geo_code_2)
}
<br /><a href="{crmURL p='civicrm/contact/map' q="reset=1&cid=`$contactId`&lid=`$add.location_type_id`"}" title="{ts 1=`$add.location_type`}Map %1 Address{/ts}"><span class="geotag">{ts}Map{/ts}</span></a>
{/if}
</div>
<div class="crm-content">
{if !empty($sharedAddresses.$locationIndex.shared_address_display.name)}
<strong>{ts 1=$sharedAddresses.$locationIndex.shared_address_display.name}Address belongs to %1{/ts}</strong><br />
{/if}
{$add.display|nl2br}
</div>
</div>
<!-- add custom data -->
{foreach from=$add.custom item=customGroup key=cgId} {* start of outer foreach *}
{assign var="isAddressCustomPresent" value=1}
{foreach from=$customGroup item=customValue key=cvId}
<div id="address_custom_{$cgId}_{$locationIndex}"
class="crm-collapsible crm-address-custom-{$cgId}-{$locationIndex}-accordion
{if $customValue.collapse_display}collapsed{/if}">
<div class="collapsible-title">
{$customValue.title}
</div>
<div class="crm-summary-block">
{foreach from=$customValue.fields item=customField key=cfId}
<div class="crm-summary-row">
<div class="crm-label">
{$customField.field_title}
</div>
<div class="crm-content">
{$customField.field_value}
</div>
</div>
{/foreach}
</div>
</div>
{/foreach}
{/foreach} {* end of outer custom group foreach *}
<!-- end custom data -->
{/if}
</div>
</div>

View file

@ -0,0 +1,93 @@
{*
+--------------------------------------------------------------------+
| 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 building communication preference block*}
<div id="crm-communication-pref-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_CommunicationPreferences"{rdelim}' data-dependent-fields='["#crm-phone-content", "#crm-email-content", ".address.crm-inline-edit:not(.add-new)", "#crm-contact-actions-wrapper"]'{/if}>
<div class="crm-clear crm-inline-block-content"{if $permission EQ 'edit'} title="{ts}Edit communication preferences{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {ts}Edit communication preferences{/ts}
</div>
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Privacy{/ts}</div>
<div class="crm-content crm-contact-privacy_values font-red upper">
{foreach from=$privacy item=priv key=index}
{if $priv}{$privacy_values.$index}<br/>{/if}
{/foreach}
{if $is_opt_out}{ts}No Bulk Emails (User Opt Out){/ts}{/if}
</div>
</div>
<div class="crm-summary-row">
<div class="crm-label">{ts}Preferred Method(s){/ts}</div>
<div class="crm-content crm-contact-preferred_communication_method_display">
{$preferred_communication_method_display}
</div>
</div>
{if $preferred_language}
<div class="crm-summary-row">
<div class="crm-label">{ts}Preferred Language{/ts}</div>
<div class="crm-content crm-contact-preferred_language">
{$preferred_language}
</div>
</div>
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Email Format{/ts}</div>
<div class="crm-content crm-contact-preferred_mail_format">
{$preferred_mail_format}
</div>
</div>
{if isset($communication_style_display)}
<div class="crm-summary-row">
<div class="crm-label">{ts}Communication Style{/ts}</div>
<div class="crm-content crm-contact-communication_style_display">
{$communication_style_display}
</div>
</div>
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Email Greeting{/ts}</div>
<div class="crm-content crm-contact-email_greeting_display">
{$email_greeting_display}
{if !empty($email_greeting_custom)}<span class="crm-custom-greeting">({ts}Customized{/ts})</span>{/if}
</div>
</div>
<div class="crm-summary-row">
<div class="crm-label">{ts}Postal Greeting{/ts}</div>
<div class="crm-content crm-contact-postal_greeting_display">
{$postal_greeting_display}
{if !empty($postal_greeting_custom)}<span class="crm-custom-greeting" >({ts}Customized{/ts})</span>{/if}
</div>
</div>
<div class="crm-summary-row">
<div class="crm-label">{ts}Addressee{/ts}</div>
<div class="crm-content crm-contact-addressee_display">
{$addressee_display}
{if !empty($addressee_custom)}<span class="crm-custom-greeting">({ts}Customized{/ts})</span>{/if}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,70 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{* data-edit-params to reload this info whenever relationship gets updated *}
<div id="crm-contactinfo-content" {if $permission EQ 'edit'} class="crm-inline-edit" {/if} data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_ContactInfo"{rdelim}'>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Edit info{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {ts}Edit info{/ts}
</div>
{/if}
{if $contact_type eq 'Individual'}
<div class="crm-summary-row">
<div class="crm-label">{ts}Employer{/ts}</div>
<div class="crm-content crm-contact-current_employer">
{if !empty($current_employer_id)}
<a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$current_employer_id`"}" title="{ts}view current employer{/ts}">{$current_employer}</a>
{/if}
</div>
</div>
<div class="crm-summary-row">
<div class="crm-label">{ts}Job Title{/ts}</div>
<div class="crm-content crm-contact-job_title">{$job_title}</div>
</div>
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Nickname{/ts}</div>
<div class="crm-content crm-contact-nick_name">{$nick_name}</div>
</div>
{if $contact_type eq 'Organization'}
<div class="crm-summary-row">
<div class="crm-label">{ts}Legal Name{/ts}</div>
<div class="crm-content crm-contact-legal_name">{$legal_name}</div>
</div>
<div class="crm-summary-row">
<div class="crm-label">{ts}SIC Code{/ts}</div>
<div class="crm-content crm-contact-sic_code">{$sic_code}</div>
</div>
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Source{/ts}</div>
<div class="crm-content crm-contact_source">{$source}</div>
</div>
</div>
</div>

View file

@ -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 id="crm-contactname-content" {if $permission EQ 'edit'}class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_ContactName"{rdelim}' data-dependent-fields='["#crm-communication-pref-content"]'{/if}>
<div class="crm-inline-block-content"{if $permission EQ 'edit'} title="{ts}Edit Contact Name{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {ts}Edit name{/ts}
</div>
{/if}
<div class="crm-summary-display_name">
{$title}{if $domainContact} ({ts}default organization{/ts}){/if}
</div>
</div>
</div>

View file

@ -0,0 +1,27 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{include file="CRM/Contact/Page/View/CustomDataFieldView.tpl"}

View file

@ -0,0 +1,68 @@
{*
+--------------------------------------------------------------------+
| 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="crm-demographic-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-dependent-fields='["#crm-contactname-content"]' data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Demographics"{rdelim}'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Edit demographics{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {ts}Edit demographics{/ts}
</div>
{/if}
<div class="crm-summary-row">
<div class="crm-label">{ts}Gender{/ts}</div>
<div class="crm-content crm-contact-gender_display">{$gender_display}</div>
</div>
<div class="crm-summary-row">
<div class="crm-label">{ts}Date of Birth{/ts}</div>
<div class="crm-content crm-contact-birth_date_display">
{assign var="date_format" value = $fields.birth_date.smarty_view_format}
{$birth_date|crmDate:$date_format}
&nbsp;
</div>
</div>
{if $is_deceased eq 1}
{if $deceased_date}
<div class="crm-summary-row">
<div class="crm-label">{ts}Date Deceased{/ts}</div>
<div class="crm-content crm-contact-deceased_date_display">
{assign var="date_format" value = $fields.birth_date.smarty_view_format}
{$deceased_date|crmDate:$date_format}
</div>
</div>
{else}
<div class="crm-summary-row">
<div class="crm-label"></div>
<div class="crm-content crm-contact-deceased_message"><span class="font-red upper">{ts}Contact is Deceased{/ts}</span></div>
</div>
{/if}
{else}
<div class="crm-summary-row">
<div class="crm-label">{ts}Age{/ts}</div>
<div class="crm-content crm-contact-age_display">{if $age.y}{ts count=$age.y plural='%count years'}%count year{/ts}{elseif $age.m}{ts count=$age.m plural='%count months'}%count month{/ts}{/if}</div>
</div>
{/if}
</div>
</div>

View file

@ -0,0 +1,102 @@
{*
+--------------------------------------------------------------------+
| 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 building email block*}
<div id="crm-email-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Email"{rdelim}' data-dependent-fields='["#crm-contact-actions-wrapper"]'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Add or edit email{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {if empty($email)}{ts}Add email{/ts}{else}{ts}Add or edit email{/ts}{/if}
</div>
{/if}
{if empty($email)}
<div class="crm-summary-row">
<div class="crm-label">
{ts}Email{/ts}
{if $privacy.do_not_email}<span class="icon privacy-flag do-not-email" title="{ts}Privacy flag: Do Not Email{/ts}"></span>{/if}
</div>
<div class="crm-content"></div>
</div>
{/if}
{foreach from=$email key="blockId" item=item}
{if $item.email}
<div class="crm-summary-row {if $item.is_primary eq 1}primary{/if}">
<div class="crm-label">
{$item.location_type} {ts}Email{/ts}
{if $privacy.do_not_email}<span class="icon privacy-flag do-not-email" title="{ts}Privacy flag: Do Not Email{/ts}"></span>{elseif $item.on_hold}<span class="icon privacy-flag email-hold" title="{ts}Email on hold - generally due to bouncing.{/ts}"></span>{/if}
</div>
<div class="crm-content crm-contact_email">
{if !$item.on_hold and !$privacy.do_not_email}
{if $mailingOutboundOption == 2} {* Outbound email is disabled, use a mailto link *}
<a href="mailto:{$item.email}" title="{ts 1=$item.email}Send email to %1{/ts}">
{$item.email}
</a>
{else}
<a href="{crmURL p="civicrm/activity/email/add" q="action=add&reset=1&email_id=`$item.id`"}" class="crm-popup" title="{ts 1=$item.email}Send email to %1{/ts}">
{$item.email}
</a>
{/if}
{else}
{$item.email}
{/if}
{if $item.on_hold == 2}&nbsp;({ts}On Hold - Opt Out{/ts})&nbsp;{ts}{$item.hold_date|truncate:10:''|crmDate}{/ts}{elseif $item.on_hold}&nbsp;({ts}On Hold{/ts})&nbsp;{ts}{$item.hold_date|truncate:10:''|crmDate}{/ts}{/if}{if $item.is_bulkmail}&nbsp;({ts}Bulk{/ts}){/if}
{if $item.signature_text OR $item.signature_html}
<span class="signature-link description">
<a href="#" title="{ts}Signature{/ts}" onClick="showHideSignature( '{$blockId}' ); return false;">{ts}(signature){/ts}</a>
</span>
{/if}
<div id="Email_Block_{$blockId}_signature" class="hiddenElement">
<strong>{ts}Signature HTML{/ts}</strong><br />{$item.signature_html}<br /><br />
<strong>{ts}Signature Text{/ts}</strong><br />{$item.signature_text|nl2br}</div>
</div>
</div>
{/if}
{/foreach}
</div>
</div>
{literal}
<script type="text/javascript">
function showHideSignature( blockId ) {
cj("#Email_Block_" + blockId + "_signature").show( );
cj("#Email_Block_" + blockId + "_signature").dialog({
title: "Signature",
modal: true,
width: 900,
height: 500,
beforeclose: function(event, ui) {
cj(this).dialog("destroy");
},
buttons: {
"Done": function() {
cj(this).dialog("destroy");
}
}
});
}
</script>
{/literal}

View file

@ -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 |
+--------------------------------------------------------------------+
*}
{* template for building IM block*}
<div id="crm-im-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_IM"{rdelim}'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Add or edit IM{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {if empty($im)}{ts}Add IM{/ts}{else}{ts}Add or edit IM{/ts}{/if}
</div>
{/if}
{if empty($im)}
<div class="crm-summary-row">
<div class="crm-label">{ts}IM{/ts}</div>
<div class="crm-content"></div>
</div>
{/if}
{foreach from=$im item=item}
{if $item.name or $item.provider}
{if $item.name}
<div class="crm-summary-row {if $item.is_primary eq 1} primary{/if}">
<div class="crm-label">{$item.provider}&nbsp;({$item.location_type})</div>
<div class="crm-content crm-contact_im">{$item.name}</div>
</div>
{/if}
{/if}
{/foreach}
</div>
</div>

View file

@ -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 |
+--------------------------------------------------------------------+
*}
{* template for building OpenID block*}
<div id="crm-openid-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_OpenID"{rdelim}'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Add or edit OpenID{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {if empty($openid)}{ts}Add OpenID{/ts}{else}{ts}Add or edit OpenID{/ts}{/if}
</div>
{/if}
{if empty($openid)}
<div class="crm-summary-row">
<div class="crm-label">{ts}OpenID{/ts}</div>
<div class="crm-content"></div>
</div>
{/if}
{foreach from=$openid item=item}
{if $item.openid}
<div class="crm-summary-row {if $item.is_primary eq 1} primary{/if}">
<div class="crm-label">{$item.location_type}&nbsp;{ts}OpenID{/ts}</div>
<div class="crm-content crm-contact_openid">
<a href="{$item.openid}">{$item.openid|mb_truncate:40}</a>
</div>
</div>
{/if}
{/foreach}
</div>
</div>

View file

@ -0,0 +1,57 @@
{*
+--------------------------------------------------------------------+
| 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 building phone block*}
<div id="crm-phone-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Phone"{rdelim}' data-dependent-fields='["#crm-contact-actions-wrapper"]'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Add or edit phone{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {if empty($phone)}{ts}Add phone{/ts}{else}{ts}Add or edit phone{/ts}{/if}
</div>
{/if}
{if empty($phone)}
<div class="crm-summary-row">
<div class="crm-label">
{ts}Phone{/ts}
{if $privacy.do_not_phone}<span class="icon privacy-flag do-not-phone" title="{ts}Privacy flag: Do Not Phone{/ts}"></span>{/if}
</div>
<div class="crm-content"></div>
</div>
{/if}
{foreach from=$phone item=item}
{if $item.phone || $item.phone_ext}
<div class="crm-summary-row {if $item.is_primary eq 1}primary{/if}">
<div class="crm-label">
{if $privacy.do_not_phone}<span class="icon privacy-flag do-not-phone" title="{ts}Privacy flag: Do Not Phone{/ts}"></span>{/if}
{$item.location_type} {$item.phone_type}
</div>
<div class="crm-content crm-contact_phone">
{$item.phone}{if $item.phone_ext}&nbsp;&nbsp;{ts}ext.{/ts} {$item.phone_ext}{/if}
</div>
</div>
{/if}
{/foreach}
</div>
</div>

View file

@ -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 |
+--------------------------------------------------------------------+
*}
{* template for building website block *}
<div id="crm-website-content" {if $permission EQ 'edit'} class="crm-inline-edit" data-edit-params='{ldelim}"cid": "{$contactId}", "class_name": "CRM_Contact_Form_Inline_Website"{rdelim}'{/if}>
<div class="crm-clear crm-inline-block-content" {if $permission EQ 'edit'}title="{ts}Add or edit website{/ts}"{/if}>
{if $permission EQ 'edit'}
<div class="crm-edit-help">
<span class="crm-i fa-pencil"></span> {if empty($website)}{ts}Add website{/ts}{else}{ts}Add or edit website{/ts}{/if}
</div>
{/if}
{if empty($website)}
<div class="crm-summary-row">
<div class="crm-label">{ts}Website{/ts}</div>
<div class="crm-content"></div>
</div>
{/if}
{foreach from=$website item=item}
{if !empty($item.url)}
<div class="crm-summary-row">
<div class="crm-label">{$item.website_type} {ts}Website{/ts}</div>
<div class="crm-content crm-contact_website"><a href="{$item.url}" target="_blank">{$item.url}</a></div>
</div>
{/if}
{/foreach}
</div>
</div>

View file

@ -0,0 +1,72 @@
{*
+--------------------------------------------------------------------+
| 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 |
+--------------------------------------------------------------------+
*}
{strip}
<p>
{if $rows}
<table>
<tr class="columnheader">
<th>{ts}Saved Search{/ts}</th>
<th>{ts}Description{/ts}</th>
<th>{ts}Criteria{/ts}</th>
<th></th>
</tr>
{foreach from=$rows item=row}
<tr class="{cycle values="odd-row,even-row"}">
<td>{$row.name}</td>
<td>{$row.description}</td>
<td><ul>
{foreach from=$row.query_detail item=criteria}
<li>{$criteria}</li>
{/foreach}
</ul>
</td>
<td>{$row.action}</td>
</tr>
{/foreach}
</table>
{else}
<div class="messages status no-popup">
<dl>
<dt><img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/></dt>
<dd>
{ts}There are currently no Saved Searches. To create a Saved search:{/ts}
<p>
<ul>
{capture assign=crmURLsearch}{crmURL p='civicrm/contact/search/basic' q='reset=1'}{/capture}
{capture assign=crmURLadvanced}{crmURL p='civicrm/contact/search/advanced' q='reset=1'}{/capture}
<li>{ts 1=$crmURLsearch 2=$crmURLadvanced}Use <a href='%1'>Find</a> or <a href='%2'>Advanced Search</a> form to enter search criteria{/ts}</li>
<li>{ts}Run and refine the search criteria as necessary{/ts}</li>
<li>{ts}Select 'New Saved Search' from the '- more actions -' drop-down menu and click 'Go'{/ts}</li>
<li>{ts}Enter a name and description for your Saved Search{/ts}</li>
</ul>
</p>
</dd>
</dl>
</div>
{/if}
</p>
{/strip}

View file

@ -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>
&nbsp;{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>

View file

@ -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}

View file

@ -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>

View file

@ -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}

View file

@ -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>

View file

@ -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>&nbsp;</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>

View file

@ -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> &nbsp;
{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>

View file

@ -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>
&nbsp;{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>

View file

@ -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}&nbsp;<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> &nbsp;
{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}

View file

@ -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>

View file

@ -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" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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}

View file

@ -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*}

View file

@ -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'>&nbsp;</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>

View file

@ -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>&nbsp;</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>

View file

@ -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}

View file

@ -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._);

View file

@ -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"}&nbsp;
</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">
&nbsp;/&nbsp;<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}

View file

@ -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>

View file

@ -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"}

View file

@ -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>

View file

@ -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>

View file

@ -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>