DocSpace-client/products/ASC.CRM/Server/Templates/ContactInfoCardTemplate.html

87 lines
4.8 KiB
HTML
Raw Normal View History

2020-03-02 15:38:31 +00:00
<script id="contactInfoCardResourcesTmpl" type="text/x-jquery-tmpl">
<div id="contactInfoCardResources" class="display-none"
data-one="${ASC.CRM.Resources.CRMJSResource.OneContact}"
data-no="${ASC.CRM.Resources.CRMJSResource.NoContacts}"
data-many="${ASC.CRM.Resources.CRMJSResource.ManyContacts}"></div>
</script>
<script id="contactInfoCardTmpl" type="text/x-jquery-tmpl">
<div class="crm-contactInfoCard" id="contactInfoCard_${id}">
{{if isPrivateForMe == false}}
<a href="${contactLink}">
{{if isCompany == true}}
<img class="crm-contactInfoCardImg" border="0" style="margin: 0 auto;" src="${ASC.CRM.Data.MediumSizePhotoCompany}" alt="${displayName}" title="${displayName}" onload="ASC.CRM.Common.loadContactFoto(jq(this), jq(this).next(), '${mediumFotoUrl}');" />
{{else}}
<img class="crm-contactInfoCardImg" border="0" style="margin: 0 auto;" src="${ASC.CRM.Data.MediumSizePhoto}" alt="${displayName}" title="${displayName}" onload="ASC.CRM.Common.loadContactFoto(jq(this), jq(this).next(), '${mediumFotoUrl}');" />
{{/if}}
<img class="crm-contactInfoCardImg" border="0" style="margin: 0 auto;display:none;" alt="${displayName}" title="${displayName}"/>
</a>
{{else}}
{{if isCompany == true}}
<img class="crm-contactInfoCardImg" border="0" style="margin: 0 auto 10px; float: left;" src="${ASC.CRM.Data.MediumSizePhotoCompany}" alt="${displayName}" title="${displayName}" onload="ASC.CRM.Common.loadContactFoto(jq(this), jq(this).next(), '${mediumFotoUrl}');" />
{{else}}
<img class="crm-contactInfoCardImg" border="0" style="margin: 0 auto 10px; float: left;" src="${ASC.CRM.Data.MediumSizePhoto}" alt="${displayName}" title="${displayName}" onload="ASC.CRM.Common.loadContactFoto(jq(this), jq(this).next(), '${mediumFotoUrl}');" />
{{/if}}
<img class="crm-contactInfoCardImg" border="0" style="margin: 0 auto 10px; float: left;display:none;" alt="${displayName}" title="${displayName}"/>
{{/if}}
<div class="infoCardContent">
{{if isPrivateForMe == true}}
<label class="crm-private-lock"></label>
<span class="crm-task-title header-base-medium">${displayName}</span>
{{else}}
<a title="${displayName}" class="linkHeader" style="display: inline-block;
margin-bottom: 6px;text-decoration: underline;" href="${contactLink}">
${displayName}
</a>
{{if isCompany == true && typeof(personsCount) != "undefined"}}
<div class="personsCountString" style="margin-bottom: 6px;" data-one="${ASC.CRM.Resources.CRMJSResource.OneContact}" data-no="${ASC.CRM.Resources.CRMJSResource.NoContacts}" data-many="${ASC.CRM.Resources.CRMJSResource.ManyContacts}">
{{if personsCount == 0}}
${jq("#contactInfoCardResources").attr("data-no")}
{{else personsCount == 1}}
1 ${jq("#contactInfoCardResources").attr("data-one")}
{{else}}
${personsCount} ${jq("#contactInfoCardResources").attr("data-many")}
{{/if}}
</div>
{{else}}
<div style="margin-bottom: 6px;">${title}</div>
{{/if}}
<ul>
{{each(i, item) commonData}}
{{if item.infoType == 1 && item.isPrimary}}
<li>
<div class="crm-email">
<a class="linkMedium" href="mailto:${item.data}">
${item.data}
</a>&nbsp;<span class="text-medium-describe">(${item.categoryName})</span>
</div>
</li>
{{/if}}
{{if item.infoType == 0 && item.isPrimary}}
<li>
<div class="crm-phone">
${item.data}&nbsp;<span class="text-medium-describe">(${item.categoryName})</span>
</div>
</li>
{{/if}}
{{/each}}
{{if typeof (primaryAddress) != "undefined" && primaryAddress != null}}
<li>
<div class="crm-address">{{html primaryAddress.Data}}&nbsp;<span class="text-medium-describe">(${primaryAddress.categoryName})</span>
<br/>
<a class="linkMedium" style="text-decoration: underline;" href="${primaryAddress.Href}" target="_blank">
${ASC.CRM.Resources.CRMContactResource.ShowOnMap}
</a>
</div>
</li>
{{/if}}
</ul>
{{/if}}
</div>
</div>
</script>