invenio-banners 3.0.2__tar.gz → 3.1.1__tar.gz
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-3.0.2 → invenio-banners-3.1.1}/CHANGES.rst +10 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/PKG-INFO +11 -1
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/__init__.py +1 -1
- invenio-banners-3.1.1/invenio_banners/administration/banners.py +182 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/resources/config.py +8 -1
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/messages.pot +33 -29
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/PKG-INFO +11 -1
- invenio-banners-3.0.2/invenio_banners/administration/banners.py +0 -242
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.dockerignore +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.editorconfig +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.git-blame-ignore-revs +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.github/workflows/i18n-pull.yml +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.github/workflows/i18n-push.yml +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.github/workflows/pypi-publish.yml +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.github/workflows/tests.yml +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/.tx/config +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/AUTHORS.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/CONTRIBUTING.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/INSTALL.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/LICENSE +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/MANIFEST.in +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/README.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/babel.ini +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/Makefile +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/api.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/authors.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/changes.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/conf.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/configuration.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/contributing.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/index.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/installation.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/license.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/make.bat +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/requirements.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/docs/usage.rst +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/administration/__init__.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/alembic/5e02314da32e_create_invenio_banners_db_table.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/alembic/e40d93d99040_create_invenio_banners_branch.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/config.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/ext.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/proxies.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/records/__init__.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/records/models.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/resources/__init__.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/resources/errors.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/resources/resource.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/__init__.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/config.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/errors.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/permissions.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/results.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/schemas.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/services/service.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/templates/semantic-ui/invenio_banners/banner.html +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/af/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ar/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/bg/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ca/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/cs/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/da/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/de/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/de_AT/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/de_DE/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/el/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/en_AT/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/en_HU/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/es/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/es_CU/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/es_MX/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/et/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/et_EE/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/fa/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/fa_IR/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/fr/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/fr_CI/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/fr_FR/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/gl/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/hi_IN/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/hr/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/hu/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/hu_HU/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/it/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ja/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ka/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/lt/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ne/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/no/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/pl/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/pt/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ro/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/ru/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/rw/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/sk/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/sv/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/sv_SE/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/tr/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/uk/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/uk_UA/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/zh_CN/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/translations/zh_TW/LC_MESSAGES/messages.po +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/utils.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners/views.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/SOURCES.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/dependency_links.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/entry_points.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/not-zip-safe +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/requires.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/top_level.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/pyproject.toml +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/requirements-devel.txt +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/run-tests.sh +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/setup.cfg +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/setup.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/conftest.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/records/test_disable.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/records/test_models.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/resources/conftest.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/resources/test_resources.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/services/conftest.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/services/test_services.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/test_invenio_banners.py +0 -0
- {invenio-banners-3.0.2 → invenio-banners-3.1.1}/tests/test_macro.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
..
|
|
2
2
|
Copyright (C) 2020-2024 CERN.
|
|
3
|
+
Copyright (C) 2024 Northwestern University.
|
|
3
4
|
|
|
4
5
|
Invenio-Banners is free software; you can redistribute it and/or modify
|
|
5
6
|
it under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -7,6 +8,15 @@
|
|
|
7
8
|
Changes
|
|
8
9
|
=======
|
|
9
10
|
|
|
11
|
+
Version v3.1.1 (released 2024-09-18)
|
|
12
|
+
|
|
13
|
+
- admin: adjust + fix typos in descriptions of fields
|
|
14
|
+
- i18n:push translations
|
|
15
|
+
|
|
16
|
+
Version v3.1.0 (released 2024-08-07)
|
|
17
|
+
|
|
18
|
+
- http headers: use and adjust vnd.inveniordm.v1+json http accept header
|
|
19
|
+
|
|
10
20
|
Version 3.0.2 (released 2024-07-17)
|
|
11
21
|
|
|
12
22
|
- errors: implement REST validation error for banner loader
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: invenio-banners
|
|
3
|
-
Version: 3.
|
|
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
|
|
@@ -38,6 +38,7 @@ Description: ..
|
|
|
38
38
|
|
|
39
39
|
..
|
|
40
40
|
Copyright (C) 2020-2024 CERN.
|
|
41
|
+
Copyright (C) 2024 Northwestern University.
|
|
41
42
|
|
|
42
43
|
Invenio-Banners is free software; you can redistribute it and/or modify
|
|
43
44
|
it under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -45,6 +46,15 @@ Description: ..
|
|
|
45
46
|
Changes
|
|
46
47
|
=======
|
|
47
48
|
|
|
49
|
+
Version v3.1.1 (released 2024-09-18)
|
|
50
|
+
|
|
51
|
+
- admin: adjust + fix typos in descriptions of fields
|
|
52
|
+
- i18n:push translations
|
|
53
|
+
|
|
54
|
+
Version v3.1.0 (released 2024-08-07)
|
|
55
|
+
|
|
56
|
+
- http headers: use and adjust vnd.inveniordm.v1+json http accept header
|
|
57
|
+
|
|
48
58
|
Version 3.0.2 (released 2024-07-17)
|
|
49
59
|
|
|
50
60
|
- errors: implement REST validation error for banner loader
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright (C) 2023 CERN.
|
|
4
|
+
#
|
|
5
|
+
# Invenio-Banners is free software; you can redistribute it and/or modify it
|
|
6
|
+
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
+
|
|
8
|
+
"""Invenio administration banners view module."""
|
|
9
|
+
|
|
10
|
+
from invenio_administration.views.base import (
|
|
11
|
+
AdminResourceCreateView,
|
|
12
|
+
AdminResourceDetailView,
|
|
13
|
+
AdminResourceEditView,
|
|
14
|
+
AdminResourceListView,
|
|
15
|
+
)
|
|
16
|
+
from invenio_i18n import lazy_gettext as _
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class BannerListView(AdminResourceListView):
|
|
20
|
+
"""Search admin view."""
|
|
21
|
+
|
|
22
|
+
api_endpoint = "/banners"
|
|
23
|
+
name = "banners"
|
|
24
|
+
resource_config = "banners_resource"
|
|
25
|
+
title = "Banners"
|
|
26
|
+
menu_label = "Banners"
|
|
27
|
+
category = _("Site management")
|
|
28
|
+
pid_path = "id"
|
|
29
|
+
icon = "newspaper"
|
|
30
|
+
|
|
31
|
+
display_search = True
|
|
32
|
+
display_delete = True
|
|
33
|
+
display_create = True
|
|
34
|
+
display_edit = True
|
|
35
|
+
|
|
36
|
+
item_field_list = {
|
|
37
|
+
"id": {"text": _("Id"), "order": 1, "width": 1},
|
|
38
|
+
"start_datetime": {"text": _("Start time (UTC)"), "order": 2, "width": 2},
|
|
39
|
+
"end_datetime": {"text": _("End time (UTC)"), "order": 3, "width": 2},
|
|
40
|
+
"message": {"text": _("Message"), "order": 4, "width": 7},
|
|
41
|
+
"active": {"text": _("Active"), "order": 5, "width": 1},
|
|
42
|
+
"url_path": {"text": _("URL path"), "order": 6, "width": 2},
|
|
43
|
+
"category": {"text": _("Category"), "order": 7, "width": 1},
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
create_view_name = "banner_create"
|
|
47
|
+
|
|
48
|
+
search_config_name = "BANNERS_SEARCH"
|
|
49
|
+
search_sort_config_name = "BANNERS_SORT_OPTIONS"
|
|
50
|
+
|
|
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
|
+
|
|
122
|
+
class BannerEditView(AdminResourceEditView):
|
|
123
|
+
"""Configuration for Banner edit view."""
|
|
124
|
+
|
|
125
|
+
name = "banner_edit"
|
|
126
|
+
url = "/banners/<pid_value>/edit"
|
|
127
|
+
resource_config = "banners_resource"
|
|
128
|
+
pid_path = "id"
|
|
129
|
+
api_endpoint = "/banners"
|
|
130
|
+
title = "Edit Banner"
|
|
131
|
+
|
|
132
|
+
list_view_name = "banners"
|
|
133
|
+
|
|
134
|
+
form_fields = {
|
|
135
|
+
**common_form_fields,
|
|
136
|
+
"created": {"order": 7},
|
|
137
|
+
"updated": {"order": 8},
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class BannerCreateView(AdminResourceCreateView):
|
|
142
|
+
"""Configuration for Banner create view."""
|
|
143
|
+
|
|
144
|
+
name = "banner_create"
|
|
145
|
+
url = "/banners/create"
|
|
146
|
+
resource_config = "banners_resource"
|
|
147
|
+
pid_path = "id"
|
|
148
|
+
api_endpoint = "/banners"
|
|
149
|
+
title = "Create Banner"
|
|
150
|
+
|
|
151
|
+
list_view_name = "banners"
|
|
152
|
+
|
|
153
|
+
form_fields = {
|
|
154
|
+
**common_form_fields,
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class BannerDetailView(AdminResourceDetailView):
|
|
159
|
+
"""Admin banner detail view."""
|
|
160
|
+
|
|
161
|
+
url = "/banners/<pid_value>"
|
|
162
|
+
api_endpoint = "/banners"
|
|
163
|
+
name = "banner-details"
|
|
164
|
+
resource_config = "banners_resource"
|
|
165
|
+
title = "Banner Details"
|
|
166
|
+
|
|
167
|
+
display_delete = True
|
|
168
|
+
display_edit = True
|
|
169
|
+
|
|
170
|
+
list_view_name = "banners"
|
|
171
|
+
pid_path = "id"
|
|
172
|
+
|
|
173
|
+
item_field_list = {
|
|
174
|
+
"start_datetime": {"text": _("Start time"), "order": 1},
|
|
175
|
+
"end_datetime": {"text": _("End time"), "order": 2},
|
|
176
|
+
"message": {"text": _("Message"), "order": 3},
|
|
177
|
+
"url_path": {"text": _("URL path"), "order": 4},
|
|
178
|
+
"category": {"text": _("Category"), "order": 5},
|
|
179
|
+
"active": {"text": _("Active"), "order": 6},
|
|
180
|
+
"created": {"text": _("Created"), "order": 7},
|
|
181
|
+
"updated": {"text": _("Updated"), "order": 8},
|
|
182
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
#
|
|
3
|
-
# Copyright (C) 2022-
|
|
3
|
+
# Copyright (C) 2022-2024 CERN.
|
|
4
4
|
#
|
|
5
5
|
# Invenio-Banners is free software; you can redistribute it and/or modify it
|
|
6
6
|
# under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -45,3 +45,10 @@ class BannerResourceConfig(RecordResourceConfig):
|
|
|
45
45
|
|
|
46
46
|
request_body_parsers = {"application/json": RequestBodyParser(JSONDeserializer())}
|
|
47
47
|
default_content_type = "application/json"
|
|
48
|
+
|
|
49
|
+
response_handlers = {
|
|
50
|
+
"application/vnd.inveniordm.v1+json": RecordResourceConfig.response_handlers[
|
|
51
|
+
"application/json"
|
|
52
|
+
],
|
|
53
|
+
**RecordResourceConfig.response_handlers,
|
|
54
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# Translations template for invenio-banners.
|
|
2
|
-
# Copyright (C)
|
|
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>,
|
|
5
|
+
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
|
|
6
6
|
#
|
|
7
7
|
#, fuzzy
|
|
8
8
|
msgid ""
|
|
9
9
|
msgstr ""
|
|
10
|
-
"Project-Id-Version: invenio-banners
|
|
10
|
+
"Project-Id-Version: invenio-banners 3.0.2\n"
|
|
11
11
|
"Report-Msgid-Bugs-To: info@inveniosoftware.org\n"
|
|
12
|
-
"POT-Creation-Date:
|
|
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.
|
|
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:
|
|
24
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
38
|
-
#: invenio_banners/administration/banners.py:
|
|
39
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
59
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
66
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
72
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
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:
|
|
87
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
93
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
129
|
-
#: invenio_banners/administration/banners.py:
|
|
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:
|
|
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:
|
|
146
|
+
#: invenio_banners/administration/banners.py:240
|
|
143
147
|
msgid "Created"
|
|
144
148
|
msgstr ""
|
|
145
149
|
|
|
146
|
-
#: invenio_banners/administration/banners.py:
|
|
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.
|
|
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
|
|
@@ -38,6 +38,7 @@ Description: ..
|
|
|
38
38
|
|
|
39
39
|
..
|
|
40
40
|
Copyright (C) 2020-2024 CERN.
|
|
41
|
+
Copyright (C) 2024 Northwestern University.
|
|
41
42
|
|
|
42
43
|
Invenio-Banners is free software; you can redistribute it and/or modify
|
|
43
44
|
it under the terms of the MIT License; see LICENSE file for more details.
|
|
@@ -45,6 +46,15 @@ Description: ..
|
|
|
45
46
|
Changes
|
|
46
47
|
=======
|
|
47
48
|
|
|
49
|
+
Version v3.1.1 (released 2024-09-18)
|
|
50
|
+
|
|
51
|
+
- admin: adjust + fix typos in descriptions of fields
|
|
52
|
+
- i18n:push translations
|
|
53
|
+
|
|
54
|
+
Version v3.1.0 (released 2024-08-07)
|
|
55
|
+
|
|
56
|
+
- http headers: use and adjust vnd.inveniordm.v1+json http accept header
|
|
57
|
+
|
|
48
58
|
Version 3.0.2 (released 2024-07-17)
|
|
49
59
|
|
|
50
60
|
- errors: implement REST validation error for banner loader
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
#
|
|
3
|
-
# Copyright (C) 2023 CERN.
|
|
4
|
-
#
|
|
5
|
-
# Invenio-Banners is free software; you can redistribute it and/or modify it
|
|
6
|
-
# under the terms of the MIT License; see LICENSE file for more details.
|
|
7
|
-
|
|
8
|
-
"""Invenio administration banners view module."""
|
|
9
|
-
|
|
10
|
-
from invenio_administration.views.base import (
|
|
11
|
-
AdminResourceCreateView,
|
|
12
|
-
AdminResourceDetailView,
|
|
13
|
-
AdminResourceEditView,
|
|
14
|
-
AdminResourceListView,
|
|
15
|
-
)
|
|
16
|
-
from invenio_i18n import lazy_gettext as _
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class BannerListView(AdminResourceListView):
|
|
20
|
-
"""Search admin view."""
|
|
21
|
-
|
|
22
|
-
api_endpoint = "/banners"
|
|
23
|
-
name = "banners"
|
|
24
|
-
resource_config = "banners_resource"
|
|
25
|
-
title = "Banners"
|
|
26
|
-
menu_label = "Banners"
|
|
27
|
-
category = _("Site management")
|
|
28
|
-
pid_path = "id"
|
|
29
|
-
icon = "newspaper"
|
|
30
|
-
|
|
31
|
-
display_search = True
|
|
32
|
-
display_delete = True
|
|
33
|
-
display_create = True
|
|
34
|
-
display_edit = True
|
|
35
|
-
|
|
36
|
-
item_field_list = {
|
|
37
|
-
"id": {"text": _("Id"), "order": 1, "width": 1},
|
|
38
|
-
"start_datetime": {"text": _("Start time (UTC)"), "order": 2, "width": 2},
|
|
39
|
-
"end_datetime": {"text": _("End time (UTC)"), "order": 3, "width": 2},
|
|
40
|
-
"message": {"text": _("Message"), "order": 4, "width": 7},
|
|
41
|
-
"active": {"text": _("Active"), "order": 5, "width": 1},
|
|
42
|
-
"url_path": {"text": _("URL path"), "order": 6, "width": 2},
|
|
43
|
-
"category": {"text": _("Category"), "order": 7, "width": 1},
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
create_view_name = "banner_create"
|
|
47
|
-
|
|
48
|
-
search_config_name = "BANNERS_SEARCH"
|
|
49
|
-
search_sort_config_name = "BANNERS_SORT_OPTIONS"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class BannerEditView(AdminResourceEditView):
|
|
53
|
-
"""Configuration for Banner edit view."""
|
|
54
|
-
|
|
55
|
-
name = "banner_edit"
|
|
56
|
-
url = "/banners/<pid_value>/edit"
|
|
57
|
-
resource_config = "banners_resource"
|
|
58
|
-
pid_path = "id"
|
|
59
|
-
api_endpoint = "/banners"
|
|
60
|
-
title = "Edit Banner"
|
|
61
|
-
|
|
62
|
-
list_view_name = "banners"
|
|
63
|
-
|
|
64
|
-
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
|
-
},
|
|
131
|
-
"created": {"order": 7},
|
|
132
|
-
"updated": {"order": 8},
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
class BannerCreateView(AdminResourceCreateView):
|
|
137
|
-
"""Configuration for Banner create view."""
|
|
138
|
-
|
|
139
|
-
name = "banner_create"
|
|
140
|
-
url = "/banners/create"
|
|
141
|
-
resource_config = "banners_resource"
|
|
142
|
-
pid_path = "id"
|
|
143
|
-
api_endpoint = "/banners"
|
|
144
|
-
title = "Create Banner"
|
|
145
|
-
|
|
146
|
-
list_view_name = "banners"
|
|
147
|
-
|
|
148
|
-
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
|
-
},
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
class BannerDetailView(AdminResourceDetailView):
|
|
219
|
-
"""Admin banner detail view."""
|
|
220
|
-
|
|
221
|
-
url = "/banners/<pid_value>"
|
|
222
|
-
api_endpoint = "/banners"
|
|
223
|
-
name = "banner-details"
|
|
224
|
-
resource_config = "banners_resource"
|
|
225
|
-
title = "Banner Details"
|
|
226
|
-
|
|
227
|
-
display_delete = True
|
|
228
|
-
display_edit = True
|
|
229
|
-
|
|
230
|
-
list_view_name = "banners"
|
|
231
|
-
pid_path = "id"
|
|
232
|
-
|
|
233
|
-
item_field_list = {
|
|
234
|
-
"start_datetime": {"text": _("Start time"), "order": 1},
|
|
235
|
-
"end_datetime": {"text": _("End time"), "order": 2},
|
|
236
|
-
"message": {"text": _("Message"), "order": 3},
|
|
237
|
-
"url_path": {"text": _("URL path"), "order": 4},
|
|
238
|
-
"category": {"text": _("Category"), "order": 5},
|
|
239
|
-
"active": {"text": _("Active"), "order": 6},
|
|
240
|
-
"created": {"text": _("Created"), "order": 7},
|
|
241
|
-
"updated": {"text": _("Updated"), "order": 8},
|
|
242
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{invenio-banners-3.0.2 → invenio-banners-3.1.1}/invenio_banners.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|