Bugfixes for Freemarker functions
git-svn-id: https://svn.libreccm.org/ccm/trunk@6084 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
ab8ed2e2e4
commit
4115973bf0
|
|
@ -26,7 +26,15 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getObjectCount listId>
|
<#function getObjectCount listId>
|
||||||
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectCount"]?number>
|
<#if (model["/bebop:page/*[@id='${listId}']/nav:noContent"]?size > 0)>
|
||||||
|
<#return 0>
|
||||||
|
<#elseif (model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectCount"]?size > 0)>
|
||||||
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectCount"]?number>
|
||||||
|
<#elseif (model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/count"]?size > 0)>
|
||||||
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/count"]?number>
|
||||||
|
<#else>
|
||||||
|
<#return 0>
|
||||||
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPaginatorBaseUrl listId>
|
<#function getPaginatorBaseUrl listId>
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,19 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getTitleFilterValue list>
|
<#function getTitleFilterValue list>
|
||||||
<#return list["./filters/title"]>
|
<#if (list["./filters/title"]?size > 0)>
|
||||||
|
<#return list["./filters/title"]>
|
||||||
|
<#else>
|
||||||
|
<#return "">
|
||||||
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getResearchFieldFilterValue list>
|
<#function getResearchFieldFilterValue list>
|
||||||
<#return list["./filters/researchfield"]>
|
<#if (list["./filters/researchfield"]?size > 0)>
|
||||||
|
<#return list["./filters/researchfield"]>
|
||||||
|
<#else>
|
||||||
|
<#return "">
|
||||||
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getCount list>
|
<#function getCount list>
|
||||||
|
|
@ -65,6 +73,10 @@
|
||||||
<#return item["./@object-type"]>
|
<#return item["./@object-type"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#function getProjectItemBegin item>
|
||||||
|
<#return item["./project-begin"]>
|
||||||
|
</#function>
|
||||||
|
|
||||||
<#function getProjectItemBeginDay item>
|
<#function getProjectItemBeginDay item>
|
||||||
<#return item["./project-begin/@day"]>
|
<#return item["./project-begin/@day"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
@ -77,6 +89,10 @@
|
||||||
<#return item["./project-begin/@year"]>
|
<#return item["./project-begin/@year"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#function getProjectItemEnd item>
|
||||||
|
<#return item["./project-end"]>
|
||||||
|
</#function>
|
||||||
|
|
||||||
<#function getProjectItemEndDay item>
|
<#function getProjectItemEndDay item>
|
||||||
<#return item["./project-end/@day"]>
|
<#return item["./project-end/@day"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
|
||||||
|
|
@ -35,5 +35,11 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function formatDateTime style date>
|
<#function formatDateTime style date>
|
||||||
<#return _formatDateTime(style, date["./@year"], date["./@month"], date["./@day"], date["./@hour"], date["./@minute"], date["./@second"])>
|
<#assign year = (date["./@year"]?size > 0)?then(date["./@year"], 0)>
|
||||||
|
<#assign month = (date["./@month"]?size > 0)?then(date["./@month"], 0)>
|
||||||
|
<#assign day = (date["./@day"]?size > 0)?then(date["./@day"], 0)>
|
||||||
|
<#assign hour = (date["./@hour"]?size > 0)?then(date["./@hour"], 0)>
|
||||||
|
<#assign minute = (date["./@minute"]?size > 0)?then(date["./@minute"], 0)>
|
||||||
|
<#assign second = (date["./@second"]?size > 0)?then(date["./@second"], 0)>
|
||||||
|
<#return _formatDateTime(style, year, month, day, hour, minute, second)>
|
||||||
</#function>
|
</#function>
|
||||||
Loading…
Reference in New Issue