pageflow 15.2.2 → 15.6.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pageflow might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -118
- data/README.md +2 -3
- data/admins/pageflow/accounts.rb +1 -98
- data/admins/pageflow/entry.rb +21 -1
- data/admins/pageflow/entry_templates.rb +140 -0
- data/admins/pageflow/membership.rb +12 -0
- data/admins/pageflow/user.rb +5 -5
- data/app/assets/javascripts/pageflow/admin/entries.js +65 -0
- data/app/assets/javascripts/pageflow/admin/users.js +1 -1
- data/app/assets/javascripts/pageflow/asset_urls.js.erb +1 -0
- data/app/assets/javascripts/pageflow/base.js +0 -12
- data/app/assets/javascripts/pageflow/components.js +2 -6
- data/app/assets/javascripts/pageflow/dist/ui.js +178 -55
- data/app/assets/javascripts/pageflow/editor/vendor.js +1 -0
- data/app/assets/javascripts/pageflow/vendor.js +12 -10
- data/app/assets/stylesheets/pageflow/base.scss +0 -7
- data/app/assets/stylesheets/pageflow/editor/base.scss +5 -2
- data/app/assets/stylesheets/pageflow/editor/composables.scss +5 -1
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/emulation_mode_button.scss +44 -55
- data/app/assets/stylesheets/pageflow/editor/help.scss +2 -2
- data/app/assets/stylesheets/pageflow/editor/select_button.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -1
- data/app/assets/stylesheets/pageflow/entries.scss +1 -1
- data/app/assets/stylesheets/pageflow/loading_spinner.scss +4 -1
- data/app/assets/stylesheets/pageflow/navigation_mobile.scss +4 -4
- data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/page.scss +7 -0
- data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/shared/menu_bar.scss +2 -2
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss +2 -2
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +1 -1
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/quality_menu.scss +2 -2
- data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/wave.scss +1 -1
- data/app/assets/stylesheets/pageflow/ui/forms.scss +9 -2
- data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +2 -2
- data/app/assets/stylesheets/pageflow/ui/tooltip.scss +17 -3
- data/app/helpers/pageflow/admin/entries_helper.rb +16 -0
- data/app/helpers/pageflow/structured_data_helper.rb +0 -2
- data/app/models/pageflow/account.rb +21 -1
- data/app/models/pageflow/account_role_query.rb +1 -1
- data/app/models/pageflow/chapter.rb +3 -9
- data/app/models/pageflow/entry.rb +9 -2
- data/app/models/pageflow/entry_duplicate.rb +1 -0
- data/app/models/pageflow/entry_template.rb +16 -2
- data/app/models/pageflow/managed_user_query.rb +1 -1
- data/app/models/pageflow/page.rb +1 -4
- data/app/models/pageflow/revision.rb +0 -4
- data/app/models/pageflow/storyline.rb +2 -9
- data/app/policies/pageflow/account_policy.rb +10 -0
- data/app/policies/pageflow/entry_template_policy.rb +5 -1
- data/app/policies/pageflow/folder_policy.rb +2 -2
- data/app/policies/pageflow/membership_policy.rb +2 -2
- data/app/policies/pageflow/theming_policy.rb +2 -2
- data/app/policies/pageflow/user_policy.rb +1 -1
- data/app/views/admin/accounts/_entry_template_details.html.arb +7 -5
- data/app/views/admin/accounts/_form.html.erb +3 -49
- data/app/views/admin/entries/_attributes_table.html.arb +5 -0
- data/app/views/admin/entries/_not_allowed_to_see_entry_types.json.jbuilder +2 -0
- data/app/views/admin/entries/entry_types.json.jbuilder +4 -0
- data/app/views/admin/entry_templates/_form.html.erb +58 -0
- data/app/views/admin/users/_not_allowed_to_see_user_quota.html.erb +3 -0
- data/app/views/components/pageflow/admin/entry_templates_tab.rb +48 -0
- data/app/views/pageflow/admin/initial_passwords/edit.html.erb +2 -1
- data/app/views/pageflow/admin/users/_quota_exhausted.html.erb +1 -1
- data/app/views/pageflow/themes/_theme.json.jbuilder +1 -1
- data/app/views/pageflow/video_files/_video_file.json.jbuilder +8 -1
- data/config/initializers/admin_resource_tabs.rb +5 -0
- data/config/initializers/help_entries.rb +1 -5
- data/config/initializers/revision_components.rb +5 -0
- data/config/locales/de.yml +88 -155
- data/config/locales/en.yml +79 -143
- data/db/migrate/20200515112500_add_constraints_to_entry_templates.rb +21 -0
- data/db/migrate/20200807135200_rename_pageflow_entry_template_entry_type_to_entry_type_name.rb +7 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/components.js +7 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +1528 -1349
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +9258 -0
- data/{app/assets/javascripts/pageflow → entry_types/paged/app/assets/javascripts/pageflow_paged}/dist/react-client.js +1 -1
- data/{app/assets/javascripts/pageflow → entry_types/paged/app/assets/javascripts/pageflow_paged}/dist/react-server.js +3 -3
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/frontend.js +6 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/server_rendering.js +9 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/vendor.js +9 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/videojs.js +6 -0
- data/entry_types/paged/app/controllers/pageflow_paged/application_controller.rb +2 -2
- data/{app/helpers/pageflow → entry_types/paged/app/helpers/pageflow_paged}/page_background_asset_helper.rb +4 -3
- data/{app/helpers/pageflow → entry_types/paged/app/helpers/pageflow_paged}/react_server_side_rendering_helper.rb +23 -2
- data/entry_types/paged/app/views/layouts/pageflow_paged/_loading_spinner_inline_script.html.erb +1 -0
- data/entry_types/paged/app/views/layouts/pageflow_paged/application.html.erb +3 -3
- data/entry_types/paged/app/views/pageflow_paged/editor/entries/_head.html.erb +4 -2
- data/entry_types/paged/app/views/pageflow_paged/entries/_entry.html.erb +1 -1
- data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/page_background_asset/_element.html.erb +0 -0
- data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/react/_widget.html.erb +0 -0
- data/{app/views/pageflow → entry_types/paged/app/views/pageflow_paged}/react/page.html.erb +0 -0
- data/entry_types/paged/config/initializers/features.rb +1 -1
- data/entry_types/paged/config/initializers/help_entries.rb +17 -0
- data/entry_types/paged/config/locales/new/help.de.yml +162 -0
- data/entry_types/paged/config/locales/new/help.en.yml +153 -0
- data/entry_types/paged/lib/pageflow_paged/engine.rb +13 -0
- data/entry_types/paged/lib/pageflow_paged/plugin.rb +5 -1
- data/entry_types/paged/lib/pageflow_paged/react.rb +12 -0
- data/{lib/pageflow → entry_types/paged/lib/pageflow_paged}/react/page_type.rb +2 -2
- data/{lib/pageflow → entry_types/paged/lib/pageflow_paged}/react/widget_type.rb +2 -2
- data/entry_types/paged/lib/tasks/pageflow_paged_tasks.rake +7 -0
- data/entry_types/paged/vendor/assets/javascripts/development/pageflow_paged/vendor/react-server.js +20613 -0
- data/entry_types/paged/vendor/assets/javascripts/development/pageflow_paged/vendor/react.js +21495 -0
- data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/dash.all.min.js +0 -0
- data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs-dash.js +0 -0
- data/{vendor/assets/javascripts → entry_types/paged/vendor/assets/javascripts/pageflow_paged/vendor}/videojs.js +0 -0
- data/entry_types/paged/vendor/assets/javascripts/production/pageflow_paged/vendor/react-server.js +24 -0
- data/entry_types/paged/vendor/assets/javascripts/production/pageflow_paged/vendor/react.js +24 -0
- data/entry_types/scrolled/app/assets/javascripts/pageflow_scrolled/legacy.js +0 -0
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +14 -4
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +10 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +7 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +2 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb +21 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +40 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +36 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +3 -9
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +37 -2
- data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +3 -9
- data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +1 -9
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/content_elements/batch.json.jbuilder +2 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -7
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/_global_notices.html.erb +10 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +28 -11
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +3 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +8 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/favicons/_entry.html.erb +10 -0
- data/entry_types/scrolled/config/initializers/help_entries.rb +16 -0
- data/entry_types/scrolled/config/locales/de.yml +669 -0
- data/entry_types/scrolled/config/locales/en.yml +488 -0
- data/entry_types/scrolled/config/routes.rb +1 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +76 -6
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-192x192.png +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/android-chrome-512x512.png +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/apple-touch-icon.png +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/browserconfig.xml +9 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-16x16.png +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon-32x32.png +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/favicon.ico +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/mstile-150x150.png +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/safari-pinned-tab.svg +46 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/favicons/site.webmanifest +19 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDesktop.svg +56 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoMobile.svg +22 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/unmute.mp3 +0 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +6 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +3 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +90 -30
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/create_bundle_symlinks_for_yarn.rake +33 -0
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +8 -0
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +173 -0
- data/entry_types/scrolled/package/config/webpack.js +11 -0
- data/entry_types/scrolled/package/contentElements-editor.js +316 -185
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements-frontend.js +940 -304
- data/entry_types/scrolled/package/editor.js +2930 -371
- data/entry_types/scrolled/package/frontend-server.js +228 -0
- data/entry_types/scrolled/package/frontend/EditableText-7093fd0e.js +1071 -0
- data/entry_types/scrolled/package/frontend/Viewer-e49e7807.js +387 -0
- data/entry_types/scrolled/package/frontend/Wavesurfer-0adf5667.js +375 -0
- data/entry_types/scrolled/package/frontend/components-6a6793ca.js +2534 -0
- data/entry_types/scrolled/package/frontend/getPrototypeOf-63c7c8e8.js +86 -0
- data/entry_types/scrolled/package/frontend/i18n-4dc6c377.js +1092 -0
- data/entry_types/scrolled/package/frontend/index.css +9 -0
- data/entry_types/scrolled/package/frontend/index.js +5686 -0
- data/entry_types/scrolled/package/frontend/useBrowserFeature-91a4c29d.js +33 -0
- data/entry_types/scrolled/package/package.json +30 -9
- data/entry_types/scrolled/spec/fixtures/audio.m4a +0 -0
- data/entry_types/scrolled/spec/fixtures/video.mp4 +0 -0
- data/lib/generators/pageflow/initializer/templates/pageflow.rb +14 -9
- data/lib/pageflow/ability_mixin.rb +14 -2
- data/lib/pageflow/configuration.rb +6 -5
- data/lib/pageflow/entry_export_import/revision_serialization.rb +15 -13
- data/lib/pageflow/entry_export_import/revision_serialization/import.rb +18 -26
- data/lib/pageflow/entry_type_configuration.rb +2 -0
- data/lib/pageflow/global_config_api.rb +5 -4
- data/lib/pageflow/nested_revision_component.rb +49 -0
- data/lib/pageflow/react.rb +4 -2
- data/lib/pageflow/revision_component.rb +6 -2
- data/lib/pageflow/themes.rb +4 -0
- data/lib/pageflow/user_mixin.rb +2 -1
- data/lib/pageflow/version.rb +1 -1
- data/{packages/pageflow → package}/config/jest/index.js +8 -2
- data/{packages/pageflow → package}/config/jest/transformers/jst.js +0 -0
- data/{packages/pageflow → package}/config/jest/transformers/upwardBabel.js +0 -0
- data/{packages/pageflow → package}/config/webpack.js +7 -0
- data/{packages/pageflow → package}/editor.js +482 -1130
- data/package/frontend.js +2553 -0
- data/{packages/pageflow → package}/package.json +3 -0
- data/{packages/pageflow → package}/testHelpers.js +114 -13
- data/{packages/pageflow → package}/ui.js +178 -55
- data/spec/factories/accounts.rb +3 -1
- data/spec/factories/entry_templates.rb +1 -0
- data/spec/factories/published_entries.rb +6 -1
- data/spec/factories/test_revision_components.rb +4 -0
- metadata +95 -36
- data/app/assets/javascripts/pageflow/dist/frontend.js +0 -5800
- data/app/assets/javascripts/pageflow/videojs.js +0 -6
- data/config/initializers/entry_types.rb +0 -4
- data/entry_types/scrolled/config/locales/new/de.yml +0 -269
- data/entry_types/scrolled/config/locales/new/en.yml +0 -264
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled_tasks.rake +0 -96
- data/entry_types/scrolled/package/frontend.js +0 -2879
- data/packages/pageflow/config/jest/transformers/cssModules.js +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6388531c85a2d391a0a61f48054aad19cd68a59e3d8c80484ca660ae8b5d88c9
|
4
|
+
data.tar.gz: c07d1a7b17523b5257587582b81379890e90fdcb15547d875447fcd34493f759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e0a92e7a71d751dcaafc8bac07e0fae1369323864d4911c90b51c017c2aa24a383df87c811a85216ae29de00e7f3dc4a3f15493a00500b6793fc097378eb241
|
7
|
+
data.tar.gz: 7581eed1244ccce3eb97a2ad3698120e24f848e0fbf23e76b251775fc3b8525554b5ed8d2fa711409b6c726c0919d43cf7842dd59ec3f7454d4d05159596d1c4
|
data/CHANGELOG.md
CHANGED
@@ -1,130 +1,23 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 15.
|
3
|
+
### Version 15.6.1
|
4
4
|
|
5
|
-
|
5
|
+
2021-05-10
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/v15.
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/v15.6.0...v15.6.1)
|
8
8
|
|
9
|
-
-
|
10
|
-
([#
|
9
|
+
- Include shared config from `pageflow-scrolled` package in gem.
|
10
|
+
([#1690](https://github.com/codevise/pageflow/pull/1690))
|
11
11
|
|
12
|
-
### Version 15.
|
12
|
+
### Version 15.6.0
|
13
13
|
|
14
|
-
|
14
|
+
2021-05-10
|
15
15
|
|
16
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/v15.
|
16
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/15-5-stable...v15.6.0)
|
17
17
|
|
18
|
-
-
|
19
|
-
([#
|
20
|
-
- Include scrolled content element js files in gem (15.2 Backport)
|
21
|
-
([#1374](https://github.com/codevise/pageflow/pull/1374))
|
22
|
-
|
23
|
-
### Version 15.2.0
|
24
|
-
|
25
|
-
2020-04-01
|
26
|
-
|
27
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/15-1-stable...v15.2.0)
|
28
|
-
|
29
|
-
#### Core
|
30
|
-
|
31
|
-
##### Editor
|
32
|
-
|
33
|
-
- Bug fix: Re-add entry.configuration in editor for backwards compatibility
|
34
|
-
([#1331](https://github.com/codevise/pageflow/pull/1331))
|
35
|
-
- Bug fix: Fix help link in editor page type drop down
|
36
|
-
([#1372](https://github.com/codevise/pageflow/pull/1372))
|
37
|
-
|
38
|
-
##### Documentation
|
39
|
-
|
40
|
-
- Remind developers to configure their editor with ESLint before starting to contribute
|
41
|
-
([#1369](https://github.com/codevise/pageflow/pull/1369))
|
42
|
-
- Move troubleshooting to docs
|
43
|
-
([#1327](https://github.com/codevise/pageflow/pull/1327))
|
44
|
-
|
45
|
-
##### Internal
|
46
|
-
|
47
|
-
- Extract entry template from theming
|
48
|
-
([#1315](https://github.com/codevise/pageflow/pull/1315))
|
49
|
-
- Use Ruby 2.6.5 in Travis
|
50
|
-
([#1334](https://github.com/codevise/pageflow/pull/1334))
|
51
|
-
- Remove pageflow-react from yarn workspace list
|
52
|
-
([#1329](https://github.com/codevise/pageflow/pull/1329))
|
53
|
-
|
54
|
-
#### Paged Entry Type
|
55
|
-
|
56
|
-
##### Published Entry
|
57
|
-
|
58
|
-
- Allow hiding the logo on page level
|
59
|
-
([#1356](https://github.com/codevise/pageflow/pull/1356))
|
60
|
-
- Bug fix: Make multimedia alert and new pages box display again for
|
61
|
-
new entries
|
62
|
-
([#1366](https://github.com/codevise/pageflow/pull/1366))
|
63
|
-
|
64
|
-
#### Scrolled Entry Type
|
65
|
-
|
66
|
-
##### Content Elements
|
67
|
-
|
68
|
-
- Add before/after content element
|
69
|
-
([#1351](https://github.com/codevise/pageflow/pull/1351))
|
70
|
-
- dataWrapperChart content element
|
71
|
-
([#1349](https://github.com/codevise/pageflow/pull/1349),
|
72
|
-
[#1355](https://github.com/codevise/pageflow/pull/1355))
|
73
|
-
- External link content element
|
74
|
-
([#1346](https://github.com/codevise/pageflow/pull/1346))
|
75
|
-
- Add videoEmbed content element
|
76
|
-
([#1336](https://github.com/codevise/pageflow/pull/1336))
|
77
|
-
|
78
|
-
##### Widgets
|
79
|
-
|
80
|
-
- Improve navigation
|
81
|
-
([#1347](https://github.com/codevise/pageflow/pull/1347))
|
82
|
-
|
83
|
-
##### Editor
|
84
|
-
|
85
|
-
- Adding content elements
|
86
|
-
([#1337](https://github.com/codevise/pageflow/pull/1337))
|
87
|
-
- Edit content elements in the editor
|
88
|
-
([#1335](https://github.com/codevise/pageflow/pull/1335))
|
89
|
-
- Add inline help texts for scrolled editor
|
90
|
-
([#1353](https://github.com/codevise/pageflow/pull/1353))
|
91
|
-
- Add section editing options in editor sidebar
|
92
|
-
([#1363](https://github.com/codevise/pageflow/pull/1363))
|
93
|
-
|
94
|
-
##### JavaScript API
|
95
|
-
|
96
|
-
- Export useFile hook from scrolled frontend
|
97
|
-
([#1371](https://github.com/codevise/pageflow/pull/1371))
|
98
|
-
- Fix useFileRights hook
|
99
|
-
([#1357](https://github.com/codevise/pageflow/pull/1357))
|
100
|
-
- I18n for scrolled frontend
|
101
|
-
([#1342](https://github.com/codevise/pageflow/pull/1342))
|
102
|
-
- Content element frontend api
|
103
|
-
([#1324](https://github.com/codevise/pageflow/pull/1324))
|
104
|
-
- Enable registering content elements with default config
|
105
|
-
([#1354](https://github.com/codevise/pageflow/pull/1354),
|
106
|
-
[#1360](https://github.com/codevise/pageflow/pull/1360))
|
107
|
-
- Introduce configuration editor groups in scrolled editor
|
108
|
-
([#1352](https://github.com/codevise/pageflow/pull/1352),
|
109
|
-
[#1365](https://github.com/codevise/pageflow/pull/1365))
|
110
|
-
- Improve guides
|
111
|
-
([#1362](https://github.com/codevise/pageflow/pull/1362),
|
112
|
-
[#1348](https://github.com/codevise/pageflow/pull/1348),
|
113
|
-
[#1344](https://github.com/codevise/pageflow/pull/1344))
|
114
|
-
|
115
|
-
##### Internal
|
116
|
-
|
117
|
-
- Make package imports external by default in Rollup config
|
118
|
-
([#1341](https://github.com/codevise/pageflow/pull/1341))
|
119
|
-
- Make pageflow-scrolled Capybara specs less flaky
|
120
|
-
([#1339](https://github.com/codevise/pageflow/pull/1339))
|
121
|
-
- Prevent Percy from reporting different video loading progress
|
122
|
-
([#1343](https://github.com/codevise/pageflow/pull/1343))
|
123
|
-
- Enable React devtools in editor iframe
|
124
|
-
([#1338](https://github.com/codevise/pageflow/pull/1338))
|
125
|
-
- Setup Storybook for content element development
|
126
|
-
([#1326](https://github.com/codevise/pageflow/pull/1326))
|
18
|
+
- Support non-root packages in `create_bundle_symlinks_for_yarn` tasks
|
19
|
+
([#1689](https://github.com/codevise/pageflow/pull/1689))
|
127
20
|
|
128
21
|
See
|
129
|
-
[15-
|
22
|
+
[15-5-stable branch](https://github.com/codevise/pageflow/blob/15-5-stable/CHANGELOG.md)
|
130
23
|
for previous changes.
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Pageflow
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/pageflow.svg)](http://badge.fury.io/rb/pageflow)
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://github.com/codevise/pageflow/workflows/tests/badge.svg)](https://github.com/codevise/pageflow/actions)
|
5
5
|
[![Coverage Status](https://coveralls.io/repos/github/codevise/pageflow/badge.svg?branch=master)](https://coveralls.io/github/codevise/pageflow?branch=master)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/codevise/pageflow/badges/gpa.svg)](https://codeclimate.com/github/codevise/pageflow)
|
7
7
|
[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)
|
@@ -53,7 +53,7 @@ Pageflow assumes the following choice of libraries:
|
|
53
53
|
Pageflow runs in environments with:
|
54
54
|
|
55
55
|
* Ruby >= 2.1 (see `.travis.yml` for supported versions)
|
56
|
-
* Node >= 10.
|
56
|
+
* Node >= 10.18
|
57
57
|
* Rails 4.2
|
58
58
|
* Redis server (for Resque)
|
59
59
|
* A database server supported by Active Record (tested with MySQL)
|
@@ -212,4 +212,3 @@ We would like to express our special thanks to the following services
|
|
212
212
|
for supporting Pageflow through free open source plans:
|
213
213
|
|
214
214
|
[![BrowserStack](doc/supporter_logos/browser_stack.png)](https://browserstack.com)
|
215
|
-
[![Travis CI](doc/supporter_logos/travis_ci.png)](https://travis-ci.com/)
|
data/admins/pageflow/accounts.rb
CHANGED
@@ -30,9 +30,6 @@ module Pageflow
|
|
30
30
|
membership_role_with_tooltip(own_role, scope: 'own_account_role')
|
31
31
|
end
|
32
32
|
end
|
33
|
-
column :default_theming do |account|
|
34
|
-
account.first_paged_entry_template.theme_name if authorized?(:read, account)
|
35
|
-
end
|
36
33
|
end
|
37
34
|
|
38
35
|
csv do
|
@@ -63,7 +60,6 @@ module Pageflow
|
|
63
60
|
show :title => :name do |account|
|
64
61
|
render 'account_details', :account => account
|
65
62
|
render 'theming_details', :account => account
|
66
|
-
render 'entry_template_details', account: account
|
67
63
|
|
68
64
|
tabs_view(Pageflow.config.admin_resource_tabs.find_by_resource(account.default_theming),
|
69
65
|
i18n: 'pageflow.admin.resource_tabs',
|
@@ -76,76 +72,25 @@ module Pageflow
|
|
76
72
|
helper Pageflow::Admin::FormHelper
|
77
73
|
helper Pageflow::Admin::LocalesHelper
|
78
74
|
helper Pageflow::Admin::MembershipsHelper
|
79
|
-
helper Pageflow::Admin::WidgetsHelper
|
80
75
|
helper ThemesHelper
|
81
76
|
|
82
77
|
def new
|
83
78
|
@account = Account.new
|
84
79
|
@account.build_default_theming
|
85
|
-
@entry_template = @account.entry_templates.build(
|
86
|
-
default_locale: current_user.locale,
|
87
|
-
share_providers: Pageflow.config.default_share_providers,
|
88
|
-
entry_type: 'paged'
|
89
|
-
)
|
90
80
|
end
|
91
81
|
|
92
82
|
def create
|
93
|
-
account_params =
|
94
|
-
.except(:paged_entry_template_attributes)
|
83
|
+
account_params = permitted_params[:account] || {}
|
95
84
|
@account = Account.new(account_params)
|
96
85
|
@account.build_default_theming(permitted_params.fetch(:account, {})[
|
97
86
|
:default_theming_attributes])
|
98
|
-
@entry_template = @account.entry_templates.build({entry_type: 'paged'}
|
99
|
-
.merge(entry_template_params))
|
100
|
-
|
101
|
-
super
|
102
|
-
update_widgets('paged')
|
103
|
-
end
|
104
|
-
|
105
|
-
def edit
|
106
|
-
@entry_template = resource.first_paged_entry_template
|
107
87
|
super
|
108
88
|
end
|
109
89
|
|
110
90
|
def update
|
111
|
-
@entry_template = resource.entry_templates.find_or_initialize_by(
|
112
|
-
entry_type: 'paged'
|
113
|
-
)
|
114
|
-
@entry_template.assign_attributes(entry_template_params)
|
115
|
-
@entry_template.save
|
116
91
|
update! do |success, failure|
|
117
92
|
success.html { redirect_to(admin_account_path(resource, params.permit(:tab))) }
|
118
93
|
end
|
119
|
-
update_widgets('paged')
|
120
|
-
end
|
121
|
-
|
122
|
-
def entry_template_params
|
123
|
-
current_params = permitted_params_with_entry_template_attributes.fetch(:account, {})[
|
124
|
-
:paged_entry_template_attributes]&.to_hash
|
125
|
-
if current_params
|
126
|
-
config = true_false_strings_to_booleans_or_numbers(
|
127
|
-
current_params['configuration']
|
128
|
-
)
|
129
|
-
share_providers = true_false_strings_to_booleans_or_numbers(
|
130
|
-
current_params['share_providers']
|
131
|
-
)
|
132
|
-
current_params.merge('configuration' => config, 'share_providers' => share_providers)
|
133
|
-
else
|
134
|
-
{}
|
135
|
-
end
|
136
|
-
end
|
137
|
-
|
138
|
-
def update_widgets(entry_type)
|
139
|
-
if @account.valid?
|
140
|
-
EntryTemplate.find_by(account_id: @account.id, entry_type: entry_type)
|
141
|
-
&.widgets&.batch_update!(widgets_params)
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
def widgets_params
|
146
|
-
(params[:widgets].try(:permit!).to_h || {}).map do |role, type_name|
|
147
|
-
{role: role, type_name: type_name}
|
148
|
-
end
|
149
94
|
end
|
150
95
|
|
151
96
|
def permitted_params
|
@@ -154,12 +99,6 @@ module Pageflow
|
|
154
99
|
with_permitted_feature_states(result)
|
155
100
|
end
|
156
101
|
|
157
|
-
def permitted_params_with_entry_template_attributes
|
158
|
-
result = params.permit(account: permitted_account_attributes_plus_entry_template)
|
159
|
-
|
160
|
-
with_permitted_feature_states(result)
|
161
|
-
end
|
162
|
-
|
163
102
|
def scoped_collection
|
164
103
|
super.includes(:default_theming)
|
165
104
|
end
|
@@ -172,25 +111,6 @@ module Pageflow
|
|
172
111
|
result
|
173
112
|
end
|
174
113
|
|
175
|
-
def true_false_strings_to_booleans_or_numbers(hash)
|
176
|
-
hash&.map { |k, v| [k, to_boolean_or_number(v)] }&.to_h
|
177
|
-
end
|
178
|
-
|
179
|
-
def to_boolean_or_number(value)
|
180
|
-
case value
|
181
|
-
when 'false'
|
182
|
-
false
|
183
|
-
when 'true'
|
184
|
-
true
|
185
|
-
when '0'
|
186
|
-
0
|
187
|
-
when '1'
|
188
|
-
1
|
189
|
-
else
|
190
|
-
value
|
191
|
-
end
|
192
|
-
end
|
193
|
-
|
194
114
|
def permitted_account_attributes
|
195
115
|
[
|
196
116
|
:name,
|
@@ -200,11 +120,6 @@ module Pageflow
|
|
200
120
|
permitted_attributes_for(:account)
|
201
121
|
end
|
202
122
|
|
203
|
-
def permitted_account_attributes_plus_entry_template
|
204
|
-
permitted_account_attributes +
|
205
|
-
[paged_entry_template_attributes: permitted_entry_template_attributes]
|
206
|
-
end
|
207
|
-
|
208
123
|
def permitted_theming_attributes
|
209
124
|
[
|
210
125
|
:cname,
|
@@ -219,18 +134,6 @@ module Pageflow
|
|
219
134
|
permitted_attributes_for(:theming)
|
220
135
|
end
|
221
136
|
|
222
|
-
def permitted_entry_template_attributes
|
223
|
-
[
|
224
|
-
:theme_name,
|
225
|
-
:default_author,
|
226
|
-
:default_publisher,
|
227
|
-
:default_keywords,
|
228
|
-
:default_locale,
|
229
|
-
share_providers: {},
|
230
|
-
configuration: {}
|
231
|
-
]
|
232
|
-
end
|
233
|
-
|
234
137
|
def permitted_attributes_for(resource_name)
|
235
138
|
if params[:id]
|
236
139
|
Pageflow.config_for(resource).admin_form_inputs.permitted_attributes_for(resource_name)
|
data/admins/pageflow/entry.rb
CHANGED
@@ -130,6 +130,14 @@ module Pageflow
|
|
130
130
|
input_html: {style: 'width: 200px'})
|
131
131
|
end
|
132
132
|
|
133
|
+
if f.object.new_record?
|
134
|
+
f.input :type_name,
|
135
|
+
as: :select,
|
136
|
+
include_blank: false,
|
137
|
+
collection: entry_type_collection,
|
138
|
+
wrapper_html: {style: 'display: none'}
|
139
|
+
end
|
140
|
+
|
133
141
|
if authorized?(:configure_folder_for, resource)
|
134
142
|
folder_collection = collection_for_folders(resource.account, resource.folder)
|
135
143
|
f.input(:folder,
|
@@ -168,6 +176,18 @@ module Pageflow
|
|
168
176
|
end
|
169
177
|
end
|
170
178
|
|
179
|
+
collection_action :entry_types do
|
180
|
+
account = Pageflow::Account.find(params[:account_id])
|
181
|
+
|
182
|
+
if authorized?(:see_entry_types, account)
|
183
|
+
@entry_types = helpers.entry_type_collection_for_account(account)
|
184
|
+
|
185
|
+
render(layout: false)
|
186
|
+
else
|
187
|
+
render(partial: 'not_allowed_to_see_entry_types', status: 403)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
171
191
|
member_action :duplicate, method: :post do
|
172
192
|
entry = Entry.find(params[:id])
|
173
193
|
authorize!(:duplicate, entry)
|
@@ -251,7 +271,7 @@ module Pageflow
|
|
251
271
|
end
|
252
272
|
|
253
273
|
def permitted_attributes
|
254
|
-
result = [:title]
|
274
|
+
result = [:title, :type_name]
|
255
275
|
target = if !params[:id] && current_user.admin?
|
256
276
|
Account.first
|
257
277
|
elsif params[:id]
|
@@ -0,0 +1,140 @@
|
|
1
|
+
module Pageflow
|
2
|
+
ActiveAdmin.register EntryTemplate, as: 'EntryTemplate' do
|
3
|
+
menu false
|
4
|
+
config.batch_actions = false
|
5
|
+
actions :index, :new, :create, :edit, :update
|
6
|
+
form partial: 'form'
|
7
|
+
|
8
|
+
belongs_to :account, parent_class: Pageflow::Account
|
9
|
+
|
10
|
+
breadcrumb do
|
11
|
+
breadcrumb_links.first 3
|
12
|
+
end
|
13
|
+
|
14
|
+
controller do
|
15
|
+
helper Pageflow::Admin::FormHelper
|
16
|
+
helper Pageflow::Admin::WidgetsHelper
|
17
|
+
|
18
|
+
def index
|
19
|
+
redirect_to redirect_path
|
20
|
+
end
|
21
|
+
|
22
|
+
def new
|
23
|
+
account = Account.find(params[:account_id])
|
24
|
+
@entry_template = EntryTemplate.new(
|
25
|
+
account: account,
|
26
|
+
entry_type_name: params[:entry_type_name]
|
27
|
+
)
|
28
|
+
|
29
|
+
@page_title = page_title('new', params[:entry_type_name])
|
30
|
+
|
31
|
+
super
|
32
|
+
end
|
33
|
+
|
34
|
+
def create
|
35
|
+
@entry_template = EntryTemplate.new(
|
36
|
+
entry_template_params.merge(account_id: permitted_params[:account_id])
|
37
|
+
)
|
38
|
+
@page_title = page_title('new', @entry_template.entry_type_name)
|
39
|
+
authorize!(:create, @entry_template)
|
40
|
+
create! { redirect_path }
|
41
|
+
update_widgets if @entry_template.errors.empty?
|
42
|
+
end
|
43
|
+
|
44
|
+
def edit
|
45
|
+
@page_title = page_title('edit', resource.entry_type_name)
|
46
|
+
super
|
47
|
+
end
|
48
|
+
|
49
|
+
def update
|
50
|
+
@entry_template = EntryTemplate.find(params[:id])
|
51
|
+
@entry_template.assign_attributes(entry_template_params)
|
52
|
+
@page_title = page_title('edit', @entry_template.entry_type_name)
|
53
|
+
params[:entry_template].delete('share_providers')
|
54
|
+
params[:entry_template].delete('configuration')
|
55
|
+
authorize!(:update, @entry_template)
|
56
|
+
update! { redirect_path }
|
57
|
+
update_widgets if @entry_template.errors.empty?
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
def page_title(rest_verb, entry_type_name)
|
63
|
+
"#{I18n.t('pageflow.admin.entry_templates.page_title.' + rest_verb)} "\
|
64
|
+
"#{I18n.t('activerecord.values.pageflow/entry.type_names.' + entry_type_name)}"
|
65
|
+
end
|
66
|
+
|
67
|
+
def permitted_params
|
68
|
+
params.permit(
|
69
|
+
:account_id,
|
70
|
+
entry_template: permitted_entry_template_attributes
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
def permitted_entry_template_attributes
|
75
|
+
[
|
76
|
+
:id,
|
77
|
+
:account_id,
|
78
|
+
:entry_type_name,
|
79
|
+
:theme_name,
|
80
|
+
:default_author,
|
81
|
+
:default_publisher,
|
82
|
+
:default_keywords,
|
83
|
+
:default_locale,
|
84
|
+
share_providers: {},
|
85
|
+
configuration: {}
|
86
|
+
]
|
87
|
+
end
|
88
|
+
|
89
|
+
def redirect_path
|
90
|
+
admin_account_path(params[:account_id], tab: 'entry_templates')
|
91
|
+
end
|
92
|
+
|
93
|
+
def entry_template_params
|
94
|
+
current_params = permitted_params[:entry_template]&.to_hash
|
95
|
+
|
96
|
+
if current_params
|
97
|
+
config = true_false_strings_to_booleans_or_numbers(
|
98
|
+
current_params['configuration']
|
99
|
+
)
|
100
|
+
share_providers = true_false_strings_to_booleans_or_numbers(
|
101
|
+
current_params['share_providers']
|
102
|
+
)
|
103
|
+
current_params.merge('configuration' => config,
|
104
|
+
'share_providers' => share_providers)
|
105
|
+
else
|
106
|
+
{}
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
def true_false_strings_to_booleans_or_numbers(hash)
|
111
|
+
hash&.map { |k, v| [k, to_boolean_or_number(v)] }&.to_h
|
112
|
+
end
|
113
|
+
|
114
|
+
def to_boolean_or_number(value)
|
115
|
+
case value
|
116
|
+
when 'false'
|
117
|
+
false
|
118
|
+
when 'true'
|
119
|
+
true
|
120
|
+
when '0'
|
121
|
+
0
|
122
|
+
when '1'
|
123
|
+
1
|
124
|
+
else
|
125
|
+
value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def update_widgets
|
130
|
+
resource.widgets&.batch_update!(widgets_params)
|
131
|
+
end
|
132
|
+
|
133
|
+
def widgets_params
|
134
|
+
(params[:widgets].try(:permit!).to_h || {}).map do |role, type_name|
|
135
|
+
{role: role, type_name: type_name}
|
136
|
+
end
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|