diff --git a/ccm-sci-member-navigation/web/themes/freemarker/ccm-sci-member-navigation.ftl b/ccm-sci-member-navigation/web/themes/freemarker/ccm-sci-member-navigation.ftl index ac7b0eabb..60dc2dfb9 100644 --- a/ccm-sci-member-navigation/web/themes/freemarker/ccm-sci-member-navigation.ftl +++ b/ccm-sci-member-navigation/web/themes/freemarker/ccm-sci-member-navigation.ftl @@ -5,54 +5,149 @@ "ui": "http://www.arsdigita.com/ui/1.0"} > +<#--filedoc + Functions for processing member lists. +--> + +<#--doc + Retrieve a member list from the model + + @param listId The ID of the list to retrieve. + + @return The model of the member list. +--> <#function getSciMemberList listId="itemList"> <#return model["/bebop:page/nav:sci-member-list[@id='${listId}']"]> +<#--doc + Get the members from a list + + @param list The list model as returned by `getSciMemberList`. + + @return A sequence with the member models. +--> <#function getMembers list> <#return list["./member"]> +<#--doc + Get the current value of the surname filter. + + @param list The list model as returned by `getSciMemberList`. + + @return The value of the surname filter list. +--> <#function getSurnameFilterValue list> <#return list["./filters/surname"]> +<#--doc + Get the number of members in the list. + + @param list The list model as returned by `getSciMemberList`. + + @return The number of members in the list. +--> <#function getCount list> <#return list["./paginator/@count"]> +<#--doc + Get the current page of the list. + + @param list The list model as returned by `getSciMemberList`. + + @return The current page of the list. +--> <#function getCurrentPage list> <#return list["./paginator/@currentPage"]> +<#--doc + Gets the maximum number of items per page.. + + @param list The list model as returned by `getSciMemberList`. + + @return The maximum member of items per page. +--> <#function getLimit list> <#return list["./paginator/@limit"]> +<#--doc + Gets the number of pages of the list. + + @param list The list model as returned by `getSciMemberList`. + + @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 member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The ID of the provided member item. +--> <#function getMemberItemId item> <#return item["./item-id"]> +<#--doc + Gets the name of the member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The name of the provided member item. +--> <#function getMemberItemName item> <#return item["./name"]> +<#--doc + Gets the title of the member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The title of the provided member item. +--> <#function getMemberItemTitle item> <#return item["./title"]> @@ -61,22 +156,59 @@ <#return item["./surname"]> +<#--doc + Gets the given name of the member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The given name of the provided member item. +--> <#function getMemberItemGivenName item> <#return item["./givenname"]> +<#--doc + Gets the name prefix of the member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The name prefix of the provided member item. +--> <#function getMemberItemTitlePre item> <#return item["./title-pre"]> +<#--doc + Gets the name suffix of the member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The name suffix of the provided member item. +--> <#function getMemberItemTitlePost item> <#return item["./title-post"]> +<#--doc + Gets the contact entries of the member. + + @param item The model of the member item to use (as returned by `getMembers`) + + @return The contact entries of the provided member item. +--> <#function getMemberItemContactEntries item> <#return item["./contact-entries"]> +<#--doc + Get the contact entry with the specified key. + + @param item The model of the member item to use (as returned by `getMembers`). + + @param key The key of the contact entry. + + @return The contact entry. +--> <#function getMemberItemContactEntry item key> <#return item["./contact-entries/contact-entry[./@key='${key}']"]> \ No newline at end of file