Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Commit bb42ca5

Browse files
authored
Merge pull request #3131 from gitnnolabs/add_license
Adiciona a licença no rodapé do site e atualiza o opac_schema
2 parents 8ccc11a + fbd6475 commit bb42ca5

3 files changed

Lines changed: 46 additions & 23 deletions

File tree

opac/webapp/config/default.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,13 @@
186186
- OPAC_FILTER_SECTION_ENABLE: ativa/desativa o filtro por seção na página do issue.
187187
188188
- Common Style List
189-
- OAPC_COMMON_STYLE_LIST: Caminho para um arquivo .json com as CSL.
189+
- OPAC_COMMON_STYLE_LIST: Caminho para um arquivo .json com as CSL.
190+
191+
- Site License
192+
- OPAC_SITE_LICENSE_ENABLE: ativa/desativa a exibição do logo do creative commons no rodapé do site
193+
- OPAC_SITE_LICENSE_NAME: Nome da licença (default: "Creative Common - by 4.0")
194+
- OPAC_SITE_LICENSE_URL: URL da licença (default: https://creativecommons.org/licenses/by-nc/4.0/)
195+
- OPAC_SITE_LICENSE_IMG_URL: Imagem da licença (default: https://licensebuttons.net/l/by/4.0/88x31.png)
190196
"""
191197

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

663669
# Citation Export Format
664670
CITATION_EXPORT_FORMATS = {"bib": "BibTex", "ris": "Reference Manager"}
671+
672+
SITE_LICENSE_ENABLE = os.environ.get("OPAC_SITE_LICENSE_ENABLE", "True") == "True"
673+
SITE_LICENSE_NAME = os.environ.get("OPAC_SITE_LICENSE_NAME", "Creative Common - by 4.0")
674+
SITE_LICENSE_URL = os.environ.get("OPAC_SITE_LICENSE_URL", "https://creativecommons.org/licenses/by-nc/4.0/")
675+
SITE_LICENSE_IMG_URL = os.environ.get("OPAC_SITE_LICENSE_IMG_URL", "https://licensebuttons.net/l/by/4.0/88x31.png")

opac/webapp/templates/includes/footer.html

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,51 @@
55
<span class="logo-svg-footer"></span>
66
</div>
77
<div class="col-md-8 col-sm-9">
8-
<strong>SciELO - Scientific Electronic Library Online</strong><br/>
9-
{{ g.collection.address1 or '' }}<br/>
8+
<strong>SciELO - Scientific Electronic Library Online</strong><br />
9+
{{ g.collection.address1 or '' }}<br />
1010
{{ g.collection.address2 or '' }}
1111
</div>
12+
{% if config.SITE_LICENSE_ENABLE %}
13+
<div class="container-license">
14+
<div class="row">
15+
<div class="col-sm-3 col-md-2">
16+
<a href="{{config.SITE_LICENSE_URL}}" target="_blank" title="" rel="license"><img
17+
src="{{config.SITE_LICENSE_IMG_URL}}" alt="{{config.SITE_LICENSE_NAME}}">
18+
</a>
19+
</div>
20+
</div>
21+
</div>
22+
{% endif %}
1223
</div>
1324
</div>
1425
{% if g.collection and g.collection.sponsors %}
15-
<div class="partners">
16-
{% for sponsor in g.collection.sponsors|sort(attribute='order') %}
17-
{% if sponsor.url and sponsor.logo_url %}
18-
<a href="{{ sponsor.url }}" target="_blank">
19-
{% if sponsor.logo_url %}
20-
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
21-
{% else %}
22-
{{ sponsor.name }}
23-
{% endif %}
24-
</a>
25-
{% elif sponsor.logo_url %}
26-
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
27-
{% else %}
28-
{{ sponsor.name }}
29-
{% endif %}
30-
{% endfor %}
31-
</div>
26+
<div class="partners">
27+
{% for sponsor in g.collection.sponsors|sort(attribute='order') %}
28+
{% if sponsor.url and sponsor.logo_url %}
29+
<a href="{{ sponsor.url }}" target="_blank">
30+
{% if sponsor.logo_url %}
31+
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
32+
{% else %}
33+
{{ sponsor.name }}
34+
{% endif %}
35+
</a>
36+
{% elif sponsor.logo_url %}
37+
<img src="{{ sponsor.logo_url }}" alt="{{ sponsor.name }}">
38+
{% else %}
39+
{{ sponsor.name }}
40+
{% endif %}
41+
{% endfor %}
42+
</div>
3243
{% endif %}
3344

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

43-
</footer>
55+
</footer>

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ MarkupSafe==2.0.1
3939
mongoengine==0.16.3
4040
natsort==7.0.1
4141
oauthlib==3.1.0
42-
-e git+https://git@github.com/scieloorg/opac_schema@v2.8.0#egg=Opac_Schema
42+
-e git+https://git@github.com/scieloorg/opac_schema@v2.8.1#egg=Opac_Schema
4343
-e git+https://github.com/scieloorg/packtools@dd8bb00c08ce5285a4dc00aa7fdb1f3af6b708cb#egg=packtools
4444
passlib==1.7.2
4545
pbr==5.4.5

0 commit comments

Comments
 (0)