individual-qrCodeFoafPerson.ftl: add hasValidVCard function, remove tabs
individual--foaf-person.ftl: use hasValidVCard function in commented-out QR code section
This commit is contained in:
parent
1c3df021cf
commit
41aa28ed03
2 changed files with 92 additions and 73 deletions
|
@ -71,12 +71,14 @@
|
|||
<@p.vitroLinks propertyGroups namespaces editable "individual-urls-people" />
|
||||
|
||||
<#--
|
||||
<#if hasValidVCard()>
|
||||
<div style="border:1px solid #cccccc">
|
||||
<span style="padding-left:5px">vCard QR <a style="font-size:smaller" href="${individual.qrData.aboutQrCodesUrl}">What is this?</a></span>
|
||||
<a title="Export QR codes" href="${individual.qrData.exportQrCodeUrl}">
|
||||
<@qrCodeVCard qrCodeWidth="150" />
|
||||
</a>
|
||||
</div>
|
||||
</#if>
|
||||
-->
|
||||
</section>
|
||||
|
||||
|
|
|
@ -103,4 +103,21 @@
|
|||
<#return output>
|
||||
</#function>
|
||||
|
||||
<#function hasValidVCard>
|
||||
|
||||
<#local qrData = individual.qrData >
|
||||
|
||||
<#local firstName = qrData.firstName! >
|
||||
<#local lastName = qrData.lastName! >
|
||||
|
||||
<#local validVCard = false>
|
||||
<#if firstName != "" && lastName != "">
|
||||
<#local validVCard = true>
|
||||
</#if>
|
||||
|
||||
<#return validVCard>
|
||||
</#function>
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue