Documentation for ccm-sci-types-institute.ftl

git-svn-id: https://svn.libreccm.org/ccm/trunk@6310 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-11-03 18:03:00 +00:00
parent 5edd620506
commit 7871487205
1 changed files with 46 additions and 0 deletions

View File

@ -7,6 +7,17 @@
<#import ../ccm-cms/content-item.ftl as ContentItem>
<#--filedoc
Functions for processing SciInstitute items.
-->
<#--doc
Gets the description of the institute.
@param data The SciInstitute to use.
@return The description of the institute.
-->
<#function getDescription data>
<#if (data["./instituteDesc"]?size > 0)>
<#return data["./instituteDesc"]>
@ -15,6 +26,13 @@
</#if>
</#function>
<#--doc
Gets the short description of the institute.
@param data The SciInstitute to use.
@return The short description of the institute.
-->
<#function getShortDescription data>
<#if (data["./instituteShortDescription"])>
<#return data["./instituteShortDescription"])>
@ -23,18 +41,46 @@
</#if>
</#function>
<#--doc
Gets the departments of an institute.
@param data The SciInstitute to use.
@return A sequence of SciDepartments.
-->
<#function getDepartments data>
<#return data["./departments"]>
</#function>
<#--doc
Gets the OID of a department.
@param department The SciDepartment to use.
@return The OID of the department.
-->
<#function getDepartmentOid department>
<#return department["./@oid"]>
</#function>
<#--doc
Gets the title of a department.
@param department The SciDepartment to use.
@return The title of the department.
-->
<#function getDepartmentTitle department>
<#return department["./title"]>
</#function>
<#--doc
Gets the link the to department.
@param department The SciDepartment to use.
@return The link to the department.
-->
<#function getDepartmentLink department>
<#return ContentItem.generateContentItemLink(department)>
</#function>