- Timestamp:
- 2010-11-01T10:03:17+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/oran/transform/layouts/xml-to-gui.xsl
r23135 r23255 54 54 <xsl:template name="meta-to-combo"> 55 55 <xsl:param name="metadataSets" select='.'/> 56 <xsl:param name="current" select='.'/> 56 <xsl:param name="current" select='.'/> 57 57 58 58 <xsl:variable name="current_mod"> 59 59 <xsl:choose> 60 60 <xsl:when test="contains($current,'.')"><xsl:value-of select="$current"/></xsl:when> 61 <xsl:otherwise>ex.<xsl:value-of select="$current"/></xsl:otherwise> 61 <xsl:when test="$current!=''">ex.<xsl:value-of select="$current"/></xsl:when> 62 <xsl:otherwise>ex.Title</xsl:otherwise> 62 63 </xsl:choose> 63 64 </xsl:variable> 64 65 65 <select> 66 <!-- <option value ="{$current_mod}" disabled="disabled" selected="{$current_mod}"><xsl:value-of select="$current_mod"/></option> --> 67 68 <xsl:apply-templates select="$metadataSets" mode="meta-to-combo"> 69 <xsl:with-param name="current" select="$current_mod"/> 70 </xsl:apply-templates> 71 </select> 66 <xsl:variable name="exists"> 67 <xsl:apply-templates select="$metadataSets" mode="search-meta-to-combo"> 68 <xsl:with-param name="current" select="$current_mod"/> <!--<xsl:copy-of select="$current_mod"/></xsl:with-param> --> 69 </xsl:apply-templates> 70 </xsl:variable> 71 72 <xsl:choose> 73 <xsl:when test="$exists='TRUE'"> 74 <select> 75 <xsl:apply-templates select="$metadataSets" mode="meta-to-combo"> 76 <xsl:with-param name="current" select="$current_mod"/> 77 </xsl:apply-templates> 78 </select> 79 </xsl:when> 80 <xsl:otherwise> 81 <xsl:value-of select="$current_mod"/> 82 </xsl:otherwise> 83 </xsl:choose> 84 85 </xsl:template> 86 87 <xsl:template match="metadataSet" mode="search-meta-to-combo"> 88 <xsl:param name="current"/> 89 90 <xsl:variable name="set"><xsl:value-of select="substring-before($current, '.')"/></xsl:variable> 91 92 <xsl:if test="@name=$set"> 93 <xsl:apply-templates select="metadata" mode="search-meta-to-combo"> 94 <!-- <xsl:with-param name="set" select="@name"/> --> <!-- name of the set --> 95 <xsl:with-param name="current" select="$current"/> 96 </xsl:apply-templates> 97 </xsl:if> 98 </xsl:template> 99 100 <xsl:template match="metadata" mode="search-meta-to-combo"> 101 <xsl:param name="current"/> 102 <xsl:variable name="cur"><xsl:value-of select="substring-after($current, '.')"/></xsl:variable> 103 <xsl:if test="@name=$cur">TRUE</xsl:if> 104 </xsl:template> 105 106 <xsl:template match="*" mode="search-meta-to-combo"> 107 <xsl:param name="current"/> 108 <xsl:apply-templates mode="search-meta-to-combo"> 109 <xsl:with-param name="current" select="$current"/> 110 </xsl:apply-templates> 72 111 </xsl:template> 73 112 … … 76 115 77 116 <xsl:apply-templates mode="meta-to-combo"> 78 <xsl:with-param name="set" select="@name"/> 117 <xsl:with-param name="set" select="@name"/> <!-- name of the set --> 79 118 <xsl:with-param name="current" select="$current"/> 80 119 </xsl:apply-templates> … … 87 126 <xsl:variable name="meta"><xsl:value-of select="$set"/>.<xsl:value-of select="@name"/></xsl:variable> 88 127 89 <!-- if this is the current value, then set combo box to this value -->90 128 <xsl:choose> 91 129 <xsl:when test="$current = $meta"> … … 134 172 <xsl:param name="metadataSets"/> 135 173 174 <!-- DEBUG metadata: <xsl:value-of select="@name"/>eol --> 175 136 176 <div class="gsf_metadata css_gsf_metadata block leaf" title="gsf:metadata"> 137 177 <xsl:variable name="combo"> … … 192 232 <xsl:param name="depth"/> 193 233 <xsl:param name="metadataSets"/> 194 195 <!-- CHILD = <xsl:value-of select="child[1]/@name"/> -->196 <!-- CHILD = <xsl:value-of select="child::*[name()][1]"/> -->197 198 199 <!-- <xsl:for-each select="child::*"> -->200 <!-- <xsl:value-of select="name()"/> -->201 <!-- </xsl:for-each> -->202 203 234 204 235 <div class="gsf_template css_gsf_template block" title="gsf:template"> … … 211 242 </xsl:variable> 212 243 213 <!-- <a href="#" class="minmax">[+]</a><a href="#" class="remove">[x]</a><a href="#" class="remove"><img src="interfaces/oran/images/green_button_close.png" alt="[x]" title="Click me to remove"/></a><a href="[myhref]" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-home" style="float:left;"></span>Home</a> -->214 244 <table class="header"><tbody><tr><td class="header">MATCH=<input type="text" name="rawtextinput" size="10" value="{@match}"/></td><td class="header"><xsl:copy-of select="$mode"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-plusthick" title="Click me to expand">[+]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table> 215 245 … … 264 294 265 295 <div class="gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise"> 266 <table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="#" class="remove">[x]</a></td><td><a href=" [myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table>296 <table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="#" class="remove">[x]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table> 267 297 <xsl:apply-templates mode="xml-to-gui"> 268 298 <xsl:with-param name="depth" select="$depth"/>
Note:
See TracChangeset
for help on using the changeset viewer.