Skip to content

Commit

Permalink
Merge pull request #275 from gitnnolabs/remove_related_article_box
Browse files Browse the repository at this point in the history
Remove a caixa de Retratação e Errata da geração do HTML no packtools
  • Loading branch information
gitnnolabs authored Oct 7, 2021
2 parents e05f65a + e1066b9 commit 1e439b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 2 additions & 3 deletions packtools/catalogs/htmlgenerator/v2.0/article.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<xsl:include href="article-meta-contrib.xsl"/>
<xsl:include href="article-meta-abstract.xsl"/>
<xsl:include href="article-meta-product.xsl"/>
<xsl:include href="article-meta-related-article.xsl"/>
<!-- <xsl:include href="article-meta-related-article.xsl"/> -->

<xsl:include href="generic-history.xsl"/>
<xsl:include href="generic-pub-date.xsl"/>
Expand Down Expand Up @@ -80,7 +80,7 @@
<xsl:variable name="q_abstract">
<xsl:apply-templates select="article" mode="count_abstracts"/>
</xsl:variable>

<xsl:template match="/">
<xsl:choose>
<xsl:when test="$output_style='website'">
Expand Down Expand Up @@ -211,7 +211,6 @@
<div class="articleMeta">
</div>
<xsl:apply-templates select="." mode="article-meta-contrib"/>

<xsl:apply-templates select="." mode="article-or-abstract"/>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packtools/version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Single source to the version across setup.py and the whole project.
"""
from __future__ import unicode_literals
__version__ = '2.7.4'
__version__ = '2.7.5'

8 changes: 8 additions & 0 deletions tests/test_htmlgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ def test_if_history_section_is_present_in_sub_article(self):
self.assertIn('<strong>Aceito</strong><br>14 Jan 2019</li>', html_string)
self.assertIn('<strong>Publicado</strong><br>31 Maio 2019</li>', html_string)

@unittest.skip("""A caixa de retratação está sendo gerada pela aplicação, caso deseje que seja gerado pelo XSLT descomentar a linha 24 do arquivo article.xsl""")
def test_show_retraction_box_if_article_is_an_retraction(self):
sample = u"""<article article-type="retraction" dtd-version="1.1"
specific-use="sps-1.8" xml:lang="pt"
Expand All @@ -430,6 +431,7 @@ def test_show_retraction_box_if_article_is_an_retraction(self):
html_string
)

@unittest.skip("""A caixa de retratação está sendo gerada pela aplicação, caso deseje que seja gerado pelo XSLT descomentar a linha 24 do arquivo article.xsl""")
def test_should_translate_retraction_to_english(self):
sample = u"""<article article-type="retraction" dtd-version="1.1"
specific-use="sps-1.8" xml:lang="en"
Expand All @@ -449,7 +451,9 @@ def test_should_translate_retraction_to_english(self):

self.assertIn(u'This retraction retracts the following document', html_string)

@unittest.skip("""A caixa de retratação está sendo gerada pela aplicação, caso deseje que seja gerado pelo XSLT descomentar a linha 24 do arquivo article.xsl""")
def test_do_not_show_retraction_box_if_article_is_not_a_retraction(self):

sample = u"""<article article-type="research-article" dtd-version="1.1"
specific-use="sps-1.8" xml:lang="pt"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
Expand All @@ -469,7 +473,9 @@ def test_do_not_show_retraction_box_if_article_is_not_a_retraction(self):

self.assertNotIn(u'This retraction retracts the following document', html_string)

@unittest.skip("""A caixa de retratação está sendo gerada pela aplicação, caso deseje que seja gerado pelo XSLT descomentar a linha 24 do arquivo article.xsl""")
def test_show_retraction_box_if_article_is_an_partial_retraction(self):

sample = u"""<article article-type="partial-retraction" dtd-version="1.1"
specific-use="sps-1.8" xml:lang="pt"
xmlns:mml="http://www.w3.org/1998/Math/MathML"
Expand All @@ -493,6 +499,7 @@ def test_show_retraction_box_if_article_is_an_partial_retraction(self):
html_string
)

@unittest.skip("""A caixa de retratação está sendo gerada pela aplicação, caso deseje que seja gerado pelo XSLT descomentar a linha 24 do arquivo article.xsl""")
def test_presents_link_to_retreted_document_using_pid(self):
sample = u"""<article article-type="partial-retraction" dtd-version="1.1"
specific-use="sps-1.8" xml:lang="pt"
Expand All @@ -517,6 +524,7 @@ def test_presents_link_to_retreted_document_using_pid(self):
html_string
)

@unittest.skip("""A caixa de retratação está sendo gerada pela aplicação, caso deseje que seja gerado pelo XSLT descomentar a linha 24 do arquivo article.xsl""")
def test_presents_link_to_retreted_document_using_aid(self):
sample = u"""<article article-type="partial-retraction" dtd-version="1.1"
specific-use="sps-1.8" xml:lang="pt"
Expand Down

0 comments on commit 1e439b4

Please sign in to comment.