invenio-banners 3.2.0__py2.py3-none-any.whl → 3.3.1__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of invenio-banners might be problematic. Click here for more details.
- invenio_banners/__init__.py +1 -1
- invenio_banners/administration/banners.py +6 -5
- invenio_banners/config.py +4 -3
- invenio_banners/templates/semantic-ui/invenio_banners/banner.html +5 -2
- invenio_banners/utils.py +1 -1
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info}/METADATA +22 -13
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info}/RECORD +12 -12
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info}/WHEEL +1 -1
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info}/entry_points.txt +0 -1
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info/licenses}/AUTHORS.rst +0 -0
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info/licenses}/LICENSE +0 -0
- {invenio_banners-3.2.0.dist-info → invenio_banners-3.3.1.dist-info}/top_level.txt +0 -0
invenio_banners/__init__.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
3
|
# Copyright (C) 2023 CERN.
|
|
4
|
+
# Copyright (C) 2024 KTH Royal Institute of Technology.
|
|
4
5
|
#
|
|
5
6
|
# Invenio-Banners is free software; you can redistribute it and/or modify it
|
|
6
7
|
# under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -22,8 +23,8 @@ class BannerListView(AdminResourceListView):
|
|
|
22
23
|
api_endpoint = "/banners"
|
|
23
24
|
name = "banners"
|
|
24
25
|
resource_config = "banners_resource"
|
|
25
|
-
title = "Banners"
|
|
26
|
-
menu_label = "Banners"
|
|
26
|
+
title = _("Banners")
|
|
27
|
+
menu_label = _("Banners")
|
|
27
28
|
category = _("Site management")
|
|
28
29
|
pid_path = "id"
|
|
29
30
|
icon = "newspaper"
|
|
@@ -127,7 +128,7 @@ class BannerEditView(AdminResourceEditView):
|
|
|
127
128
|
resource_config = "banners_resource"
|
|
128
129
|
pid_path = "id"
|
|
129
130
|
api_endpoint = "/banners"
|
|
130
|
-
title = "Edit Banner"
|
|
131
|
+
title = _("Edit Banner")
|
|
131
132
|
|
|
132
133
|
list_view_name = "banners"
|
|
133
134
|
|
|
@@ -146,7 +147,7 @@ class BannerCreateView(AdminResourceCreateView):
|
|
|
146
147
|
resource_config = "banners_resource"
|
|
147
148
|
pid_path = "id"
|
|
148
149
|
api_endpoint = "/banners"
|
|
149
|
-
title = "Create Banner"
|
|
150
|
+
title = _("Create Banner")
|
|
150
151
|
|
|
151
152
|
list_view_name = "banners"
|
|
152
153
|
|
|
@@ -162,7 +163,7 @@ class BannerDetailView(AdminResourceDetailView):
|
|
|
162
163
|
api_endpoint = "/banners"
|
|
163
164
|
name = "banner-details"
|
|
164
165
|
resource_config = "banners_resource"
|
|
165
|
-
title = "Banner Details"
|
|
166
|
+
title = _("Banner Details")
|
|
166
167
|
|
|
167
168
|
display_delete = True
|
|
168
169
|
display_edit = True
|
invenio_banners/config.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
3
|
# Copyright (C) 2020-2023 CERN.
|
|
4
|
+
# Copyright (C) 2024 KTH Royal Institute of Technology.
|
|
4
5
|
#
|
|
5
6
|
# Invenio-Banners is free software; you can redistribute it and/or modify it
|
|
6
7
|
# under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -12,9 +13,9 @@ from invenio_i18n import lazy_gettext as _
|
|
|
12
13
|
from invenio_banners.utils import style_category
|
|
13
14
|
|
|
14
15
|
BANNERS_CATEGORIES = [
|
|
15
|
-
("info", "Info"),
|
|
16
|
-
("warning", "Warning"),
|
|
17
|
-
("other", "Other"),
|
|
16
|
+
("info", _("Info")),
|
|
17
|
+
("warning", _("Warning")),
|
|
18
|
+
("other", _("Other")),
|
|
18
19
|
]
|
|
19
20
|
"""Categories to define different types of messages. List of (id, label)."""
|
|
20
21
|
|
|
@@ -7,12 +7,15 @@
|
|
|
7
7
|
under the terms of the MIT License; see LICENSE file for more details.
|
|
8
8
|
#}
|
|
9
9
|
|
|
10
|
-
{%- macro banner() -%}
|
|
10
|
+
{%- macro banner(ui_classes) -%}
|
|
11
11
|
{%- block banner %}
|
|
12
12
|
{%- set banners = get_active_banners() %}
|
|
13
|
+
{% if not ui_classes %}
|
|
14
|
+
{% set ui_classes = "top attached m-0" %}
|
|
15
|
+
{% endif %}
|
|
13
16
|
{% if banners %}
|
|
14
17
|
{% for banner in banners %}
|
|
15
|
-
<div class="{{ banner.category|style_banner_category }}">
|
|
18
|
+
<div class="ui {{ banner.category|style_banner_category }} message {{ ui_classes }} inv-banner" id="banner-{{ banner.id }}">
|
|
16
19
|
<div class="ui container">
|
|
17
20
|
{{ banner.message|safe }}
|
|
18
21
|
</div>
|
invenio_banners/utils.py
CHANGED
|
@@ -20,7 +20,7 @@ def get_active_banners_for_request():
|
|
|
20
20
|
|
|
21
21
|
def style_category(category):
|
|
22
22
|
"""Return predefined Semantic-UI classes for each banner category."""
|
|
23
|
-
style_class = "
|
|
23
|
+
style_class = "{}"
|
|
24
24
|
if category == "warning":
|
|
25
25
|
style_class = style_class.format("warning")
|
|
26
26
|
elif category == "other":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: invenio-banners
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.1
|
|
4
4
|
Summary: Invenio-Banners is a module used to create and show banners with useful messages to users.
|
|
5
5
|
Home-page: https://github.com/inveniosoftware/invenio-banners
|
|
6
6
|
Author: CERN
|
|
@@ -10,17 +10,20 @@ Keywords: Invenio Banners
|
|
|
10
10
|
Platform: any
|
|
11
11
|
Classifier: Development Status :: 1 - Planning
|
|
12
12
|
Requires-Python: >=3.7
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
License-File: AUTHORS.rst
|
|
15
|
+
Requires-Dist: invenio-i18n<3.0.0,>=2.0.0
|
|
16
|
+
Requires-Dist: invenio-administration<3.0.0,>=2.0.0
|
|
17
|
+
Provides-Extra: tests
|
|
18
|
+
Requires-Dist: pytest-invenio<3.0.0,>=2.1.0; extra == "tests"
|
|
19
|
+
Requires-Dist: invenio-app<2.0.0,>=1.3.4; extra == "tests"
|
|
20
|
+
Requires-Dist: pytest-black>=0.3.0; extra == "tests"
|
|
21
|
+
Requires-Dist: sphinx>=4.5; extra == "tests"
|
|
15
22
|
Provides-Extra: opensearch1
|
|
16
|
-
Requires-Dist: invenio-search[opensearch1]
|
|
23
|
+
Requires-Dist: invenio-search[opensearch1]<3.0.0,>=2.1.0; extra == "opensearch1"
|
|
17
24
|
Provides-Extra: opensearch2
|
|
18
|
-
Requires-Dist: invenio-search[opensearch2]
|
|
19
|
-
|
|
20
|
-
Requires-Dist: pytest-invenio <3.0.0,>=2.1.0 ; extra == 'tests'
|
|
21
|
-
Requires-Dist: invenio-app <2.0.0,>=1.3.4 ; extra == 'tests'
|
|
22
|
-
Requires-Dist: pytest-black >=0.3.0 ; extra == 'tests'
|
|
23
|
-
Requires-Dist: sphinx >=4.5 ; extra == 'tests'
|
|
25
|
+
Requires-Dist: invenio-search[opensearch2]<3.0.0,>=2.1.0; extra == "opensearch2"
|
|
26
|
+
Dynamic: license-file
|
|
24
27
|
|
|
25
28
|
..
|
|
26
29
|
Copyright (C) 2020 CERN.
|
|
@@ -61,6 +64,14 @@ https://invenio-banners.readthedocs.io/
|
|
|
61
64
|
Changes
|
|
62
65
|
=======
|
|
63
66
|
|
|
67
|
+
Version v3.3.1 (released 2025-03-18)
|
|
68
|
+
|
|
69
|
+
- i18n: backport missing translations
|
|
70
|
+
|
|
71
|
+
Version v3.3.0 (released 2025-01-22)
|
|
72
|
+
|
|
73
|
+
- templates: pass ui classes through macro parameters
|
|
74
|
+
|
|
64
75
|
Version v3.2.0 (released 2024-11-05)
|
|
65
76
|
|
|
66
77
|
- feat(administration): use html editor for message
|
|
@@ -106,5 +117,3 @@ Version 1.0.0a1 (release 2020-10-25)
|
|
|
106
117
|
------------------------------------
|
|
107
118
|
|
|
108
119
|
- Initial public release.
|
|
109
|
-
|
|
110
|
-
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
invenio_banners/__init__.py,sha256=
|
|
2
|
-
invenio_banners/config.py,sha256=
|
|
1
|
+
invenio_banners/__init__.py,sha256=vY52TIhcA4kV3CSeeLSipq1KJz55CE_KxKFo0gQ7xNI,425
|
|
2
|
+
invenio_banners/config.py,sha256=csFr0XWaYh05hAjvY44pA6taQFDUmocQ08mX4e5jiEY,1364
|
|
3
3
|
invenio_banners/ext.py,sha256=rRIgDgZIyGhm2M8WHWApMPRcBVe3eHkaHzTOt-YH6aw,1836
|
|
4
4
|
invenio_banners/proxies.py,sha256=nfACfpSgfCHiixSy2cO4G9y_lHFQj6onOeBLifYY6IQ,638
|
|
5
|
-
invenio_banners/utils.py,sha256=
|
|
5
|
+
invenio_banners/utils.py,sha256=PmSJY-S5CQ58HSAUnNWJJqwYO206GqLLLVGCO6YzL10,854
|
|
6
6
|
invenio_banners/views.py,sha256=sya476lHzXnFERPK7LAgn21wzUVBywjhs5y56Lh7NtY,449
|
|
7
7
|
invenio_banners/administration/__init__.py,sha256=QtT7HabGpMsOlT6xlFp4RNalseEH7ugsdn532bkR4Tk,243
|
|
8
|
-
invenio_banners/administration/banners.py,sha256=
|
|
8
|
+
invenio_banners/administration/banners.py,sha256=N-7iBxyp6LRuDXSlktXqncmPnISGHTmWNXtcybKUYPc,5578
|
|
9
9
|
invenio_banners/alembic/5e02314da32e_create_invenio_banners_db_table.py,sha256=FZ5Z8RsrbrlN8vr43LW0ukVRFTj2DV7B7JgVjnk0zp8,1446
|
|
10
10
|
invenio_banners/alembic/e40d93d99040_create_invenio_banners_branch.py,sha256=KoEbAzpNneVNBwegW3FfMIW_XTH6im0GXz2DvIF6DwA,562
|
|
11
11
|
invenio_banners/records/__init__.py,sha256=-A_Q-oZyJuV2lcgLfqXWeMuTlmv6IrEbcMqs_58PHuE,298
|
|
@@ -21,7 +21,7 @@ invenio_banners/services/permissions.py,sha256=EbC4oeFaBHCYTPnDMrtoS9Cgo4skhjz69
|
|
|
21
21
|
invenio_banners/services/results.py,sha256=sg2z1zPKD8mWgUigwqdFWJqdnA7wOtmf6yKfa3AeUek,3082
|
|
22
22
|
invenio_banners/services/schemas.py,sha256=rWh1WSQR4ps_Ii7RWd82FUMk4_aHbdwd5kYh5gCxlJU,1442
|
|
23
23
|
invenio_banners/services/service.py,sha256=7KdwwrmqvtBsmEschL-i_ydPsijH7RjzLzMFogrKYeQ,4770
|
|
24
|
-
invenio_banners/templates/semantic-ui/invenio_banners/banner.html,sha256=
|
|
24
|
+
invenio_banners/templates/semantic-ui/invenio_banners/banner.html,sha256=mOPfWsxRMIftoCyU82WeHlEhHFvy56BTF4wDJHpzX-o,811
|
|
25
25
|
invenio_banners/translations/messages.pot,sha256=SQpSVoZDsRHTihUdvEkq7HoNRwffdwhYPm2qITPRPYk,5090
|
|
26
26
|
invenio_banners/translations/af/LC_MESSAGES/messages.po,sha256=kS4YofCdd6b6NCX5QXXKBZ1tpnu8dFWEdgQWsYPrYAk,5070
|
|
27
27
|
invenio_banners/translations/ar/LC_MESSAGES/messages.po,sha256=qnp42420rDMGeqnxztFgBT-79vlRE39BHvuHdsxp4xI,6308
|
|
@@ -69,10 +69,10 @@ invenio_banners/translations/uk/LC_MESSAGES/messages.po,sha256=Z1ZM6O0bb8if1a82K
|
|
|
69
69
|
invenio_banners/translations/uk_UA/LC_MESSAGES/messages.po,sha256=4KNAaMpzBYXmTLcH4NtmLKWpCZKEI9CbjfEH9tfa52c,5308
|
|
70
70
|
invenio_banners/translations/zh_CN/LC_MESSAGES/messages.po,sha256=rBoibkyrfoi5WwZwI-C67fk_Gce7aGVg2595rJrrDi0,5265
|
|
71
71
|
invenio_banners/translations/zh_TW/LC_MESSAGES/messages.po,sha256=2rOl1mvYBlJhThTyyQphuCVPl2apcJMew-tGl6WBO8I,5199
|
|
72
|
-
invenio_banners-3.
|
|
73
|
-
invenio_banners-3.
|
|
74
|
-
invenio_banners-3.
|
|
75
|
-
invenio_banners-3.
|
|
76
|
-
invenio_banners-3.
|
|
77
|
-
invenio_banners-3.
|
|
78
|
-
invenio_banners-3.
|
|
72
|
+
invenio_banners-3.3.1.dist-info/licenses/AUTHORS.rst,sha256=fQsy2e1bLnwt_a89-kO6CwBwN7o58Ix9F9195b2iTJo,295
|
|
73
|
+
invenio_banners-3.3.1.dist-info/licenses/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
|
|
74
|
+
invenio_banners-3.3.1.dist-info/METADATA,sha256=49Uxb2ycMEZK6gM1vPFBhYn0vc3jZTsDFDxFgEV2jZA,3754
|
|
75
|
+
invenio_banners-3.3.1.dist-info/WHEEL,sha256=MAQBAzGbXNI3bUmkDsiV_duv8i-gcdnLzw7cfUFwqhU,109
|
|
76
|
+
invenio_banners-3.3.1.dist-info/entry_points.txt,sha256=3p4FMVuj9AZ1QGm6YdcdhzP9k4xsPfsUG10Ykc3CpxI,719
|
|
77
|
+
invenio_banners-3.3.1.dist-info/top_level.txt,sha256=ENJP1dEZ93e4ImCi7AHaVooTUV-6fQnRJ106wHitg5g,16
|
|
78
|
+
invenio_banners-3.3.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|