Documenation for the Freemarker functions provided by ccm-sci-project-navigation

git-svn-id: https://svn.libreccm.org/ccm/trunk@6123 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-06-08 15:45:50 +00:00
parent 94c17d34e4
commit 47ce316302
3 changed files with 127 additions and 6 deletions

View File

@ -80,4 +80,11 @@ item.
Gets the contact entries of the provided member item.
## `getMemberItemCotactEntry(item: Node, key: String): Node`
Gets the contact entry with the provided key of the provided member
item.

View File

@ -0,0 +1,120 @@
# Freemarker functions for SQL project lists
Import path
: `/ccm-sci-project-navigation.ftl`
## `getSciProjectList(listId: String = "itemList"): Node`
Returns an project list. The list can be selected by the optional
`listId` parameter. The default value for the parameter is `itemList`.
## `getProjects(list: Node): Sequence<Node>`
Returns the projects in a project list.
## `getTitleFilterValue(list: Node): String`
Gets the value of the title filter of the provided list.
## `getResearchFieldFilterValue(list: Node): String`
Returns the value of the research field filter of the provided list.
## `getCount(list: Node): String`
Returns the number of projects in the provided list.
## `getCurrentPage(list: Node): String`
Returns the number of the current page of the list.
## `getLimit(list: Node): String`
Gets the maximum number of items per page.
## `getMaxPages(list: Node): String`
Gets the number of page of the provided list.
## `getNextPageLink(list: Node): String`
Gets the link to the next page of the provided list.
## `getPrevPageLink(list: Node): String`
Gets the link to the previous page of the provided list.
## `getOffset(list: Node): String`
Gets the index of the first item on the current page.
## `getProjectItemId(item: Node): String`
Returns the ID of the provided project item.
## `getProjectItemName(item: Node): String`
Returns the name of the provided project item.
## `getProjectItemTitle(item: Node): String`
Returns the value of the `title` property of the provided project item.
## `getProjectItemObjectType(item: Node): String`
Returns the value of the object type of the provided project item.
## `getProjectItemBegin(item: Node): String`
Returns the value of the `begin` property of the provided project item.
## `getProjectItemBeginDay(item: Node): String`
Returns the value of the `day` property of begin date of the provided
project item.
## `getProjectItemBeginMonth(item: Node): String`
Returns the value of the `month` property of begin date of the
provided project item.
## `getProjectItemBeginYear(item: Node): String`
Returns the value of the `year` property of begin date of the provided
project item.
## `getProjectItemEnd(item: Node): String`
Returns the value of the `end` property of the provided project item.
## `getProjectItemEndDay(item: Node): String`
Returns the value of the `day` property of end date of the provided
project item.
## `getProjectItemEndMonth(item: Node): String`
Returns the value of the `month` property of end date of the
provided project item.
## `getProjectItemEndYear(item: Node): String`
Returns the value of the `year` property of end date of the provided
project item.
## `getProjectItemShortDesc(item: Node): String`
Returns the value of the `short-desc` property of the provided project
item.
## `getProjectItemMembers(item: Node): Sequence<Node>`
Returns the members of the project.
## `getProjectMemberSurname(member: Node): String`
Returns the surname of the provided member.
## `getProjectMemberGivenname(member: Node): String`
Returns the given name of the provided member.

View File

@ -120,9 +120,3 @@
<#function getProjectMemberGivenname member>
<#return member["./@givenname"]>
</#function>