Templates

When creating Calendar entries, OMD will automatically apply a default layout for each entry description. However, if you want to layout the description differently, the preferences calendarEntryTaskQueries and calendarEntryTaskTemplate will allow you to specify the layout yourself.

The preference calendarEntryTaskQueries must contain an XML document with a list of Download queries. The Download queries determine the content and structure of the XML document that is created for the calendar entry. Once the XML document is created, it will be transformed by the XSL document described below.

calendarEntryTaskQueries
Type Default Value Example
String empty See below

Example

<?xml version="1.0" encoding="UTF-8" ?>
<omd.domain.s4.Task id="?">
  <omd.domain.s4.Task query="omd.domain.s4.Task.findByTaskGroupOtherTasks"/>
  <omd.domain.s4.Resource query="omd.domain.s4.Resource.findByTaskGroup"/>
</omd.domain.s4.Task>

The preference calendarEntryTaskTemplate must represent an XSL document that transforms the entry XML document.

calendarEntryTaskTemplate
Type Default Value Example
String empty See below

Example

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output media-type="text/html"/>
  <xsl:template match="/Download/omd.domain.s4.Task">
<html>
 <body>
  <p>
  Task <xsl:value-of select="@externalId"/>
 </p>
  <p>
   <table cellpadding="0" border="0" cellspacing="0">
   <tr><td><b><xsl:value-of select="@name"/></b></td></tr>
   <tr><td><xsl:value-of select="@street"/></td></tr>
   <tr><td><xsl:value-of select="@city"/></td></tr>
   <tr><td><xsl:value-of select="@country"/></td></tr>
  </table>
 </p>
  <p>
  <xsl:value-of select="@remarks"/>
 </p>
 <ul>
  <li>Status: <xsl:value-of select="@status"/></li>
  <li>Estimated Duration: <xsl:value-of select="@estimatedDuration"/> min</li>
  <li>Earliest: <xsl:value-of select="@earliest"/></li>
  <li>Latest: <xsl:value-of select="@latest"/></li>
 </ul>
  <b>Related tasks</b>
  <ul>
  <xsl:for-each select="omd.domain.s4.Task">
  <li>Task <xsl:value-of select="@externalId"/>
  <xsl:if test="string-length(@scheduled) > 0">
  assigned to <xsl:value-of select="//omd.domain.s4.Resource[@id =      ../@scheduledFor]/@fullName"/>
  on <xsl:value-of select="@scheduled"/></xsl:if>
  </li>
  </xsl:for-each>
 </ul>
  </body>
   </html>
  </xsl:template>
  </xsl:stylesheet>

results matching ""

    No results matching ""