pageflow 15.2.0 → 15.5.0
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 +5 -5
- data/CHANGELOG.md +89 -83
- 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/accounts.js +1 -1
- 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 +4 -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 +32 -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/contentElements-editor.js +541 -0
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements-frontend.js +1169 -0
- 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 +96 -37
- data/app/assets/javascripts/pageflow/dist/editor.js +0 -11890
- 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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 96902980a5bb3f8dbdb7fea7c6d2ac7864cec92f72b841a32f9544d56f25ddf7
|
4
|
+
data.tar.gz: fb05810978adc0db7eac1901beec575d0d552c2187f95e4e4df92ab8d58801be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 157deea11713fb77f374469ffcb2ed25ebe0e7401f140eea761266602099a89311b58be6b4e353980dc6bae3bd896136e2a27b7748c9e6434142816230973400
|
7
|
+
data.tar.gz: 571fd3407f0e45cd0ba1bb902349da1e84ee1ffdd7cb5367ac59cc22de439ae1866b79214e96c08ecc92956b367ec1a5dd84f2a1f6fa4ff4236d6b9307643e89
|
data/CHANGELOG.md
CHANGED
@@ -1,110 +1,116 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 15.
|
3
|
+
### Version 15.5.0
|
4
4
|
|
5
|
-
|
5
|
+
2021-05-07
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/15-
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/15-4-stable...v15.5.0)
|
8
8
|
|
9
9
|
#### Core
|
10
10
|
|
11
|
-
#####
|
11
|
+
##### Manual Update Step
|
12
12
|
|
13
|
-
-
|
14
|
-
([#1331](https://github.com/codevise/pageflow/pull/1331))
|
15
|
-
- Bug fix: Fix help link in editor page type drop down
|
16
|
-
([#1372](https://github.com/codevise/pageflow/pull/1372))
|
13
|
+
- Upgrade Webpack config
|
17
14
|
|
18
|
-
|
15
|
+
Disable Babel compilation of `node_modules` directory to prevent
|
16
|
+
error of the form "_typeof is not defined" in Video.js HTTP
|
17
|
+
streaming service worker that is registered when DASH sources are
|
18
|
+
used. Add the following lines to the host application's
|
19
|
+
`config/webpack/environment.js` file:
|
19
20
|
|
20
|
-
|
21
|
-
(
|
22
|
-
- Move troubleshooting to docs
|
23
|
-
([#1327](https://github.com/codevise/pageflow/pull/1327))
|
21
|
+
```
|
22
|
+
environment.config.merge(require('pageflow-scrolled/config/webpack'))
|
24
23
|
|
25
|
-
|
24
|
+
// Opt into future default behavior of Webpacker [1] to work around
|
25
|
+
// problems with Video.js DASH service worker.
|
26
|
+
//
|
27
|
+
// [1] https://github.com/rails/webpacker/pull/2624
|
28
|
+
environment.loaders.delete('nodeModules')
|
26
29
|
|
27
|
-
|
28
|
-
([#1315](https://github.com/codevise/pageflow/pull/1315))
|
29
|
-
- Use Ruby 2.6.5 in Travis
|
30
|
-
([#1334](https://github.com/codevise/pageflow/pull/1334))
|
31
|
-
- Remove pageflow-react from yarn workspace list
|
32
|
-
([#1329](https://github.com/codevise/pageflow/pull/1329))
|
30
|
+
```
|
33
31
|
|
34
|
-
|
32
|
+
No longer precompiling `node_modules` means that some ES6 syntax
|
33
|
+
included in some of the packages will end up in the
|
34
|
+
bundle. `therubyracer` gem then causes "Use of const in strict mode"
|
35
|
+
error during SSR. Upgrading the host application to use `mini_racer`
|
36
|
+
instead fixes the problem.
|
37
|
+
([#1655](https://github.com/codevise/pageflow/pull/1655))
|
35
38
|
|
36
|
-
#####
|
39
|
+
##### Rails Engine
|
40
|
+
|
41
|
+
- Allow registering entry type specific file importers
|
42
|
+
([#1684](https://github.com/codevise/pageflow/pull/1684))
|
43
|
+
- Nested revision components
|
44
|
+
([#1654](https://github.com/codevise/pageflow/pull/1654))
|
45
|
+
- Nested revision components
|
46
|
+
([#1654](https://github.com/codevise/pageflow/pull/1654))
|
47
|
+
- Upgrade to Devise 4.7
|
48
|
+
([#1657](https://github.com/codevise/pageflow/pull/1657))
|
49
|
+
|
50
|
+
##### Admin
|
37
51
|
|
38
|
-
-
|
39
|
-
([#
|
40
|
-
|
41
|
-
|
42
|
-
|
52
|
+
- Validate user locale
|
53
|
+
([#1658](https://github.com/codevise/pageflow/pull/1658))
|
54
|
+
|
55
|
+
#### Paged Entry Type
|
56
|
+
|
57
|
+
- Add theme option for content text phone typography
|
58
|
+
([#1670](https://github.com/codevise/pageflow/pull/1670))
|
59
|
+
- Bug fix: Wait until listener is ready before requesting cookie notice
|
60
|
+
([#1650](https://github.com/codevise/pageflow/pull/1650))
|
43
61
|
|
44
62
|
#### Scrolled Entry Type
|
45
63
|
|
46
|
-
#####
|
64
|
+
##### Rails Engine
|
47
65
|
|
48
|
-
-
|
49
|
-
([#
|
50
|
-
-
|
51
|
-
([#
|
52
|
-
[#1355](https://github.com/codevise/pageflow/pull/1355))
|
53
|
-
- External link content element
|
54
|
-
([#1346](https://github.com/codevise/pageflow/pull/1346))
|
55
|
-
- Add videoEmbed content element
|
56
|
-
([#1336](https://github.com/codevise/pageflow/pull/1336))
|
66
|
+
- Color/font options for scrolled themes
|
67
|
+
([#1673](https://github.com/codevise/pageflow/pull/1673))
|
68
|
+
- Improve scrolled install generator
|
69
|
+
([#1682](https://github.com/codevise/pageflow/pull/1682))
|
57
70
|
|
58
|
-
#####
|
71
|
+
##### Published Entry
|
59
72
|
|
60
|
-
-
|
61
|
-
([#
|
73
|
+
- Add 360 image content element based on @egjs/view360
|
74
|
+
([#1675](https://github.com/codevise/pageflow/pull/1675),
|
75
|
+
[#1676](https://github.com/codevise/pageflow/pull/1676))
|
76
|
+
- Add position wide for heading content elements
|
77
|
+
([#1678](https://github.com/codevise/pageflow/pull/1678))
|
78
|
+
- Remove chapter number from chapter box
|
79
|
+
([#1679](https://github.com/codevise/pageflow/pull/1679))
|
80
|
+
- Fix embed video opt in text color in inverted section
|
81
|
+
([#1671](https://github.com/codevise/pageflow/pull/1671))
|
82
|
+
- Handle player unallocated by empty pool
|
83
|
+
([#1668](https://github.com/codevise/pageflow/pull/1668))
|
84
|
+
- Horizontal scroller for desktop navigation bar
|
85
|
+
([#1669](https://github.com/codevise/pageflow/pull/1669))
|
86
|
+
- Improve file rights
|
87
|
+
([#1665](https://github.com/codevise/pageflow/pull/1665))
|
88
|
+
- Allow non latin characters in video embed caption
|
89
|
+
([#1664](https://github.com/codevise/pageflow/pull/1664))
|
90
|
+
- Hyphenate long text block headers
|
91
|
+
([#1662](https://github.com/codevise/pageflow/pull/1662))
|
92
|
+
- Upgrade Scrolled to Video.js 7
|
93
|
+
([#1655](https://github.com/codevise/pageflow/pull/1655))
|
94
|
+
- Improve before/after wiggle animation
|
95
|
+
([#1659](https://github.com/codevise/pageflow/pull/1659))
|
96
|
+
- Display notices for unsupported browser or non-js
|
97
|
+
([#1653](https://github.com/codevise/pageflow/pull/1653))
|
98
|
+
- Basic styles for print layout of scrolled entries
|
99
|
+
([#1652](https://github.com/codevise/pageflow/pull/1652))
|
100
|
+
- Bug fix: Hide frame around inline video on iOS 12
|
101
|
+
([#1680](https://github.com/codevise/pageflow/pull/1680))
|
62
102
|
|
63
103
|
##### Editor
|
64
104
|
|
65
|
-
-
|
66
|
-
([#
|
67
|
-
-
|
68
|
-
([#
|
69
|
-
-
|
70
|
-
([#
|
71
|
-
-
|
72
|
-
([#
|
73
|
-
|
74
|
-
##### JavaScript API
|
75
|
-
|
76
|
-
- Export useFile hook from scrolled frontend
|
77
|
-
([#1371](https://github.com/codevise/pageflow/pull/1371))
|
78
|
-
- Fix useFileRights hook
|
79
|
-
([#1357](https://github.com/codevise/pageflow/pull/1357))
|
80
|
-
- I18n for scrolled frontend
|
81
|
-
([#1342](https://github.com/codevise/pageflow/pull/1342))
|
82
|
-
- Content element frontend api
|
83
|
-
([#1324](https://github.com/codevise/pageflow/pull/1324))
|
84
|
-
- Enable registering content elements with default config
|
85
|
-
([#1354](https://github.com/codevise/pageflow/pull/1354),
|
86
|
-
[#1360](https://github.com/codevise/pageflow/pull/1360))
|
87
|
-
- Introduce configuration editor groups in scrolled editor
|
88
|
-
([#1352](https://github.com/codevise/pageflow/pull/1352),
|
89
|
-
[#1365](https://github.com/codevise/pageflow/pull/1365))
|
90
|
-
- Improve guides
|
91
|
-
([#1362](https://github.com/codevise/pageflow/pull/1362),
|
92
|
-
[#1348](https://github.com/codevise/pageflow/pull/1348),
|
93
|
-
[#1344](https://github.com/codevise/pageflow/pull/1344))
|
94
|
-
|
95
|
-
##### Internal
|
96
|
-
|
97
|
-
- Make package imports external by default in Rollup config
|
98
|
-
([#1341](https://github.com/codevise/pageflow/pull/1341))
|
99
|
-
- Make pageflow-scrolled Capybara specs less flaky
|
100
|
-
([#1339](https://github.com/codevise/pageflow/pull/1339))
|
101
|
-
- Prevent Percy from reporting different video loading progress
|
102
|
-
([#1343](https://github.com/codevise/pageflow/pull/1343))
|
103
|
-
- Enable React devtools in editor iframe
|
104
|
-
([#1338](https://github.com/codevise/pageflow/pull/1338))
|
105
|
-
- Setup Storybook for content element development
|
106
|
-
([#1326](https://github.com/codevise/pageflow/pull/1326))
|
105
|
+
- Prevent concurrent save requests for embed urls
|
106
|
+
([#1672](https://github.com/codevise/pageflow/pull/1672))
|
107
|
+
- Do not trigger multiple save requests for backdrop updates
|
108
|
+
([#1666](https://github.com/codevise/pageflow/pull/1666))
|
109
|
+
- Fix lazy loading in editor for Safari
|
110
|
+
([#1660](https://github.com/codevise/pageflow/pull/1660))
|
111
|
+
- Bug fix: Cascade model removal through ForeignKeySubsetCollection
|
112
|
+
([#1651](https://github.com/codevise/pageflow/pull/1651))
|
107
113
|
|
108
114
|
See
|
109
|
-
[15-
|
115
|
+
[15-4-stable branch](https://github.com/codevise/pageflow/blob/15-4-stable/CHANGELOG.md)
|
110
116
|
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
|