invenio-banners 3.1.0__py2.py3-none-any.whl → 3.1.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.

@@ -9,6 +9,6 @@
9
9
 
10
10
  from .ext import InvenioBanners
11
11
 
12
- __version__ = "3.1.0"
12
+ __version__ = "3.1.1"
13
13
 
14
14
  __all__ = ("__version__", "InvenioBanners")
@@ -49,6 +49,76 @@ class BannerListView(AdminResourceListView):
49
49
  search_sort_config_name = "BANNERS_SORT_OPTIONS"
50
50
 
51
51
 
52
+ common_form_fields = {
53
+ "start_datetime": {
54
+ "order": 1,
55
+ "text": _("Start time"),
56
+ "description": _(
57
+ "Date/time to make the banner active. "
58
+ "Input format: yyyy-mm-dd hh:mm:ss. "
59
+ "Set to future date/time to delay the banner. "
60
+ "Note: specify time in UTC time standard."
61
+ ),
62
+ "placeholder": _("YYYY-MM-DD hh:mm:ss"),
63
+ },
64
+ "end_datetime": {
65
+ "order": 2,
66
+ "text": _("End time"),
67
+ "description": _(
68
+ "Date/time to make the banner inactive. "
69
+ "Input format: yyyy-mm-dd hh:mm:ss. An empty value makes "
70
+ "the banner active until manually disabled via the active flag. "
71
+ "Note: specify time in UTC time standard."
72
+ ),
73
+ "placeholder": _("YYYY-MM-DD hh:mm:ss"),
74
+ },
75
+ "message": {
76
+ "order": 3,
77
+ "text": _("Message"),
78
+ "description": _(
79
+ "Message to be displayed on the banner. HTML format is supported."
80
+ ),
81
+ "rows": 10,
82
+ },
83
+ "url_path": {
84
+ "order": 4,
85
+ "text": _("URL path"),
86
+ "description": _(
87
+ "URL path prefix (including the first /) to define where "
88
+ "the message will be active on the site. For "
89
+ "example, if you enter `/records`, any URL starting with "
90
+ "`/records` will return an active banner (`/records`, "
91
+ "`/records/1234`, etc.). An empty value makes the banner "
92
+ "active for any URL."
93
+ ),
94
+ },
95
+ "category": {
96
+ "order": 5,
97
+ "text": _("Category"),
98
+ "description": _(
99
+ "Banner category. `Info` option displays a blue banner. "
100
+ "`Warning` option displays an orange banner. "
101
+ "`Other` option displays a gray banner."
102
+ ),
103
+ "options": [
104
+ {"title_l10n": "Info", "id": "info"},
105
+ {"title_l10n": "Warning", "id": "warning"},
106
+ {"title_l10n": "Other", "id": "other"},
107
+ ],
108
+ "placeholder": "Select a category",
109
+ },
110
+ "active": {
111
+ "order": 6,
112
+ "text": _("Active"),
113
+ "description": _(
114
+ "Tick it to activate the banner: banner will be "
115
+ "displayed according to start/end times. If not "
116
+ "activated, start/end times will be ignored."
117
+ ),
118
+ },
119
+ }
120
+
121
+
52
122
  class BannerEditView(AdminResourceEditView):
53
123
  """Configuration for Banner edit view."""
54
124
 
@@ -62,72 +132,7 @@ class BannerEditView(AdminResourceEditView):
62
132
  list_view_name = "banners"
63
133
 
64
134
  form_fields = {
65
- "start_datetime": {
66
- "order": 1,
67
- "text": _("Start time"),
68
- "description": _(
69
- "Input format: yyyy-mm-dd hh:mm:ss. "
70
- "Set to current or future date/time to delay the banner. "
71
- "Note: specify time in UTC time standard."
72
- ),
73
- "placeholder": _("YYYY-MM-DD hh:mm:ss"),
74
- },
75
- "end_datetime": {
76
- "order": 2,
77
- "text": _("End time"),
78
- "description": _(
79
- "Input format: yyyy-mm-dd hh:mm:ss. Date/time "
80
- "to make the banner inactive. Empty value will make "
81
- "the banner active until manually disabled via the active flag. "
82
- "Note: specify time in UTC time standard."
83
- ),
84
- "placeholder": _("YYYY-MM-DD hh:mm:ss"),
85
- },
86
- "message": {
87
- "order": 3,
88
- "text": _("Message"),
89
- "description": _(
90
- "Message to be displayed on the banner. HTML format is supported."
91
- ),
92
- "rows": 10,
93
- },
94
- "url_path": {
95
- "order": 4,
96
- "text": _("URL path"),
97
- "description": _(
98
- "Enter the URL path (including the first /) to define in "
99
- "which part of the site the message will be active. For "
100
- "example, if you enter `/records`, any URL starting with "
101
- "`/records` will return an active banner (/records, "
102
- "/records/1234, etc...). Empty value will make the banner "
103
- "active for any URL."
104
- ),
105
- },
106
- "category": {
107
- "order": 5,
108
- "text": _("Category"),
109
- "description": _(
110
- "Banner category. Info option displays the banner "
111
- "with information message in a blue color. "
112
- "Warning - a warning information in an orange color. "
113
- "Other - all the rest types of massages in a gray color."
114
- ),
115
- "options": [
116
- {"title_l10n": "Info", "id": "info"},
117
- {"title_l10n": "Warning", "id": "warning"},
118
- {"title_l10n": "Other", "id": "other"},
119
- ],
120
- "placeholder": "Select a category",
121
- },
122
- "active": {
123
- "order": 6,
124
- "text": _("Active"),
125
- "description": _(
126
- "Tick it to activate the banner: banner will be"
127
- "displayed according to start/end times. If not "
128
- "activated, start/end times will be ignored."
129
- ),
130
- },
135
+ **common_form_fields,
131
136
  "created": {"order": 7},
132
137
  "updated": {"order": 8},
133
138
  }
@@ -146,72 +151,7 @@ class BannerCreateView(AdminResourceCreateView):
146
151
  list_view_name = "banners"
147
152
 
148
153
  form_fields = {
149
- "start_datetime": {
150
- "order": 1,
151
- "text": _("Start time"),
152
- "description": _(
153
- "Input format: yyyy-mm-dd hh:mm:ss. "
154
- "Set to current or future date/time to delay the banner. "
155
- "Note: specify time in UTC time standard."
156
- ),
157
- "placeholder": _("YYYY-MM-DD hh:mm:ss"),
158
- },
159
- "end_datetime": {
160
- "order": 2,
161
- "text": _("End time"),
162
- "description": _(
163
- "Input format: yyyy-mm-dd hh:mm:ss. Date/time "
164
- "to make the banner inactive. Empty value will make "
165
- "the banner active until manually disabled via the active flag. "
166
- "Note: specify time in UTC time standard."
167
- ),
168
- "placeholder": _("YYYY-MM-DD hh:mm:ss"),
169
- },
170
- "message": {
171
- "order": 3,
172
- "text": _("Message"),
173
- "description": _(
174
- "Message to be displayed on the banner. HTML format is supported."
175
- ),
176
- "rows": 10,
177
- },
178
- "url_path": {
179
- "order": 4,
180
- "text": _("URL path"),
181
- "description": _(
182
- "Enter the URL path (including the first /) to define in "
183
- "which part of the site the message will be active. For "
184
- "example, if you enter `/records`, any URL starting with "
185
- "`/records` will return an active banner (/records, "
186
- "/records/1234, etc...). Empty value will make the banner "
187
- "active for any URL."
188
- ),
189
- },
190
- "category": {
191
- "order": 5,
192
- "text": _("Category"),
193
- "description": _(
194
- "Banner category. Info option displays the banner "
195
- "with information message in a blue color. "
196
- "Warning - a warning information in an orange color. "
197
- "Other - all the rest types of messages in a gray color."
198
- ),
199
- "options": [
200
- {"title_l10n": "Info", "id": "info"},
201
- {"title_l10n": "Warning", "id": "warning"},
202
- {"title_l10n": "Other", "id": "other"},
203
- ],
204
- "placeholder": "Select a category",
205
- },
206
- "active": {
207
- "order": 6,
208
- "text": _("Active"),
209
- "description": _(
210
- "Tick it to activate the banner: banner will be"
211
- "displayed according to start/end times. If not "
212
- "activated, start/end times will be ignored."
213
- ),
214
- },
154
+ **common_form_fields,
215
155
  }
216
156
 
217
157
 
@@ -1,27 +1,27 @@
1
1
  # Translations template for invenio-banners.
2
- # Copyright (C) 2023 CERN
2
+ # Copyright (C) 2024 CERN
3
3
  # This file is distributed under the same license as the invenio-banners
4
4
  # project.
5
- # FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
5
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
6
6
  #
7
7
  #, fuzzy
8
8
  msgid ""
9
9
  msgstr ""
10
- "Project-Id-Version: invenio-banners 2.1.0\n"
10
+ "Project-Id-Version: invenio-banners 3.0.2\n"
11
11
  "Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
12
- "POT-Creation-Date: 2023-06-30 11:25+0200\n"
12
+ "POT-Creation-Date: 2024-08-06 08:46+0000\n"
13
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "MIME-Version: 1.0\n"
17
17
  "Content-Type: text/plain; charset=utf-8\n"
18
18
  "Content-Transfer-Encoding: 8bit\n"
19
- "Generated-By: Babel 2.12.1\n"
19
+ "Generated-By: Babel 2.15.0\n"
20
20
 
21
21
  #: invenio_banners/administration/banners.py:42
22
22
  #: invenio_banners/administration/banners.py:96
23
- #: invenio_banners/administration/banners.py:179
24
- #: invenio_banners/administration/banners.py:236 invenio_banners/config.py:37
23
+ #: invenio_banners/administration/banners.py:180
24
+ #: invenio_banners/administration/banners.py:237 invenio_banners/config.py:37
25
25
  msgid "URL path"
26
26
  msgstr ""
27
27
 
@@ -34,13 +34,17 @@ msgid "End DateTime"
34
34
  msgstr ""
35
35
 
36
36
  #: invenio_banners/administration/banners.py:41
37
- #: invenio_banners/administration/banners.py:123
38
- #: invenio_banners/administration/banners.py:207
39
- #: invenio_banners/administration/banners.py:238 invenio_banners/config.py:49
37
+ #: invenio_banners/administration/banners.py:124
38
+ #: invenio_banners/administration/banners.py:208
39
+ #: invenio_banners/administration/banners.py:239 invenio_banners/config.py:49
40
40
  #: invenio_banners/services/config.py:60
41
41
  msgid "Active"
42
42
  msgstr ""
43
43
 
44
+ #: invenio_banners/administration/banners.py:27
45
+ msgid "Site management"
46
+ msgstr ""
47
+
44
48
  #: invenio_banners/administration/banners.py:37
45
49
  msgid "Id"
46
50
  msgstr ""
@@ -55,27 +59,27 @@ msgstr ""
55
59
 
56
60
  #: invenio_banners/administration/banners.py:40
57
61
  #: invenio_banners/administration/banners.py:88
58
- #: invenio_banners/administration/banners.py:171
59
- #: invenio_banners/administration/banners.py:235
62
+ #: invenio_banners/administration/banners.py:172
63
+ #: invenio_banners/administration/banners.py:236
60
64
  msgid "Message"
61
65
  msgstr ""
62
66
 
63
67
  #: invenio_banners/administration/banners.py:43
64
68
  #: invenio_banners/administration/banners.py:108
65
- #: invenio_banners/administration/banners.py:191
66
- #: invenio_banners/administration/banners.py:237
69
+ #: invenio_banners/administration/banners.py:192
70
+ #: invenio_banners/administration/banners.py:238
67
71
  msgid "Category"
68
72
  msgstr ""
69
73
 
70
74
  #: invenio_banners/administration/banners.py:67
71
- #: invenio_banners/administration/banners.py:150
72
- #: invenio_banners/administration/banners.py:233
75
+ #: invenio_banners/administration/banners.py:151
76
+ #: invenio_banners/administration/banners.py:234
73
77
  #: invenio_banners/services/config.py:52
74
78
  msgid "Start time"
75
79
  msgstr ""
76
80
 
77
81
  #: invenio_banners/administration/banners.py:68
78
- #: invenio_banners/administration/banners.py:151
82
+ #: invenio_banners/administration/banners.py:152
79
83
  msgid ""
80
84
  "Input format: yyyy-mm-dd hh:mm:ss. Set to current or future date/time to "
81
85
  "delay the banner. Note: specify time in UTC time standard."
@@ -83,20 +87,20 @@ msgstr ""
83
87
 
84
88
  #: invenio_banners/administration/banners.py:73
85
89
  #: invenio_banners/administration/banners.py:84
86
- #: invenio_banners/administration/banners.py:156
87
- #: invenio_banners/administration/banners.py:167
90
+ #: invenio_banners/administration/banners.py:157
91
+ #: invenio_banners/administration/banners.py:168
88
92
  msgid "YYYY-MM-DD hh:mm:ss"
89
93
  msgstr ""
90
94
 
91
95
  #: invenio_banners/administration/banners.py:77
92
- #: invenio_banners/administration/banners.py:160
93
- #: invenio_banners/administration/banners.py:234
96
+ #: invenio_banners/administration/banners.py:161
97
+ #: invenio_banners/administration/banners.py:235
94
98
  #: invenio_banners/services/config.py:56
95
99
  msgid "End time"
96
100
  msgstr ""
97
101
 
98
102
  #: invenio_banners/administration/banners.py:78
99
- #: invenio_banners/administration/banners.py:161
103
+ #: invenio_banners/administration/banners.py:162
100
104
  msgid ""
101
105
  "Input format: yyyy-mm-dd hh:mm:ss. Date/time to make the banner inactive."
102
106
  " Empty value will make the banner active until manually disabled via the "
@@ -104,12 +108,12 @@ msgid ""
104
108
  msgstr ""
105
109
 
106
110
  #: invenio_banners/administration/banners.py:89
107
- #: invenio_banners/administration/banners.py:172
111
+ #: invenio_banners/administration/banners.py:173
108
112
  msgid "Message to be displayed on the banner. HTML format is supported."
109
113
  msgstr ""
110
114
 
111
115
  #: invenio_banners/administration/banners.py:97
112
- #: invenio_banners/administration/banners.py:180
116
+ #: invenio_banners/administration/banners.py:181
113
117
  msgid ""
114
118
  "Enter the URL path (including the first /) to define in which part of the"
115
119
  " site the message will be active. For example, if you enter `/records`, "
@@ -125,25 +129,25 @@ msgid ""
125
129
  "Other - all the rest types of massages in a gray color."
126
130
  msgstr ""
127
131
 
128
- #: invenio_banners/administration/banners.py:124
129
- #: invenio_banners/administration/banners.py:208
132
+ #: invenio_banners/administration/banners.py:125
133
+ #: invenio_banners/administration/banners.py:209
130
134
  msgid ""
131
135
  "Tick it to activate the banner: banner will bedisplayed according to "
132
136
  "start/end times. If not activated, start/end times will be ignored."
133
137
  msgstr ""
134
138
 
135
- #: invenio_banners/administration/banners.py:192
139
+ #: invenio_banners/administration/banners.py:193
136
140
  msgid ""
137
141
  "Banner category. Info option displays the banner with information message"
138
142
  " in a blue color. Warning - a warning information in an orange color. "
139
143
  "Other - all the rest types of messages in a gray color."
140
144
  msgstr ""
141
145
 
142
- #: invenio_banners/administration/banners.py:239
146
+ #: invenio_banners/administration/banners.py:240
143
147
  msgid "Created"
144
148
  msgstr ""
145
149
 
146
- #: invenio_banners/administration/banners.py:240
150
+ #: invenio_banners/administration/banners.py:241
147
151
  msgid "Updated"
148
152
  msgstr ""
149
153
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: invenio-banners
3
- Version: 3.1.0
3
+ Version: 3.1.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
@@ -54,6 +54,7 @@ https://invenio-banners.readthedocs.io/
54
54
 
55
55
  ..
56
56
  Copyright (C) 2020-2024 CERN.
57
+ Copyright (C) 2024 Northwestern University.
57
58
 
58
59
  Invenio-Banners is free software; you can redistribute it and/or modify
59
60
  it under the terms of the MIT License; see LICENSE file for more details.
@@ -61,6 +62,11 @@ https://invenio-banners.readthedocs.io/
61
62
  Changes
62
63
  =======
63
64
 
65
+ Version v3.1.1 (released 2024-09-18)
66
+
67
+ - admin: adjust + fix typos in descriptions of fields
68
+ - i18n:push translations
69
+
64
70
  Version v3.1.0 (released 2024-08-07)
65
71
 
66
72
  - http headers: use and adjust vnd.inveniordm.v1+json http accept header
@@ -1,11 +1,11 @@
1
- invenio_banners/__init__.py,sha256=JylemtnXfzx8PB-rlz9RMvBnjrx9p5gk3UB9jrdkYK0,373
1
+ invenio_banners/__init__.py,sha256=can8AwpDeSf3drqZX0cxmgfkYOLSLXliyHRFKmFW2rU,373
2
2
  invenio_banners/config.py,sha256=xGHNLvXoJyQsJo7yKeOh-lDySTaX0bVH1mk7BMrE1NA,1299
3
3
  invenio_banners/ext.py,sha256=rRIgDgZIyGhm2M8WHWApMPRcBVe3eHkaHzTOt-YH6aw,1836
4
4
  invenio_banners/proxies.py,sha256=nfACfpSgfCHiixSy2cO4G9y_lHFQj6onOeBLifYY6IQ,638
5
5
  invenio_banners/utils.py,sha256=7jSiwsyfP7_mMwmA0exZTlyyppklApO9qG4E7MannA4,897
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=Vq4o4PDPgN7GwYHGXf65LfdXH35kXs6k88xDpBySm0I,8365
8
+ invenio_banners/administration/banners.py,sha256=ZlJgxiWxteQvhQa5_1_iq1FHWSG0bTm72fvTFcsQydg,5507
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
@@ -22,7 +22,7 @@ invenio_banners/services/results.py,sha256=1TTtq--8WQkoqkTzIrC0EFsXSRurQZWn5MNgK
22
22
  invenio_banners/services/schemas.py,sha256=vq8CuEDCyXSkCXSbcRBQDUe8dvvX_njBa9N6CMdE-5A,1427
23
23
  invenio_banners/services/service.py,sha256=DRg-GIyuvSD0w1jYC07u7nt2pybeE1Yi_7ugLW0bA4Q,4559
24
24
  invenio_banners/templates/semantic-ui/invenio_banners/banner.html,sha256=RdEjT_ay7UYwYNQjIQ_2Q-qonprBhVzoQq9OzHPzSKk,642
25
- invenio_banners/translations/messages.pot,sha256=COiWqNZKe7rPc5qNua4RoxBQUVHaZ6bsW-9NzFv7skg,5007
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
28
28
  invenio_banners/translations/bg/LC_MESSAGES/messages.po,sha256=GBTk25P43GIjtclcTPw1Em_GY4SYgCjvkn4KO6rGujI,5193
@@ -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.1.0.dist-info/AUTHORS.rst,sha256=fQsy2e1bLnwt_a89-kO6CwBwN7o58Ix9F9195b2iTJo,295
73
- invenio_banners-3.1.0.dist-info/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
74
- invenio_banners-3.1.0.dist-info/METADATA,sha256=rgsldgPwISim-2NJRvjvyyfiH8BZLDroAFdrsdipczA,3315
75
- invenio_banners-3.1.0.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
76
- invenio_banners-3.1.0.dist-info/entry_points.txt,sha256=jnZLi-_SEWCfUnqlIcj0tJmOnD33Z1GvmQMEejfhD20,720
77
- invenio_banners-3.1.0.dist-info/top_level.txt,sha256=ENJP1dEZ93e4ImCi7AHaVooTUV-6fQnRJ106wHitg5g,16
78
- invenio_banners-3.1.0.dist-info/RECORD,,
72
+ invenio_banners-3.1.1.dist-info/AUTHORS.rst,sha256=fQsy2e1bLnwt_a89-kO6CwBwN7o58Ix9F9195b2iTJo,295
73
+ invenio_banners-3.1.1.dist-info/LICENSE,sha256=UvI8pR8jGWqe0sTkb_hRG6eIrozzWwWzyCGEpuXX4KE,1062
74
+ invenio_banners-3.1.1.dist-info/METADATA,sha256=fWJL4VVTYSJab3ybAJqutb_Hw25NZrHm9-9QSYQA9Vw,3481
75
+ invenio_banners-3.1.1.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
76
+ invenio_banners-3.1.1.dist-info/entry_points.txt,sha256=jnZLi-_SEWCfUnqlIcj0tJmOnD33Z1GvmQMEejfhD20,720
77
+ invenio_banners-3.1.1.dist-info/top_level.txt,sha256=ENJP1dEZ93e4ImCi7AHaVooTUV-6fQnRJ106wHitg5g,16
78
+ invenio_banners-3.1.1.dist-info/RECORD,,