source: clientsplugin/trunk/cron/zendesk.xslt

Last change on this file was 6480, checked in by Colin Guthrie, 14 years ago

Update the Zendesk summary:

  • Split into milestones.
  • Show total hours
  • Show delivery dates.
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/xml
File size: 2.5 KB
Line 
1<?xml version="1.0" encoding="utf-8"?>
2<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#160;"> ]>
3<xsl:stylesheet
4  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5  version="1.0">
6 
7  <xsl:output method="xml" indent="yes" encoding="UTF-8" omit-xml-declaration="yes"/>
8 
9  <!-- Match the root of the XML render the three views -->
10  <xsl:template match="/">
11    <entry>
12      <body>
13        <xsl:for-each select="/clientsplugin/milestones/milestone">
14          <xsl:variable name="milestone"><xsl:value-of select="./name" /></xsl:variable>
15          &lt;fieldset style=&quot;border: 1px solid #333; margin: 0.3em; margin-top: 1em;&quot;&gt;
16            &lt;legend style=&quot;margin-left: 2em; padding: 3px;&quot;&gt;Release: <xsl:value-of select="$milestone" />&lt;/legend&gt;
17            &lt;div style=&quot;margin: 1em 1em 0;&quot;&gt;
18              <xsl:if test="./description != ''">
19                &lt;p&gt;<xsl:value-of select="./description" />&lt;/p&gt;
20              </xsl:if>
21              &lt;p&gt;&lt;b&gt;Expected Due Date:&lt;/b&gt; <xsl:value-of select="./due" />&lt;/p&gt;
22            &lt;/div&gt;
23
24            &lt;table style=&quot;border-collapse:collapse; width:100%&quot;&gt;
25              &lt;tr&gt;
26              &lt;th&gt;&lt;/th&gt;
27              &lt;th style=&quot;text-align:center;&quot; &gt;Estimated Hours&lt;/th&gt;
28              &lt;th style=&quot;text-align:center;&quot; &gt;Hours Worked&lt;/th&gt;
29              &lt;th style=&quot;text-align:center;&quot; &gt;Status&lt;/th&gt;
30              &lt;/tr&gt;
31              <xsl:for-each select="/clientsplugin/summary/ticket/milestone[.=$milestone]/..">
32                &lt;tr style=&quot;<xsl:if test="position() mod 2 = 0">background-color: #B6E3EC</xsl:if>&quot;&gt;
33                  &lt;td style=&quot;padding:5px;&quot;&gt;
34                  <xsl:value-of select="./summary" />
35                  &lt;/td&gt;
36                  &lt;td style=&quot;text-align:center;padding:5px;&quot; &gt;
37                  <xsl:value-of select="./estimatedhours" />
38                  &lt;/td&gt;
39                  &lt;td style=&quot;text-align:center;padding: 5px;&quot; &gt;
40                  <xsl:value-of select="./totalhours" />
41                  &lt;/td&gt;
42                  &lt;td style=&quot;text-align:center;padding: 5px;&quot; &gt;
43                  <xsl:value-of select="./status" />
44                  &lt;/td&gt;
45                &lt;/tr&gt;
46              </xsl:for-each>
47            &lt;/table&gt;
48          &lt;/fieldset&gt;
49        </xsl:for-each>
50      </body>
51    </entry>
52  </xsl:template>
53</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.