individual-qrCodeFoafPerson.ftl: After standardizing vCard QR code with Narayan, set up macro. All that's needed is completion wherever "temp" is seen.
This commit is contained in:
parent
2ce40f82aa
commit
5491a88b91
1 changed files with 40 additions and 18 deletions
|
@ -2,34 +2,56 @@
|
||||||
|
|
||||||
<#-- QR code -->
|
<#-- QR code -->
|
||||||
|
|
||||||
<#macro qrCodeFoafPerson qrCodeWidth>
|
<#macro qrCodeVCard qrCodeWidth>
|
||||||
|
|
||||||
|
<#--
|
||||||
|
Example:
|
||||||
|
|
||||||
|
BEGIN:VCARD
|
||||||
|
VERSION:3.0
|
||||||
|
N:Conlon;Michael
|
||||||
|
FN:Michael Conlon
|
||||||
|
ORG:University of Florida
|
||||||
|
TITLE:Associate Director and Chief Operating Officer
|
||||||
|
TEL;TYPE=WORK,VOICE:(352) 273-8872
|
||||||
|
EMAIL;TYPE=PREF,INTERNET:mconlon@ufl.edu
|
||||||
|
URL:https://vivo.ufl.edu/display/n25562
|
||||||
|
PHOTO;VALUE=URL;TYPE=JPG:https://vivo.ufl.edu/file/n34850/_main_image_491-NUCATS-STS-042310.jpg
|
||||||
|
REV:20080424T195243Z
|
||||||
|
END:VCARD
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#local core = "http://vivoweb.org/ontology/core#">
|
||||||
<#local foaf = "http://xmlns.com/foaf/0.1/">
|
<#local foaf = "http://xmlns.com/foaf/0.1/">
|
||||||
<#local rdfs = "http://www.w3.org/2000/01/rdf-schema#">
|
<#local rdfs = "http://www.w3.org/2000/01/rdf-schema#">
|
||||||
|
|
||||||
<#local label = individual.nameStatement.value >
|
<#local label = individual.nameStatement.value >
|
||||||
<#local workPhone = (propertyGroups.getProperty("${core}workPhone").firstValue)! >
|
<#local firstName = (allProperties.getProperty("${foaf}firstName").firstValue)! >
|
||||||
<#local firstName = (propertyGroups.getProperty("${foaf}firstName").firstValue)! >
|
<#local lastName = (allProperties.getProperty("${foaf}lastName").firstValue)! >
|
||||||
<#local lastName = (propertyGroups.getProperty("${foaf}lastName").firstValue)! >
|
<#local org = "temp" >
|
||||||
|
<#local title = "temp" >
|
||||||
|
<#local phoneNumber = (allProperties.getProperty("${core}phoneNumber").firstValue)! >
|
||||||
|
<#local email = (allProperties.getProperty("${core}email").firstValue)! >
|
||||||
|
<#local url = "temp" >
|
||||||
|
<#local photo = "temp" >
|
||||||
|
<#local rev = "temp" >
|
||||||
|
|
||||||
<#assign vCard><#t>
|
<#assign vCard><#t>
|
||||||
BEGIN:VCARD%0A<#t>
|
BEGIN:VCARD<#lt>
|
||||||
VERSION:3.0%0A<#t>
|
VERSION:3.0<#lt>
|
||||||
N:${lastName};${firstName}%0A<#t>
|
N:${lastName};${firstName}<#lt>
|
||||||
FN:${label}%0A<#t>
|
FN:${firstName} ${lastName}<#lt>
|
||||||
<#if workPhone??><#t>
|
ORG:${org}<#lt>
|
||||||
TEL;TYPE=WORK,VOICE:${workPhone}%0A<#t>
|
TITLE:${title}<#lt>
|
||||||
</#if><#t>
|
TEL;TYPE=WORK,VOICE:${phoneNumber}<#lt>
|
||||||
<#if email.statements?has_content><#t>
|
EMAIL;TYPE=PREF,INTERNET:${email}<#lt>
|
||||||
<#list email.statements as statement><#t>
|
URL:${url}<#lt>
|
||||||
EMAIL;TYPE=PREF,INTERNET:${statement.value}%0A<#t>
|
PHOTO;VALUE=URL;TYPE=JPG:${photo}<#lt>
|
||||||
</#list><#t>
|
REV:${rev}<#lt>
|
||||||
</#if><#t>
|
END:VCARD<#t>
|
||||||
END:VCARD<#t>
|
|
||||||
</#assign><#t>
|
</#assign><#t>
|
||||||
|
|
||||||
<#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${vCard}&choe=UTF-8" >
|
<#local qrCodeUrl = "https://chart.googleapis.com/chart?cht=qr&chs=${qrCodeWidth}x${qrCodeWidth}&chl=${vCard}&choe=UTF-8" >
|
||||||
|
|
||||||
<img src="${qrCodeUrl}" />
|
<img src="${qrCodeUrl}" />
|
||||||
</#macro>
|
</#macro>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue