| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:eat="http://msqr.us/xsd/ieat"
- xmlns:xweb="http://msqr.us/xsd/jaxb-web"
- exclude-result-prefixes="eat xweb">
-
- <!-- imports -->
- <xsl:import href="tmpl/default-layout.xsl"/>
-
- <!-- layout variables -->
- <xsl:variable name="layout.global.nav.page" select="'add-recipe'"/>
-
- <!-- helper vars -->
- <xsl:variable name="recipe" select="xweb:x-data/xweb:x-model/eat:edit/eat:recipe"/>
- <xsl:variable name="is-new" select="not(boolean($recipe/@recipeId))"/>
-
- <xsl:template match="xweb:x-data" mode="page-title">
- <xsl:choose>
- <xsl:when test="$is-new = 'false'">
- <xsl:value-of select="key('i18n','edit-recipe.edit.validate.title')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('i18n','edit-recipe.create.validate.title')"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="xweb:x-data" mode="page-body">
- <div class="intro">
- <xsl:choose>
- <xsl:when test="$is-new = 'false'">
- <xsl:value-of select="key('i18n','edit-recipe.edit.validate.intro')"
- disable-output-escaping="yes"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="key('i18n','edit-recipe.create.validate.intro')"
- disable-output-escaping="yes"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
-
- <xsl:apply-templates select="$recipe" mode="display"/>
-
- <form method="post" action="{$web-context}{$ctx/xweb:path}">
- <input type="submit" name="_finish" value="{key('i18n','save.displayName')}"/>
- <xsl:text> </xsl:text>
- <input type="submit" value="{key('i18n','reedit.displayName')}">
- <xsl:choose>
- <xsl:when test="$is-new = 'true'">
- <xsl:attribute name="name">_target1</xsl:attribute>
- </xsl:when>
- <xsl:otherwise>
- <xsl:attribute name="name">_target0</xsl:attribute>
- </xsl:otherwise>
- </xsl:choose>
- </input>
- </form>
- </xsl:template>
- </xsl:stylesheet>
|