Project

General

Profile

« Previous | Next » 

Revision 5311

Added by daigle over 14 years ago

Merge 1.9.2 changes back into the trunk

View differences:

searchWorkflowResultset.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
	
33
	<xsl:import href="util.xsl"/>
33 34
	<xsl:output method="html" />
34 35
	<xsl:param name="sessid" />
35 36
	<xsl:param name="qformat">default</xsl:param>
36 37
	<xsl:param name="enableediting">false</xsl:param>
37 38
	<xsl:param name="contextURL"/>
38
	
39
	<xsl:variable name ="emptyString"/>
40

  
39 41
	<xsl:template match="/">  
40 42
	
41 43
		<div class="result-header-section">      
......
52 54
		<xsl:if test="count(resultset/document) &gt; 0">
53 55
			<xsl:for-each select="resultset/document">
54 56
				<xsl:sort select='./updatedate' order='descending' />
55
				<xsl:sort select='./param[@name="/entity/@name"]' />
56
				<xsl:if test="./docname = 'entity'">
57
				<!--<xsl:sort select='./param[@name="/entity/@name"]' />
58
				<xsl:if test="./docname = 'entity'">-->
59
				<xsl:sort select='./param[@name="/kar/karEntry/karEntryXML/entity/@name"]' />
60
				<xsl:variable name="workflowRunClassName">
61
                    <xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/property[@name=&apos;WorkflowRun&apos;]/@class"]'/>
62
                </xsl:variable>
63
                <xsl:if test="$workflowRunClassName = $emptyString">
57 64
					<div>
58 65
						<xsl:attribute name="class">
59 66
							<xsl:choose>
......
61 68
								<xsl:when test="position() mod 2 = 0">row row-even</xsl:when>
62 69
							</xsl:choose>
63 70
						</xsl:attribute>
71
						<xsl:variable name="karLSID">
72
							<xsl:value-of select='./param[@name="/kar/mainAttributes/lsid"]' />
73
						</xsl:variable>
74
						<xsl:variable name="karDocid">
75
							<xsl:call-template name="extractDocidFromLsid">
76
								<xsl:with-param name="lsidString" select="$karLSID" />
77
							</xsl:call-template>
78
						</xsl:variable>
79
						<xsl:variable name="workflowLSID">
80
							<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/entity/property[@name=&apos;entityId&apos;]/@value"]'/>
81
						</xsl:variable>
82
						<xsl:variable name="karXmlDocid">
83
                            <xsl:value-of select='./docid'/>
84
                        </xsl:variable>
85
                        <xsl:variable name="karXmlLSID">
86
                            <xsl:call-template name="lsid">
87
                                <xsl:with-param name="docid" select="$karXmlDocid" />
88
                            </xsl:call-template>
89
                        </xsl:variable>
64 90

  
65 91
						<div class="col col1">	
66
							<xsl:value-of select='./param[@name="/entity/@name"]' />		
92
							<!--<xsl:value-of select='./param[@name="/entity/@name"]' />-->
93
							<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/entity/@name"]' />		
67 94
						</div>
68 95
						<div class="col col2">	
69
							<xsl:value-of select='./param[@name="property[@name=&apos;KeplerDocumentation&apos;]/property[@name=&apos;author&apos;]/configure"]' />		
96
							<!--<xsl:value-of select='./param[@name="property[@name=&apos;KeplerDocumentation&apos;]/property[@name=&apos;author&apos;]/configure"]' />-->
97
							<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/entity/property[@name=&apos;KeplerDocumentation&apos;]/property[@name=&apos;author&apos;]/configure"]' />		
70 98
						</div>
71 99
						<div class="col col3">	
72 100
							<xsl:value-of select='./updatedate' />			
......
74 102
						<div class="col col4">	
75 103
							<a>
76 104
								<xsl:attribute name="class">underlined</xsl:attribute>
77
								<xsl:attribute name="href">./searchWorkflowRun.jsp?workflowid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;entityId&apos;]/@value"]' /></xsl:attribute>
105
								<!--<xsl:attribute name="href">./searchWorkflowRun.jsp?workflowid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;entityId&apos;]/@value"]' /></xsl:attribute>-->
106
								<xsl:attribute name="href">./searchWorkflowRun.jsp?workflowlsid=<xsl:value-of select="$workflowLSID" /></xsl:attribute>
78 107
									 View Runs
79 108
							</a>
80 109
							<span> | </span>
81 110
							<a>
82 111
								<xsl:attribute name="class">underlined</xsl:attribute>
83
								<xsl:attribute name="href">./scheduleWorkflowRun.jsp?workflowid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;entityId&apos;]/@value"]' />&amp;karid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;karLSID&apos;]/@value"]' />&amp;workflowname=<xsl:value-of select='./param[@name="/entity/@name"]' /></xsl:attribute>	 
112
								<!--<xsl:attribute name="href">./scheduleWorkflowRun.jsp?workflowid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;entityId&apos;]/@value"]' />&amp;karid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;karLSID&apos;]/@value"]' />&amp;workflowname=<xsl:value-of select='./param[@name="/entity/@name"]' /></xsl:attribute>-->
113
								<xsl:attribute name="href">./scheduleWorkflowRun.jsp?workflowid=<xsl:value-of select="$karXmlLSID" />&amp;karid=<xsl:value-of select="normalize-space($karLSID)" />&amp;workflowname=<xsl:value-of select='./param[@name="/kar/karEntry/karEntryXML/entity/@name"]' /></xsl:attribute>	 
84 114
									 Schedule
85 115
							</a> 
86 116
							<span> | </span>
87 117
							<a>
88 118
								<xsl:attribute name="class">underlined</xsl:attribute>
89 119
								<xsl:attribute name="href">
90
									<xsl:value-of select='$contextURL' />/metacat?action=read&amp;docid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;karLSID&apos;]/@value"]' />
120
									<!--<xsl:value-of select='$contextURL' />/metacat?action=read&amp;docid=<xsl:value-of select='./param[@name="/entity/property[@name=&apos;karLSID&apos;]/@value"]' />-->
121
									<xsl:value-of select='$contextURL' />/metacat?action=read&amp;docid=<xsl:value-of select="$karDocid" />
91 122
								</xsl:attribute>	 
92 123
									 Download
93 124
							</a> 
......
97 128
			</xsl:for-each>
98 129
		</xsl:if>
99 130
	</xsl:template>
100

  
131
	
132
	<!--************** creates a fake lsid for kar xml file document**************-->
133
   <xsl:template name="lsid">
134
       <xsl:param name="docid"/>
135
       <xsl:variable name="colonString">
136
           <xsl:value-of select="translate($docid, '.', ':')" />
137
        </xsl:variable>
138
       <xsl:variable name="lsidString" select="concat('urn:lsid:','gamma.msi.ucsb.edu/OpenAuth',':',string($colonString))"/>      
139
        <xsl:value-of select="$lsidString"/>
140
   </xsl:template>
101 141
</xsl:stylesheet>

Also available in: Unified diff