Docuementation for ccm-sci-publications/article.ftl and ccm-sci-publications/authors.ftl
git-svn-id: https://svn.libreccm.org/ccm/trunk@6307 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
285c138cc7
commit
1862edc503
|
|
@ -7,6 +7,18 @@
|
||||||
|
|
||||||
<#import "../ccm-cms/content-item.ftl" as ContentItem>
|
<#import "../ccm-cms/content-item.ftl" as ContentItem>
|
||||||
|
|
||||||
|
<#--filedoc
|
||||||
|
Functions for publications of the types ArticleInCollectedVolume.
|
||||||
|
ArticleInJournal and InProceedings.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Constructs the link to the detail view for the article.
|
||||||
|
|
||||||
|
@param article The article to use.
|
||||||
|
|
||||||
|
@return The link to the detail view of the article.
|
||||||
|
-->
|
||||||
<#function getHref article>
|
<#function getHref article>
|
||||||
<#return ContentItem.generateContentItemLink(article["./@oid"])>
|
<#return ContentItem.generateContentItemLink(article["./@oid"])>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
|
||||||
|
|
@ -5,42 +5,120 @@
|
||||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<#--filedoc
|
||||||
|
Functions for processing the authors of a publication.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Constructs the link the homepage of the author.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@param keyId The `keyId` of the contact entry providing the link to the homepage.
|
||||||
|
|
||||||
|
@return The link to the homepage of the author.
|
||||||
|
-->
|
||||||
<#function getLink author keyId>
|
<#function getLink author keyId>
|
||||||
<#return author["./contacts/contact/contactentries[./keyId = '${keyId}']/value"]>
|
<#return author["./contacts/contact/contactentries[./keyId = '${keyId}']/value"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Determines if an author has a link to a homepage.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@param keyId The `keyId` of the contact entry providing the link to the homepage.
|
||||||
|
|
||||||
|
@return `true` if the author has a link to a homepage, `false` otherwise.
|
||||||
|
-->
|
||||||
<#function hasLink author keyId>
|
<#function hasLink author keyId>
|
||||||
<#return (author["./contacts/contact/contactentries[./keyId = '${keyId}']"]?size > 0)>
|
<#return (author["./contacts/contact/contactentries[./keyId = '${keyId}']"]?size > 0)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the ID of the author.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return The ID of the author.
|
||||||
|
-->
|
||||||
<#function getId author>
|
<#function getId author>
|
||||||
<#return author["./masterVersion/id"] + "_" + author["./@name"]>
|
<#return author["./masterVersion/id"] + "_" + author["./@name"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the position of the author in the sequence of authors.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return The position of the author.
|
||||||
|
-->
|
||||||
<#function getPosition author>
|
<#function getPosition author>
|
||||||
<#return author["./position()"]>
|
<#return author["./position()"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Determines if the author is the last author in the sequence.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return `true` if the author is the last in the sequence, `false`otherwise.
|
||||||
|
-->
|
||||||
<#function isLast author>
|
<#function isLast author>
|
||||||
<#return author["./last()"]>
|
<#return author["./last()"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Determines if the author has a surname.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return `true` if the author has a surname, `false`otherwise.
|
||||||
|
-->
|
||||||
<#function hasSurname author>
|
<#function hasSurname author>
|
||||||
<#return (author["./surname"]?size > 0)>
|
<#return (author["./surname"]?size > 0)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the surname of the author.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return The surname of the author.
|
||||||
|
-->
|
||||||
<#function getSurname author>
|
<#function getSurname author>
|
||||||
<#return author["./surname"]>
|
<#return author["./surname"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Determines if the author has a givnen name.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return `true` if the author has a given name, `false`otherwise.
|
||||||
|
-->
|
||||||
<#function hasGivenName author>
|
<#function hasGivenName author>
|
||||||
<#return (author["./givenname"]?size > 0)>
|
<#return (author["./givenname"]?size > 0)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the given name of the author.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return The given name of the author.
|
||||||
|
-->
|
||||||
<#function getGivenName author>
|
<#function getGivenName author>
|
||||||
<#return author["./givenname"]>
|
<#return author["./givenname"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Determines if the author is an editor.
|
||||||
|
|
||||||
|
@param author The author to use.
|
||||||
|
|
||||||
|
@return `true` if the author an editor, `false`otherwise.
|
||||||
|
-->
|
||||||
<#function isEditor author>
|
<#function isEditor author>
|
||||||
<#return author["./@isEditor"] == "true">
|
<#return author["./@isEditor"] == "true">
|
||||||
</#function>
|
</#function>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue