First commit
This commit is contained in:
commit
c6e2478c40
13918 changed files with 2303184 additions and 0 deletions
277
sites/all/modules/civicrm/templates/CRM/Profile/Form/Dynamic.tpl
Normal file
277
sites/all/modules/civicrm/templates/CRM/Profile/Form/Dynamic.tpl
Normal file
|
@ -0,0 +1,277 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-profile-name-{$ufGroupName}">
|
||||
{crmRegion name=profile-form-`$ufGroupName`}
|
||||
|
||||
{* Profile forms when embedded in CMS account create (mode=1) or
|
||||
cms account edit (mode=8) or civicrm/profile (mode=4) pages *}
|
||||
{if $deleteRecord}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}Are you sure you want to delete this record?{/ts}
|
||||
</div>
|
||||
|
||||
<div class="crm-submit-buttons">
|
||||
<span class="crm-button">{$form._qf_Edit_upload_delete.html}</span>
|
||||
<a class="button cancel" href="{$cancelURL}">{$cancelButtonText}</a>
|
||||
</div>
|
||||
{else}
|
||||
{if ! empty( $fields )}
|
||||
{* Wrap in crm-container div so crm styles are used.*}
|
||||
{* Replace div id "crm-container" only when profile is not loaded in civicrm container, i.e for profile shown in my account and in profile standalone mode otherwise id should be "crm-profile-block" *}
|
||||
|
||||
{if $action eq 1 or $action eq 2 or $action eq 4 }
|
||||
<div id="crm-profile-block" class="crm-container crm-public">
|
||||
{else}
|
||||
<div id="crm-container" class="crm-container crm-public" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
|
||||
{/if}
|
||||
|
||||
{if $isDuplicate and ( ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192) ) }
|
||||
<div class="crm-submit-buttons">
|
||||
<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{if $mode eq 1 || $activeComponent neq "CiviCRM"}
|
||||
{include file="CRM/Form/body.tpl"}
|
||||
{/if}
|
||||
{strip}
|
||||
{if $help_pre && $action neq 4}
|
||||
<div class="messages help">{$help_pre}</div>
|
||||
{/if}
|
||||
|
||||
{include file="CRM/common/CMSUser.tpl"}
|
||||
|
||||
{if $action eq 2 and $multiRecordFieldListing}
|
||||
<h1>{ts}Edit Details{/ts}</h1>
|
||||
<div class="crm-submit-buttons" style='float:right'>
|
||||
{include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{assign var=zeroField value="Initial Non Existent Fieldset"}
|
||||
{assign var=fieldset value=$zeroField}
|
||||
{foreach from=$fields item=field key=fieldName}
|
||||
{if $field.skipDisplay}
|
||||
{continue}
|
||||
{/if}
|
||||
{assign var="profileID" value=$field.group_id}
|
||||
{assign var=n value=$field.name}
|
||||
{if $field.groupTitle != $fieldset}
|
||||
{if $mode neq 8 && $mode neq 4}
|
||||
<div {if $context neq 'dialog'}id="profilewrap{$field.group_id}"{/if}>
|
||||
<fieldset><legend>{$field.groupTitle}</legend>
|
||||
{/if}
|
||||
{assign var=fieldset value=`$field.groupTitle`}
|
||||
{assign var=groupHelpPost value=`$field.groupHelpPost`}
|
||||
{if $field.groupHelpPre}
|
||||
<div class="messages help">{$field.groupHelpPre}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{if $field.field_type eq "Formatting"}
|
||||
{$field.help_pre}
|
||||
{elseif $n}
|
||||
{if $field.groupTitle != $fieldset}
|
||||
{if $fieldset != $zeroField}
|
||||
{if $groupHelpPost}
|
||||
<div class="messages help">{$groupHelpPost}</div>
|
||||
{/if}
|
||||
{if $mode neq 8 && $mode neq 4}
|
||||
</div><!-- end form-layout-compressed-div -->
|
||||
</fieldset>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div class="form-layout-compressed">
|
||||
{/if}
|
||||
{if $field.help_pre && $action neq 4 && $form.$n.html}
|
||||
<div class="crm-section helprow-{$n}-section helprow-pre" id="helprow-{$n}">
|
||||
<div class="content description">{$field.help_pre}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if $field.options_per_line}
|
||||
<div class="crm-section editrow_{$n}-section form-item" id="editrow-{$n}">
|
||||
<div class="label">{$form.$n.label}</div>
|
||||
<div class="content edit-value">
|
||||
{assign var="count" value="1"}
|
||||
{strip}
|
||||
<table class="form-layout-compressed">
|
||||
<tr>
|
||||
{* sort by fails for option per line. Added a variable to iterate through the element array*}
|
||||
{assign var="index" value="1"}
|
||||
{foreach name=outer key=key item=item from=$form.$n}
|
||||
{if $index < 10}
|
||||
{assign var="index" value=`$index+1`}
|
||||
{else}
|
||||
<td class="labels font-light">{$form.$n.$key.html}</td>
|
||||
{if $count == $field.options_per_line}
|
||||
</tr>
|
||||
<tr>
|
||||
{assign var="count" value="1"}
|
||||
{else}
|
||||
{assign var="count" value=`$count+1`}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>{* end of main edit section div*}
|
||||
{else}
|
||||
<div id="editrow-{$n}" class="crm-section editrow_{$n}-section form-item">
|
||||
<div class="label">
|
||||
{$form.$n.label}
|
||||
</div>
|
||||
<div class="edit-value content">
|
||||
{if $n|substr:0:3 eq 'im-'}
|
||||
{assign var="provider" value=$n|cat:"-provider_id"}
|
||||
{$form.$provider.html}
|
||||
{/if}
|
||||
{if $n eq 'email_greeting' or $n eq 'postal_greeting' or $n eq 'addressee'}
|
||||
{include file="CRM/Profile/Form/GreetingType.tpl"}
|
||||
{elseif ( $n eq 'group' && $form.group ) || ( $n eq 'tag' && $form.tag )}
|
||||
{include file="CRM/Contact/Form/Edit/TagsAndGroups.tpl" type=$n context="profile" tableLayout=1}
|
||||
{elseif ( $form.$n.name eq 'image_URL' )}
|
||||
{$form.$n.html}
|
||||
{if !empty($imageURL)}
|
||||
<div class="crm-section contact_image-section">
|
||||
<div class="content">
|
||||
{include file="CRM/Contact/Page/ContactImage.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{elseif $n|substr:0:5 eq 'phone'}
|
||||
{assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
|
||||
{$form.$n.html}
|
||||
{if $form.$phone_ext_field.html}
|
||||
{$form.$phone_ext_field.html}
|
||||
{/if}
|
||||
{else}
|
||||
{$form.$n.html}
|
||||
{if $field.html_type eq 'Autocomplete-Select'}
|
||||
{if $field.data_type eq 'ContactReference'}
|
||||
{include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
{if $form.$n.type eq 'file'}
|
||||
<div class="crm-section file_displayURL-section file_displayURL{$n}-section"><div class="content">{$customFiles.$n.displayURL}</div></div>
|
||||
<div class="crm-section file_deleteURL-section file_deleteURL{$n}-section"><div class="content">{$customFiles.$n.deleteURL}</div></div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{* Show explanatory text for field if not in 'view' mode *}
|
||||
{if $field.help_post && $action neq 4 && $form.$n.html}
|
||||
<div class="crm-section helprow-{$n}-section helprow-post" id="helprow-{$n}">
|
||||
<div class="content description">{$field.help_post}</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}{* end of main if field name if *}
|
||||
{/foreach}
|
||||
|
||||
{if $isCaptcha && ( $mode eq 8 || $mode eq 4 || $mode eq 1 ) }
|
||||
{include file='CRM/common/ReCAPTCHA.tpl'}
|
||||
<script type="text/javascript">cj('.recaptcha_label').attr('width', '140px');</script>
|
||||
{/if}
|
||||
|
||||
{if $field.groupHelpPost}
|
||||
<div class="messages help">{$field.groupHelpPost}</div>
|
||||
{/if}
|
||||
|
||||
{if $mode neq 8 && $mode neq 4}
|
||||
</fieldset>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if ($action eq 1 and $mode eq 4 ) or ($action eq 2) or ($action eq 8192)}
|
||||
{if $action eq 2 and $multiRecordFieldListing}
|
||||
{include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true}
|
||||
{assign var=floatStyle value='float:right'}
|
||||
{/if}
|
||||
<div class="crm-submit-buttons" style='{$floatStyle}'>
|
||||
{include file="CRM/common/formButtons.tpl"}{if $isDuplicate}<span class="crm-button">{$form._qf_Edit_upload_duplicate.html}</span>{/if}
|
||||
<a class="button cancel" href="{$cancelURL}">
|
||||
<span>
|
||||
<i class="crm-i fa-times"></i>
|
||||
{$cancelButtonText}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
{if $help_post && $action neq 4}<br /><div class="messages help">{$help_post}</div>{/if}
|
||||
{/strip}
|
||||
|
||||
</div> {* end crm-container div *}
|
||||
|
||||
<script type="text/javascript">
|
||||
{if $drupalCms}
|
||||
{literal}
|
||||
if ( document.getElementsByName("cms_create_account")[0].checked ) {
|
||||
cj('#details').show();
|
||||
}
|
||||
else {
|
||||
cj('#details').hide();
|
||||
}
|
||||
{/literal}
|
||||
{/if}
|
||||
</script>
|
||||
{/if} {* fields array is not empty *}
|
||||
{if $multiRecordFieldListing and empty($fields)}
|
||||
{include file="CRM/Profile/Page/MultipleRecordFieldsListing.tpl" showListing=true}
|
||||
{/if}
|
||||
{if $drupalCms}
|
||||
{include file="CRM/common/showHideByFieldValue.tpl"
|
||||
trigger_field_id ="create_account"
|
||||
trigger_value =""
|
||||
target_element_id ="details"
|
||||
target_element_type ="block"
|
||||
field_type ="radio"
|
||||
invert = 0
|
||||
}
|
||||
{elseif $statusMessage}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{$statusMessage}
|
||||
</div>
|
||||
{/if}
|
||||
{/if} {*end of if for $deleteRecord*}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
|
||||
CRM.$(function($) {
|
||||
cj('#selector tr:even').addClass('odd-row ');
|
||||
cj('#selector tr:odd ').addClass('even-row');
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
{/crmRegion}
|
||||
</div> {* end crm-profile-NAME *}
|
|
@ -0,0 +1,26 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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/Profile/Form/Dynamic.tpl"}
|
|
@ -0,0 +1,47 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| CiviCRM version 4.7 |
|
||||
+--------------------------------------------------------------------+
|
||||
| Copyright CiviCRM LLC (c) 2004-2017 |
|
||||
+--------------------------------------------------------------------+
|
||||
| This file is a part of CiviCRM. |
|
||||
| |
|
||||
| CiviCRM is free software; you can copy, modify, and distribute it |
|
||||
| under the terms of the GNU Affero General Public License |
|
||||
| Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
|
||||
| |
|
||||
| CiviCRM is distributed in the hope that it will be useful, but |
|
||||
| WITHOUT ANY WARRANTY; without even the implied warranty of |
|
||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
||||
| See the GNU Affero General Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU Affero General Public |
|
||||
| License and the CiviCRM Licensing Exception along |
|
||||
| with this program; if not, contact CiviCRM LLC |
|
||||
| at info[AT]civicrm[DOT]org. If you have questions about the |
|
||||
| GNU Affero General Public License or the licensing of CiviCRM, |
|
||||
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{assign var="customGreeting" value=$n|cat:"_custom"}
|
||||
<span>{$form.$n.html|crmAddClass:big}</span> <span id="{$customGreeting}_html" class="hiddenElement">{$form.$customGreeting.html|crmAddClass:big}</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
var fieldName = '{$n}';
|
||||
{literal}
|
||||
cj( "#" + fieldName ).change( function( ) {
|
||||
var fldName = cj(this).attr( 'id' );
|
||||
showCustom( fldName, cj(this).val( ) );
|
||||
});
|
||||
|
||||
showCustom( fieldName, cj( "#" + fieldName ).val( ) );
|
||||
function showCustom( fldName, value ) {
|
||||
if ( value == 4 ) {
|
||||
cj( "#" + fldName + "_custom_html").show( );
|
||||
} else {
|
||||
cj( "#" + fldName + "_custom_html").hide( );
|
||||
cj( "#" + fldName + "_custom" ).val('');
|
||||
}
|
||||
}
|
||||
{/literal}
|
||||
</script>
|
124
sites/all/modules/civicrm/templates/CRM/Profile/Form/Search.tpl
Normal file
124
sites/all/modules/civicrm/templates/CRM/Profile/Form/Search.tpl
Normal file
|
@ -0,0 +1,124 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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( $fields )}
|
||||
{if $groupId }
|
||||
<div class="crm-accordion-wrapper crm-group-{$groupId}-accordion {if $rows}collapsed{/if}">
|
||||
<div class="crm-accordion-header crm-master-accordion-header">
|
||||
{ts}Edit Search Criteria{/ts}
|
||||
</div>
|
||||
<div class="crm-accordion-body">
|
||||
{else}
|
||||
<div>
|
||||
{/if}
|
||||
|
||||
<table class="form-layout-compressed" id="profile">
|
||||
{foreach from=$fields item=field key=fieldName}
|
||||
{if $field.skipDisplay}
|
||||
{continue}
|
||||
{/if}
|
||||
{assign var=n value=$field.name}
|
||||
{assign var="operator_name" value=$n|cat:'_operator'}
|
||||
{if $field.is_search_range}
|
||||
{assign var=from value=$field.name|cat:'_from'}
|
||||
{assign var=to value=$field.name|cat:'_to'}
|
||||
<tr>
|
||||
<td class="label">{$form.$from.label}</td>
|
||||
<td class="description">{$form.$from.html} {$form.$to.label} {$form.$to.html}</td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr>
|
||||
<td class="label">
|
||||
{$form.$n.label}
|
||||
</td>
|
||||
{if $n eq 'addressee' or $n eq 'email_greeting' or $n eq 'postal_greeting'}
|
||||
<td class="description">
|
||||
{include file="CRM/Profile/Form/GreetingType.tpl"}
|
||||
</td>
|
||||
{elseif $n eq 'group'}
|
||||
<td>
|
||||
<table id="selector" class="selector" style="width:auto;">
|
||||
<tr><td>{$form.$n.html}{* quickform add closing </td> </tr>*}
|
||||
</table>
|
||||
</td>
|
||||
{else}
|
||||
<td class="description">
|
||||
{if $n|substr:0:5 eq 'phone'}
|
||||
{assign var="phone_ext_field" value=$n|replace:'phone':'phone_ext'}
|
||||
{$form.$n.html}
|
||||
{if $form.$phone_ext_field.html}
|
||||
{$form.$phone_ext_field.html}
|
||||
{/if}
|
||||
{else}
|
||||
{$form.$n.html}
|
||||
{/if}
|
||||
{if $field.html_type eq 'Autocomplete-Select' and $field.data_type eq 'ContactReference'}
|
||||
{include file="CRM/Custom/Form/ContactReference.tpl" element_name = $n}
|
||||
{/if}
|
||||
{if !empty($form.$operator_name)}
|
||||
<span class="crm-multivalue-search-op" for="{$n}">{$form.$operator_name.html}</span>
|
||||
{assign var="add_multivalue_js" value=true}
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{if $proximity_search}
|
||||
<tr><td colspan="2">{include file="CRM/Contact/Form/Task/ProximityCommon.tpl"}</td></tr>
|
||||
{/if}
|
||||
|
||||
<tr><td></td><td>{include file="CRM/common/formButtons.tpl"}</td></tr>
|
||||
</table>
|
||||
|
||||
{if $groupId}
|
||||
</div><!-- /.crm-accordion-body -->
|
||||
</div><!-- /.crm-accordion-wrapper -->
|
||||
{/if}
|
||||
|
||||
{elseif $statusMessage}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{$statusMessage}
|
||||
</div>
|
||||
{else} {* empty fields *}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}No fields in this Profile have been configured as searchable. Ask the site administrator to check the Profile setup.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
CRM.$(function($) {
|
||||
$('#selector tr:even').addClass('odd-row ');
|
||||
$('#selector tr:odd ').addClass('even-row');
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{if !empty($add_multivalue_js)}
|
||||
{include file="CRM/Custom/Form/MultiValueSearch.js.tpl"}
|
||||
{/if}
|
|
@ -0,0 +1,50 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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( $row )}
|
||||
{* wrap in crm-container div so crm styles are used *}
|
||||
{if $overlayProfile }
|
||||
{include file="CRM/Profile/Page/Overlay.tpl"}
|
||||
{else}
|
||||
<div id="crm-container" class="crm-container" lang="{$config->lcMessages|truncate:2:"":true}" xml:lang="{$config->lcMessages|truncate:2:"":true}">
|
||||
<div class="crm-profile-name-{$ufGroupName}">
|
||||
{crmRegion name=profile-view-`$ufGroupName`}
|
||||
{foreach from=$profileFields item=field key=rowName}
|
||||
<div id="row-{$rowName}" class="crm-section {$rowName}-section">
|
||||
<div class="label">
|
||||
{$field.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$field.value}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/crmRegion}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{* fields array is not empty *}
|
|
@ -0,0 +1,103 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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-profile-name-{$ufGroupName}">
|
||||
{crmRegion name=profile-search-`$ufGroupName`}
|
||||
|
||||
{* make sure there are some fields in the selector *}
|
||||
{if ! empty( $columnHeaders ) || $isReset }
|
||||
|
||||
{if $search}
|
||||
<div class="crm-block crm-form-block">
|
||||
{include file="$searchTPL"}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="crm-block crm-content-block">
|
||||
{* show profile listings criteria ($qill) *}
|
||||
{if $rows}
|
||||
|
||||
{if $qill}
|
||||
<div class="crm-search-tasks">
|
||||
<div id="search-status">
|
||||
{ts}Displaying contacts where:{/ts}
|
||||
{include file="CRM/common/displaySearchCriteria.tpl"}
|
||||
{if $mapURL}<a href="{$mapURL}">» {ts}Map these contacts{/ts}</a>{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
<div class="crm-search-results">
|
||||
{include file="CRM/common/pager.tpl" location="top"}
|
||||
{* Search criteria are passed to tpl in the $qill array *}
|
||||
|
||||
|
||||
{strip}
|
||||
<table>
|
||||
<tr class="columnheader">
|
||||
{foreach from=$columnHeaders item=header}
|
||||
<th scope="col">
|
||||
{if $header.sort}
|
||||
{assign var='key' value=$header.sort}
|
||||
{$sort->_response.$key.link}
|
||||
{else}
|
||||
{$header.name}
|
||||
{/if}
|
||||
</th>
|
||||
{/foreach}
|
||||
</tr>
|
||||
|
||||
{counter start=0 skip=1 print=false}
|
||||
{foreach from=$rows item=row name=listings}
|
||||
<tr id="row-{$smarty.foreach.listings.iteration}" class="{cycle values="odd-row,even-row"}">
|
||||
{foreach from=$row key=index item=value}
|
||||
{if $columnHeaders.$index.field_name}
|
||||
<td class="crm-{$columnHeaders.$index.field_name}">{$value}</td>
|
||||
{else}
|
||||
<td>{$value}</td>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
{/strip}
|
||||
{include file="CRM/common/pager.tpl" location="bottom"}
|
||||
</div>
|
||||
{elseif ! $isReset}
|
||||
{include file="CRM/Contact/Form/Search/EmptyResults.tpl" context="Profile"}
|
||||
{/if}
|
||||
|
||||
|
||||
{else}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
{ts}No fields in this Profile have been configured to display as a result column in the search results table. Ask the site administrator to check the Profile setup.{/ts}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{/crmRegion}
|
||||
</div>{* crm-profile-name-NAME *}
|
|
@ -0,0 +1,129 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 $showListing}
|
||||
{if $dontShowTitle neq 1}<h1>{ts}{$customGroupTitle}{/ts}</h1>{/if}
|
||||
{if $pageViewType eq 'customDataView'}
|
||||
{assign var='dialogId' value='custom-record-dialog'}
|
||||
{else}
|
||||
{assign var='dialogId' value='profile-dialog'}
|
||||
{/if}
|
||||
{if ($records and $headers) or ($pageViewType eq 'customDataView')}
|
||||
{include file="CRM/common/jsortable.tpl"}
|
||||
<div id="custom-{$customGroupId}-table-wrapper" {if $pageViewType eq 'customDataView'}class="crm-entity" data-entity="contact" data-id="{$contactId}"{/if}>
|
||||
<div>
|
||||
{strip}
|
||||
<table id="records-{$customGroupId}" class={if $pageViewType eq 'customDataView'}"crm-multifield-selector crm-ajax-table"{else}'display'{/if}>
|
||||
<thead>
|
||||
{if $pageViewType eq 'customDataView'}
|
||||
{foreach from=$headers key=recId item=head}
|
||||
<th data-data={ts}'{$headerAttr.$recId.columnName}'{/ts}
|
||||
{if !empty($headerAttr.$recId.dataType)}cell-data-type="{$headerAttr.$recId.dataType}"{/if}
|
||||
{if !empty($headerAttr.$recId.dataEmptyOption)}cell-data-empty-option="{$headerAttr.$recId.dataEmptyOption}"{/if}>{ts}{$head}{/ts}
|
||||
</th>
|
||||
{/foreach}
|
||||
<th data-data="action" data-orderable="false"> </th>
|
||||
</thead>
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
var ZeroRecordText = {/literal}'{ts 1=$customGroupTitle}No records of type \'%1\' found.{/ts}'{literal};
|
||||
var $table = $('#records-' + {/literal}'{$customGroupId}'{literal});
|
||||
$('table.crm-multifield-selector').data({
|
||||
"ajax": {
|
||||
"url": {/literal}'{crmURL p="civicrm/ajax/multirecordfieldlist" h=0 q="snippet=4&cid=$contactId&cgid=$customGroupId"}'{literal},
|
||||
},
|
||||
"language": {
|
||||
"emptyTable": ZeroRecordText,
|
||||
},
|
||||
//Add class attributes to cells
|
||||
"rowCallback": function(row, data) {
|
||||
$('thead th', $table).each(function(index) {
|
||||
var fName = $(this).attr('data-data');
|
||||
var cell = $('td:eq(' + index + ')', row);
|
||||
if (typeof data[fName] == 'object') {
|
||||
if (typeof data[fName].data != 'undefined') {
|
||||
$(cell).html(data[fName].data);
|
||||
}
|
||||
if (typeof data[fName].cellClass != 'undefined') {
|
||||
$(cell).attr('class', data[fName].cellClass);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
})
|
||||
})(CRM.$);
|
||||
</script>
|
||||
{/literal}
|
||||
|
||||
{else}
|
||||
{foreach from=$headers key=recId item=head}
|
||||
<th>{ts}{$head}{/ts}</th>
|
||||
{/foreach}
|
||||
|
||||
{foreach from=$dateFields key=fieldId item=v}
|
||||
<th class='hiddenElement'></th>
|
||||
{/foreach}
|
||||
<th> </th>
|
||||
</thead>
|
||||
{foreach from=$records key=recId item=rows}
|
||||
<tr class="{cycle values="odd-row,even-row"}">
|
||||
{foreach from=$headers key=hrecId item=head}
|
||||
<td {crmAttributes a=$attributes.$hrecId.$recId}>{$rows.$hrecId}</td>
|
||||
{/foreach}
|
||||
<td>{$rows.action}</td>
|
||||
{foreach from=$dateFieldsVals key=fid item=rec}
|
||||
<td class='crm-field-{$fid}_date hiddenElement'>{$rec.$recId}</td>
|
||||
{/foreach}
|
||||
</tr>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</table>
|
||||
{/strip}
|
||||
</div>
|
||||
</div>
|
||||
<div id='{$dialogId}' class="hiddenElement"></div>
|
||||
{elseif !$records}
|
||||
<div class="messages status no-popup">
|
||||
<div class="icon inform-icon"></div>
|
||||
|
||||
{ts 1=$customGroupTitle}No records of type '%1' found.{/ts}
|
||||
</div>
|
||||
<div id='{$dialogId}' class="hiddenElement"></div>
|
||||
{/if}
|
||||
|
||||
{if !$reachedMax}
|
||||
<div class="action-link">
|
||||
{if $pageViewType eq 'customDataView'}
|
||||
<br/><a accesskey="N" title="{ts 1=$customGroupTitle}Add %1 Record{/ts}" href="{crmURL p='civicrm/contact/view/cd/edit' q="reset=1&type=$ctype&groupID=$customGroupId&entityID=$contactId&cgcount=$newCgCount&multiRecordDisplay=single&mode=add"}"
|
||||
class="button action-item"><span><i class="crm-i fa-plus-circle"></i> {ts 1=$customGroupTitle}Add %1 Record{/ts}</span></a>
|
||||
{else}
|
||||
<a accesskey="N" href="{crmURL p='civicrm/profile/edit' q="reset=1&id=`$contactId`&multiRecord=add&gid=`$gid`&context=multiProfileDialog&onPopupClose=`$onPopupClose`"}"
|
||||
class="button action-item"><span><i class="crm-i fa-plus-circle"></i> {ts}Add New Record{/ts}</span></a>
|
||||
{/if}
|
||||
</div>
|
||||
<br />
|
||||
{/if}
|
||||
{/if}
|
|
@ -0,0 +1,55 @@
|
|||
{*
|
||||
+--------------------------------------------------------------------+
|
||||
| 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 $overlayProfile }
|
||||
<table class="crm-table-group-summary">
|
||||
<tr><td>{$displayName}</td></tr>
|
||||
<tr><td>
|
||||
{assign var="count" value="0"}
|
||||
{assign var="totalRows" value=$row|@count}
|
||||
<div class="crm-summary-col-0">
|
||||
{foreach from=$profileFields item=field key=rowName}
|
||||
{if $count gt $totalRows/2}
|
||||
</div>
|
||||
</td><td>
|
||||
<div class="crm-summary-col-1">
|
||||
{assign var="count" value="1"}
|
||||
{/if}
|
||||
<div class="crm-section {$rowName}-section">
|
||||
<div class="label">
|
||||
{$field.label}
|
||||
</div>
|
||||
<div class="content">
|
||||
{$field.value}
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
{assign var="count" value=`$count+1`}
|
||||
{/foreach}
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
{* fields array is not empty *}
|
||||
{/if}
|
|
@ -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 |
|
||||
+--------------------------------------------------------------------+
|
||||
*}
|
||||
{* If you want a custom profile view, you can access field labels and values in $profileFields_N array - where N is profile ID. *}
|
||||
{* EXAMPLES *}{* $profileFields_1.last_name.label *}{* $profileFields_1.last_name.value *}
|
||||
|
||||
{if $overlayProfile }
|
||||
{foreach from=$profileGroups item=group}
|
||||
<div class="crm-summary-group">
|
||||
{$group.content}
|
||||
</div>
|
||||
{/foreach}
|
||||
{else}
|
||||
{foreach from=$profileGroups item=group}
|
||||
<h2>{$group.title}</h2>
|
||||
<div id="profilewrap{$groupID}" class="crm-profile-view">
|
||||
{$group.content}
|
||||
</div>
|
||||
{/foreach}
|
||||
<div class="action-link">
|
||||
{if $listingURL}
|
||||
<a href="{$listingURL}">» {ts}Back to Listings{/ts}</a>
|
||||
{/if}
|
||||
{if $mapURL}
|
||||
<a href="{$mapURL}">» {ts}Map Primary Address{/ts}</a>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{literal}
|
||||
<script type='text/javascript'>
|
||||
function contactImagePopUp (url, width, height) {
|
||||
newWindow = window.open( url,'name', 'width='+width+', height='+height );
|
||||
}
|
||||
</script>
|
||||
{/literal}
|
Loading…
Add table
Add a link
Reference in a new issue