From 5edd620506a8c9a792b776ddeab6138d1a1ea99a Mon Sep 17 00:00:00 2001 From: jensp Date: Sun, 3 Nov 2019 17:59:15 +0000 Subject: [PATCH] Documentation for ccm-sci-types-department.ftl git-svn-id: https://svn.libreccm.org/ccm/trunk@6309 8810af33-2d31-482b-a856-94f89814c4df --- .../freemarker/ccm-sci-types-department.ftl | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/ccm-sci-types-department/web/themes/freemarker/ccm-sci-types-department.ftl b/ccm-sci-types-department/web/themes/freemarker/ccm-sci-types-department.ftl index e03af1438..2f5adee64 100644 --- a/ccm-sci-types-department/web/themes/freemarker/ccm-sci-types-department.ftl +++ b/ccm-sci-types-department/web/themes/freemarker/ccm-sci-types-department.ftl @@ -7,6 +7,17 @@ <#import "/ccm-cms/content-item.ftl" as ContentItem> +<#--filedoc + Functions for processing SciDepartment items. +--> + +<#--doc + Gets the description of a SciDepartment. + + @param data The SciDepartment to use. + + @return The description of the department. +--> <#function getDescription data> <#if (data["./departmentDesc"]?size > 0)> <#return data["./departmentDescription"]> @@ -15,6 +26,13 @@ +<#--doc + Gets the short description of a SciDepartment. + + @param data The SciDepartment to use. + + @return The short description of the department. +--> <#function getShortDescription data> <#if (data["./departmentShortDescription"]?size > 0)> <#return data["./departmentShortDescription"]> @@ -27,54 +45,145 @@ +<#--doc + Gets the heads of the department. + + @param data The SciDepartment to use. + + @return A sequence of person items. +--> <#function getDepartmentHeads data> <#return data["./heads/head"]> +<#--doc + Gets the ID of a department head. + + @param head The department head to use. + + @return The ID of the department head. +--> <#function getDepartmentHeadId head> <#return data["./masterVersion/id"] + "_" + data["./@name"]> +<#--doc + Gets the link to a department head. + + @param head The department head to use. + + @return A link to the department head. +--> <#function getDepartmentHeadLink head> <#return ContentItem.generateContentItemLink(head)> +<#--doc + Gets the vice heads of the department. + + @param data The SciDepartment to use. + + @return A sequence of person items. +--> <#function getDepartmentViceHeads data> <#return data["./viceheads/vicehead"]> +<#--doc + Gets the ID of a department vice head. + + @param head The department vice head to use. + + @return The ID of the department vice head. +--> <#function getDepartmentViceHeadId head> <#return head["./masterVersion/id"] + "_" + data["./@name"]> +<#--doc + Gets the link to a department vice head. + + @param head The department vice head to use. + + @return A link to the department vice head. +--> <#function getDepartmentViceHeadLink head> <#return CMS.generateContentItemLink(head)> +<#--doc + Gets the secretariats of the department. + + @param data The SciDepartment to use. + + @return A sequence of person items. +--> <#function getSecretariats data> <#return data["./secretariats/secretariat"]> +<#--doc + Gets the ID of a secretariat. + + @param head The secretariat to use. + + @return The ID of the secretariat. +--> <#function getSecretariatsId sec> <#return sec["./masterVersion/id"] + "_" + data["./@name"]> +<#--doc + Gets the link to a secretariat. + + @param head The secretariat to use. + + @return A link to the secretariat. +--> <#function getSecretariatsLink sec> <#return ContentItem.generateContentItemLink(sec)> +<#--doc + Gets the members of the department. + + @param data The SciDepartment to use. + + @return A sequence of persons. +--> <#function getMembers data> <#return data["./member"]> +<#--doc + Gets the projects of the department. + + @param data The SciDepartment to use. + + @return A sequence of SciProjects. +--> <#function getProjects data> <#return data["./project"]> +<#--doc + Gets the ID of a project. + + @param project The project to use. + + @return The ID of the project. +--> <#function getProjectId project> <#return project["./masterVersion/id"] + "_" + data["./@name"]> +<#--doc + Gets the link to a project. + + @param project The project to use. + + @return A link to the project. +--> <#function getProject project> <#return ContentItem.generateContentItemLink(project)>