From 237452ab89943581f3665922079dc8f5143abe6c Mon Sep 17 00:00:00 2001 From: jensp Date: Sun, 3 Nov 2019 14:59:46 +0000 Subject: [PATCH] Docuementation for ccm-sci-project-navigation.ftl git-svn-id: https://svn.libreccm.org/ccm/trunk@6305 8810af33-2d31-482b-a856-94f89814c4df --- .../freemarker/ccm-sci-project-navigation.ftl | 193 ++++++++++++++++++ 1 file changed, 193 insertions(+) diff --git a/ccm-sci-project-navigation/web/themes/freemarker/ccm-sci-project-navigation.ftl b/ccm-sci-project-navigation/web/themes/freemarker/ccm-sci-project-navigation.ftl index a70dea135..7145d2587 100644 --- a/ccm-sci-project-navigation/web/themes/freemarker/ccm-sci-project-navigation.ftl +++ b/ccm-sci-project-navigation/web/themes/freemarker/ccm-sci-project-navigation.ftl @@ -5,14 +5,39 @@ "ui": "http://www.arsdigita.com/ui/1.0"} > +<#--filedoc + Functions for processing project lists. +--> + +<#--doc + Gets the project list with provided ID from the model. + + @param listId The ID of the to retrieve. + + @return The model of the list with the provided ID. +--> <#function getSciProjectList listId="itemList"> <#return model["/bebop:page/nav:sci-project-list[@id='${listId}']"]> +<#--doc + Get the projects from a project list + + @param list The list to use. + + @return A sequence with the models of the projects in the list. +--> <#function getProjects list> <#return list["./project"]> +<#--doc + Gets the current value of the title filter. + + @param The model of the list to use. + + @return The value of the title filter. +--> <#function getTitleFilterValue list> <#if (list["./filters/title"]?size > 0)> <#return list["./filters/title"]> @@ -21,6 +46,13 @@ +<#--doc + Gets the current value of the research field filter. + + @param The model of the list to use. + + @return The current value of the research field filter. +--> <#function getResearchFieldFilterValue list> <#if (list["./filters/researchfield"]?size > 0)> <#return list["./filters/researchfield"]> @@ -29,94 +61,255 @@ +<#--doc + Gets the number of projects in the list. + + @param The model of the list to use. + + @return The number of projects in the list. +--> <#function getCount list> <#return list["./paginator/@count"]> +<#--doc + Gets the current page of the list. + + @param The model of the list to use. + + @return The current page of the list. +--> <#function getCurrentPage list> <#return list["./paginator/@currentPage"]> +<#--doc + Gets the maximum number of items per page. + + @param The model of the list to use. + + @return The maximum number of items per page. +--> <#function getLimit list> <#return list["./paginator/@limit"]> +<#--doc + Gets the number of pages of the list. + + @param The model of the list to use. + + @return The number of pages of the list. +--> <#function getMaxPages list> <#return list["./paginator/@maxPages"]> +<#--doc + Gets the link to the next page of the list. + + @param list The list model as returned by `getSciMemberList`. + + @return The link to the next page of the list. +--> <#function getNextPageLink list> <#return list["./paginator/@nextPageLink"]> +<#--doc + Gets the link to the previous page of the list. + + @param list The list model as returned by `getSciMemberList`. + + @return The link to the previous page of the list. +--> <#function getPrevPageLink list> <#return list["./paginator/@prevPageLink"]> +<#--doc + Gets the index to the first visible item. + + @param list The list model as returned by `getSciMemberList`. + + @return The index of the first visible item. +--> <#function getOffset list> <#return list["./paginator/@offset"]> +<#--doc + Gets the ID of the project. + + @param item The model of the project item to use (as returned by `getProjects`) + + @return The ID of the provided project item. +--> <#function getProjectItemId item> <#return item["./item-id"]> +<#--doc + Gets the name of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The name of the project item. +--> <#function getProjectItemName item> <#return item["./name"]> +<#--doc + Gets the title of the project item. + + @param title The model of the project item to use (as returned by `getProjects`). + + @return The title of the project item. +--> <#function getProjectItemTitle item> <#return item["./title"]> +<#--doc + Gets the object type of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The object type of the project item. +--> <#function getProjectItemObjectType item> <#return item["./@object-type"]> +<#--doc + Gets the begin date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The begin date of the project. +--> <#function getProjectItemBegin item> <#return item["./project-begin"]> +<#--doc + Gets day of the begin date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The day of the begin date of the project. +--> <#function getProjectItemBeginDay item> <#return item["./project-begin/@day"]> +<#--doc + Gets the month of the begin date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The month of the begin date of the project. +--> <#function getProjectItemBeginMonth item> <#return item["./project-begin/@month-name"]> +<#--doc + Get year of the begin date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The year of the begin date of the project. +--> <#function getProjectItemBeginYear item> <#return item["./project-begin/@year"]> +<#--doc + Gets the end date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The end date of the project. +--> <#function getProjectItemEnd item> <#return item["./project-end"]> +<#--doc + Gets the day of the end date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The day of the end date of the project. +--> <#function getProjectItemEndDay item> <#return item["./project-end/@day"]> +<#--doc + Gets the month of the end date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The month of the end date of the project. +--> <#function getProjectItemEndMonth item> <#return item["./project-end/@month-name"]> +<#--doc + Gets the year of the end date of the project item. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The year of the end date of the project. +--> <#function getProjectItemEndYear item> <#return item["./project-end/@year"]> +<#--doc + Gets the short description of the project. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return The short description of the project. +--> <#function getProjectItemShortDesc item> <#return item["./project-short-desc"]> +<#--doc + Gets the members of the project. + + @param item The model of the project item to use (as returned by `getProjects`). + + @return A sequence containing the models for the members of the project. +--> <#function getProjectItemMembers item> <#return item["./members/member"]> +<#--doc + Gets the surname of a project member + + @param member The model of the project member to use (as returned by `getProjectItemMembers`). + + @return The surname of the project name. +--> <#function getProjectMemberSurname member> <#return member["./@surname"]> +<#--doc + Gets the given name of a project member + + @param member The model of the project member to use (as returned by `getProjectItemMembers`). + + @return The given name of the project name. +--> <#function getProjectMemberGivenname member> <#return member["./@givenname"]>