Adding new functionality that I did commit when I should have...

This commit is contained in:
2019-07-01 10:00:37 +02:00
parent d04501a303
commit d2338283aa
3 changed files with 308 additions and 55 deletions

View File

@@ -8,13 +8,64 @@
</div>
</xsl:template>
<xsl:template match="clanek/status">
<form id="myed-status">
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
<xsl:attribute name="name">status</xsl:attribute>
<xsl:attribute name="value">A-HU</xsl:attribute>
<xsl:if test="text()='A-HU'"><xsl:attribute name="checked" /></xsl:if>
</xsl:element>
nepregledano
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
<xsl:attribute name="name">status</xsl:attribute>
<xsl:attribute name="value">DESLO</xsl:attribute>
<xsl:if test="text()='DESLO'"><xsl:attribute name="checked" /></xsl:if>
</xsl:element>
v delu
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
<xsl:attribute name="name">status</xsl:attribute>
<xsl:attribute name="value">PREHUN</xsl:attribute>
<xsl:if test="text()='PREHUN'"><xsl:attribute name="checked" /></xsl:if>
</xsl:element>
za HUN redakcijo
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
<xsl:attribute name="name">status</xsl:attribute>
<xsl:attribute name="value">PRISLO</xsl:attribute>
<xsl:if test="text()='PRISLO'"><xsl:attribute name="checked" /></xsl:if>
</xsl:element>
za SLO dopolnitev
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
<xsl:attribute name="name">status</xsl:attribute>
<xsl:attribute name="value">OUT</xsl:attribute>
<xsl:if test="text()='OUT'"><xsl:attribute name="checked" /></xsl:if>
</xsl:element>
za izlocitev
<xsl:element name="input">
<xsl:attribute name="type">radio</xsl:attribute>
<xsl:attribute name="name">status</xsl:attribute>
<xsl:attribute name="value">Z</xsl:attribute>
<xsl:if test="text()='Z'"><xsl:attribute name="checked" /></xsl:if>
</xsl:element>
ZAKLJUCENO
</form>
</xsl:template>
<xsl:template match="clanek/glava">
<div>
<xsl:apply-templates select="korpusi/korpus[1]/frek_lema | oblika/iztocnica | zaglavje/besedna_vrsta"/>
<span id="myed-opomba"><xsl:apply-templates select="opomba"/></span>
<xsl:apply-templates select="opomba"/>
</div>
</xsl:template>
<xsl:template match="glava/opomba">
<span id="myed-opomba"><xsl:apply-templates/></span>
</xsl:template>
<xsl:template match="korpusi/korpus/frek_lema">
<xsl:element name="span">
<xsl:attribute name="id">myed-freq-start</xsl:attribute>
@@ -92,33 +143,30 @@
</xsl:template>
<!--disambiguators anywhere-->
<xsl:template match="indikator[text() or *]">
<xsl:if test="count(parent::pomen/../pomen)&gt;1 or oznaka">
<xsl:text xml:space="preserve"> </xsl:text>
<span>
<xsl:if test="not(oznaka) or text()"><xsl:text xml:space="preserve">(</xsl:text></xsl:if>
<xsl:template match="indikator">
<xsl:if test="count(parent::pomen/../pomen)&gt;0 or oznaka">
<xsl:element name="span">
<xsl:attribute name="class">myed-indikator</xsl:attribute>
<xsl:attribute name="indikator_id"><xsl:value-of select="@indikator_id"/></xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="not(oznaka) or text()"><xsl:text xml:space="preserve">)</xsl:text></xsl:if>
</span>
<xsl:text xml:space="preserve"> </xsl:text>
</xsl:element>
</xsl:if>
</xsl:template>
<xsl:template match="oznaka[text() or *]">
<xsl:if test="not(parent::indikator)"><xsl:text xml:space="preserve"> </xsl:text></xsl:if>
<span class="myed-oznaka">
<xsl:apply-templates/>
</span>
<xsl:if test="not(parent::indikator)"><xsl:text xml:space="preserve"> </xsl:text></xsl:if>
<xsl:template match="oznaka">
<xsl:element name="span">
<xsl:attribute name="class">myed-oznaka</xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="@tip" /></xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="oznaka[text() or *]">
<span class="myed-oznaka">
<xsl:if test="not(parent::indikator/text())"><xsl:text xml:space="preserve">(</xsl:text></xsl:if>
<xsl:template match="rzg">
<xsl:element name="span">
<xsl:attribute name="class">myed-prevod-razlaga</xsl:attribute>
<xsl:attribute name="taksonomija"><xsl:value-of select="@taksonomija" /></xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="not(parent::indikator/text())"><xsl:text xml:space="preserve">)</xsl:text></xsl:if>
</span>
</xsl:element>
</xsl:template>
<xsl:template match="indikator | oznaka"/>
<!--sense-level translations-->
<xsl:template match="vecjez/prevod">
<xsl:if test="*">
@@ -131,10 +179,10 @@
<xsl:attribute name="prevod_id"><xsl:value-of select="@prevod_id" /></xsl:attribute>
<xsl:attribute name="tabindex">1</xsl:attribute>
<span class="myed-prevod-oznaka"><xsl:apply-templates select=".//oznaka"/></span>
<xsl:apply-templates select=".//oznaka | .//ustaljena_oblika"/>
<span class="myed-prevod-text"><xsl:apply-templates select=".//tekst"/></span>
<sup><xsl:apply-templates select=".//vir"/></sup>
<span class="myed-prevod-razlaga"><xsl:apply-templates select=".//rzg"/></span>
<xsl:apply-templates select=".//rzg"/>
<select class="myed-clanek-select">
<option value="edit" title="Spremeni / HUN"></option>
@@ -150,6 +198,9 @@
myed-prevod-semicolon
<xsl:if test="@semicolon!='true'">myed-prevod-semicolon-hidden</xsl:if>
</xsl:attribute>
<xsl:attribute name="ozbo">
<xsl:value-of select="@semicolon" />
</xsl:attribute>
;
</xsl:element>
</xsl:element>