Skip to content

Commit

Permalink
Corrige a apresentação de relacionamento do artigo para a sua versão …
Browse files Browse the repository at this point in the history
…preprint (#357)

* Corrige a mensagem sobre artigo ter preprint

* Trata o relacionamento de artigo com a sua versão preprint diferente, sem destacar a versão preprint, para não confundir o usuário.
O link fica então junto com a data (date-type='preprint')

* Insere a caixa amarela oculta para evitar que a aplicação do site insira a caixa via javascript

* Atualiza a versão para 2.17.6
  • Loading branch information
robertatakenaka authored Dec 8, 2022
1 parent 8d15c2b commit cf8dada
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@

<xsl:template match="article" mode="article-meta-related-article">
<!-- seleciona dados de article ou sub-article -->
<xsl:if test=".//related-article">
<xsl:if test=".//related-article[@related-article-type!='preprint']">
<!-- preprint não deve tanto destaque quanto os demais tipos -->
<!-- caixa amarela -->
<div class="panel article-correction-title">
<xsl:choose>
<xsl:when test=".//sub-article[@xml:lang=$TEXT_LANG and @article-type='translation']//related-article">
<!-- sub-article -->
<xsl:apply-templates select=".//sub-article[@xml:lang=$TEXT_LANG and @article-type='translation']//related-article" mode="article-meta-related-article-box-item"/>
<xsl:apply-templates select=".//sub-article[@xml:lang=$TEXT_LANG and @article-type='translation']//related-article[@related-article-type!='preprint']" mode="article-meta-related-article-box-item"/>
</xsl:when>
<xsl:otherwise>
<!-- article -->
<xsl:apply-templates select=".//article-meta//related-article" mode="article-meta-related-article-box-item"/>
<xsl:apply-templates select="body//related-article" mode="article-meta-related-article-box-item"/>
<xsl:apply-templates select=".//article-meta//related-article[@related-article-type!='preprint']" mode="article-meta-related-article-box-item"/>
<xsl:apply-templates select="body//related-article[@related-article-type!='preprint']" mode="article-meta-related-article-box-item"/>
</xsl:otherwise>
</xsl:choose>
</div>
Expand All @@ -34,7 +35,6 @@
</ul>
</div>
</xsl:template>


<xsl:template match="@related-article-type" mode="article-meta-related-article-message">
<!-- MESSAGE -->
Expand All @@ -51,7 +51,7 @@
<xsl:when test=".='addendum'">This document has an addendum</xsl:when>
<xsl:when test=".='retraction'">This document was retracted by</xsl:when>
<xsl:when test=".='correction'">This document has corrections</xsl:when>
<xsl:when test=".='preprint'">This document has the publication of reviewers' recommendation</xsl:when>
<xsl:when test=".='preprint'">This document has a preprint version</xsl:when>
<xsl:when test=".='peer-reviewed-material'">This recommendation refers to the article</xsl:when>
<xsl:otherwise>This document is related to</xsl:otherwise>
</xsl:choose>
Expand Down Expand Up @@ -121,4 +121,8 @@
<xsl:apply-templates select="." mode="article-meta-related-article-link"/>
</xsl:template>

<xsl:template match="related-article[@related-article-type='preprint']" mode="hidden-box">
<!-- para evitar que a caixa seja inserida via javascript -->
<div class="panel article-correction-title" style="visibility: hidden"></div>
</xsl:template>
</xsl:stylesheet>
2 changes: 2 additions & 0 deletions packtools/catalogs/htmlgenerator/v2.0/article.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
<xsl:apply-templates select="." mode="article-text-sub-articles"/>

<xsl:apply-templates select="." mode="data-availability"/>

<xsl:apply-templates select="front/article-meta" mode="generic-pub-date"/>
<xsl:apply-templates select="front/article-meta" mode="generic-history"/>
<section class="documentLicense">
Expand All @@ -265,6 +266,7 @@
</div>
</div>
</section>
<xsl:apply-templates select=".//related-article[@related-article-type='preprint']" mode="hidden-box"/>
</article>
</xsl:template>

Expand Down
8 changes: 4 additions & 4 deletions packtools/catalogs/htmlgenerator/v2.0/config-labels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@
<name lang="es">Este documento es un anexo de</name>
</term>
<term>
<name>This article has preprint version</name>
<name lang="en">This article has preprint version</name>
<name lang="pt">Este artigo tem versão preprint</name>
<name lang="es">Este artículo tiene versión preprint</name>
<name>This document has a preprint version</name>
<name lang="en">This document has a preprint version</name>
<name lang="pt">Este documento possui uma versão em preprint</name>
<name lang="es">Este documento tiene una versión preprint</name>
</term>
<term>
<name>This recommendation refers to the article</name>
Expand Down
6 changes: 5 additions & 1 deletion packtools/catalogs/htmlgenerator/v2.0/generic-history.xsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:variable name="related_preprint" select="//related-article[@related-article-type='preprint']"/>
<xsl:template match="article-meta | sub-article | response" mode="generic-history">
<xsl:if test=".//history">
<div class="articleSection">
Expand Down Expand Up @@ -43,6 +43,10 @@
<xsl:apply-templates select="@date-type" mode="history-item-label"/>
</strong><br/>
<xsl:apply-templates select="."></xsl:apply-templates>
<xsl:if test="@date-type='preprint' and $related_preprint">
<br/>
<xsl:apply-templates select="$related_preprint[1]" mode="article-meta-related-article-link"/>
</xsl:if>
</li>
</xsl:template>

Expand Down
2 changes: 1 addition & 1 deletion packtools/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Single source to the version across setup.py and the whole project.
"""
from __future__ import unicode_literals
__version__ = '2.17.5'
__version__ = '2.17.6'
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

<a class="copyLink" data-clipboard-text="https://doi.org/10.1590/2236-8906-76-2021"><span class="sci-ico-link"></span>copiar</a></span>
</div>
<div class="panel article-correction-title">
<div class="panel-heading">Este documento tem a publicação de recomendação de pareceristas:
</div>
<div class="panel-body"><ul><li><a target="_blank" href="https://doi.org/10.1590/2236-8906-76/2021">10.1590/2236-8906-76/2021</a></li></ul></div>
</div>
<h1 class="article-title">
<span class="sci-ico-openAccess showTooltip" data-toggle="tooltip" data-original-title="by 4.0 "></span><i>Campylocentrum</i> Benth. (Orchidaceae, Epidendroideae) no Distrito Federal e no Estado de Goiás, Brasil<a id="shorten" href="#" class="short-link"><span class="sci-ico-link"></span></a>
</h1>
Expand Down Expand Up @@ -275,13 +270,14 @@ <h1 class="articleSectionTitle">Histórico</h1>
<li>
<strong>Aceito</strong><br>11 Out 2022</li>
<li>
<strong>Preprint depositado em</strong><br>14 Out 2022</li>
<strong>Preprint depositado em</strong><br>14 Out 2022<br><a target="_blank" href="https://doi.org/10.1590/2236-8906-76/2021">10.1590/2236-8906-76/2021</a>
</li>
</ul></div></div>
</div>
<section class="documentLicense"><div class="container-license"><div class="row">
<div class="col-sm-3 col-md-2"><a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" title=""><img src="https://licensebuttons.net/l/by/4.0//88x31.png" alt="Creative Common - by 4.0 "></a></div>
<div class="col-sm-9 col-md-10"><a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" title="">Este é um artigo publicado em acesso aberto sob uma licença Creative Commons</a></div>
</div></div></section></article>
</div></div></section><div class="panel article-correction-title" style="visibility: hidden"></div></article>
</div>
</div></div></section><div class="modal fade ModalDefault ModalTutors" id="ModalTutors" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content">
<div class="modal-header">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@

<a class="copyLink" data-clipboard-text="https://doi.org/10.1590/0101-3173.2022.v45n1.p159"><span class="sci-ico-link"></span>copiar</a></span>
</div>
<div class="panel article-correction-title">
<div class="panel-heading">Este documento tem a publicação de recomendação de pareceristas:
</div>
<div class="panel-body"><ul><li><a target="_blank" href="https://doi.org/10.1590/0101-3173.2022.v45n1.p139">preprint version</a></li></ul></div>
</div>
<h1 class="article-title">
<span class="sci-ico-openAccess showTooltip" data-toggle="tooltip" data-original-title="by 4.0 "></span>Este documento é um artigo que tem preprint<a id="shorten" href="#" class="short-link"><span class="sci-ico-link"></span></a>
</h1>
Expand Down Expand Up @@ -90,7 +85,7 @@ <h1 class="articleSectionTitle">Histórico</h1>
<section class="documentLicense"><div class="container-license"><div class="row">
<div class="col-sm-3 col-md-2"><a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" title=""><img src="https://licensebuttons.net/l/by/4.0//88x31.png" alt="Creative Common - by 4.0 "></a></div>
<div class="col-sm-9 col-md-10"><a href="https://creativecommons.org/licenses/by/4.0/" target="_blank" title="">Este é um artigo publicado em acesso aberto sob uma licença Creative Commons</a></div>
</div></div></section></article>
</div></div></section><div class="panel article-correction-title" style="visibility: hidden"></div></article>
</div>
</div></div></section><div class="modal fade ModalDefault ModalTutors" id="ModalTutors" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog"><div class="modal-content">
<div class="modal-header">
Expand Down

0 comments on commit cf8dada

Please sign in to comment.