Skip to content

Commit

Permalink
Merge pull request #3131 from gitnnolabs/add_license
Browse files Browse the repository at this point in the history
Adiciona a licença no rodapé do site e atualiza o opac_schema
  • Loading branch information
gitnnolabs authored Nov 5, 2024
2 parents 8ccc11a + fbd6475 commit bb42ca5
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 23 deletions.
13 changes: 12 additions & 1 deletion opac/webapp/config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,13 @@
- OPAC_FILTER_SECTION_ENABLE: ativa/desativa o filtro por seção na página do issue.
- Common Style List
- OAPC_COMMON_STYLE_LIST: Caminho para um arquivo .json com as CSL.
- OPAC_COMMON_STYLE_LIST: Caminho para um arquivo .json com as CSL.
- Site License
- OPAC_SITE_LICENSE_ENABLE: ativa/desativa a exibição do logo do creative commons no rodapé do site
- OPAC_SITE_LICENSE_NAME: Nome da licença (default: "Creative Common - by 4.0")
- OPAC_SITE_LICENSE_URL: URL da licença (default: https://creativecommons.org/licenses/by-nc/4.0/)
- OPAC_SITE_LICENSE_IMG_URL: Imagem da licença (default: https://licensebuttons.net/l/by/4.0/88x31.png)
"""

PROJECT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
Expand Down Expand Up @@ -662,3 +668,8 @@

# Citation Export Format
CITATION_EXPORT_FORMATS = {"bib": "BibTex", "ris": "Reference Manager"}

SITE_LICENSE_ENABLE = os.environ.get("OPAC_SITE_LICENSE_ENABLE", "True") == "True"
SITE_LICENSE_NAME = os.environ.get("OPAC_SITE_LICENSE_NAME", "Creative Common - by 4.0")
SITE_LICENSE_URL = os.environ.get("OPAC_SITE_LICENSE_URL", "https://creativecommons.org/licenses/by-nc/4.0/")
SITE_LICENSE_IMG_URL = os.environ.get("OPAC_SITE_LICENSE_IMG_URL", "https://licensebuttons.net/l/by/4.0/88x31.png")
54 changes: 33 additions & 21 deletions opac/webapp/templates/includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,51 @@
<span class="logo-svg-footer"></span>
</div>
<div class="col-md-8 col-sm-9">
<strong>SciELO - Scientific Electronic Library Online</strong><br/>
{{ g.collection.address1 or '' }}<br/>
<strong>SciELO - Scientific Electronic Library Online</strong><br />
{{ g.collection.address1 or '' }}<br />
{{ g.collection.address2 or '' }}
</div>
{% if config.SITE_LICENSE_ENABLE %}
<div class="container-license">
<div class="row">
<div class="col-sm-3 col-md-2">
<a href="{{config.SITE_LICENSE_URL}}" target="_blank" title="" rel="license"><img
src="{{config.SITE_LICENSE_IMG_URL}}" alt="{{config.SITE_LICENSE_NAME}}">
</a>
</div>
</div>
</div>
{% endif %}
</div>
</div>
{% if g.collection and g.collection.sponsors %}
<div class="partners">
{% for sponsor in g.collection.sponsors|sort(attribute='order') %}
{% if sponsor.url and sponsor.logo_url %}
<a href="{{ sponsor.url }}" target="_blank">
{% if sponsor.logo_url %}
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
{% else %}
{{ sponsor.name }}
{% endif %}
</a>
{% elif sponsor.logo_url %}
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
{% else %}
{{ sponsor.name }}
{% endif %}
{% endfor %}
</div>
<div class="partners">
{% for sponsor in g.collection.sponsors|sort(attribute='order') %}
{% if sponsor.url and sponsor.logo_url %}
<a href="{{ sponsor.url }}" target="_blank">
{% if sponsor.logo_url %}
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
{% else %}
{{ sponsor.name }}
{% endif %}
</a>
{% elif sponsor.logo_url %}
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
{% else %}
{{ sponsor.name }}
{% endif %}
{% endfor %}
</div>
{% endif %}

<div class="container collectionLicense">
<a href="{{ url_for('main.about_collection') }}">
<img alt="{% trans %}Open Access{% endtrans %}" style="border-width:0" class="image" src="{{ url_for('static', filename='img/oa_logo_32.png') }}">
<img alt="{% trans %}Open Access{% endtrans %}" style="border-width:0" class="image"
src="{{ url_for('static', filename='img/oa_logo_32.png') }}">
<span>
<strong>{% trans %}Leia{% endtrans %}</strong> {% trans %}a Declaração de Acesso Aberto{% endtrans %}
</span>
</a>
</div>

</footer>
</footer>
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ MarkupSafe==2.0.1
mongoengine==0.16.3
natsort==7.0.1
oauthlib==3.1.0
-e git+https://[email protected]/scieloorg/[email protected].0#egg=Opac_Schema
-e git+https://[email protected]/scieloorg/[email protected].1#egg=Opac_Schema
-e git+https://github.com/scieloorg/packtools@dd8bb00c08ce5285a4dc00aa7fdb1f3af6b708cb#egg=packtools
passlib==1.7.2
pbr==5.4.5
Expand Down

0 comments on commit bb42ca5

Please sign in to comment.