Revision 5311
Added by daigle over 14 years ago
searchWorkflowRunResultset.xsl | ||
---|---|---|
29 | 29 |
* into an HTML format suitable for rendering with modern web browsers. |
30 | 30 |
--> |
31 | 31 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
32 |
|
|
32 |
<xsl:import href="util.xsl"/> |
|
33 | 33 |
<xsl:output method="html" /> |
34 | 34 |
<xsl:param name="sessid" /> |
35 | 35 |
<xsl:param name="qformat">default</xsl:param> |
36 | 36 |
<xsl:param name="enableediting">false</xsl:param> |
37 | 37 |
<xsl:param name="contextURL"/> |
38 |
<xsl:variable name ="pdfExtension" select="'.pdf'"/> |
|
39 |
<xsl:variable name ="emptyString"/> |
|
38 | 40 |
|
39 | 41 |
<xsl:template match="/"> |
40 | 42 |
<div class="result-header-section"> |
... | ... | |
50 | 52 |
if there are not then don't show the query results --> |
51 | 53 |
<xsl:if test="count(resultset/document) > 0"> |
52 | 54 |
<xsl:for-each select="resultset/document"> |
53 |
<xsl:sort select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='startTime']/@value"]' order='descending' /> |
|
54 |
<xsl:sort select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='workflowName']/@value"]' /> |
|
55 |
<div> |
|
56 |
<xsl:attribute name="class"> |
|
57 |
<xsl:choose> |
|
55 |
<xsl:sort select='./param[@name="/kar/karEntry/karEntryXML/property[@name='WorkflowRun']/property[@name='startTime']/@value"]' order='descending' /> |
|
56 |
<xsl:sort select='./param[@name="/kar/karEntry/karEntryXML/property[@name='WorkflowRun']/property[@name='workflowName']/@value"]' /> |
|
57 |
<!-- test if the document has the "workflowRun" property. If has, kept this document--> |
|
58 |
<xsl:variable name="workflowRunClassName"> |
|
59 |
<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/property[@name='WorkflowRun']/@class"]'/> |
|
60 |
</xsl:variable> |
|
61 |
|
|
62 |
<xsl:if test="$workflowRunClassName != $emptyString"> |
|
63 |
<xsl:variable name="karDocid"> |
|
64 |
<xsl:call-template name="extractDocidFromLsid"> |
|
65 |
<xsl:with-param name="lsidString" select='./param[@name="/kar/mainAttributes/lsid"]' /> |
|
66 |
</xsl:call-template> |
|
67 |
</xsl:variable> |
|
68 |
<xsl:variable name="pdfFile"> |
|
69 |
<xsl:for-each select='./param[@name="/kar/karEntry/karEntryAttributes/Name"]'> |
|
70 |
<xsl:variable name="fileName" select='.' /> |
|
71 |
<xsl:if test="contains($fileName, $pdfExtension)"> |
|
72 |
<xsl:value-of select="normalize-space($fileName)"/> |
|
73 |
</xsl:if> |
|
74 |
</xsl:for-each> |
|
75 |
</xsl:variable> |
|
76 |
|
|
77 |
<div> |
|
78 |
<xsl:attribute name="class"> |
|
79 |
<xsl:choose> |
|
58 | 80 |
<xsl:when test="position() mod 2 = 1">row row-odd</xsl:when> |
59 | 81 |
<xsl:when test="position() mod 2 = 0">row row-even</xsl:when> |
60 |
</xsl:choose> |
|
61 |
</xsl:attribute> |
|
82 |
</xsl:choose>
|
|
83 |
</xsl:attribute>
|
|
62 | 84 |
|
63 |
<div class="col col1"> |
|
64 |
<xsl:value-of select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='workflowName']/@value"]' />
|
|
65 |
</div> |
|
66 |
<div class="col col2"> |
|
67 |
<xsl:choose> |
|
68 |
<xsl:when test="not(./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='tpcStatus']/@value"])" >
|
|
85 |
<div class="col col1">
|
|
86 |
<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/property[@name='WorkflowRun']/property[@name='workflowName']/@value"]' />
|
|
87 |
</div>
|
|
88 |
<div class="col col2">
|
|
89 |
<xsl:choose>
|
|
90 |
<xsl:when test="not(./param[@name="/kar/karEntry/karEntryAttributes/tpcStatus"])" >
|
|
69 | 91 |
unknown |
70 |
</xsl:when> |
|
71 |
<xsl:otherwise> |
|
72 |
<xsl:value-of select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='tpcStatus']/@value"]' />
|
|
73 |
</xsl:otherwise> |
|
74 |
</xsl:choose> |
|
75 |
</div> |
|
76 |
<div class="col col3"> |
|
77 |
<xsl:value-of select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='startTime']/@value"]' />
|
|
78 |
</div> |
|
79 |
<div class="col col4"> |
|
80 |
<a> |
|
81 |
<xsl:attribute name="class">underlined</xsl:attribute> |
|
82 |
<xsl:attribute name="href"> |
|
83 |
<xsl:value-of select='$contextURL' />/metacat?action=read&docid=<xsl:value-of select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='karLSID']/@value"]' />&archiveEntryName=<xsl:value-of select='./param[@name="/property[@class='org.kepler.util.WorkflowRun']/property[@name='ReportInstance_pdf']/@value"]' />
|
|
84 |
</xsl:attribute> |
|
85 |
|
|
86 |
</a> |
|
92 |
</xsl:when>
|
|
93 |
<xsl:otherwise>
|
|
94 |
<xsl:value-of select='./param[@name="/kar/karEntry/karEntryAttributes/tpcStatus"]' />
|
|
95 |
</xsl:otherwise>
|
|
96 |
</xsl:choose>
|
|
97 |
</div>
|
|
98 |
<div class="col col3">
|
|
99 |
<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/property[@name='WorkflowRun']/property[@name='startTime']/@value"]' />
|
|
100 |
</div>
|
|
101 |
<div class="col col4">
|
|
102 |
<a>
|
|
103 |
<xsl:attribute name="class">underlined</xsl:attribute>
|
|
104 |
<xsl:attribute name="href">
|
|
105 |
<xsl:value-of select='$contextURL' />/metacat?action=read&docid=<xsl:value-of select="$karDocid" />&archiveEntryName=<xsl:value-of select="$pdfFile" />
|
|
106 |
</xsl:attribute>
|
|
107 |
PDF
|
|
108 |
</a>
|
|
87 | 109 |
<!-- | |
88 | 110 |
<a> |
89 | 111 |
<xsl:attribute name="class">underlined</xsl:attribute> |
... | ... | |
92 | 114 |
</xsl:attribute> |
93 | 115 |
HTML |
94 | 116 |
</a --> |
95 |
</div> |
|
96 |
</div> |
|
117 |
</div> |
|
118 |
</div> |
|
119 |
</xsl:if> |
|
97 | 120 |
</xsl:for-each> |
98 | 121 |
</xsl:if> |
99 | 122 |
</xsl:template> |
100 |
|
|
101 | 123 |
</xsl:stylesheet> |
Also available in: Unified diff
Merge 1.9.2 changes back into the trunk