Docuementation for ccm-sci-project-navigation.ftl
git-svn-id: https://svn.libreccm.org/ccm/trunk@6305 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
f1a93406e2
commit
237452ab89
|
|
@ -5,14 +5,39 @@
|
||||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
"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">
|
<#function getSciProjectList listId="itemList">
|
||||||
<#return model["/bebop:page/nav:sci-project-list[@id='${listId}']"]>
|
<#return model["/bebop:page/nav:sci-project-list[@id='${listId}']"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjects list>
|
||||||
<#return list["./project"]>
|
<#return list["./project"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getTitleFilterValue list>
|
||||||
<#if (list["./filters/title"]?size > 0)>
|
<#if (list["./filters/title"]?size > 0)>
|
||||||
<#return list["./filters/title"]>
|
<#return list["./filters/title"]>
|
||||||
|
|
@ -21,6 +46,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getResearchFieldFilterValue list>
|
||||||
<#if (list["./filters/researchfield"]?size > 0)>
|
<#if (list["./filters/researchfield"]?size > 0)>
|
||||||
<#return list["./filters/researchfield"]>
|
<#return list["./filters/researchfield"]>
|
||||||
|
|
@ -29,94 +61,255 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getCount list>
|
||||||
<#return list["./paginator/@count"]>
|
<#return list["./paginator/@count"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getCurrentPage list>
|
||||||
<#return list["./paginator/@currentPage"]>
|
<#return list["./paginator/@currentPage"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getLimit list>
|
||||||
<#return list["./paginator/@limit"]>
|
<#return list["./paginator/@limit"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getMaxPages list>
|
||||||
<#return list["./paginator/@maxPages"]>
|
<#return list["./paginator/@maxPages"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getNextPageLink list>
|
||||||
<#return list["./paginator/@nextPageLink"]>
|
<#return list["./paginator/@nextPageLink"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getPrevPageLink list>
|
||||||
<#return list["./paginator/@prevPageLink"]>
|
<#return list["./paginator/@prevPageLink"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getOffset list>
|
||||||
<#return list["./paginator/@offset"]>
|
<#return list["./paginator/@offset"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemId item>
|
||||||
<#return item["./item-id"]>
|
<#return item["./item-id"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemName item>
|
||||||
<#return item["./name"]>
|
<#return item["./name"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemTitle item>
|
||||||
<#return item["./title"]>
|
<#return item["./title"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemObjectType item>
|
||||||
<#return item["./@object-type"]>
|
<#return item["./@object-type"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemBegin item>
|
||||||
<#return item["./project-begin"]>
|
<#return item["./project-begin"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemBeginDay item>
|
||||||
<#return item["./project-begin/@day"]>
|
<#return item["./project-begin/@day"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemBeginMonth item>
|
||||||
<#return item["./project-begin/@month-name"]>
|
<#return item["./project-begin/@month-name"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemBeginYear item>
|
||||||
<#return item["./project-begin/@year"]>
|
<#return item["./project-begin/@year"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemEnd item>
|
||||||
<#return item["./project-end"]>
|
<#return item["./project-end"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemEndDay item>
|
||||||
<#return item["./project-end/@day"]>
|
<#return item["./project-end/@day"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemEndMonth item>
|
||||||
<#return item["./project-end/@month-name"]>
|
<#return item["./project-end/@month-name"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemEndYear item>
|
||||||
<#return item["./project-end/@year"]>
|
<#return item["./project-end/@year"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemShortDesc item>
|
||||||
<#return item["./project-short-desc"]>
|
<#return item["./project-short-desc"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectItemMembers item>
|
||||||
<#return item["./members/member"]>
|
<#return item["./members/member"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectMemberSurname member>
|
||||||
<#return member["./@surname"]>
|
<#return member["./@surname"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--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>
|
<#function getProjectMemberGivenname member>
|
||||||
<#return member["./@givenname"]>
|
<#return member["./@givenname"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue