affinitic.smartweb 1.0.0a1__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.
Files changed (119) hide show
  1. affinitic.smartweb-1.0.0a1/CHANGES.rst +33 -0
  2. affinitic.smartweb-1.0.0a1/CONTRIBUTORS.rst +4 -0
  3. affinitic.smartweb-1.0.0a1/LICENSE.rst +14 -0
  4. affinitic.smartweb-1.0.0a1/MANIFEST.in +11 -0
  5. affinitic.smartweb-1.0.0a1/PKG-INFO +129 -0
  6. affinitic.smartweb-1.0.0a1/README.rst +65 -0
  7. affinitic.smartweb-1.0.0a1/docs/conf.py +85 -0
  8. affinitic.smartweb-1.0.0a1/docs/index.md +16 -0
  9. affinitic.smartweb-1.0.0a1/setup.cfg +4 -0
  10. affinitic.smartweb-1.0.0a1/setup.py +73 -0
  11. affinitic.smartweb-1.0.0a1/src/affinitic/__init__.py +2 -0
  12. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/__init__.py +6 -0
  13. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/__init__.py +0 -0
  14. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/configure.zcml +30 -0
  15. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/import_document.py +161 -0
  16. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/overrides/.gitkeep +0 -0
  17. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/static/.gitkeep +0 -0
  18. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/static/svg/arrow_left_circle.svg +4 -0
  19. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/browser/static/svg/plus_circle.svg +4 -0
  20. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/configure.zcml +58 -0
  21. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/__init__.py +7 -0
  22. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/configure.zcml +6 -0
  23. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/folders/__init__.py +0 -0
  24. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/folders/event_folder/__init__.py +0 -0
  25. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/folders/event_folder/content.py +15 -0
  26. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/folders/news_folder/__init__.py +0 -0
  27. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/folders/news_folder/content.py +15 -0
  28. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/pages/__init__.py +0 -0
  29. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/pages/event/__init__.py +0 -0
  30. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/pages/event/content.py +16 -0
  31. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/pages/news/__init__.py +0 -0
  32. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/pages/news/content.py +16 -0
  33. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/__init__.py +0 -0
  34. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/collection/configure.zcml +16 -0
  35. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/common_templates/carousel.pt +110 -0
  36. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/common_templates/list.pt +115 -0
  37. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/common_templates/table.pt +132 -0
  38. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/configure.zcml +8 -0
  39. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/event_infos/__init__.py +0 -0
  40. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/event_infos/configure.zcml +14 -0
  41. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/event_infos/content.py +39 -0
  42. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/event_infos/view.pt +20 -0
  43. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/event_infos/view.py +70 -0
  44. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/events/__init__.py +0 -0
  45. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/events/configure.zcml +46 -0
  46. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/events/content.py +74 -0
  47. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/events/macros.pt +32 -0
  48. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/events/view.py +65 -0
  49. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/news/__init__.py +0 -0
  50. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/news/configure.zcml +38 -0
  51. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/news/content.py +74 -0
  52. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/contents/sections/news/view.py +40 -0
  53. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/interfaces.py +8 -0
  54. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/README.rst +37 -0
  55. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/__init__.py +0 -0
  56. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/affinitic.smartweb.pot +0 -0
  57. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/en/LC_MESSAGES/affinitic.smartweb.mo +0 -0
  58. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/en/LC_MESSAGES/affinitic.smartweb.po +15 -0
  59. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/en/LC_MESSAGES/plone.mo +0 -0
  60. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/en/LC_MESSAGES/plone.po +0 -0
  61. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/fr/LC_MESSAGES/affinitic.smartweb.mo +0 -0
  62. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/fr/LC_MESSAGES/affinitic.smartweb.po +15 -0
  63. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/fr/LC_MESSAGES/plone.mo +0 -0
  64. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/fr/LC_MESSAGES/plone.po +0 -0
  65. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/nl/LC_MESSAGES/affinitic.smartweb.mo +0 -0
  66. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/nl/LC_MESSAGES/affinitic.smartweb.po +15 -0
  67. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/nl/LC_MESSAGES/plone.mo +0 -0
  68. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/nl/LC_MESSAGES/plone.po +0 -0
  69. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/update.py +74 -0
  70. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/locales/update.sh +16 -0
  71. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/permissions.zcml +12 -0
  72. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/browserlayer.xml +7 -0
  73. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/catalog.xml +4 -0
  74. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/metadata.xml +10 -0
  75. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/registry/main.xml +8 -0
  76. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/rolemap.xml +7 -0
  77. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.CirkwiView.xml +10 -0
  78. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.DirectoryView.xml +10 -0
  79. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.EventsView.xml +10 -0
  80. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.Folder.xml +20 -0
  81. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.NewsView.xml +10 -0
  82. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.Page.xml +19 -0
  83. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.PortalPage.xml +23 -0
  84. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types/imio.smartweb.Procedure.xml +10 -0
  85. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/default/types.xml +10 -0
  86. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/taxonomies/event_category.cfg +9 -0
  87. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/taxonomies/event_category.xml +57 -0
  88. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/taxonomies/news_category.cfg +9 -0
  89. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/taxonomies/news_category.xml +57 -0
  90. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.Event.xml +69 -0
  91. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.EventFolder.xml +57 -0
  92. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.News.xml +63 -0
  93. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.NewsFolder.xml +57 -0
  94. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.SectionEventInfo.xml +34 -0
  95. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.SectionEvents.xml +44 -0
  96. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/affinitic.smartweb.SectionNews.xml +44 -0
  97. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/imio.smartweb.Folder.xml +20 -0
  98. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/imio.smartweb.Page.xml +19 -0
  99. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types/imio.smartweb.SectionCollection.xml +15 -0
  100. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/types.xml +11 -0
  101. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/event_news/workflows.xml +7 -0
  102. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/portlets/rolemap.xml +12 -0
  103. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/uninstall/browserlayer.xml +7 -0
  104. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/profiles/uninstall_types/types.xml +10 -0
  105. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/setuphandlers.py +35 -0
  106. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/testing.py +50 -0
  107. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/tests/__init__.py +0 -0
  108. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/tests/robot/test_example.robot +66 -0
  109. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/tests/test_robot.py +31 -0
  110. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/tests/test_setup.py +55 -0
  111. affinitic.smartweb-1.0.0a1/src/affinitic/smartweb/utils.py +28 -0
  112. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/PKG-INFO +129 -0
  113. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/SOURCES.txt +117 -0
  114. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/dependency_links.txt +1 -0
  115. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/entry_points.txt +6 -0
  116. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/namespace_packages.txt +1 -0
  117. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/not-zip-safe +1 -0
  118. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/requires.txt +14 -0
  119. affinitic.smartweb-1.0.0a1/src/affinitic.smartweb.egg-info/top_level.txt +1 -0
@@ -0,0 +1,33 @@
1
+ Changelog
2
+ =========
3
+
4
+
5
+ 1.0.0a1 (2023-04-25)
6
+ --------------------
7
+
8
+ - Locals
9
+ [Julien]
10
+
11
+ - Add multilangual dependencies
12
+ [Julien]
13
+
14
+ - Fix removing default folder
15
+ [Julien]
16
+
17
+ - Add back portlet support
18
+ [Julien]
19
+
20
+ - Add Event and News type
21
+ [Julien]
22
+
23
+ - Remove CirkwiView type
24
+ [Julien]
25
+
26
+ - Add custom hook for migration
27
+ [Julien]
28
+
29
+ - Remove default dependencies from imio smartweb
30
+ [Nicolas]
31
+
32
+ - Initial release.
33
+ [Affinitic]
@@ -0,0 +1,4 @@
1
+ Contributors
2
+ ============
3
+
4
+ - Affinitic, support@affinitic.be
@@ -0,0 +1,14 @@
1
+ affinitic.smartweb Copyright 2021, Affinitic
2
+ This program is free software; you can redistribute it and/or
3
+ modify it under the terms of the GNU General Public License version 2
4
+ as published by the Free Software Foundation.
5
+
6
+ This program is distributed in the hope that it will be useful,
7
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
+ GNU General Public License for more details.
10
+
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston,
14
+ MA 02111-1307 USA.
@@ -0,0 +1,11 @@
1
+ graft src/affinitic
2
+ graft docs
3
+ include *.rst
4
+ global-exclude *.pyc
5
+ exclude *.cfg
6
+ exclude .coveragerc
7
+ exclude .editorconfig
8
+ exclude .mcli
9
+ exclude Dockerfile
10
+ exclude Makefile
11
+ exclude cookiecutter.json
@@ -0,0 +1,129 @@
1
+ Metadata-Version: 2.1
2
+ Name: affinitic.smartweb
3
+ Version: 1.0.0a1
4
+ Summary: An agnostic version of IMIO Smartweb
5
+ Home-page: http://git.affinitic.be/affinitic-addons/affinitic.smartweb
6
+ Author: Affinitic
7
+ Author-email: support@affinitic.be
8
+ License: GPL version 2
9
+ Project-URL: Source, http://git.affinitic.be/affinitic-addons/affinitic.smartweb
10
+ Project-URL: Tracker, http://git.affinitic.be/affinitic-addons/affinitic.smartweb/issues
11
+ Description: ==================
12
+ affinitic.smartweb
13
+ ==================
14
+
15
+ An agnostic version of IMIO Smartweb
16
+
17
+ Features
18
+ --------
19
+
20
+ - Can be bullet points
21
+
22
+
23
+ Examples
24
+ --------
25
+
26
+ This add-on can be seen in action at the following sites:
27
+ - Is there a page on the internet where everybody can see the features?
28
+
29
+
30
+ Documentation
31
+ -------------
32
+
33
+ Full documentation for end users can be found in the "docs" folder, and is also available online at ...
34
+
35
+
36
+ Translations
37
+ ------------
38
+
39
+ This product has been translated into
40
+
41
+ - French
42
+
43
+
44
+ Installation
45
+ ------------
46
+
47
+ Install affinitic.smartweb by adding it to your buildout::
48
+
49
+ [buildout]
50
+
51
+ ...
52
+
53
+ eggs =
54
+ affinitic.smartweb
55
+
56
+
57
+ and then running ``bin/buildout``
58
+
59
+
60
+ Contribute
61
+ ----------
62
+
63
+ - Issue Tracker: http://git.affinitic.be/affinitic-addons/affinitic.smartweb/issues
64
+ - Source Code: http://git.affinitic.be/affinitic-addons/affinitic.smartweb
65
+
66
+
67
+ Support
68
+ -------
69
+
70
+ If you are having issues, please let us know.
71
+
72
+
73
+ License
74
+ -------
75
+ The project is licensed under the GPLv2.
76
+
77
+
78
+ Contributors
79
+ ============
80
+
81
+ - Affinitic, support@affinitic.be
82
+
83
+
84
+ Changelog
85
+ =========
86
+
87
+
88
+ 1.0.0a1 (2023-04-25)
89
+ --------------------
90
+
91
+ - Locals
92
+ [Julien]
93
+
94
+ - Add multilangual dependencies
95
+ [Julien]
96
+
97
+ - Fix removing default folder
98
+ [Julien]
99
+
100
+ - Add back portlet support
101
+ [Julien]
102
+
103
+ - Add Event and News type
104
+ [Julien]
105
+
106
+ - Remove CirkwiView type
107
+ [Julien]
108
+
109
+ - Add custom hook for migration
110
+ [Julien]
111
+
112
+ - Remove default dependencies from imio smartweb
113
+ [Nicolas]
114
+
115
+ - Initial release.
116
+ [Affinitic]
117
+
118
+ Keywords: Python Plone CMS
119
+ Platform: UNKNOWN
120
+ Classifier: Environment :: Web Environment
121
+ Classifier: Framework :: Plone
122
+ Classifier: Framework :: Plone :: Addon
123
+ Classifier: Framework :: Plone :: 6.0
124
+ Classifier: Programming Language :: Python
125
+ Classifier: Programming Language :: Python :: 3.8
126
+ Classifier: Operating System :: OS Independent
127
+ Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
128
+ Requires-Python: >=3.8
129
+ Provides-Extra: test
@@ -0,0 +1,65 @@
1
+ ==================
2
+ affinitic.smartweb
3
+ ==================
4
+
5
+ An agnostic version of IMIO Smartweb
6
+
7
+ Features
8
+ --------
9
+
10
+ - Can be bullet points
11
+
12
+
13
+ Examples
14
+ --------
15
+
16
+ This add-on can be seen in action at the following sites:
17
+ - Is there a page on the internet where everybody can see the features?
18
+
19
+
20
+ Documentation
21
+ -------------
22
+
23
+ Full documentation for end users can be found in the "docs" folder, and is also available online at ...
24
+
25
+
26
+ Translations
27
+ ------------
28
+
29
+ This product has been translated into
30
+
31
+ - French
32
+
33
+
34
+ Installation
35
+ ------------
36
+
37
+ Install affinitic.smartweb by adding it to your buildout::
38
+
39
+ [buildout]
40
+
41
+ ...
42
+
43
+ eggs =
44
+ affinitic.smartweb
45
+
46
+
47
+ and then running ``bin/buildout``
48
+
49
+
50
+ Contribute
51
+ ----------
52
+
53
+ - Issue Tracker: http://git.affinitic.be/affinitic-addons/affinitic.smartweb/issues
54
+ - Source Code: http://git.affinitic.be/affinitic-addons/affinitic.smartweb
55
+
56
+
57
+ Support
58
+ -------
59
+
60
+ If you are having issues, please let us know.
61
+
62
+
63
+ License
64
+ -------
65
+ The project is licensed under the GPLv2.
@@ -0,0 +1,85 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from pkg_resources import get_distribution
4
+
5
+ import sys
6
+
7
+
8
+ project = "affinitic.smartweb"
9
+ copyright = "2022, Affinitic"
10
+
11
+ version = release = get_distribution(project).version
12
+
13
+
14
+ # The suffix of source filenames.
15
+ source_suffix = {
16
+ ".md": "markdown",
17
+ ".rst": "restructuredtext",
18
+ }
19
+
20
+ extensions = [
21
+ "sphinx.ext.doctest",
22
+ "sphinx.ext.coverage",
23
+ "sphinx.ext.autodoc",
24
+ "sphinx.ext.viewcode",
25
+ "sphinx.ext.autosummary",
26
+ "myst_parser",
27
+ "sphinx.ext.todo",
28
+ ]
29
+ master_doc = "index"
30
+
31
+ locale_dirs = ["translated/"]
32
+ language = "en"
33
+
34
+ # Grouping the document tree into LaTeX files. List of tuples
35
+ # (source start file, target name, title, author, documentclass [howto/manual])
36
+ # This enables PDF generation.
37
+ latex_documents = [
38
+ (
39
+ "index",
40
+ "affinitic.smartweb.tex",
41
+ "affinitic.smartweb Documentation",
42
+ "",
43
+ "manual",
44
+ )
45
+ ]
46
+
47
+
48
+ class Mock:
49
+ def __init__(self, *args, **kwargs):
50
+ pass
51
+
52
+ def __call__(self, *args, **kwargs):
53
+ return Mock()
54
+
55
+ @classmethod
56
+ def __getattr__(cls, name):
57
+ if name in ("__file__", "__path__"):
58
+ return "/dev/null"
59
+ elif name[0] == name[0].upper():
60
+ mockType = type(name, (), {})
61
+ mockType.__module__ = __name__
62
+ return mockType
63
+ else:
64
+ return Mock()
65
+
66
+
67
+ MOCK_MODULES = ["lxml"]
68
+ for mod_name in MOCK_MODULES:
69
+ sys.modules[mod_name] = Mock()
70
+
71
+
72
+ # -- Options for myST markdown conversion to html -----------------------------
73
+
74
+ myst_enable_extensions = [
75
+ "colon_fence",
76
+ "deflist",
77
+ ]
78
+
79
+
80
+ # -- Options for HTML output -------------------------------------------------
81
+
82
+ # The theme to use for HTML and HTML Help pages. See the documentation for
83
+ # a list of builtin themes.
84
+ #
85
+ html_theme = "sphinx_book_theme"
@@ -0,0 +1,16 @@
1
+ ---
2
+ html_meta:
3
+ "description": "An agnostic version of IMIO Smartweb"
4
+ "property=og:description": "An agnostic version of IMIO Smartweb"
5
+ "property=og:title": "affinitic.smartweb"
6
+ "keywords": "Plone, ..."
7
+ ---
8
+
9
+ # `affinitic.smartweb`
10
+
11
+
12
+ ## Indices and tables
13
+
14
+ - {ref}`genindex`
15
+ - {ref}`modindex`
16
+ - {ref}`search`
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,73 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Installer for the affinitic.smartweb package."""
3
+
4
+ from setuptools import find_packages
5
+ from setuptools import setup
6
+
7
+
8
+ long_description = "\n\n".join(
9
+ [
10
+ open("README.rst").read(),
11
+ open("CONTRIBUTORS.rst").read(),
12
+ open("CHANGES.rst").read(),
13
+ ]
14
+ )
15
+
16
+
17
+ setup(
18
+ name="affinitic.smartweb",
19
+ version="1.0.0a1",
20
+ description="An agnostic version of IMIO Smartweb",
21
+ long_description=long_description,
22
+ # Get more from https://pypi.org/classifiers/
23
+ classifiers=[
24
+ "Environment :: Web Environment",
25
+ "Framework :: Plone",
26
+ "Framework :: Plone :: Addon",
27
+ "Framework :: Plone :: 6.0",
28
+ "Programming Language :: Python",
29
+ "Programming Language :: Python :: 3.8",
30
+ "Operating System :: OS Independent",
31
+ "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
32
+ ],
33
+ keywords="Python Plone CMS",
34
+ author="Affinitic",
35
+ author_email="support@affinitic.be",
36
+ url="http://git.affinitic.be/affinitic-addons/affinitic.smartweb",
37
+ project_urls={
38
+ "Source": "http://git.affinitic.be/affinitic-addons/affinitic.smartweb",
39
+ "Tracker": "http://git.affinitic.be/affinitic-addons/affinitic.smartweb/issues",
40
+ },
41
+ license="GPL version 2",
42
+ packages=find_packages("src", exclude=["ez_setup"]),
43
+ namespace_packages=["affinitic"],
44
+ package_dir={"": "src"},
45
+ include_package_data=True,
46
+ zip_safe=False,
47
+ python_requires=">=3.8",
48
+ install_requires=[
49
+ "setuptools",
50
+ # -*- Extra requirements: -*-
51
+ "plone.api",
52
+ "plone.app.dexterity",
53
+ "plone.restapi",
54
+ "z3c.jbot",
55
+ "imio.smartweb.policy",
56
+ "plone.app.multilingual",
57
+ ],
58
+ extras_require={
59
+ "test": [
60
+ "plone.app.contenttypes",
61
+ "plone.app.iterate",
62
+ "plone.app.robotframework[debug]",
63
+ "plone.app.testing",
64
+ "plone.testing",
65
+ ],
66
+ },
67
+ entry_points="""
68
+ [z3c.autoinclude.plugin]
69
+ target = plone
70
+ [console_scripts]
71
+ update_locale = affinitic.smartweb.locales.update:update_locale
72
+ """,
73
+ )
@@ -0,0 +1,2 @@
1
+ # -*- coding: utf-8 -*-
2
+ __import__("pkg_resources").declare_namespace(__name__)
@@ -0,0 +1,6 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Init and utils."""
3
+ from zope.i18nmessageid import MessageFactory
4
+
5
+
6
+ _ = MessageFactory("affinitic.smartweb")
@@ -0,0 +1,30 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:browser="http://namespaces.zope.org/browser"
4
+ xmlns:plone="http://namespaces.plone.org/plone"
5
+ i18n_domain="affinitic.smartweb">
6
+
7
+ <!-- Set overrides folder for Just-a-Bunch-Of-Templates product -->
8
+ <include package="z3c.jbot" file="meta.zcml" />
9
+ <browser:jbot
10
+ directory="overrides"
11
+ layer="affinitic.smartweb.interfaces.IAffiniticSmartwebLayer"
12
+ />
13
+
14
+ <!-- Publish static files -->
15
+ <plone:static
16
+ name="affinitic.smartweb"
17
+ type="plone"
18
+ directory="static"
19
+ />
20
+
21
+ <browser:page
22
+ name="import_content"
23
+ for="zope.interface.Interface"
24
+ class=".import_document.CustomImportDocumentContent"
25
+ layer="affinitic.smartweb.interfaces.IAffiniticSmartwebLayer"
26
+ permission="cmf.ManagePortal"
27
+ />
28
+
29
+
30
+ </configure>
@@ -0,0 +1,161 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ from affinitic.smartweb.utils import check_if_folder_exist
4
+ from collective.exportimport.import_content import ImportContent
5
+ from os.path import join
6
+ from plone import api
7
+ from plone.app.textfield.value import RichTextValue
8
+ from six.moves.urllib.parse import unquote
9
+ from six.moves.urllib.parse import urlparse
10
+
11
+ import logging
12
+
13
+
14
+ logger = logging.getLogger(__name__)
15
+
16
+
17
+ class CustomImportDocumentContent(ImportContent):
18
+
19
+ PORTAL_TYPE_MAPPING = {
20
+ "Document": "imio.smartweb.Page",
21
+ "Folder": "imio.smartweb.Folder",
22
+ }
23
+
24
+ ALLOWED_TYPES = [
25
+ "Collection",
26
+ "Link",
27
+ "imio.smartweb.DirectoryView",
28
+ "imio.smartweb.EventsView",
29
+ "imio.smartweb.Folder",
30
+ "imio.smartweb.NewsView",
31
+ "imio.smartweb.Page",
32
+ "imio.smartweb.PortalPage",
33
+ "imio.smartweb.Procedure",
34
+ ]
35
+
36
+ def dict_hook_document(self, item):
37
+ item["@type"] = "imio.smartweb.Page"
38
+ item["layout"] = "full_view"
39
+ return item
40
+
41
+ def dict_hook_folder(self, item):
42
+ item["@type"] = "imio.smartweb.Folder"
43
+ item["layout"] = "block_view"
44
+ return item
45
+
46
+ def dict_hook_event(self, item):
47
+ item["@type"] = "affinitic.smartweb.Event"
48
+ item["layout"] = "block_view"
49
+ return item
50
+
51
+ def dict_hook_newsitem(self, item):
52
+ item["@type"] = "affinitic.smartweb.News"
53
+ item["layout"] = "block_view"
54
+ return item
55
+
56
+ def _create_text_section(self, text, title, container):
57
+ api.content.create(
58
+ container=container,
59
+ type="imio.smartweb.SectionText",
60
+ title=title,
61
+ text=RichTextValue(
62
+ raw=text,
63
+ mimeType="text/html",
64
+ outputMimeType="text/x-html-safe",
65
+ ),
66
+ hide_title=True,
67
+ )
68
+
69
+ def _create_gallery_section(self, id, container):
70
+ api.content.create(
71
+ container=container,
72
+ type="imio.smartweb.SectionGallery",
73
+ id=id,
74
+ hide_title=True,
75
+ )
76
+
77
+ def global_obj_hook_before_deserializing(self, obj, item):
78
+ """Hook to modify the created obj before deserializing the data."""
79
+ sections_content = item.get("section_content", False)
80
+ if not sections_content:
81
+ return obj, item
82
+
83
+ for count, section in enumerate(sections_content):
84
+ if section["type"] == "text":
85
+ self._create_text_section(
86
+ text=section["data"],
87
+ title=f"{item.get('title')} Section Text {count}",
88
+ container=obj,
89
+ )
90
+
91
+ if section["type"] == "image":
92
+ self._create_gallery_section(id=section.get("id"), container=obj)
93
+
94
+ return obj, item
95
+
96
+ def create_container(self, item):
97
+ folder = self.context
98
+ parent_url = unquote(item["parent"]["@id"])
99
+ parent_url_parsed = urlparse(parent_url)
100
+ # Get the path part, split it, remove the always empty first element.
101
+ parent_path = parent_url_parsed.path.split("/")[1:]
102
+ if (
103
+ len(parent_url_parsed.netloc.split(":")) > 1
104
+ or parent_url_parsed.netloc == "nohost"
105
+ ):
106
+ # For example localhost:8080, or nohost when running tests.
107
+ # First element will then be a Plone Site id.
108
+ # Get rid of it.
109
+ parent_path = parent_path[1:]
110
+
111
+ # create original structure for imported content
112
+ for element in parent_path:
113
+ if element not in folder:
114
+ folder = api.content.create(
115
+ container=folder,
116
+ type="imio.smartweb.Folder",
117
+ id=element,
118
+ title=element,
119
+ )
120
+ logger.info(
121
+ "Created container {} to hold {}".format(
122
+ folder.absolute_url(), item["@id"]
123
+ )
124
+ )
125
+ else:
126
+ folder = folder[element]
127
+
128
+ if (
129
+ item["@type"] == "imio.smartweb.FolderNews Item"
130
+ or item["@type"] == "imio.smartweb.Folderaffinitic.smartweb.News"
131
+ ):
132
+ if not check_if_folder_exist(folder, "news"):
133
+ folder = api.content.create(
134
+ container=folder,
135
+ type="affinitic.smartweb.NewsFolder",
136
+ id="news",
137
+ title="News",
138
+ )
139
+ else:
140
+ folder = folder["news"]
141
+
142
+ if (
143
+ item["@type"] == "imio.smartweb.FolderEvent"
144
+ or item["@type"] == "imio.smartweb.Folderaffinitic.smartweb.Event"
145
+ ):
146
+ if not check_if_folder_exist(folder, "events"):
147
+ folder = api.content.create(
148
+ container=folder,
149
+ type="affinitic.smartweb.NewsFolder",
150
+ id="events",
151
+ title="Events",
152
+ )
153
+ else:
154
+ folder = folder["events"]
155
+
156
+ return folder
157
+
158
+ def handle_image_container(self, item):
159
+
160
+ path = item["section_image"].replace("http://localhost:8080/Plone", "")
161
+ return api.content.get(path=path)
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20px" height="20px">
2
+ <!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
3
+ <path d="M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM281 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L136 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l182.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L393 239c9.4 9.4 9.4 24.6 0 33.9L281 385z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="20px" height="20px">
2
+ <!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. -->
3
+ <path d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344V280H168c-13.3 0-24-10.7-24-24s10.7-24 24-24h64V168c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24H280v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"/>
4
+ </svg>