Freemarker functions for ccm-sci-project-navigation and ccm-sci-publications-navigation
git-svn-id: https://svn.libreccm.org/ccm/trunk@6054 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
50ef33b45b
commit
956a12fc8e
|
|
@ -0,0 +1,108 @@
|
|||
<#ftl ns_prefixes={
|
||||
"bebop":"http://www.arsdigita.com/bebop/1.0",
|
||||
"cms":"http://www.arsdigita.com/cms/1.0",
|
||||
"nav":"http://ccm.redhat.com/navigation",
|
||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||
>
|
||||
|
||||
<#function getSciProjectList listId="itemList">
|
||||
<#return model["/bebop:page/nav:sci-project-list[@id='${listId}'"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjects list>
|
||||
<#return list["./project]>
|
||||
</#function>
|
||||
|
||||
<#function getTitleFilterValue list>
|
||||
<#return list["./filters/title"]>
|
||||
</#function>
|
||||
|
||||
<#function getResearchFieldFilterValue list>
|
||||
<#return list["./filters/researchfield"]>
|
||||
</#function>
|
||||
|
||||
<#function getCount list>
|
||||
<#return list["./paginator/@count"]>
|
||||
</#function>
|
||||
|
||||
<#function getCurrentPage list>
|
||||
<#return list["./paginator/@currentPage"]>
|
||||
</#function>
|
||||
|
||||
<#function getLimit list>
|
||||
<#return list["./paginator/@limit"]>
|
||||
</#function>
|
||||
|
||||
<#function getMaxPages list>
|
||||
<#return list["./paginator/@maxPages"]>
|
||||
</#function>
|
||||
|
||||
<#function getNextPageLink list>
|
||||
<#return list["./paginator/@nextPageLink"]>
|
||||
</#function>
|
||||
|
||||
<#function getPrevPageLink list>
|
||||
<#return list["./paginator/@prevPageLink"]>
|
||||
</#function>
|
||||
|
||||
<#function getOffset list>
|
||||
<#return list["./paginator/@offset"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemId item>
|
||||
<#return item["./item-id"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemTitle item>
|
||||
<#return item["./title"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemObjectType item>
|
||||
<#return item["./@object-type]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemBeginDay item>
|
||||
<#return item["./project-begin/@day"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemBeginMonth item>
|
||||
<#return item["./project-begin/@month-name"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemBeginYear item>
|
||||
<#return item["./project-begin/@year"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemEndDay item>
|
||||
<#return item["./project-end/@day"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemEndMonth item>
|
||||
<#return item["./project-end/@month-name"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemEndYear item>
|
||||
<#return item["./project-end/@year"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemShortDesc item>
|
||||
<#return item["./project-short-desc"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectItemMembers item>
|
||||
<#return item["./members/member"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectMemberSurname member>
|
||||
<#return member["./surname"]>
|
||||
</#function>
|
||||
|
||||
<#function getProjectMemberGivenname member>
|
||||
<#return member["./givenname"]>
|
||||
</#function>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
<#ftl ns_prefixes={
|
||||
"bebop":"http://www.arsdigita.com/bebop/1.0",
|
||||
"cms":"http://www.arsdigita.com/cms/1.0",
|
||||
"nav":"http://ccm.redhat.com/navigation",
|
||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||
>
|
||||
|
||||
<#function getSciPublicationsList listId="itemList">
|
||||
<#return model["/bebop:page/nav:sci-publication-list[@id='${listId}']"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublications list>
|
||||
<#return list["./publication"]>
|
||||
</#function>
|
||||
|
||||
<#function getTitleFilterValue list>
|
||||
<#return list["./fiters/title]>
|
||||
</#function>
|
||||
|
||||
<#function getYearOfPublicationFilterAvailableYears list>
|
||||
<#return list["./filters/available-years/year]>
|
||||
</#function>
|
||||
|
||||
<#function getYearOfPublicationFilterValue list>
|
||||
<#return list["./fiters/year]>
|
||||
</#function>
|
||||
|
||||
<#function getAuthorsFilterValue list>
|
||||
<#return list["./filters/authors]>
|
||||
</#function>
|
||||
|
||||
<#function getSort list>
|
||||
<#return list["./filters/sort"]
|
||||
</#function>
|
||||
|
||||
<#function getCount list>
|
||||
<#return list["./paginator/@count"]>
|
||||
</#function>
|
||||
|
||||
<#function getCurrentPage list>
|
||||
<#return list["./paginator/@currentPage"]>
|
||||
</#function>
|
||||
|
||||
<#function getLimit list>
|
||||
<#return list["./paginator/@limit"]>
|
||||
</#function>
|
||||
|
||||
<#function getMaxPages list>
|
||||
<#return list["./paginator/@maxPages"]>
|
||||
</#function>
|
||||
|
||||
<#function getNextPageLink list>
|
||||
<#return list["./paginator/@nextPageLink"]>
|
||||
</#function>
|
||||
|
||||
<#function getPrevPageLink list>
|
||||
<#return list["./paginator/@prevPageLink"]>
|
||||
</#function>
|
||||
|
||||
<#function getOffset list>
|
||||
<#return list["./paginator/@offset"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationId item>
|
||||
<#return item["./item-id"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationObjectType item>
|
||||
<#return item["./object-type"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationTitle item>
|
||||
<#return item["./title"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationYear item>
|
||||
<#return item["./year"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationAuthors item>
|
||||
<#return item["./authors/author"]>
|
||||
</#function>
|
||||
|
||||
<#function getAuthorSurname author>
|
||||
<#return author["./surname"]>
|
||||
</#function>
|
||||
|
||||
<#function getAuthorGivenName author>
|
||||
<#return author["./givenname"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationPlace item>
|
||||
<#return item["./place"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationOrganization item>
|
||||
<#return item["./organization"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationOrganizationName orga>
|
||||
<#return orga["./title"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationUnpublishedPlace item>
|
||||
<#return item["./unpublished-place"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationPublisher item>
|
||||
<#return item["./publisher"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublisherPlace publisher>
|
||||
<#return publisher["./@place"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublisherName publisher>
|
||||
<#return publisher["./@name"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationJournal item>
|
||||
<#return item["./journal"]>
|
||||
</#function>
|
||||
|
||||
<#function getJournalName journal>
|
||||
<#return journal["./name"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationIssue item>
|
||||
<#return item["./issue"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationVolumeOfJournal item>
|
||||
<#return item["./volume-of-journal"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationPagesFrom item>
|
||||
<#return item["./pages-from"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationPagesTo item>
|
||||
<#return item["./pages-to"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationCollectedVolume item>
|
||||
<#return item["./collected-volume"]>
|
||||
</#function>
|
||||
|
||||
<#function getCollectedVolumeAuthors collectedVolume>
|
||||
<#return collectedVolume["./authors/author"]>
|
||||
</#function>
|
||||
|
||||
<#function getCollectedVolumeTitle collectedVolume>
|
||||
<#return collectedVolume["./title"]>
|
||||
</#function>
|
||||
|
||||
<#function getCollectedVolumePublisher collectedVolume>
|
||||
<#return collectedVolume["./publisher"]>
|
||||
</#function>
|
||||
|
||||
<#function getProceedings item>
|
||||
<#return item["./proceedings"]>
|
||||
</#function>
|
||||
|
|
@ -5,6 +5,11 @@
|
|||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||
>
|
||||
|
||||
<#---
|
||||
Retrieves the languages in which the content of the current page is available.
|
||||
|
||||
@return A sequence of the available languages (as ISO language codes)
|
||||
#>
|
||||
<#function getAvailableLanguages>
|
||||
<#if (model["/bebop:page/cms:contentPanel"]?size > 0)>
|
||||
<#return model["/bebop:page/cms:contentPanel/availableLanguages/language/@locale"]>
|
||||
|
|
|
|||
Loading…
Reference in New Issue