Documentation for ccm-cms-types-event.ftl
git-svn-id: https://svn.libreccm.org/ccm/trunk@6299 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
3459f41585
commit
bca834875d
|
|
@ -7,14 +7,40 @@
|
|||
|
||||
<#import "/ccm-cms-types-article.ftl" as Article>
|
||||
|
||||
<#--filedoc
|
||||
Functions for processing Event items.
|
||||
-->
|
||||
|
||||
<#--doc
|
||||
Gets the lead text of an event item
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The lead text of the event item.
|
||||
-->
|
||||
|
||||
<#function getLead item>
|
||||
<#return Article.getLead(item)>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the main text of an event item
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The main of the event item.
|
||||
-->
|
||||
<#function getMainText item>
|
||||
<#return Article.getMainText(item)>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the end date of an event item
|
||||
|
||||
@param item The news event to use.
|
||||
|
||||
@return The date of the event item.
|
||||
-->
|
||||
<#function getEndDate item>
|
||||
<#if (item["./endDate"]?size > 0)>
|
||||
<#return item["./endDate"]>
|
||||
|
|
@ -23,6 +49,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the year of the end date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The year of the end date of the event.
|
||||
-->
|
||||
<#function getEndDateYear item>
|
||||
<#if (item["./endDate"]?size > 0)>
|
||||
<#return item["./endDate/@year"]>
|
||||
|
|
@ -31,6 +64,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the month of the end date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The month of the end date of the event.
|
||||
-->
|
||||
<#function getEndDateMonth item>
|
||||
<#if (item["./endDate"]?size > 0)>
|
||||
<#return item["./endDate/@month"]>
|
||||
|
|
@ -39,6 +79,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the day of the end date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The day of the end date of the event.
|
||||
-->
|
||||
<#function getEndDateDay item>
|
||||
<#if (item["./endDate"]?size > 0)>
|
||||
<#return item["./endDate/@day"]>
|
||||
|
|
@ -47,6 +94,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the short name of the day of the end date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The short name of the day of the end date of the event.
|
||||
-->
|
||||
<#function getEndDateDayNameShort item>
|
||||
<#if (item["./endDate"]?size > 0)>
|
||||
<#return item["./endDate/@dayNameShort"]>
|
||||
|
|
@ -55,6 +109,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the end time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The end time of the event.
|
||||
-->
|
||||
<#function getEndTime item>
|
||||
<#if (item["./endTime"]?size > 0)>
|
||||
<#return item["./endTime"]>
|
||||
|
|
@ -63,6 +124,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the hour of the end time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The hour of the end time of the event.
|
||||
-->
|
||||
<#function getEndTimeHour item>
|
||||
<#if (item["./endTime"]?size > 0)>
|
||||
<#return item["./endTime/@hour"]>
|
||||
|
|
@ -71,6 +139,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the minute of the end time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The minute of the end time of the event.
|
||||
-->
|
||||
<#function getEndTimeMinute item>
|
||||
<#if (item["./endTime"]?size > 0)>
|
||||
<#return item["./endTime/@minute"]>
|
||||
|
|
@ -79,6 +154,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the second of the end time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The second of the end time of the event.
|
||||
-->
|
||||
<#function getEndTimeSecond item>
|
||||
<#if (item["./endTime"]?size > 0)>
|
||||
<#return item["./endTime/@second"]>
|
||||
|
|
@ -87,6 +169,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the start date of an event item
|
||||
|
||||
@param item The news event to use.
|
||||
|
||||
@return The start of the event item.
|
||||
-->
|
||||
<#function getStartDate item>
|
||||
<#if (item["./startDate"]?size > 0)>
|
||||
<#return item["./startDate"]>
|
||||
|
|
@ -95,6 +184,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the year of the start date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The year of the start date of the event.
|
||||
-->
|
||||
<#function getStartDateYear item>
|
||||
<#if (item["./startDate"]?size > 0)>
|
||||
<#return item["./startDate/@year"]>
|
||||
|
|
@ -103,6 +199,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the month of the start date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The month of the start date of the event.
|
||||
-->
|
||||
<#function getStartDateMonth item>
|
||||
<#if (item["./startDate"]?size > 0)>
|
||||
<#return item["./startDate/@month"]>
|
||||
|
|
@ -111,6 +214,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the day of the start date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The day of the start date of the event.
|
||||
-->
|
||||
<#function getStartDateDay item>
|
||||
<#if (item["./startDate"]?size > 0)>
|
||||
<#return item["./startDate/@day"]>
|
||||
|
|
@ -119,6 +229,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the short name of the day of the start date of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The short name of the day of the start date of the event.
|
||||
-->
|
||||
<#function getStartDateDayNameShort item>
|
||||
<#if (item["./startDate"]?size > 0)>
|
||||
<#return item["./startDate/@dayNameShort"]>
|
||||
|
|
@ -127,6 +244,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the start time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The start time of the event.
|
||||
-->
|
||||
<#function getStartTime item>
|
||||
<#if (item["./startTime"]?size > 0)>
|
||||
<#return item["./startTime"]>
|
||||
|
|
@ -135,28 +259,57 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#function hasStartDate item>
|
||||
</#function>
|
||||
<#--doc
|
||||
Determines if the provided event item has a start time
|
||||
|
||||
<#function hasEndDate item>
|
||||
</#function>
|
||||
@param item The event item to use.
|
||||
|
||||
@return `true` if the provided event item has a start time, `false` otherwise.
|
||||
-->
|
||||
<#function hasStartTime item>
|
||||
<#return (item["./startTime"]?size > 0 || item["./nav:attribute[@name='startTime']"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Determines if the provided event item has a end time
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return `true` if the provided event item has a end time, `false` otherwise.
|
||||
-->
|
||||
<#function hasEndTime item>
|
||||
<#return (item["./endTime"]?size > 0 || item["./nav:attribute[@name='endTime']"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Determines if the provided event item has a start date.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return `true` if the provided event item has a start date, `false` otherwise.
|
||||
-->
|
||||
<#function hasStartDate item>
|
||||
<#return (item["./startDate"]?size > 0 || item["./nav:attribute[@name='startDate']"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Determines if the provided event item has a end date.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return `true` if the provided event item has a end date, `false` otherwise.
|
||||
-->
|
||||
<#function hasEndDate item>
|
||||
<#return (item["./endDate"]?size > 0 || item["./nav:attribute[@name='endDate']"]?size > 0)>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the hour of the start time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The hour of the start time of the event.
|
||||
-->
|
||||
<#function getstartTimeHour item>
|
||||
<#if (item["./startTime"]?size > 0)>
|
||||
<#return item["./startTime/@hour"]>
|
||||
|
|
@ -165,6 +318,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the minute of the start time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The minute of the start time of the event.
|
||||
-->
|
||||
<#function getstartTimeMinute item>
|
||||
<#if (item["./startTime"]?size > 0)>
|
||||
<#return item["./startTime/@minute"]>
|
||||
|
|
@ -173,6 +333,13 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the second of the start time of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The second of the start time of the event.
|
||||
-->
|
||||
<#function getstartTimeSecond item>
|
||||
<#if (item["./startTime"]?size > 0)>
|
||||
<#return item["./startTime/@second"]>
|
||||
|
|
@ -181,26 +348,68 @@
|
|||
</#if>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the location of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The value of the `location` property of the event.
|
||||
-->
|
||||
<#function getLocation(item)>
|
||||
<#return item["./location"]>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the main contributor of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The value of the `mainContributor` property of the event.
|
||||
-->
|
||||
<#function getMainContributor item>
|
||||
<#return item["./mainContributor"]>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the type of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The value of the `eventType` property of the event.
|
||||
-->
|
||||
<#function getEventType item>
|
||||
<#return item["./eventType"]>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the cost of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The value of the `cost` property of the event.
|
||||
-->
|
||||
<#function getCost item>
|
||||
<#return item["./cost"]>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the map link for the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The value of the `mapLink` property of the event.
|
||||
-->
|
||||
<#function getMapLink item>
|
||||
<#return item["./mapLink"]>
|
||||
</#function>
|
||||
|
||||
<#--doc
|
||||
Gets the addendium of the event.
|
||||
|
||||
@param item The event item to use.
|
||||
|
||||
@return The value of the `eventDate` property of the event.
|
||||
-->
|
||||
<#function getEventDateAddendum item>
|
||||
<#return item["./eventDate"]>
|
||||
</#function>
|
||||
|
|
|
|||
Loading…
Reference in New Issue