invenio-banners 3.2.0__tar.gz → 3.3.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.

Files changed (125) hide show
  1. invenio_banners-3.3.1/.github/workflows/pypi-publish.yml +11 -0
  2. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.github/workflows/tests.yml +6 -2
  3. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/CHANGES.rst +8 -0
  4. invenio_banners-3.3.1/PKG-INFO +119 -0
  5. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/__init__.py +1 -1
  6. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/administration/banners.py +6 -5
  7. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/config.py +4 -3
  8. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/templates/semantic-ui/invenio_banners/banner.html +5 -2
  9. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/utils.py +1 -1
  10. invenio_banners-3.3.1/invenio_banners.egg-info/PKG-INFO +119 -0
  11. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners.egg-info/entry_points.txt +0 -1
  12. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/test_macro.py +6 -7
  13. invenio-banners-3.2.0/.github/workflows/pypi-publish.yml +0 -28
  14. invenio-banners-3.2.0/PKG-INFO +0 -100
  15. invenio-banners-3.2.0/invenio_banners.egg-info/PKG-INFO +0 -100
  16. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.dockerignore +0 -0
  17. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.editorconfig +0 -0
  18. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.git-blame-ignore-revs +0 -0
  19. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.github/workflows/i18n-pull.yml +0 -0
  20. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.github/workflows/i18n-push.yml +0 -0
  21. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/.tx/config +0 -0
  22. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/AUTHORS.rst +0 -0
  23. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/CONTRIBUTING.rst +0 -0
  24. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/INSTALL.rst +0 -0
  25. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/LICENSE +0 -0
  26. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/MANIFEST.in +0 -0
  27. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/README.rst +0 -0
  28. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/babel.ini +0 -0
  29. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/Makefile +0 -0
  30. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/api.rst +0 -0
  31. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/authors.rst +0 -0
  32. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/changes.rst +0 -0
  33. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/conf.py +0 -0
  34. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/configuration.rst +0 -0
  35. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/contributing.rst +0 -0
  36. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/index.rst +0 -0
  37. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/installation.rst +0 -0
  38. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/license.rst +0 -0
  39. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/make.bat +0 -0
  40. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/requirements.txt +0 -0
  41. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/docs/usage.rst +0 -0
  42. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/administration/__init__.py +0 -0
  43. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/alembic/5e02314da32e_create_invenio_banners_db_table.py +0 -0
  44. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/alembic/e40d93d99040_create_invenio_banners_branch.py +0 -0
  45. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/ext.py +0 -0
  46. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/proxies.py +0 -0
  47. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/records/__init__.py +0 -0
  48. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/records/models.py +0 -0
  49. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/resources/__init__.py +0 -0
  50. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/resources/config.py +0 -0
  51. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/resources/errors.py +0 -0
  52. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/resources/resource.py +0 -0
  53. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/__init__.py +0 -0
  54. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/config.py +0 -0
  55. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/errors.py +0 -0
  56. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/permissions.py +0 -0
  57. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/results.py +0 -0
  58. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/schemas.py +0 -0
  59. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/services/service.py +0 -0
  60. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/af/LC_MESSAGES/messages.po +0 -0
  61. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ar/LC_MESSAGES/messages.po +0 -0
  62. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/bg/LC_MESSAGES/messages.po +0 -0
  63. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ca/LC_MESSAGES/messages.po +0 -0
  64. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/cs/LC_MESSAGES/messages.po +0 -0
  65. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/da/LC_MESSAGES/messages.po +0 -0
  66. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/de/LC_MESSAGES/messages.po +0 -0
  67. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/de_AT/LC_MESSAGES/messages.po +0 -0
  68. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/de_DE/LC_MESSAGES/messages.po +0 -0
  69. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/el/LC_MESSAGES/messages.po +0 -0
  70. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/en_AT/LC_MESSAGES/messages.po +0 -0
  71. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/en_HU/LC_MESSAGES/messages.po +0 -0
  72. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/es/LC_MESSAGES/messages.po +0 -0
  73. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/es_CU/LC_MESSAGES/messages.po +0 -0
  74. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/es_MX/LC_MESSAGES/messages.po +0 -0
  75. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/et/LC_MESSAGES/messages.po +0 -0
  76. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/et_EE/LC_MESSAGES/messages.po +0 -0
  77. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/fa/LC_MESSAGES/messages.po +0 -0
  78. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/fa_IR/LC_MESSAGES/messages.po +0 -0
  79. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/fr/LC_MESSAGES/messages.po +0 -0
  80. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/fr_CI/LC_MESSAGES/messages.po +0 -0
  81. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/fr_FR/LC_MESSAGES/messages.po +0 -0
  82. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/gl/LC_MESSAGES/messages.po +0 -0
  83. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/hi_IN/LC_MESSAGES/messages.po +0 -0
  84. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/hr/LC_MESSAGES/messages.po +0 -0
  85. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/hu/LC_MESSAGES/messages.po +0 -0
  86. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/hu_HU/LC_MESSAGES/messages.po +0 -0
  87. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/it/LC_MESSAGES/messages.po +0 -0
  88. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ja/LC_MESSAGES/messages.po +0 -0
  89. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ka/LC_MESSAGES/messages.po +0 -0
  90. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/lt/LC_MESSAGES/messages.po +0 -0
  91. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/messages.pot +0 -0
  92. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ne/LC_MESSAGES/messages.po +0 -0
  93. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/no/LC_MESSAGES/messages.po +0 -0
  94. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/pl/LC_MESSAGES/messages.po +0 -0
  95. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/pt/LC_MESSAGES/messages.po +0 -0
  96. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ro/LC_MESSAGES/messages.po +0 -0
  97. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/ru/LC_MESSAGES/messages.po +0 -0
  98. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/rw/LC_MESSAGES/messages.po +0 -0
  99. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/sk/LC_MESSAGES/messages.po +0 -0
  100. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/sv/LC_MESSAGES/messages.po +0 -0
  101. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/sv_SE/LC_MESSAGES/messages.po +0 -0
  102. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/tr/LC_MESSAGES/messages.po +0 -0
  103. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/uk/LC_MESSAGES/messages.po +0 -0
  104. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/uk_UA/LC_MESSAGES/messages.po +0 -0
  105. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/zh_CN/LC_MESSAGES/messages.po +0 -0
  106. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/translations/zh_TW/LC_MESSAGES/messages.po +0 -0
  107. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners/views.py +0 -0
  108. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners.egg-info/SOURCES.txt +0 -0
  109. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners.egg-info/dependency_links.txt +0 -0
  110. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners.egg-info/not-zip-safe +0 -0
  111. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners.egg-info/requires.txt +0 -0
  112. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/invenio_banners.egg-info/top_level.txt +0 -0
  113. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/pyproject.toml +0 -0
  114. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/requirements-devel.txt +0 -0
  115. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/run-tests.sh +0 -0
  116. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/setup.cfg +0 -0
  117. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/setup.py +0 -0
  118. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/conftest.py +0 -0
  119. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/records/test_disable.py +0 -0
  120. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/records/test_models.py +0 -0
  121. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/resources/conftest.py +0 -0
  122. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/resources/test_resources.py +0 -0
  123. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/services/conftest.py +0 -0
  124. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/services/test_services.py +0 -0
  125. {invenio-banners-3.2.0 → invenio_banners-3.3.1}/tests/test_invenio_banners.py +0 -0
@@ -0,0 +1,11 @@
1
+ on:
2
+ push:
3
+ tags:
4
+ - v*
5
+
6
+ jobs:
7
+ build-n-publish:
8
+ uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master
9
+ secrets: inherit
10
+ with:
11
+ babel-compile-catalog: true
@@ -10,9 +10,13 @@ name: CI
10
10
 
11
11
  on:
12
12
  push:
13
- branches: master
13
+ branches:
14
+ - master
15
+ - maint-v3.x
14
16
  pull_request:
15
- branches: master
17
+ branches:
18
+ - master
19
+ - maint-v3.x
16
20
  schedule:
17
21
  # * is a special character in YAML so you have to quote this string
18
22
  - cron: "0 3 * * 6"
@@ -7,6 +7,14 @@
7
7
  Changes
8
8
  =======
9
9
 
10
+ Version v3.3.1 (released 2025-03-18)
11
+
12
+ - i18n: backport missing translations
13
+
14
+ Version v3.3.0 (released 2025-01-22)
15
+
16
+ - templates: pass ui classes through macro parameters
17
+
10
18
  Version v3.2.0 (released 2024-11-05)
11
19
 
12
20
  - feat(administration): use html editor for message
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: invenio-banners
3
+ Version: 3.3.1
4
+ Summary: Invenio-Banners is a module used to create and show banners with useful messages to users.
5
+ Home-page: https://github.com/inveniosoftware/invenio-banners
6
+ Author: CERN
7
+ Author-email: info@inveniosoftware.org
8
+ License: MIT
9
+ Keywords: Invenio Banners
10
+ Platform: any
11
+ Classifier: Development Status :: 1 - Planning
12
+ Requires-Python: >=3.7
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"
22
+ Provides-Extra: opensearch1
23
+ Requires-Dist: invenio-search[opensearch1]<3.0.0,>=2.1.0; extra == "opensearch1"
24
+ Provides-Extra: opensearch2
25
+ Requires-Dist: invenio-search[opensearch2]<3.0.0,>=2.1.0; extra == "opensearch2"
26
+ Dynamic: license-file
27
+
28
+ ..
29
+ Copyright (C) 2020 CERN.
30
+
31
+ Invenio-Banners is free software; you can redistribute it and/or modify
32
+ it under the terms of the MIT License; see LICENSE file for more details.
33
+
34
+ =================
35
+ Invenio-Banners
36
+ =================
37
+
38
+ .. image:: https://img.shields.io/travis/inveniosoftware/invenio-banners.svg
39
+ :target: https://travis-ci.org/inveniosoftware/invenio-banners
40
+
41
+ .. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-banners.svg
42
+ :target: https://coveralls.io/r/inveniosoftware/invenio-banners
43
+
44
+ .. image:: https://img.shields.io/github/tag/inveniosoftware/invenio-banners.svg
45
+ :target: https://github.com/inveniosoftware/invenio-banners/releases
46
+
47
+ .. image:: https://img.shields.io/pypi/dm/invenio-banners.svg
48
+ :target: https://pypi.python.org/pypi/invenio-banners
49
+
50
+ .. image:: https://img.shields.io/github/license/inveniosoftware/invenio-banners.svg
51
+ :target: https://github.com/inveniosoftware/invenio-banners/blob/master/LICENSE
52
+
53
+ Create and show banners with useful messages to users.
54
+
55
+ Further documentation is available on
56
+ https://invenio-banners.readthedocs.io/
57
+
58
+ ..
59
+ Copyright (C) 2020-2024 CERN.
60
+
61
+ Invenio-Banners is free software; you can redistribute it and/or modify
62
+ it under the terms of the MIT License; see LICENSE file for more details.
63
+
64
+ Changes
65
+ =======
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
+
75
+ Version v3.2.0 (released 2024-11-05)
76
+
77
+ - feat(administration): use html editor for message
78
+ - global: change the code to be compatible with sqlalchemy >= 2.0
79
+ - global: add compatibility layer to move to flask >= 3.0
80
+
81
+ Version v3.1.0 (released 2024-08-07)
82
+
83
+ - http headers: use and adjust vnd.inveniordm.v1+json http accept header
84
+
85
+ Version 3.0.2 (released 2024-07-17)
86
+
87
+ - errors: implement REST validation error for banner loader
88
+
89
+ Version 3.0.1 (released 2024-02-21)
90
+
91
+ - Moved admin menu item for banners to site administration category
92
+
93
+ Version 3.0.0 (released 2024-01-31)
94
+
95
+ - installation: bump invenio-administration
96
+
97
+ Version 2.1.1 (released 2023-07-24)
98
+
99
+ - ui: remove bottom margin
100
+
101
+ Version 2.1.0 (released 2023-03-02)
102
+
103
+ - remove deprecated flask-babelex imports
104
+ - install invenio-i18n explicitly
105
+
106
+ Version 2.0.0 (released 2023-02-15)
107
+
108
+ - global: refactor into resource/service pattern
109
+ - global: implement CRUD operations
110
+ - global: implement best practices for packaging (declarative cfg), code
111
+ linting (black) and testing
112
+ - search: improve banners search by query params
113
+ - administration: integrate banners view module
114
+
115
+
116
+ Version 1.0.0a1 (release 2020-10-25)
117
+ ------------------------------------
118
+
119
+ - Initial public release.
@@ -10,6 +10,6 @@
10
10
 
11
11
  from .ext import InvenioBanners
12
12
 
13
- __version__ = "3.2.0"
13
+ __version__ = "3.3.1"
14
14
 
15
15
  __all__ = ("__version__", "InvenioBanners")
@@ -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
@@ -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>
@@ -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 = "ui {} flashed top attached manage m-0 message"
23
+ style_class = "{}"
24
24
  if category == "warning":
25
25
  style_class = style_class.format("warning")
26
26
  elif category == "other":
@@ -0,0 +1,119 @@
1
+ Metadata-Version: 2.4
2
+ Name: invenio-banners
3
+ Version: 3.3.1
4
+ Summary: Invenio-Banners is a module used to create and show banners with useful messages to users.
5
+ Home-page: https://github.com/inveniosoftware/invenio-banners
6
+ Author: CERN
7
+ Author-email: info@inveniosoftware.org
8
+ License: MIT
9
+ Keywords: Invenio Banners
10
+ Platform: any
11
+ Classifier: Development Status :: 1 - Planning
12
+ Requires-Python: >=3.7
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"
22
+ Provides-Extra: opensearch1
23
+ Requires-Dist: invenio-search[opensearch1]<3.0.0,>=2.1.0; extra == "opensearch1"
24
+ Provides-Extra: opensearch2
25
+ Requires-Dist: invenio-search[opensearch2]<3.0.0,>=2.1.0; extra == "opensearch2"
26
+ Dynamic: license-file
27
+
28
+ ..
29
+ Copyright (C) 2020 CERN.
30
+
31
+ Invenio-Banners is free software; you can redistribute it and/or modify
32
+ it under the terms of the MIT License; see LICENSE file for more details.
33
+
34
+ =================
35
+ Invenio-Banners
36
+ =================
37
+
38
+ .. image:: https://img.shields.io/travis/inveniosoftware/invenio-banners.svg
39
+ :target: https://travis-ci.org/inveniosoftware/invenio-banners
40
+
41
+ .. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-banners.svg
42
+ :target: https://coveralls.io/r/inveniosoftware/invenio-banners
43
+
44
+ .. image:: https://img.shields.io/github/tag/inveniosoftware/invenio-banners.svg
45
+ :target: https://github.com/inveniosoftware/invenio-banners/releases
46
+
47
+ .. image:: https://img.shields.io/pypi/dm/invenio-banners.svg
48
+ :target: https://pypi.python.org/pypi/invenio-banners
49
+
50
+ .. image:: https://img.shields.io/github/license/inveniosoftware/invenio-banners.svg
51
+ :target: https://github.com/inveniosoftware/invenio-banners/blob/master/LICENSE
52
+
53
+ Create and show banners with useful messages to users.
54
+
55
+ Further documentation is available on
56
+ https://invenio-banners.readthedocs.io/
57
+
58
+ ..
59
+ Copyright (C) 2020-2024 CERN.
60
+
61
+ Invenio-Banners is free software; you can redistribute it and/or modify
62
+ it under the terms of the MIT License; see LICENSE file for more details.
63
+
64
+ Changes
65
+ =======
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
+
75
+ Version v3.2.0 (released 2024-11-05)
76
+
77
+ - feat(administration): use html editor for message
78
+ - global: change the code to be compatible with sqlalchemy >= 2.0
79
+ - global: add compatibility layer to move to flask >= 3.0
80
+
81
+ Version v3.1.0 (released 2024-08-07)
82
+
83
+ - http headers: use and adjust vnd.inveniordm.v1+json http accept header
84
+
85
+ Version 3.0.2 (released 2024-07-17)
86
+
87
+ - errors: implement REST validation error for banner loader
88
+
89
+ Version 3.0.1 (released 2024-02-21)
90
+
91
+ - Moved admin menu item for banners to site administration category
92
+
93
+ Version 3.0.0 (released 2024-01-31)
94
+
95
+ - installation: bump invenio-administration
96
+
97
+ Version 2.1.1 (released 2023-07-24)
98
+
99
+ - ui: remove bottom margin
100
+
101
+ Version 2.1.0 (released 2023-03-02)
102
+
103
+ - remove deprecated flask-babelex imports
104
+ - install invenio-i18n explicitly
105
+
106
+ Version 2.0.0 (released 2023-02-15)
107
+
108
+ - global: refactor into resource/service pattern
109
+ - global: implement CRUD operations
110
+ - global: implement best practices for packaging (declarative cfg), code
111
+ linting (black) and testing
112
+ - search: improve banners search by query params
113
+ - administration: integrate banners view module
114
+
115
+
116
+ Version 1.0.0a1 (release 2020-10-25)
117
+ ------------------------------------
118
+
119
+ - Initial public release.
@@ -18,4 +18,3 @@ invenio_banners = invenio_banners:alembic
18
18
 
19
19
  [invenio_db.models]
20
20
  invenio_banners = invenio_banners.records.models
21
-
@@ -51,19 +51,18 @@ def test_jinja_macro(app, db):
51
51
  # add one banner
52
52
  EXPECTED_MSG = "Test banner info message"
53
53
  EXPECTED_CATEGORY = "info"
54
- EXPECTED_STYLE = "ui info flashed top attached manage m-0 message"
54
+ EXPECTED_STYLE = "ui info message top attached m-0 inv-banner"
55
55
  banner = _create_banner(EXPECTED_MSG, EXPECTED_CATEGORY)
56
56
  style = style_category(banner.category)
57
-
58
57
  html = template.render()
59
58
  assert EXPECTED_MSG in html
60
- assert style.endswith(EXPECTED_STYLE)
61
- assert style in html
59
+ assert style.endswith(EXPECTED_CATEGORY)
60
+ assert EXPECTED_STYLE in html
62
61
 
63
62
  # change message and category
64
63
  EXPECTED_MSG = "Test banner warning message"
65
64
  EXPECTED_CATEGORY = "warning"
66
- EXPECTED_STYLE = "ui warning flashed top attached manage m-0 message"
65
+ EXPECTED_STYLE = "ui warning message top attached m-0 inv-banner"
67
66
 
68
67
  banner.message = EXPECTED_MSG
69
68
  banner.category = EXPECTED_CATEGORY
@@ -73,5 +72,5 @@ def test_jinja_macro(app, db):
73
72
 
74
73
  html = template.render()
75
74
  assert EXPECTED_MSG in html
76
- assert style.endswith(EXPECTED_STYLE)
77
- assert style in html
75
+ assert style.endswith(EXPECTED_CATEGORY)
76
+ assert EXPECTED_STYLE in html
@@ -1,28 +0,0 @@
1
- on:
2
- push:
3
- tags:
4
- - v*
5
-
6
- jobs:
7
- build-n-publish:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v2
11
- - name: Set up Python 3.7
12
- uses: actions/setup-python@v2
13
- with:
14
- python-version: 3.7
15
- - name: Install dependencies
16
- run: |
17
- python -m pip install --upgrade pip
18
- pip install setuptools wheel
19
- - name: Build package
20
- run: |
21
- python setup.py sdist bdist_wheel
22
- - name: pypi-publish
23
- uses: pypa/gh-action-pypi-publish@v1.3.1
24
- with:
25
- user: __token__
26
-
27
- password: ${{ secrets.pypi_token }}
28
-
@@ -1,100 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: invenio-banners
3
- Version: 3.2.0
4
- Summary: Invenio-Banners is a module used to create and show banners with useful messages to users.
5
- Home-page: https://github.com/inveniosoftware/invenio-banners
6
- Author: CERN
7
- Author-email: info@inveniosoftware.org
8
- License: MIT
9
- Description: ..
10
- Copyright (C) 2020 CERN.
11
-
12
- Invenio-Banners is free software; you can redistribute it and/or modify
13
- it under the terms of the MIT License; see LICENSE file for more details.
14
-
15
- =================
16
- Invenio-Banners
17
- =================
18
-
19
- .. image:: https://img.shields.io/travis/inveniosoftware/invenio-banners.svg
20
- :target: https://travis-ci.org/inveniosoftware/invenio-banners
21
-
22
- .. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-banners.svg
23
- :target: https://coveralls.io/r/inveniosoftware/invenio-banners
24
-
25
- .. image:: https://img.shields.io/github/tag/inveniosoftware/invenio-banners.svg
26
- :target: https://github.com/inveniosoftware/invenio-banners/releases
27
-
28
- .. image:: https://img.shields.io/pypi/dm/invenio-banners.svg
29
- :target: https://pypi.python.org/pypi/invenio-banners
30
-
31
- .. image:: https://img.shields.io/github/license/inveniosoftware/invenio-banners.svg
32
- :target: https://github.com/inveniosoftware/invenio-banners/blob/master/LICENSE
33
-
34
- Create and show banners with useful messages to users.
35
-
36
- Further documentation is available on
37
- https://invenio-banners.readthedocs.io/
38
-
39
- ..
40
- Copyright (C) 2020-2024 CERN.
41
-
42
- Invenio-Banners is free software; you can redistribute it and/or modify
43
- it under the terms of the MIT License; see LICENSE file for more details.
44
-
45
- Changes
46
- =======
47
-
48
- Version v3.2.0 (released 2024-11-05)
49
-
50
- - feat(administration): use html editor for message
51
- - global: change the code to be compatible with sqlalchemy >= 2.0
52
- - global: add compatibility layer to move to flask >= 3.0
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
-
58
- Version 3.0.2 (released 2024-07-17)
59
-
60
- - errors: implement REST validation error for banner loader
61
-
62
- Version 3.0.1 (released 2024-02-21)
63
-
64
- - Moved admin menu item for banners to site administration category
65
-
66
- Version 3.0.0 (released 2024-01-31)
67
-
68
- - installation: bump invenio-administration
69
-
70
- Version 2.1.1 (released 2023-07-24)
71
-
72
- - ui: remove bottom margin
73
-
74
- Version 2.1.0 (released 2023-03-02)
75
-
76
- - remove deprecated flask-babelex imports
77
- - install invenio-i18n explicitly
78
-
79
- Version 2.0.0 (released 2023-02-15)
80
-
81
- - global: refactor into resource/service pattern
82
- - global: implement CRUD operations
83
- - global: implement best practices for packaging (declarative cfg), code
84
- linting (black) and testing
85
- - search: improve banners search by query params
86
- - administration: integrate banners view module
87
-
88
-
89
- Version 1.0.0a1 (release 2020-10-25)
90
- ------------------------------------
91
-
92
- - Initial public release.
93
-
94
- Keywords: Invenio Banners
95
- Platform: any
96
- Classifier: Development Status :: 1 - Planning
97
- Requires-Python: >=3.7
98
- Provides-Extra: tests
99
- Provides-Extra: opensearch1
100
- Provides-Extra: opensearch2
@@ -1,100 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: invenio-banners
3
- Version: 3.2.0
4
- Summary: Invenio-Banners is a module used to create and show banners with useful messages to users.
5
- Home-page: https://github.com/inveniosoftware/invenio-banners
6
- Author: CERN
7
- Author-email: info@inveniosoftware.org
8
- License: MIT
9
- Description: ..
10
- Copyright (C) 2020 CERN.
11
-
12
- Invenio-Banners is free software; you can redistribute it and/or modify
13
- it under the terms of the MIT License; see LICENSE file for more details.
14
-
15
- =================
16
- Invenio-Banners
17
- =================
18
-
19
- .. image:: https://img.shields.io/travis/inveniosoftware/invenio-banners.svg
20
- :target: https://travis-ci.org/inveniosoftware/invenio-banners
21
-
22
- .. image:: https://img.shields.io/coveralls/inveniosoftware/invenio-banners.svg
23
- :target: https://coveralls.io/r/inveniosoftware/invenio-banners
24
-
25
- .. image:: https://img.shields.io/github/tag/inveniosoftware/invenio-banners.svg
26
- :target: https://github.com/inveniosoftware/invenio-banners/releases
27
-
28
- .. image:: https://img.shields.io/pypi/dm/invenio-banners.svg
29
- :target: https://pypi.python.org/pypi/invenio-banners
30
-
31
- .. image:: https://img.shields.io/github/license/inveniosoftware/invenio-banners.svg
32
- :target: https://github.com/inveniosoftware/invenio-banners/blob/master/LICENSE
33
-
34
- Create and show banners with useful messages to users.
35
-
36
- Further documentation is available on
37
- https://invenio-banners.readthedocs.io/
38
-
39
- ..
40
- Copyright (C) 2020-2024 CERN.
41
-
42
- Invenio-Banners is free software; you can redistribute it and/or modify
43
- it under the terms of the MIT License; see LICENSE file for more details.
44
-
45
- Changes
46
- =======
47
-
48
- Version v3.2.0 (released 2024-11-05)
49
-
50
- - feat(administration): use html editor for message
51
- - global: change the code to be compatible with sqlalchemy >= 2.0
52
- - global: add compatibility layer to move to flask >= 3.0
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
-
58
- Version 3.0.2 (released 2024-07-17)
59
-
60
- - errors: implement REST validation error for banner loader
61
-
62
- Version 3.0.1 (released 2024-02-21)
63
-
64
- - Moved admin menu item for banners to site administration category
65
-
66
- Version 3.0.0 (released 2024-01-31)
67
-
68
- - installation: bump invenio-administration
69
-
70
- Version 2.1.1 (released 2023-07-24)
71
-
72
- - ui: remove bottom margin
73
-
74
- Version 2.1.0 (released 2023-03-02)
75
-
76
- - remove deprecated flask-babelex imports
77
- - install invenio-i18n explicitly
78
-
79
- Version 2.0.0 (released 2023-02-15)
80
-
81
- - global: refactor into resource/service pattern
82
- - global: implement CRUD operations
83
- - global: implement best practices for packaging (declarative cfg), code
84
- linting (black) and testing
85
- - search: improve banners search by query params
86
- - administration: integrate banners view module
87
-
88
-
89
- Version 1.0.0a1 (release 2020-10-25)
90
- ------------------------------------
91
-
92
- - Initial public release.
93
-
94
- Keywords: Invenio Banners
95
- Platform: any
96
- Classifier: Development Status :: 1 - Planning
97
- Requires-Python: >=3.7
98
- Provides-Extra: tests
99
- Provides-Extra: opensearch1
100
- Provides-Extra: opensearch2
File without changes