From d60270bcf5aee13270cc2ce9cef57206a64b2ed5 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 19 Apr 2019 17:38:51 +0000 Subject: [PATCH] Freemarker support for ccm-cms-types-contact and ccm-cms-types-address git-svn-id: https://svn.libreccm.org/ccm/trunk@5964 8810af33-2d31-482b-a856-94f89814c4df --- .../freemarker/ccm-cms-types-address.ftl | 26 ++++++++++++++++ .../freemarker/ccm-cms-types-contact.ftl | 31 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 ccm-cms-types-address/web/themes/freemarker/ccm-cms-types-address.ftl create mode 100644 ccm-cms-types-contact/web/themes/freemarker/ccm-cms-types-contact.ftl diff --git a/ccm-cms-types-address/web/themes/freemarker/ccm-cms-types-address.ftl b/ccm-cms-types-address/web/themes/freemarker/ccm-cms-types-address.ftl new file mode 100644 index 000000000..86ca61f4e --- /dev/null +++ b/ccm-cms-types-address/web/themes/freemarker/ccm-cms-types-address.ftl @@ -0,0 +1,26 @@ +<#ftl ns_prefixes={ +"bebop":"http://www.arsdigita.com/bebop/1.0", +"cms":"http://www.arsdigita.com/cms/1.0", +"nav":"http://ccm.redhat.com/navigation", +"ui": "http://www.arsdigita.com/ui/1.0"} +> + +<#function getCity item> + <#return item["./city"]> + + +<#function getPostalCode item> + <#return item["./postalCode"]> + + +<#function getState item> + <#return item["./state"]> + + +<#function getCountry item> + <#return item["./country"]> + + +<#function getIsoCountryCode item> + <#return item["./isoCountryCode"]> + \ No newline at end of file diff --git a/ccm-cms-types-contact/web/themes/freemarker/ccm-cms-types-contact.ftl b/ccm-cms-types-contact/web/themes/freemarker/ccm-cms-types-contact.ftl new file mode 100644 index 000000000..3cd82fff5 --- /dev/null +++ b/ccm-cms-types-contact/web/themes/freemarker/ccm-cms-types-contact.ftl @@ -0,0 +1,31 @@ +<#ftl ns_prefixes={ +"bebop":"http://www.arsdigita.com/bebop/1.0", +"cms":"http://www.arsdigita.com/cms/1.0", +"nav":"http://ccm.redhat.com/navigation", +"ui": "http://www.arsdigita.com/ui/1.0"} +> + +<#function getAddress item> + <#return item["./address/address"]> + + +<#function getPerson item> + <#return item["./person"]> + + +<#function getContactEntries item> + <#return item["./contactentries"]> + + +<#function getContactEntry item keyId> + <#return item["./contactentries[keyId=${keyId}]"]> +<#/function> + +<#function getContactEntryLabel entry> + <#return item["./key"]> + + +<#function getContactEntryValue entry> + <#return item["./value"]> + +