Module: alfresco/renderers/Date

alfresco/renderers/Date

Renders an iso8601 format date indicating when a node created or last modified. However, when simple is configured to be true this will just render the date using the propertyToRender configuration attribute.
Author:
  • Dave Draper
License:
Source:

Examples

Sample configuration to override modified by properties:

{
   name: "alfresco/renderers/Date",
   config: {
      modifiedDateProperty: "modifiedOn",
      modifiedByProperty: "modifiedBy"
   }
}

Sample configuration of simple mode:

{
   name: "alfresco/renderers/Date",
   config: {
      simple: true,
      propertyToRender: "date"
   }
}

Members

format :string

An optional format to apply to the date. This is only used when simple is configured to be true.
Type:
  • string
Since:
  • 1.0.88
Default Value:
  • null
Source:

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/Date.properties"}]
Source:

modifiedByLastNameProperty :string

An optional property to complement modifiedByProperty for the cases when only "firstName" and "lastName" attributes are available (rather than "displayName"). In order to use this the modifiedByMessage will need to be overridden with a message that accepts a third token.
Type:
  • string
Since:
  • 1.0.86
Default Value:
  • null
Source:

modifiedByMessage :string

The message to display. This takes the form "Modified ago by " and is used when a modifiedByProperty is available.
Type:
  • string
Since:
  • 1.0.86
Default Value:
  • "details.modified-by"
Source:

modifiedByProperty :string

This can be set to override the default property to use to get the name of the modifier which (in dot-notation) will be "jsNode.properties.modifier". This is the property that is typically available when dealing with standard Node data.
Type:
  • string
Default Value:
  • "jsNode.properties.modifier"
Source:

modifiedDateProperty :string

This can be set to override the default property to use to get the ISO 8601 modification date which (in dot-notation) will be "jsNode.properties.modified.iso8601". This is the property that is typically available when dealing with standard Node data.
Type:
  • string
Default Value:
  • "jsNode.properties.modified.iso8601"
Source:

modifiedMessage :string

The message to display. This takes the form "Modified ago" and is used when a modifiedByProperty is NOT available.
Type:
  • string
Since:
  • 1.0.86
Default Value:
  • "details.modified-by.missing-user"
Source:

simple :boolean

Indicates whether to simply display the date without rendering it within a specific message.
Type:
  • boolean
Default Value:
  • false
Source:

Methods

postMixInProperties()

Set up the attributes to be used when rendering the template.
Source: