From 234259f4a598aa2da7397e9fca87da2a08773fd7 Mon Sep 17 00:00:00 2001 From: jensp Date: Fri, 4 Oct 2019 17:08:22 +0000 Subject: [PATCH] Several bugfixes for Freemarker function/macro libraries git-svn-id: https://svn.libreccm.org/ccm/trunk@6251 8810af33-2d31-482b-a856-94f89814c4df --- .../themes/freemarker/ccm-cms-assets-imagestep.ftl | 12 +++++------- .../freemarker/ccm-cms-assets-relatedlink.ftl | 2 +- .../freemarker/ccm-cms-publicpersonalprofile.ftl | 14 +++++++------- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/ccm-cms-assets-imagestep/web/themes/freemarker/ccm-cms-assets-imagestep.ftl b/ccm-cms-assets-imagestep/web/themes/freemarker/ccm-cms-assets-imagestep.ftl index 914d615a1..55323ec18 100644 --- a/ccm-cms-assets-imagestep/web/themes/freemarker/ccm-cms-assets-imagestep.ftl +++ b/ccm-cms-assets-imagestep/web/themes/freemarker/ccm-cms-assets-imagestep.ftl @@ -11,15 +11,13 @@ image -> { "imageId": image["./image/id"].@@text, "name": image["./image/name"].@@text, - "caption": image["./caption"].@@text, - "sortKey": image["./sortKey"]@number, - "width": image["./width"]@number, - "height": image["./width"]@number, - "imageUrl: dispatcherPrefix + "/cms-service/stream/image/?image_id=" + image["./image/id"].@@text + "caption": image["./caption"].@@text, + "sortKey": image["./sortKey"].@@text?number, + "width": image["./image/width"].@@text, + "height": image["./image/height"].@@text, + "imageUrl": dispatcherPrefix + "/cms-service/stream/image/?image_id=" + image["./image/id"].@@text } )?sort_by("sortKey")> - - <#-- <#return item["./imageAttachments"]> --> <#-- <#function getImageId image> diff --git a/ccm-cms-assets-relatedlink/web/themes/freemarker/ccm-cms-assets-relatedlink.ftl b/ccm-cms-assets-relatedlink/web/themes/freemarker/ccm-cms-assets-relatedlink.ftl index cc9bef5b2..73b0c7cb9 100644 --- a/ccm-cms-assets-relatedlink/web/themes/freemarker/ccm-cms-assets-relatedlink.ftl +++ b/ccm-cms-assets-relatedlink/web/themes/freemarker/ccm-cms-assets-relatedlink.ftl @@ -60,7 +60,7 @@ <#if (_getLinkType(link) == "caption")> <#return ""> <#elseif (_getLinkType(link) == "internalLink")> - <#return "${contextPrefix}/redirect/?oid=${link['./targetItem/@oid']}${getInternalLinkParameters(link)}"> + <#return "${contextPrefix}/redirect/?oid=${link['./targetItem/@oid']}${_getInternalLinkParameters(link)}"> <#else> <#return link["./targetURI"].@@text> diff --git a/ccm-cms-publicpersonalprofile/web/themes/freemarker/ccm-cms-publicpersonalprofile.ftl b/ccm-cms-publicpersonalprofile/web/themes/freemarker/ccm-cms-publicpersonalprofile.ftl index c956c8700..7e5247b85 100644 --- a/ccm-cms-publicpersonalprofile/web/themes/freemarker/ccm-cms-publicpersonalprofile.ftl +++ b/ccm-cms-publicpersonalprofile/web/themes/freemarker/ccm-cms-publicpersonalprofile.ftl @@ -91,7 +91,7 @@ <#else> <#return model["/ppp:profile/personalPublications/publications/publicationGroup/nav:paginator/@baseURL"].@@text + "?"> -<#function> + <#function getPublicationsPaginatorPageCount profile> <#return model["/ppp:profile/personalPublications/publications/publicationGroup/nav:paginator/@pageCount"].@@text> @@ -126,7 +126,7 @@ <#function getPublicationsPaginatonFirstPageLink profile> - <#return getPublicationsPaginatorBaseUrl(profile) + getPublicationsPaginatorPageParam(profile) + "=1)> + <#return getPublicationsPaginatorBaseUrl(profile) + getPublicationsPaginatorPageParam(profile) + "=1"> <#function getPublicationsPaginatorNextPageLink profile> @@ -134,7 +134,7 @@ <#function getPublicationsPaginatorLastPageLink profile> - <#return getPublicationsPaginatorBaseUrl(profile) + getPublicationsPaginatorPageParam(profile) + "=" + getPublicationsPaginatorPageCount(profile))> + <#return getPublicationsPaginatorBaseUrl(profile) + getPublicationsPaginatorPageParam(profile) + "=" + getPublicationsPaginatorPageCount(profile)> <#function getAvailableProjectGroups data> @@ -143,7 +143,7 @@ <#function getProjectGroupId group> <#return group["./@name"]> -<#function> + <#function getProjectGroupLink group> <#if (data["ppp:profile/personalPublications/publications/@all"] == "all")> @@ -171,7 +171,7 @@ <#else> <#return model["/ppp:profile/personalProjects/projects/projectGroup/nav:paginator/@baseURL"].@@text + "?"> -<#function> + <#function getProjectsPaginatorPageCount profile> <#return model["/ppp:profile/personalProjects/projects/projectGroup/nav:paginator/@pageCount"].@@text> @@ -206,7 +206,7 @@ <#function getProjectsPaginatonFirstPageLink profile> - <#return getProjectsPaginatorBaseUrl(profile) + getProjectsPaginatorPageParam(profile) + "=1)> + <#return getProjectsPaginatorBaseUrl(profile) + getProjectsPaginatorPageParam(profile) + "=1"> <#function getProjectsPaginatorNextPageLink profile> @@ -214,7 +214,7 @@ <#function getProjectsPaginatorLastPageLink profile> - <#return getProjectsPaginatorBaseUrl(profile) + getProjectsPaginatorPageParam(profile) + "=" + getProjectsPaginatorPageCount(profile))> + <#return getProjectsPaginatorBaseUrl(profile) + getProjectsPaginatorPageParam(profile) + "=" + getProjectsPaginatorPageCount(profile)>