pageflow 15.7.1 → 16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -243
  3. data/README.md +1 -9
  4. data/Rakefile +4 -1
  5. data/admins/pageflow/accounts.rb +12 -16
  6. data/admins/pageflow/entry.rb +57 -28
  7. data/admins/pageflow/entry_templates.rb +5 -7
  8. data/admins/pageflow/sites.rb +50 -0
  9. data/admins/pageflow/user.rb +7 -0
  10. data/app/assets/javascripts/pageflow/admin/entries.js +53 -4
  11. data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +65 -0
  12. data/app/assets/stylesheets/pageflow/admin.scss +1 -0
  13. data/app/assets/stylesheets/pageflow/editor/base.scss +2 -6
  14. data/app/assets/stylesheets/pageflow/editor/dialogs.scss +2 -0
  15. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +9 -0
  16. data/app/assets/stylesheets/pageflow/editor/info_box.scss +13 -3
  17. data/app/assets/stylesheets/pageflow/mixins/buttons.scss +1 -0
  18. data/app/assets/stylesheets/pageflow/page.scss +0 -2
  19. data/app/assets/stylesheets/pageflow/themes/default/page.scss +1 -1
  20. data/app/assets/stylesheets/pageflow/ui/forms.scss +4 -1
  21. data/app/controllers/pageflow/editor/file_import_controller.rb +32 -42
  22. data/app/controllers/pageflow/entries_controller.rb +27 -3
  23. data/app/helpers/pageflow/admin/permalinks_helper.rb +15 -0
  24. data/app/helpers/pageflow/common_entry_seed_helper.rb +1 -1
  25. data/app/helpers/pageflow/embed_code_helper.rb +1 -1
  26. data/app/helpers/pageflow/entries_helper.rb +25 -17
  27. data/app/helpers/pageflow/sites_helper.rb +11 -0
  28. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  29. data/app/inputs/pageflow_permalink_input.rb +47 -0
  30. data/app/models/concerns/pageflow/permalinkable.rb +12 -0
  31. data/app/models/concerns/pageflow/reusable_file.rb +5 -0
  32. data/app/models/concerns/pageflow/uploadable_file.rb +4 -0
  33. data/app/models/pageflow/account.rb +7 -33
  34. data/app/models/pageflow/{cname_theming_request_scope.rb → cname_site_request_scope.rb} +3 -3
  35. data/app/models/pageflow/customized_theme.rb +5 -3
  36. data/app/models/pageflow/entry.rb +8 -4
  37. data/app/models/pageflow/entry_at_revision.rb +4 -3
  38. data/app/models/pageflow/entry_duplicate.rb +8 -1
  39. data/app/models/pageflow/entry_template.rb +4 -4
  40. data/app/models/pageflow/home_button.rb +7 -7
  41. data/app/models/pageflow/image_file_url_templates.rb +2 -2
  42. data/app/models/pageflow/permalink.rb +39 -0
  43. data/app/models/pageflow/permalink_directory.rb +10 -0
  44. data/app/models/pageflow/published_entry.rb +19 -2
  45. data/app/models/pageflow/revision.rb +1 -1
  46. data/app/models/pageflow/site.rb +59 -0
  47. data/app/models/pageflow/theme_customization.rb +1 -1
  48. data/app/models/pageflow/theme_customization_file.rb +6 -1
  49. data/app/policies/pageflow/account_policy.rb +2 -2
  50. data/app/policies/pageflow/entry_policy.rb +2 -2
  51. data/app/policies/pageflow/entry_template_policy.rb +1 -1
  52. data/app/policies/pageflow/{theming_policy.rb → site_policy.rb} +13 -11
  53. data/app/views/admin/accounts/_entry_template_details.html.arb +1 -1
  54. data/app/views/admin/accounts/_form.html.erb +4 -22
  55. data/app/views/admin/accounts/_site_defaults_inline_help.html.erb +5 -0
  56. data/app/views/admin/entries/_form.html.erb +11 -12
  57. data/app/views/admin/entries/_permalink_inputs.html.erb +6 -0
  58. data/app/views/admin/entries/_site_input.html.erb +15 -0
  59. data/app/views/admin/entries/{entry_type_name_input.html.erb → entry_site_and_type_name_input.html.erb} +3 -0
  60. data/app/views/admin/entries/permalink_inputs.html.erb +7 -0
  61. data/app/views/admin/entry_templates/_form.html.erb +5 -5
  62. data/app/views/admin/sites/_attributes_table.html.arb +9 -0
  63. data/app/views/admin/sites/_fields.html.erb +17 -0
  64. data/app/views/admin/sites/_form.html.erb +5 -0
  65. data/app/views/components/pageflow/admin/entries_tab.rb +1 -2
  66. data/app/views/components/pageflow/admin/entry_templates_tab.rb +10 -11
  67. data/app/views/components/pageflow/admin/features_tab.rb +1 -1
  68. data/app/views/components/pageflow/admin/sites_tab.rb +32 -0
  69. data/app/views/components/pageflow/admin/users_tab.rb +1 -2
  70. data/app/views/pageflow/editor/entries/seed.json.erb +1 -1
  71. data/app/views/pageflow/editor/file_import/start_import_job.json.jbuilder +10 -0
  72. data/app/views/pageflow/editor/sites/_site.json.jbuilder +1 -0
  73. data/app/views/pageflow/entries/{_theming.css.erb → _site.css.erb} +0 -0
  74. data/app/views/pageflow/entries/stylesheet.css.erb +1 -1
  75. data/app/views/pageflow/files/_file.json.jbuilder +1 -0
  76. data/app/views/pageflow/social_share/_entry_meta_tags.html.erb +1 -1
  77. data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
  78. data/config/initializers/admin_resource_tabs.rb +29 -12
  79. data/config/initializers/mime_types.rb +1 -0
  80. data/config/locales/de.yml +19 -17
  81. data/config/locales/en.yml +19 -17
  82. data/config/routes.rb +8 -5
  83. data/db/migrate/20221024100724_create_pageflow_permalink_directories.rb +10 -0
  84. data/db/migrate/20221025074049_add_permalink_attributes_to_entries.rb +5 -0
  85. data/db/migrate/20221027065022_create_pageflow_permalinks.rb +12 -0
  86. data/db/migrate/20221215101134_rename_theming_to_site.rb +9 -0
  87. data/db/migrate/20221215120856_associate_entry_templates_with_sites.rb +34 -0
  88. data/db/migrate/20221219203023_add_name_to_sites.rb +5 -0
  89. data/db/migrate/20230103155934_associate_theme_customizations_with_sites.rb +27 -0
  90. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +176 -179
  91. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +49 -7
  92. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +5 -5
  93. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  94. data/entry_types/paged/config/initializers/features.rb +2 -0
  95. data/entry_types/paged/config/locales/{new/help.de.yml → de.yml} +74 -65
  96. data/entry_types/paged/config/locales/{new/help.en.yml → en.yml} +66 -56
  97. data/entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb +39 -13
  98. data/entry_types/scrolled/app/helpers/pageflow_scrolled/generated_media_queries_helper.rb +55 -0
  99. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +6 -2
  100. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +2 -0
  101. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/_manifest.json.jbuilder +16 -0
  102. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +9 -3
  103. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +5 -5
  104. data/entry_types/scrolled/app/views/pageflow_scrolled/favicons/_entry.html.erb +16 -10
  105. data/entry_types/scrolled/config/locales/de.yml +265 -76
  106. data/entry_types/scrolled/config/locales/en.yml +266 -77
  107. data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +3 -3
  108. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +14 -0
  109. data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +1 -1
  110. data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +1 -1
  111. data/entry_types/scrolled/lib/pageflow_scrolled/web_app_manifest.rb +11 -0
  112. data/entry_types/scrolled/lib/pageflow_scrolled.rb +39 -1
  113. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +3 -2
  114. data/entry_types/scrolled/package/contentElements-editor.js +124 -38
  115. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  116. data/entry_types/scrolled/package/contentElements-frontend.js +321 -27
  117. data/entry_types/scrolled/package/editor.js +1345 -739
  118. data/entry_types/scrolled/package/frontend/EditableInlineText.module-14c7b097.js +5314 -0
  119. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-9fb97827.js → PhonePlatformContext-f6093cc6.js} +87 -223
  120. data/entry_types/scrolled/package/frontend/{Viewer-e2290ea0.js → Viewer-b6becc57.js} +6 -40
  121. data/entry_types/scrolled/package/frontend/arrowRight-78a7cee4.js +42 -0
  122. data/entry_types/scrolled/package/frontend/{components-6ab26015.js → components-b3160dd7.js} +546 -361
  123. data/entry_types/scrolled/package/frontend/index.css +1 -1
  124. data/entry_types/scrolled/package/frontend/index.js +398 -3692
  125. data/entry_types/scrolled/package/package.json +3 -2
  126. data/entry_types/scrolled/package/testHelpers.js +12 -2
  127. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  128. data/entry_types/scrolled/package/widgets/defaultNavigation.js +50 -40
  129. data/entry_types/scrolled/spec/fixtures/image.ico +0 -0
  130. data/lib/pageflow/ability_mixin.rb +16 -8
  131. data/lib/pageflow/admin/attributes_table_rows.rb +1 -1
  132. data/lib/pageflow/admin/form_inputs.rb +1 -1
  133. data/lib/pageflow/admin/tabs.rb +1 -1
  134. data/lib/pageflow/configuration/permissions.rb +3 -3
  135. data/lib/pageflow/configuration.rb +17 -17
  136. data/lib/pageflow/entry_export_import/entry_serialization.rb +1 -1
  137. data/lib/pageflow/entry_type.rb +6 -2
  138. data/lib/pageflow/primary_domain_entry_redirect.rb +7 -7
  139. data/lib/pageflow/seeds.rb +10 -10
  140. data/lib/pageflow/theme_customizations.rb +10 -10
  141. data/lib/pageflow/version.rb +1 -1
  142. data/package/editor.js +129 -156
  143. data/package/frontend.js +19 -2
  144. data/package/testHelpers.js +39 -6
  145. data/spec/factories/accounts.rb +5 -2
  146. data/spec/factories/draft_entries.rb +2 -2
  147. data/spec/factories/entries.rb +18 -1
  148. data/spec/factories/entry_templates.rb +1 -1
  149. data/spec/factories/permalink_directory.rb +6 -0
  150. data/spec/factories/permalinks.rb +4 -0
  151. data/spec/factories/published_entries.rb +4 -2
  152. data/spec/factories/sites.rb +9 -0
  153. metadata +50 -62
  154. data/app/assets/javascripts/pageflow/dist/editor.js +0 -11890
  155. data/app/assets/javascripts/pageflow/dist/frontend.js +0 -5800
  156. data/app/assets/javascripts/pageflow/dist/react-client.js +0 -22
  157. data/app/assets/javascripts/pageflow/dist/react-server.js +0 -19
  158. data/app/helpers/pageflow/themings_helper.rb +0 -11
  159. data/app/models/pageflow/theming.rb +0 -29
  160. data/app/views/admin/accounts/_theming_defaults_inline_help.html.erb +0 -5
  161. data/app/views/admin/accounts/_theming_details.html.arb +0 -5
  162. data/app/views/pageflow/editor/themings/_theming.json.jbuilder +0 -1
  163. data/entry_types/paged/config/locales/new/video_contain.de.yml +0 -7
  164. data/entry_types/paged/config/locales/new/video_contain.en.yml +0 -7
  165. data/entry_types/scrolled/config/locales/new/before_after_slider.de.yml +0 -8
  166. data/entry_types/scrolled/config/locales/new/before_after_slider.en.yml +0 -8
  167. data/entry_types/scrolled/config/locales/new/center_ragged.de.yml +0 -8
  168. data/entry_types/scrolled/config/locales/new/center_ragged.en.yml +0 -9
  169. data/entry_types/scrolled/config/locales/new/consent.de.yml +0 -25
  170. data/entry_types/scrolled/config/locales/new/consent.en.yml +0 -24
  171. data/entry_types/scrolled/config/locales/new/content_element_categories.de.yml +0 -39
  172. data/entry_types/scrolled/config/locales/new/content_element_categories.en.yml +0 -39
  173. data/entry_types/scrolled/config/locales/new/default_transition.de.yml +0 -14
  174. data/entry_types/scrolled/config/locales/new/default_transition.en.yml +0 -14
  175. data/entry_types/scrolled/config/locales/new/header_line_breaks.de.yml +0 -28
  176. data/entry_types/scrolled/config/locales/new/header_line_breaks.en.yml +0 -27
  177. data/entry_types/scrolled/config/locales/new/header_size.de.yml +0 -17
  178. data/entry_types/scrolled/config/locales/new/header_size.en.yml +0 -17
  179. data/entry_types/scrolled/config/locales/new/iframe_embed.de.yml +0 -39
  180. data/entry_types/scrolled/config/locales/new/iframe_embed.en.yml +0 -39
  181. data/entry_types/scrolled/config/locales/new/inline_loops.de.yml +0 -26
  182. data/entry_types/scrolled/config/locales/new/inline_loops.en.yml +0 -26
  183. data/entry_types/scrolled/config/locales/new/portrait_inline_image.de.yml +0 -9
  184. data/entry_types/scrolled/config/locales/new/portrait_inline_image.en.yml +0 -9
  185. data/entry_types/scrolled/config/locales/new/section_width.de.yml +0 -10
  186. data/entry_types/scrolled/config/locales/new/section_width.en.yml +0 -10
  187. data/entry_types/scrolled/config/locales/new/typography_variants.de.yml +0 -7
  188. data/entry_types/scrolled/config/locales/new/typography_variants.en.yml +0 -7
  189. data/entry_types/scrolled/config/locales/new/video_embed_poster.de.yml +0 -8
  190. data/entry_types/scrolled/config/locales/new/video_embed_poster.en.yml +0 -8
  191. data/entry_types/scrolled/config/locales/new/waveform_styles.de.yml +0 -11
  192. data/entry_types/scrolled/config/locales/new/waveform_styles.en.yml +0 -12
  193. data/entry_types/scrolled/config/locales/new/widgets.de.yml +0 -6
  194. data/entry_types/scrolled/config/locales/new/widgets.en.yml +0 -6
  195. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/browserconfig.xml +0 -9
  196. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/mstile-150x150.png +0 -0
  197. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/safari-pinned-tab.svg +0 -46
  198. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/site.webmanifest +0 -19
  199. data/entry_types/scrolled/package/frontend/EditableInlineText.module-b9923660.js +0 -993
  200. data/entry_types/scrolled/package/frontend/usePhonePlatform-2857c22b.js +0 -34
  201. data/spec/factories/themings.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1a50cfe81bd53808d9ae9dad7d9a4a66b694bd4362e5b775cc214978404cedc
4
- data.tar.gz: 2071f8c941906db50038ad08e3c6e16ea3082e1f879f4f523d9c5ca8e69870d6
3
+ metadata.gz: f961d4e469b058f29cbba131a2ab69068547a6215111a1e9dae04040b956ddcf
4
+ data.tar.gz: 91b70f55119f6c1b8f8b8f4d1b98555f9d58bf73160165d7e4d16f8026384d81
5
5
  SHA512:
6
- metadata.gz: 207901a660ce7258638a9ac6095cf95e9260904eec7e471ceb3e9c8a23dcc6aef00b098135b1fb1b7b81be750166426a412d91013803452f4d72ed8eef77471f
7
- data.tar.gz: de7df8277fe83db6d8b0e5391868a6f94f86fb3a82622c526d71cc5656c5e12bcec1c33cf75d5a3ec420cd8af352545555433306d2f59cbc16dd45549790297a
6
+ metadata.gz: 82ac9717c4501f56715a6afc1a855ea9ce82f8cf1d3b6c3627ca8785960753a2967ba5114f5c348aa95608160c70b59edf338b9ea21d94fe1aee98cd7704adba
7
+ data.tar.gz: 0abd22f0d5bf02e29f6ac4b9fb6bc03732eec4a5e3cbd596aed79498f218e333a915bbbe1eee3b923bfe14ce213767f380c433c22180e5cb6294e38aa2694ab8
data/CHANGELOG.md CHANGED
@@ -1,265 +1,55 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 15.7.1
3
+ ### Version 16.0.0
4
4
 
5
- 2022-09-14
5
+ 2023-01-11
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow/compare/v15.7.0...v15.7.1)
8
-
9
- ##### Security
10
-
11
- - Fix
12
- [GHSA-qcqv-38jg-2r43](https://github.com/codevise/pageflow/security/advisories/GHSA-qcqv-38jg-2r43):
13
- Insecure direct object reference in membership update endpoint
14
- ([#1862](https://github.com/codevise/pageflow/pull/1862))
15
- - Fix
16
- [GHSA-wrrw-crp8-979q](https://github.com/codevise/pageflow/security/advisories/GHSA-wrrw-crp8-979q):
17
- Sensitive user data extraction via Ransack query injection
18
- ([#1862](https://github.com/codevise/pageflow/pull/1862))
19
-
20
- ### Version 15.7.0
21
-
22
- 2022-07-18
23
-
24
- [Compare changes](https://github.com/codevise/pageflow/compare/15-6-stable...v15.7.0)
7
+ [Compare changes](https://github.com/codevise/pageflow/compare/15-x-stable...v16.0.0)
25
8
 
26
9
  #### Core
27
10
 
28
- ##### Rails Engine
29
-
30
- - Allow skipping encoding confirmation
31
- ([#1824](https://github.com/codevise/pageflow/pull/1824))
32
- - Allow disabling taking snapshots when acquiring an editor lock
33
- ([#1819](https://github.com/codevise/pageflow/pull/1819))
34
- - Theme customization
35
- ([#1713](https://github.com/codevise/pageflow/pull/1713),
36
- [#1771](https://github.com/codevise/pageflow/pull/1771))
37
- - Fix compatibility with JBuilder 2.11.3
38
- ([#1757](https://github.com/codevise/pageflow/pull/1757))
39
- - Prevent exception when reusing file from deleted entry
40
- ([#1834](https://github.com/codevise/pageflow/pull/1834))
41
-
42
- ##### Admin
11
+ ##### Breaking Changes
43
12
 
44
- - Improve entry new form
45
- ([#1822](https://github.com/codevise/pageflow/pull/1822))
46
- - Improve admin styles
47
- ([#1816](https://github.com/codevise/pageflow/pull/1816))
48
- - Remove scrolling attribute from embed iframe snippet
49
- ([#1759](https://github.com/codevise/pageflow/pull/1759))
50
- - Let admin filters entry admin by entry type
51
- ([#1756](https://github.com/codevise/pageflow/pull/1756))
13
+ - The `Theming` model has been renamed to `Site`.
14
+ ([#1903](https://github.com/codevise/pageflow/pull/1903),
15
+ [#1914](https://github.com/codevise/pageflow/pull/1914))
52
16
 
53
- ##### Editor
17
+ Related associations like `Entry#theming` or
18
+ `Account#default_theming` have been renamed to `Entry#site` and
19
+ `Account#default_site` accordingly.
54
20
 
55
- - Rebrush editor UI
56
- ([#1809](https://github.com/codevise/pageflow/pull/1809))
57
- - Improve supported host handling in url input
58
- ([#1741](https://github.com/codevise/pageflow/pull/1741))
21
+ - Entry templates and theme customizations now belong to sites instead
22
+ of accounts.
23
+ ([#1904](https://github.com/codevise/pageflow/pull/1904),
24
+ [#1915](https://github.com/codevise/pageflow/pull/1915))
59
25
 
60
- ##### Published Entry
61
-
62
- - Use canonical entry url prefix in pretty urls
63
- ([#1752](https://github.com/codevise/pageflow/pull/1752))
64
- - Support adding trailing slash to canonical entry urls
65
- ([#1833](https://github.com/codevise/pageflow/pull/1833))
66
- - Support csmil HLS playlists
67
- ([#1817](https://github.com/codevise/pageflow/pull/1817))
68
- - Load DASH on Android if hls-playlist host contains an underscore
69
- ([#1791](https://github.com/codevise/pageflow/pull/1791))
70
- - Consent
71
- ([#1705](https://github.com/codevise/pageflow/pull/1705),
72
- [#1735](https://github.com/codevise/pageflow/pull/1735),
73
- [#1712](https://github.com/codevise/pageflow/pull/1712))
26
+ Accounts can now contain multiple sites with their own set of
27
+ templates and customized theme.
74
28
 
75
29
  ##### Internal
76
30
 
77
- - Prevent full table scan in EntryRoleQuery::Scope
78
- ([#1758](https://github.com/codevise/pageflow/pull/1758))
79
- - Upgrade Jest and Testing Library
80
- ([#1721](https://github.com/codevise/pageflow/pull/1721))
81
-
82
- #### Paged Entry Type
83
-
84
- ##### Published Entry
85
-
86
- - Add feature flag to use ultra image variant for paged backgrounds
87
- ([#1815](https://github.com/codevise/pageflow/pull/1815))
88
- - Allow deactivating smart contain for video pages
89
- ([#1812](https://github.com/codevise/pageflow/pull/1812))
90
- - Use large image variant for non-blurred media loading spinner
91
- ([#1769](https://github.com/codevise/pageflow/pull/1769))
92
- - Consent and embed opt-in
93
- ([#1716](https://github.com/codevise/pageflow/pull/1716),
94
- [#1715](https://github.com/codevise/pageflow/pull/1715),
95
- [#1714](https://github.com/codevise/pageflow/pull/1714),
96
- [#1710](https://github.com/codevise/pageflow/pull/1710))
97
-
98
- ##### Themes
99
-
100
- - Add theme option to display image on page shadow
101
- ([#1704](https://github.com/codevise/pageflow/pull/1704),
102
- [#1706](https://github.com/codevise/pageflow/pull/1706))
103
- - Add theme option to change left position of logo
104
- ([#1707](https://github.com/codevise/pageflow/pull/1707))
31
+ - Add reusable GitHub workflow to run RSpec tests
32
+ ([#1905](https://github.com/codevise/pageflow/pull/1905))
105
33
 
106
34
  #### Scrolled Entry Type
107
35
 
108
- ##### Rails Engine
109
-
110
- - Additional frontend seed data
111
- ([#1799](https://github.com/codevise/pageflow/pull/1799),
112
- [#1801](https://github.com/codevise/pageflow/pull/1801))
113
- - Improve guides for Pageflow Scrolled
114
- ([#1793](https://github.com/codevise/pageflow/pull/1793))
115
- - Move guides for Pageflow Pageflow to entry type directory
116
- ([#1792](https://github.com/codevise/pageflow/pull/1792))
117
- - Allow registering additional frontend/editor packs
118
- ([#1772](https://github.com/codevise/pageflow/pull/1772))
119
- - Make Webpack load chunks via asset host
120
- ([#1753](https://github.com/codevise/pageflow/pull/1753),
121
- [#1754](https://github.com/codevise/pageflow/pull/1754))
122
- - Allow transforming theme customizations
123
- ([#1746](https://github.com/codevise/pageflow/pull/1746))
124
- - Allow passing traits to create_used_file
125
- ([#1742](https://github.com/codevise/pageflow/pull/1742))
36
+ - Simplify borders in default navigation mobile chapter menu
37
+ ([#1913](https://github.com/codevise/pageflow/pull/1913))
38
+ - Add theme property for chapter link separator color
39
+ ([#1912](https://github.com/codevise/pageflow/pull/1912))
40
+ - Add widget slot to default navigation
41
+ ([#1911](https://github.com/codevise/pageflow/pull/1911))
42
+ - Improve theme property for default navigation progress bar height
43
+ ([#1910](https://github.com/codevise/pageflow/pull/1910))
44
+ - Add theme option to use smaller menu icon variant
45
+ ([#1909](https://github.com/codevise/pageflow/pull/1909))
46
+ - Allow using custom icons for share options
47
+ ([#1907](https://github.com/codevise/pageflow/pull/1907))
126
48
 
127
- ##### Editor
128
-
129
- - Make default section configurable and change default to fade
130
- ([#1760](https://github.com/codevise/pageflow/pull/1760),
131
- [#1761](https://github.com/codevise/pageflow/pull/1761))
132
- - Always allow inserting all content element types
133
- ([#1740](https://github.com/codevise/pageflow/pull/1740))
134
- - Allow moving text block ranges
135
- ([#1739](https://github.com/codevise/pageflow/pull/1739))
136
- - Render fade transition check box in Firefox
137
- ([#1728](https://github.com/codevise/pageflow/pull/1728))
138
-
139
- ##### Published Entry
140
-
141
- - Add centerRagged layout variant
142
- ([#1787](https://github.com/codevise/pageflow/pull/1787))
143
- - Prevent shadow flickering while scrolling on iOS 14
144
- ([#1755](https://github.com/codevise/pageflow/pull/1755))
145
- - Consent for scrolled entries
146
- ([#1722](https://github.com/codevise/pageflow/pull/1722))
147
- - Transliterate German Umlauts in entry slugs
148
- ([#1720](https://github.com/codevise/pageflow/pull/1720))
149
-
150
- ##### Widgets
151
-
152
- - Scrolled widget types
153
- ([#1749](https://github.com/codevise/pageflow/pull/1749))
154
- - Do not convert SVG files uploaded as scrolled logo
155
- ([#1835](https://github.com/codevise/pageflow/pull/1835))
156
- - Update highlighted chapter in navigation when scrolling
157
- ([#1836](https://github.com/codevise/pageflow/pull/1836))
158
- - Allow placing widget in default navigation bar credit box
159
- ([#1828](https://github.com/codevise/pageflow/pull/1828))
160
- - Do not pause loops when audio focus is lost
161
- ([#1827](https://github.com/codevise/pageflow/pull/1827))
162
- - Fix unmute icon color in Safari
163
- ([#1808](https://github.com/codevise/pageflow/pull/1808))
164
- - Ensure last item of mobile menu is visible on Android
165
- ([#1807](https://github.com/codevise/pageflow/pull/1807))
166
- - Do not collapse navigation bar after iOS scroll bouncing
167
- ([#1806](https://github.com/codevise/pageflow/pull/1806))
168
- - Align navigation breakpoints with theme breakpoints
169
- ([#1770](https://github.com/codevise/pageflow/pull/1770))
170
-
171
- ##### Content Elements
172
-
173
- - Allow more position options for content elements
174
- ([#1745](https://github.com/codevise/pageflow/pull/1745))
175
- - Add portrait image option to inline image
176
- ([#1744](https://github.com/codevise/pageflow/pull/1744))
177
- - Allow defining custom poster for video embeds
178
- ([#1743](https://github.com/codevise/pageflow/pull/1743))
179
- - Make external link id generation more robust
180
- ([#1802](https://github.com/codevise/pageflow/pull/1802))
181
- - Server generated peak data for waveforms
182
- ([#1814](https://github.com/codevise/pageflow/pull/1814))
183
- - Inline video loops and improved unmute options
184
- ([#1810](https://github.com/codevise/pageflow/pull/1810))
185
- - Prevent displaying black lines at the side of FitViewport elements
186
- ([#1825](https://github.com/codevise/pageflow/pull/1825))
187
- - Allow sorting items in external links content element
188
- ([#1800](https://github.com/codevise/pageflow/pull/1800))
189
- - Apply consist max-width to wide elements
190
- ([#1798](https://github.com/codevise/pageflow/pull/1798))
191
- - Add iframe embed content element
192
- ([#1762](https://github.com/codevise/pageflow/pull/1762),
193
- [#1765](https://github.com/codevise/pageflow/pull/1765))
194
- - Display subtitles at the bottom of the media element
195
- ([#1764](https://github.com/codevise/pageflow/pull/1764))
196
- - Add line break and manual hyphenation support for headings
197
- ([#1751](https://github.com/codevise/pageflow/pull/1751))
198
- - Add feature flag to disable scrolled chart opt-in
199
- ([#1732](https://github.com/codevise/pageflow/pull/1732))
200
- - Prevent interpreting external links as relative
201
- ([#1727](https://github.com/codevise/pageflow/pull/1727))
202
- - Use lazy opt-in consent paradigm for scrolled embeds
203
- ([#1726](https://github.com/codevise/pageflow/pull/1726))
204
- - Make heading text size configurable
205
- ([#1725](https://github.com/codevise/pageflow/pull/1725))
206
- - Make it easier to recognize 360° images
207
- ([#1724](https://github.com/codevise/pageflow/pull/1724))
208
- - Ensure contrast of text in embed opt-in
209
- ([#1723](https://github.com/codevise/pageflow/pull/1723))
210
- - Remove option hide before/after handles
211
- ([#1719](https://github.com/codevise/pageflow/pull/1719))
212
- - Fit viewport without displaying pillar boxes
213
- ([#1718](https://github.com/codevise/pageflow/pull/1718))
214
- - Add missing translation for VR content element
215
- ([#1711](https://github.com/codevise/pageflow/pull/1711))
216
-
217
- ##### Themes
218
-
219
- - Render typography CSS rules based on scrolled theme options
220
- ([#1750](https://github.com/codevise/pageflow/pull/1750))
221
- - Allow rendering content elements with rounded corners.
222
- ([#1804](https://github.com/codevise/pageflow/pull/1804),
223
- [#1805](https://github.com/codevise/pageflow/pull/1805))
224
- - Add content surface color properties
225
- ([#1803](https://github.com/codevise/pageflow/pull/1803))
226
- - Restore spacing but make it theme configurable
227
- - Allow configuring section widths in theme
228
- ([#1786](https://github.com/codevise/pageflow/pull/1786),
229
- [#1795](https://github.com/codevise/pageflow/pull/1795),
230
- [#1796](https://github.com/codevise/pageflow/pull/1796))
231
- - Allow targeting different heading sizes via theme typography rules
232
- ([#1789](https://github.com/codevise/pageflow/pull/1789))
233
- - Text variants
234
- ([#1788](https://github.com/codevise/pageflow/pull/1788))
235
- - Allow changing content text color via theme options
236
- ([#1785](https://github.com/codevise/pageflow/pull/1785))
237
- - Allow overriding text block heading margins in typography rules
238
- ([#1784](https://github.com/codevise/pageflow/pull/1784))
239
- - Let themes customize navigation bar icons
240
- ([#1775](https://github.com/codevise/pageflow/pull/1775),
241
- [#1776](https://github.com/codevise/pageflow/pull/1776))
242
- - More theme options for scrolled default navigation
243
- ([#1768](https://github.com/codevise/pageflow/pull/1768))
244
-
245
- ##### JavaScript API
246
-
247
- - Make scrolled rendering test helpers available outside package
248
- ([#1818](https://github.com/codevise/pageflow/pull/1818))
249
-
250
- ##### Internal
49
+ [Compare changes](https://github.com/codevise/pageflow/compare/15-x-stable...master)
251
50
 
252
- - Fix storybook
253
- ([#1826](https://github.com/codevise/pageflow/pull/1826))
254
- - Upgrade React minor version used in development
255
- ([#1773](https://github.com/codevise/pageflow/pull/1773))
256
- - Transpile pageflow package in scrolled storybook
257
- ([#1717](https://github.com/codevise/pageflow/pull/1717))
258
- - Update Video.js for SSR fix
259
- ([#1701](https://github.com/codevise/pageflow/pull/1701))
260
- - Do not use import/export keywords in vendored deps
261
- ([#1700](https://github.com/codevise/pageflow/pull/1700))
51
+ None so far.
262
52
 
263
53
  See
264
- [15-6-stable branch](https://github.com/codevise/pageflow/blob/15-6-stable/CHANGELOG.md)
54
+ [15-x-stable branch](https://github.com/codevise/pageflow/blob/15-x-stable/CHANGELOG.md)
265
55
  for previous changes.
data/README.md CHANGED
@@ -171,15 +171,7 @@ If you run into problems during the installation of Pageflow, please refer to th
171
171
 
172
172
  ## Security Policy
173
173
 
174
- For major security issues, at least the current release series and the
175
- last major series will receive patches and new versions.
176
-
177
- Security related announcements will be posted to the
178
- [`ruby-security-ann`](https://groups.google.com/forum/#!forum/ruby-security-ann)
179
- mailing list.
180
-
181
- If you have found a security related bug, please contact
182
- `info(at)codevise.de` instead of creating a publicly visible issue.
174
+ See [`SECURITY.md`](https://github.com/codevise/pageflow/blob/master/SECURITY.md).
183
175
 
184
176
  ## Contributing
185
177
 
data/Rakefile CHANGED
@@ -21,7 +21,10 @@ end
21
21
  require 'semmy'
22
22
  Semmy::Tasks.install do |config|
23
23
  config.github_repository = 'codevise/pageflow'
24
- config.source_files_with_docs_tags = '{app,lib,packages/*/src,spec/support/pageflow}/**/*.{js,jsx,rb,scss}'
24
+ config.source_files_with_docs_tags =
25
+ '{app,lib,packages/*/src,spec/support/pageflow,' \
26
+ 'entry_types/*/{app,lib,package/src,packages/*/src}}' \
27
+ '/**/*.{js,jsx,rb,scss}'
25
28
  end
26
29
 
27
30
  require File.expand_path('spec/support/pageflow/dummy/app', File.dirname(__FILE__))
@@ -59,12 +59,11 @@ module Pageflow
59
59
 
60
60
  show :title => :name do |account|
61
61
  render 'account_details', :account => account
62
- render 'theming_details', :account => account
63
62
 
64
- tabs_view(Pageflow.config.admin_resource_tabs.find_by_resource(account.default_theming),
63
+ tabs_view(Pageflow.config.admin_resource_tabs.find_by_resource(account),
65
64
  i18n: 'pageflow.admin.resource_tabs',
66
- authorize: :see_theming_admin_tab,
67
- build_args: [account.default_theming])
65
+ authorize: :see_account_admin_tab,
66
+ build_args: [account])
68
67
  end
69
68
 
70
69
  controller do
@@ -76,14 +75,14 @@ module Pageflow
76
75
 
77
76
  def new
78
77
  @account = Account.new
79
- @account.build_default_theming
78
+ @account.build_default_site
80
79
  end
81
80
 
82
81
  def create
83
82
  account_params = permitted_params[:account] || {}
84
83
  @account = Account.new(account_params)
85
- @account.build_default_theming(permitted_params.fetch(:account, {})[
86
- :default_theming_attributes])
84
+ @account.build_default_site(permitted_params.fetch(:account, {})[
85
+ :default_site_attributes])
87
86
  super
88
87
  end
89
88
 
@@ -100,7 +99,7 @@ module Pageflow
100
99
  end
101
100
 
102
101
  def scoped_collection
103
- super.includes(:default_theming)
102
+ super.includes(:default_site)
104
103
  end
105
104
 
106
105
  private
@@ -115,12 +114,12 @@ module Pageflow
115
114
  [
116
115
  :name,
117
116
  :default_file_rights,
118
- default_theming_attributes: permitted_theming_attributes
117
+ default_site_attributes: permitted_site_attributes
119
118
  ] +
120
119
  permitted_attributes_for(:account)
121
120
  end
122
121
 
123
- def permitted_theming_attributes
122
+ def permitted_site_attributes
124
123
  [
125
124
  :cname,
126
125
  :additional_cnames,
@@ -131,15 +130,12 @@ module Pageflow
131
130
  :privacy_link_url,
132
131
  :home_url
133
132
  ] +
134
- permitted_attributes_for(:theming)
133
+ permitted_attributes_for(:site)
135
134
  end
136
135
 
137
136
  def permitted_attributes_for(resource_name)
138
- if params[:id]
139
- Pageflow.config_for(resource).admin_form_inputs.permitted_attributes_for(resource_name)
140
- else
141
- []
142
- end
137
+ config = params[:id] ? Pageflow.config_for(resource) : Pageflow.config
138
+ config.admin_form_inputs.permitted_attributes_for(resource_name)
143
139
  end
144
140
 
145
141
  def permit_feature_states(attributes)
@@ -99,13 +99,13 @@ module Pageflow
99
99
  .order(:name)
100
100
  end)
101
101
 
102
- searchable_select_options(name: :eligible_themings,
103
- text_attribute: :name,
102
+ searchable_select_options(name: :eligible_sites,
103
+ text_attribute: :name_with_account_prefix,
104
104
  scope: lambda do |params|
105
- entry = Entry.find(params[:entry_id])
106
- ThemingPolicy::Scope
107
- .new(current_user, Theming)
108
- .themings_allowed_for(entry.account)
105
+ account = Account.find(params[:account_id])
106
+ SitePolicy::Scope
107
+ .new(current_user, Site)
108
+ .sites_allowed_for(account)
109
109
  end,
110
110
  filter: lambda do |term, scope|
111
111
  scope.ransack(account_name_cont: term).result
@@ -139,11 +139,13 @@ module Pageflow
139
139
  end
140
140
  end
141
141
 
142
- collection_action :entry_type_name_input do
142
+ collection_action :entry_site_and_type_name_input do
143
143
  account = Pageflow::Account.find(params[:account_id])
144
144
  @entry = Pageflow::Entry.new(account: account,
145
145
  type_name: params[:entry_type_name])
146
146
 
147
+ apply_entry_defaults(@entry)
148
+
147
149
  if authorized?(:see_entry_types, account)
148
150
  render(layout: false)
149
151
  else
@@ -151,6 +153,18 @@ module Pageflow
151
153
  end
152
154
  end
153
155
 
156
+ collection_action :permalink_inputs do
157
+ @entry = Entry.new(permitted_params[:entry])
158
+
159
+ apply_entry_defaults(@entry)
160
+
161
+ if authorized?(:create, @entry)
162
+ render(layout: false)
163
+ else
164
+ head :forbidden
165
+ end
166
+ end
167
+
154
168
  member_action :duplicate, method: :post do
155
169
  entry = Entry.find(params[:id])
156
170
  authorize!(:duplicate, entry)
@@ -185,17 +199,19 @@ module Pageflow
185
199
  helper FoldersHelper
186
200
  helper EntriesHelper
187
201
  helper EmbedCodeHelper
202
+ helper SitesHelper
188
203
  helper Admin::EntriesHelper
189
204
  helper Admin::FeaturesHelper
190
205
  helper Admin::FormHelper
191
206
  helper Admin::MembershipsHelper
207
+ helper Admin::PermalinksHelper
192
208
  helper Admin::RevisionsHelper
193
209
 
194
210
  helper_method :account_policy_scope
211
+ helper_method :site_policy_scope
195
212
 
196
213
  after_build do |entry|
197
- entry.account ||= account_policy_scope.entry_creatable.first || Account.first
198
- entry.theming ||= entry.account.default_theming
214
+ apply_entry_defaults(entry)
199
215
 
200
216
  if action_name == 'new' &&
201
217
  (default_entry_type = Pageflow.config.default_entry_type&.call(entry.account))
@@ -205,8 +221,8 @@ module Pageflow
205
221
  end
206
222
 
207
223
  before_update do |entry|
208
- if entry.account_id_changed? && !authorized?(:update_theming_on, resource)
209
- entry.theming = entry.account.default_theming
224
+ if entry.account_id_changed? && !authorized?(:update_site_on, resource)
225
+ entry.site = entry.account.default_site
210
226
  end
211
227
  end
212
228
 
@@ -217,7 +233,15 @@ module Pageflow
217
233
  end
218
234
 
219
235
  def scoped_collection
220
- result = super.includes(:theming, :account, {memberships: :user}, :published_revision).references(:published_revision)
236
+ result =
237
+ super
238
+ .includes(:site,
239
+ {permalink: :directory},
240
+ :account,
241
+ {memberships: :user},
242
+ :published_revision)
243
+ .references(:published_revision)
244
+
221
245
  params.key?(:folder_id) ? result.where(folder_id: params[:folder_id]) : result
222
246
  end
223
247
 
@@ -233,16 +257,21 @@ module Pageflow
233
257
 
234
258
  private
235
259
 
260
+ def apply_entry_defaults(entry)
261
+ entry.account ||= account_policy_scope.entry_creatable.first || Account.first
262
+ entry.site ||= entry.account.default_site
263
+ end
264
+
236
265
  def account_policy_scope
237
266
  AccountPolicy::Scope.new(current_user, Account)
238
267
  end
239
268
 
240
- def theming_policy_scope
241
- ThemingPolicy::Scope.new(current_user, Theming)
269
+ def site_policy_scope
270
+ SitePolicy::Scope.new(current_user, Site)
242
271
  end
243
272
 
244
273
  def permitted_attributes
245
- result = [:title, :type_name]
274
+ result = [:title, :type_name, {permalink_attributes: [:slug, :directory_id]}]
246
275
  target = if !params[:id] && current_user.admin?
247
276
  Account.first
248
277
  elsif params[:id]
@@ -260,10 +289,10 @@ module Pageflow
260
289
  if params[:id]
261
290
  accounts = resource.account
262
291
  else
263
- accounts = account_policy_scope.themings_accessible
292
+ accounts = account_policy_scope.sites_accessible
264
293
  end
265
294
 
266
- result += permitted_theming_attributes(accounts)
295
+ result += permitted_site_attributes(accounts)
267
296
 
268
297
  result
269
298
  end
@@ -275,31 +304,31 @@ module Pageflow
275
304
  end
276
305
  end
277
306
 
278
- def permitted_theming_attributes(accounts)
279
- if (create_or_new_action? || authorized?(:update_theming_on, resource)) &&
280
- theming_params_present? && theming_in_allowed_themings_for?(accounts)
281
- [:theming_id]
307
+ def permitted_site_attributes(accounts)
308
+ if (create_or_new_action? || authorized?(:update_site_on, resource)) &&
309
+ site_params_present? && site_in_allowed_sites_for?(accounts)
310
+ [:site_id]
282
311
  else
283
312
  []
284
313
  end
285
314
  end
286
315
 
287
- def theming_params_present?
288
- params[:entry] && params[:entry][:theming_id]
316
+ def site_params_present?
317
+ params[:entry] && params[:entry][:site_id]
289
318
  end
290
319
 
291
320
  def create_or_new_action?
292
- [:create, :new].include?(action_name.to_sym)
321
+ [:create, :new, :permalink_inputs].include?(action_name.to_sym)
293
322
  end
294
323
 
295
- def theming_in_allowed_themings_for?(accounts)
296
- theming_policy_scope.themings_allowed_for(accounts)
297
- .include?(Theming.find(params[:entry][:theming_id]))
324
+ def site_in_allowed_sites_for?(accounts)
325
+ site_policy_scope.sites_allowed_for(accounts)
326
+ .include?(Site.find(params[:entry][:site_id]))
298
327
  end
299
328
 
300
329
  def permitted_account_attributes
301
330
  if account_params_present? &&
302
- (action_name.to_sym == :create || legally_moving_entry_to_other_account)
331
+ (create_or_new_action? || legally_moving_entry_to_other_account)
303
332
  [:account_id]
304
333
  else
305
334
  []
@@ -5,7 +5,7 @@ module Pageflow
5
5
  actions :index, :new, :create, :edit, :update
6
6
  form partial: 'form'
7
7
 
8
- belongs_to :account, parent_class: Pageflow::Account
8
+ belongs_to :site, parent_class: Pageflow::Site
9
9
 
10
10
  breadcrumb do
11
11
  breadcrumb_links.first 3
@@ -20,9 +20,7 @@ module Pageflow
20
20
  end
21
21
 
22
22
  def new
23
- account = Account.find(params[:account_id])
24
- @entry_template = EntryTemplate.new(
25
- account: account,
23
+ @entry_template = parent.entry_templates.build(
26
24
  entry_type_name: params[:entry_type_name]
27
25
  )
28
26
 
@@ -32,8 +30,8 @@ module Pageflow
32
30
  end
33
31
 
34
32
  def create
35
- @entry_template = EntryTemplate.new(
36
- entry_template_params.merge(account_id: permitted_params[:account_id])
33
+ @entry_template = parent.entry_templates.build(
34
+ entry_template_params
37
35
  )
38
36
  @page_title = page_title('new', @entry_template.entry_type_name)
39
37
  authorize!(:create, @entry_template)
@@ -87,7 +85,7 @@ module Pageflow
87
85
  end
88
86
 
89
87
  def redirect_path
90
- admin_account_path(params[:account_id], tab: 'entry_templates')
88
+ admin_account_site_path(parent.account, parent, tab: 'entry_templates')
91
89
  end
92
90
 
93
91
  def entry_template_params