Bugfix for Freemarker function libraries
git-svn-id: https://svn.libreccm.org/ccm/trunk@6265 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
2128b250c4
commit
c89fe0a5b5
|
|
@ -14,6 +14,16 @@
|
|||
for the provided view and style. The paramters view and style are
|
||||
optional. If not provided the default value "detail" is used for
|
||||
the view parameter.
|
||||
|
||||
@param {node} item The data model of the content item itself. There are
|
||||
several functions for extracting this provided by other modules.
|
||||
|
||||
@param {string} view View type to use. Either `detail` or `list`. Default
|
||||
value is `detail`.
|
||||
|
||||
@param {string} style Style to use. Styles allow it to use different
|
||||
templates for `detail` or `list` views depending on the context were the
|
||||
content item is displayed.
|
||||
-->
|
||||
<#macro contentItem item view="detail" style="">
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,11 @@
|
|||
</#function>
|
||||
|
||||
<#function getItemLink item>
|
||||
<#if (item["./nav:path"]?size > 0)>
|
||||
<#return item["./nav:path"].@@text>
|
||||
<#else>
|
||||
<#return "/redirect/?oid=" + item["./@oid"]>
|
||||
</#if>
|
||||
</#function>
|
||||
|
||||
<#function getItemLead item>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
</#function>
|
||||
|
||||
<#function getPublicationObjectType item>
|
||||
<#return item["./object-type"].@@text>
|
||||
<#return item["./@object-type"]>
|
||||
</#function>
|
||||
|
||||
<#function getPublicationTitle item>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@
|
|||
<#return author["./contacts/contact/contactentries[./keyId = '${keyId}']/value"]>
|
||||
</#function>
|
||||
|
||||
<#function hasLink author keyId>
|
||||
<#return (author["./contacts/contact/contactentries[./keyId = '${keyId}']"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#function getId author>
|
||||
<#return author["./masterVersion/id"] + "_" + author["./@name"]>
|
||||
</#function>
|
||||
|
|
@ -21,10 +25,18 @@
|
|||
<#return author["./last()"]>
|
||||
</#function>
|
||||
|
||||
<#function hasSurname author>
|
||||
<#return (author["./surname"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#function getSurname author>
|
||||
<#return author["./surname"]>
|
||||
</#function>
|
||||
|
||||
<#function hasGivenName author>
|
||||
<#return (author["./givenname"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#function getGivenName author>
|
||||
<#return author["./givenname"]>
|
||||
</#function>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,14 @@
|
|||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||
>
|
||||
|
||||
<#function getExportLinks item>
|
||||
<#return item["./publicationExportLink"]>
|
||||
</#function>
|
||||
|
||||
<#function hasExportLinks item>
|
||||
<#return (item["./publicationExportLink"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#function getHref exportLink>
|
||||
<#return "${dispatcherPrefix}/scipublications/export/?format=${exportLink['./formatKey']}&publication=${exportLink['./publicationId']}">
|
||||
</#function>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,11 @@
|
|||
</#function>
|
||||
|
||||
<#function isReviewed item>
|
||||
<#if (item["./reviewed"]?size > 0)>
|
||||
<#return item["./reviewed"] == "true">
|
||||
<#else>
|
||||
<#return false>
|
||||
</#if>
|
||||
</#function>
|
||||
|
||||
<#function getAbstract item>
|
||||
|
|
@ -61,8 +65,8 @@
|
|||
<#return item["./misc"]>
|
||||
</#function>
|
||||
|
||||
<#function getExportLinks item>
|
||||
<#return item["./publicationExportLink"]>
|
||||
<#function hasPlace item>
|
||||
<#return (item["./place"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#function getPlace item>
|
||||
|
|
@ -157,7 +161,7 @@
|
|||
<#return item["./articles/article"]>
|
||||
</#function>
|
||||
|
||||
<#function getProceedigingsPapers item>
|
||||
<#function getProceedingsPapers item>
|
||||
<#return item["./papers/paper"]>
|
||||
</#function>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,18 +18,20 @@
|
|||
<#function getEnd item>
|
||||
<#if (item["./projectEnd"]?size > 0)>
|
||||
<#return item["./projectEnd"]>
|
||||
<#elseif (item["./lifeSpan/end"])>
|
||||
<#elseif (item["./lifeSpan/end"]?size > 0)>
|
||||
<#return item["./lifeSpan/end"]>
|
||||
<#elseif (item["./nav:attribute[@name = 'projectEnd']"])>
|
||||
<#elseif (item["./nav:attribute[@name = 'projectEnd']"]?size > 0)>
|
||||
<#return item["./nav:attribute[@name = 'projectEnd']"]>
|
||||
</#if>
|
||||
</#function>
|
||||
|
||||
<#function getDescription item>
|
||||
<#if (item["./projectDesc"])>
|
||||
<#if (item["./projectDesc"]?size > 0)>
|
||||
<#return item["./projectDesc"]>
|
||||
<#elseif (item["./description"])>
|
||||
<#elseif (item["./description"]?size > 0)>
|
||||
<#return item["./description"]>
|
||||
<#elseif (item["./projectDescription"]?size > 0)>
|
||||
<#return item["./projectDescription"]>
|
||||
</#if>
|
||||
</#function>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue