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>
|
<#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>
|
<#function getLead item>
|
||||||
<#return Article.getLead(item)>
|
<#return Article.getLead(item)>
|
||||||
</#function>
|
</#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>
|
<#function getMainText item>
|
||||||
<#return Article.getMainText(item)>
|
<#return Article.getMainText(item)>
|
||||||
</#function>
|
</#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>
|
<#function getEndDate item>
|
||||||
<#if (item["./endDate"]?size > 0)>
|
<#if (item["./endDate"]?size > 0)>
|
||||||
<#return item["./endDate"]>
|
<#return item["./endDate"]>
|
||||||
|
|
@ -23,6 +49,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndDateYear item>
|
||||||
<#if (item["./endDate"]?size > 0)>
|
<#if (item["./endDate"]?size > 0)>
|
||||||
<#return item["./endDate/@year"]>
|
<#return item["./endDate/@year"]>
|
||||||
|
|
@ -31,6 +64,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndDateMonth item>
|
||||||
<#if (item["./endDate"]?size > 0)>
|
<#if (item["./endDate"]?size > 0)>
|
||||||
<#return item["./endDate/@month"]>
|
<#return item["./endDate/@month"]>
|
||||||
|
|
@ -39,6 +79,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndDateDay item>
|
||||||
<#if (item["./endDate"]?size > 0)>
|
<#if (item["./endDate"]?size > 0)>
|
||||||
<#return item["./endDate/@day"]>
|
<#return item["./endDate/@day"]>
|
||||||
|
|
@ -47,6 +94,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndDateDayNameShort item>
|
||||||
<#if (item["./endDate"]?size > 0)>
|
<#if (item["./endDate"]?size > 0)>
|
||||||
<#return item["./endDate/@dayNameShort"]>
|
<#return item["./endDate/@dayNameShort"]>
|
||||||
|
|
@ -55,6 +109,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndTime item>
|
||||||
<#if (item["./endTime"]?size > 0)>
|
<#if (item["./endTime"]?size > 0)>
|
||||||
<#return item["./endTime"]>
|
<#return item["./endTime"]>
|
||||||
|
|
@ -63,6 +124,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndTimeHour item>
|
||||||
<#if (item["./endTime"]?size > 0)>
|
<#if (item["./endTime"]?size > 0)>
|
||||||
<#return item["./endTime/@hour"]>
|
<#return item["./endTime/@hour"]>
|
||||||
|
|
@ -71,6 +139,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndTimeMinute item>
|
||||||
<#if (item["./endTime"]?size > 0)>
|
<#if (item["./endTime"]?size > 0)>
|
||||||
<#return item["./endTime/@minute"]>
|
<#return item["./endTime/@minute"]>
|
||||||
|
|
@ -79,6 +154,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getEndTimeSecond item>
|
||||||
<#if (item["./endTime"]?size > 0)>
|
<#if (item["./endTime"]?size > 0)>
|
||||||
<#return item["./endTime/@second"]>
|
<#return item["./endTime/@second"]>
|
||||||
|
|
@ -87,6 +169,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getStartDate item>
|
||||||
<#if (item["./startDate"]?size > 0)>
|
<#if (item["./startDate"]?size > 0)>
|
||||||
<#return item["./startDate"]>
|
<#return item["./startDate"]>
|
||||||
|
|
@ -95,6 +184,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getStartDateYear item>
|
||||||
<#if (item["./startDate"]?size > 0)>
|
<#if (item["./startDate"]?size > 0)>
|
||||||
<#return item["./startDate/@year"]>
|
<#return item["./startDate/@year"]>
|
||||||
|
|
@ -103,6 +199,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getStartDateMonth item>
|
||||||
<#if (item["./startDate"]?size > 0)>
|
<#if (item["./startDate"]?size > 0)>
|
||||||
<#return item["./startDate/@month"]>
|
<#return item["./startDate/@month"]>
|
||||||
|
|
@ -111,6 +214,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getStartDateDay item>
|
||||||
<#if (item["./startDate"]?size > 0)>
|
<#if (item["./startDate"]?size > 0)>
|
||||||
<#return item["./startDate/@day"]>
|
<#return item["./startDate/@day"]>
|
||||||
|
|
@ -119,6 +229,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getStartDateDayNameShort item>
|
||||||
<#if (item["./startDate"]?size > 0)>
|
<#if (item["./startDate"]?size > 0)>
|
||||||
<#return item["./startDate/@dayNameShort"]>
|
<#return item["./startDate/@dayNameShort"]>
|
||||||
|
|
@ -127,6 +244,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getStartTime item>
|
||||||
<#if (item["./startTime"]?size > 0)>
|
<#if (item["./startTime"]?size > 0)>
|
||||||
<#return item["./startTime"]>
|
<#return item["./startTime"]>
|
||||||
|
|
@ -135,28 +259,57 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function hasStartDate item>
|
<#--doc
|
||||||
</#function>
|
Determines if the provided event item has a start time
|
||||||
|
|
||||||
<#function hasEndDate item>
|
@param item The event item to use.
|
||||||
</#function>
|
|
||||||
|
|
||||||
|
@return `true` if the provided event item has a start time, `false` otherwise.
|
||||||
|
-->
|
||||||
<#function hasStartTime item>
|
<#function hasStartTime item>
|
||||||
<#return (item["./startTime"]?size > 0 || item["./nav:attribute[@name='startTime']"]?size > 0)>
|
<#return (item["./startTime"]?size > 0 || item["./nav:attribute[@name='startTime']"]?size > 0)>
|
||||||
</#function>
|
</#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>
|
<#function hasEndTime item>
|
||||||
<#return (item["./endTime"]?size > 0 || item["./nav:attribute[@name='endTime']"]?size > 0)>
|
<#return (item["./endTime"]?size > 0 || item["./nav:attribute[@name='endTime']"]?size > 0)>
|
||||||
</#function>
|
</#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>
|
<#function hasStartDate item>
|
||||||
<#return (item["./startDate"]?size > 0 || item["./nav:attribute[@name='startDate']"]?size > 0)>
|
<#return (item["./startDate"]?size > 0 || item["./nav:attribute[@name='startDate']"]?size > 0)>
|
||||||
</#function>
|
</#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>
|
<#function hasEndDate item>
|
||||||
<#return (item["./endDate"]?size > 0 || item["./nav:attribute[@name='endDate']"]?size > 0)>
|
<#return (item["./endDate"]?size > 0 || item["./nav:attribute[@name='endDate']"]?size > 0)>
|
||||||
</#function>
|
</#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>
|
<#function getstartTimeHour item>
|
||||||
<#if (item["./startTime"]?size > 0)>
|
<#if (item["./startTime"]?size > 0)>
|
||||||
<#return item["./startTime/@hour"]>
|
<#return item["./startTime/@hour"]>
|
||||||
|
|
@ -165,6 +318,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getstartTimeMinute item>
|
||||||
<#if (item["./startTime"]?size > 0)>
|
<#if (item["./startTime"]?size > 0)>
|
||||||
<#return item["./startTime/@minute"]>
|
<#return item["./startTime/@minute"]>
|
||||||
|
|
@ -173,6 +333,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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>
|
<#function getstartTimeSecond item>
|
||||||
<#if (item["./startTime"]?size > 0)>
|
<#if (item["./startTime"]?size > 0)>
|
||||||
<#return item["./startTime/@second"]>
|
<#return item["./startTime/@second"]>
|
||||||
|
|
@ -181,26 +348,68 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#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)>
|
<#function getLocation(item)>
|
||||||
<#return item["./location"]>
|
<#return item["./location"]>
|
||||||
</#function>
|
</#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>
|
<#function getMainContributor item>
|
||||||
<#return item["./mainContributor"]>
|
<#return item["./mainContributor"]>
|
||||||
</#function>
|
</#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>
|
<#function getEventType item>
|
||||||
<#return item["./eventType"]>
|
<#return item["./eventType"]>
|
||||||
</#function>
|
</#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>
|
<#function getCost item>
|
||||||
<#return item["./cost"]>
|
<#return item["./cost"]>
|
||||||
</#function>
|
</#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>
|
<#function getMapLink item>
|
||||||
<#return item["./mapLink"]>
|
<#return item["./mapLink"]>
|
||||||
</#function>
|
</#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>
|
<#function getEventDateAddendum item>
|
||||||
<#return item["./eventDate"]>
|
<#return item["./eventDate"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue