Documentation for the Freemarker functions provided by ccm-sci-types-department

git-svn-id: https://svn.libreccm.org/ccm/trunk@6126 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-06-10 17:24:09 +00:00
parent 841d6a5851
commit 5320e8c9e5
2 changed files with 67 additions and 1 deletions

View File

@ -0,0 +1,66 @@
# Freemarker functions for SciDepartment items
Import Path
: `/ccm-sci-types-department.ftl`
## `getDescription(data: Node): HtmlString`
Returns the description of the department.
## `getShortDescription(data: Node): String`
Returns the short description of the department.
## `getDepartmentHeads(data: Node): Sequence<Node>`
Gets the heads of the department.
## `getDepartmentHeadId(head: Node): String`
Gets the ID of a head of a department.
## `getDepartmentHeadLink(head: Node): String`
Gets the link to the detail view of head of a department.
## `getDepartmentViceHeads(data: Node): Sequence<Node>`
Gets the vice heads of the department.
## `getDepartmentViceHeadId(head: Node): String`
Gets the ID of a vice head of a department.
## `getDepartmentViceHeadLink(head: Node): String`
Gets the link to the detail view of vicehead of a department.
## `getDepartmentSecretariats(data: Node): Sequence<Node>`
Gets the secretariats of the department.
## `getDepartmentSecretariatId(sec: Node): String`
Gets the ID of a secretariats of a department.
## `getDepartmentSecretariatLink(sec: Node): String`
Gets the link to the detail view of secretariats of a department.
## `getProjects(data: Node): Sequence<Node>`
Returns the list of projects assigned to the department.
## `getProjectId(project: Node): String`
Gets the id of a project.
## `getProjectLink(project: Node): String`
Returns the link to the detail view of a project.

View File

@ -8,7 +8,7 @@
<#import "/ccm-cms/content-item.ftl" as ContentItem> <#import "/ccm-cms/content-item.ftl" as ContentItem>
<#function getDescription data> <#function getDescription data>
<#if (data["./instituteDesc"]?size > 0)> <#if (data["./departmentDesc"]?size > 0)>
<#return data["./departmentDescription"]> <#return data["./departmentDescription"]>
<#elseif (data["./description"]?size > 0)> <#elseif (data["./description"]?size > 0)>
<#return data["./description"]> <#return data["./description"]>