diff --git a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl index 62d45973..a18fefc9 100644 --- a/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl +++ b/productMods/templates/freemarker/body/individual/individual--foaf-person.ftl @@ -3,7 +3,7 @@ <#-- Individual profile page template for foaf:Person individuals --> <#include "individual-setup.ftl"> -<#include "individual-qrCodeFoafPerson.ftl"> +<#import "individual-qrCodeGenerator.ftl" as qr>
@@ -34,7 +34,7 @@
  • RDF
  • - <@qrCode /> + <@qr.renderCode /> diff --git a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl deleted file mode 100644 index 4319c52c..00000000 --- a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeFoafPerson.ftl +++ /dev/null @@ -1,27 +0,0 @@ -<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> - -<#include "individual-qrCodeGenerator.ftl"> - -<#-- This macro will display a vCard QR code (includes email, phone number, URI, etc) - * default display is a small icon that reveals the full QR code when clicked - * setting the display to "full" will render a full-size QR code (<@qrCode display="full" />) - * the size can be set using the width parameter (default is 125px) - --> -<#macro qrCode display="icon" width="125"> - <#if hasValidVCard()> - <#assign qrCodeLinkedImage><@qrCodeVCard qrCodeWidth=width /> - - <#if (display == "full")> -
    vCard QR
    - ${qrCodeLinkedImage} - <#elseif (display == "icon")> -
  • - qr icon - ${qrCodeLinkedImage} Close -
  • - <#else> -

    You have passed an invalid value for the qrCode display parameter.

    - - - - \ No newline at end of file diff --git a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl index 094830b9..e800c2a1 100644 --- a/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl +++ b/productMods/templates/freemarker/body/partials/individual/individual-qrCodeGenerator.ftl @@ -20,6 +20,30 @@ +<#-- This macro will display a vCard QR code (includes email, phone number, URI, etc) + * default display is a small icon that reveals the full QR code when clicked + * setting the display to "full" will render a full-size QR code (<@renderCode display="full" />) + * the size can be set using the width parameter (default is 125px) + --> +<#macro renderCode display="icon" width="125"> + <#if hasValidVCard()> + <#assign qrCodeLinkedImage><@qrCodeVCard qrCodeWidth=width /> + + <#if (display == "full")> +
    vCard QR
    + ${qrCodeLinkedImage} + <#elseif (display == "icon")> +
  • + qr icon + ${qrCodeLinkedImage} Close +
  • + <#else> +

    You have passed an invalid value for the qrCode display parameter.

    + + + + + <#function getQrCodeUrlForVCard qrCodeWidth>