Skip to content

Commit

Permalink
Properly display calendar for date element (not having dateType).
Browse files Browse the repository at this point in the history
  • Loading branch information
François Prunayre committed Jul 15, 2015
1 parent 4b73a3e commit 4f77e74
Showing 1 changed file with 51 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,57 @@
</div>


<!-- Create form for all existing attribute (not in gn namespace)
and all non existing attributes not already present. -->
<div class="well well-sm gn-attr {if ($isDisplayingAttributes) then '' else 'hidden'}">
<xsl:apply-templates mode="render-for-field-for-attribute"
select="
../../@*|
../../gn:attribute[not(@name = parent::node()/@*/name())]">
<xsl:with-param name="ref" select="../../gn:element/@ref"/>
<xsl:with-param name="insertRef" select="../gn:element/@ref"/>
</xsl:apply-templates>
</div>
</div>
<div class="col-sm-1 gn-control">
<xsl:call-template name="render-form-field-control-remove">
<xsl:with-param name="editInfo" select="../gn:element"/>
<xsl:with-param name="parentEditInfo" select="../../gn:element"/>
</xsl:call-template>
</div>
</div>
</xsl:template>

<!--
Date with not date type.
eg. editionDate
-->
<xsl:template mode="mode-iso19139"
priority="2000"
match="*[(gco:Date|gco:DateTime) and not(../gmd:dateType)]">
<xsl:param name="schema" select="$schema" required="no"/>
<xsl:param name="labels" select="$labels" required="no"/>

<xsl:variable name="labelConfig"
select="gn-fn-metadata:getLabel($schema, name(), $labels)"/>

<xsl:variable name="dateTypeElementRef"
select="../gn:element/@ref"/>

<div class="form-group gn-field gn-title gn-required"
id="gn-el-{$dateTypeElementRef}"
data-gn-field-highlight="">
<label class="col-sm-2 control-label">
<xsl:value-of select="$labelConfig/label"/>
</label>
<div class="col-sm-9 gn-value">
<div data-gn-date-picker="{gco:Date|gco:DateTime}"
data-label=""
data-element-name="{name(gco:Date|gco:DateTime)}"
data-element-ref="{concat('_X', gn:element/@ref)}">
</div>


<!-- Create form for all existing attribute (not in gn namespace)
and all non existing attributes not already present. -->
<div class="well well-sm gn-attr {if ($isDisplayingAttributes) then '' else 'hidden'}">
Expand Down

0 comments on commit 4f77e74

Please sign in to comment.