pageflow 15.8.0 → 16.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -130
  3. data/admins/pageflow/accounts.rb +12 -16
  4. data/admins/pageflow/entry.rb +28 -25
  5. data/admins/pageflow/entry_templates.rb +5 -7
  6. data/admins/pageflow/sites.rb +50 -0
  7. data/app/assets/javascripts/pageflow/admin/entries.js +16 -7
  8. data/app/controllers/pageflow/entries_controller.rb +2 -2
  9. data/app/helpers/pageflow/admin/permalinks_helper.rb +2 -2
  10. data/app/helpers/pageflow/common_entry_seed_helper.rb +1 -1
  11. data/app/helpers/pageflow/embed_code_helper.rb +1 -1
  12. data/app/helpers/pageflow/entries_helper.rb +15 -15
  13. data/app/helpers/pageflow/sites_helper.rb +11 -0
  14. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  15. data/app/models/pageflow/account.rb +7 -33
  16. data/app/models/pageflow/{cname_theming_request_scope.rb → cname_site_request_scope.rb} +3 -3
  17. data/app/models/pageflow/customized_theme.rb +1 -1
  18. data/app/models/pageflow/entry.rb +3 -4
  19. data/app/models/pageflow/entry_at_revision.rb +2 -2
  20. data/app/models/pageflow/entry_duplicate.rb +1 -1
  21. data/app/models/pageflow/entry_template.rb +4 -4
  22. data/app/models/pageflow/home_button.rb +7 -7
  23. data/app/models/pageflow/permalink.rb +3 -3
  24. data/app/models/pageflow/permalink_directory.rb +2 -2
  25. data/app/models/pageflow/published_entry.rb +2 -2
  26. data/app/models/pageflow/site.rb +59 -0
  27. data/app/models/pageflow/theme_customization.rb +1 -1
  28. data/app/policies/pageflow/account_policy.rb +2 -2
  29. data/app/policies/pageflow/entry_policy.rb +2 -2
  30. data/app/policies/pageflow/entry_template_policy.rb +1 -1
  31. data/app/policies/pageflow/{theming_policy.rb → site_policy.rb} +13 -11
  32. data/app/views/admin/accounts/_entry_template_details.html.arb +1 -1
  33. data/app/views/admin/accounts/_form.html.erb +4 -22
  34. data/app/views/admin/accounts/_site_defaults_inline_help.html.erb +5 -0
  35. data/app/views/admin/entries/_form.html.erb +4 -13
  36. data/app/views/admin/entries/_permalink_inputs.html.erb +2 -2
  37. data/app/views/admin/entries/_site_input.html.erb +15 -0
  38. data/app/views/admin/entries/{entry_type_name_input.html.erb → entry_site_and_type_name_input.html.erb} +3 -0
  39. data/app/views/admin/entry_templates/_form.html.erb +5 -5
  40. data/app/views/admin/sites/_attributes_table.html.arb +9 -0
  41. data/app/views/admin/sites/_fields.html.erb +17 -0
  42. data/app/views/admin/sites/_form.html.erb +5 -0
  43. data/app/views/components/pageflow/admin/entries_tab.rb +1 -2
  44. data/app/views/components/pageflow/admin/entry_templates_tab.rb +10 -11
  45. data/app/views/components/pageflow/admin/features_tab.rb +1 -1
  46. data/app/views/components/pageflow/admin/sites_tab.rb +32 -0
  47. data/app/views/components/pageflow/admin/users_tab.rb +1 -2
  48. data/app/views/pageflow/editor/entries/seed.json.erb +1 -1
  49. data/app/views/pageflow/editor/sites/_site.json.jbuilder +1 -0
  50. data/app/views/pageflow/entries/{_theming.css.erb → _site.css.erb} +0 -0
  51. data/app/views/pageflow/entries/stylesheet.css.erb +1 -1
  52. data/app/views/pageflow/social_share/_entry_meta_tags.html.erb +1 -1
  53. data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
  54. data/config/initializers/admin_resource_tabs.rb +29 -12
  55. data/config/locales/de.yml +19 -17
  56. data/config/locales/en.yml +19 -17
  57. data/db/migrate/20221215101134_rename_theming_to_site.rb +9 -0
  58. data/db/migrate/20221215120856_associate_entry_templates_with_sites.rb +34 -0
  59. data/db/migrate/20221219203023_add_name_to_sites.rb +5 -0
  60. data/db/migrate/20230103155934_associate_theme_customizations_with_sites.rb +27 -0
  61. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +10 -10
  62. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +5 -5
  63. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
  64. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  65. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +5 -5
  66. data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +1 -1
  67. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-c6672f27.js → EditableInlineText.module-14c7b097.js} +2 -2
  68. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-22e65f92.js → PhonePlatformContext-f6093cc6.js} +47 -219
  69. data/entry_types/scrolled/package/frontend/{Viewer-6b05522f.js → Viewer-b6becc57.js} +2 -2
  70. data/entry_types/scrolled/package/frontend/{arrowRight-7e3d9dd5.js → arrowRight-78a7cee4.js} +1 -1
  71. data/entry_types/scrolled/package/frontend/{components-487daafa.js → components-b3160dd7.js} +2 -2
  72. data/entry_types/scrolled/package/frontend/index.css +1 -1
  73. data/entry_types/scrolled/package/frontend/index.js +195 -12
  74. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  75. data/entry_types/scrolled/package/widgets/defaultNavigation.js +16 -9
  76. data/lib/pageflow/ability_mixin.rb +16 -8
  77. data/lib/pageflow/admin/attributes_table_rows.rb +1 -1
  78. data/lib/pageflow/admin/form_inputs.rb +1 -1
  79. data/lib/pageflow/admin/tabs.rb +1 -1
  80. data/lib/pageflow/configuration/permissions.rb +3 -3
  81. data/lib/pageflow/configuration.rb +17 -17
  82. data/lib/pageflow/entry_export_import/entry_serialization.rb +1 -1
  83. data/lib/pageflow/primary_domain_entry_redirect.rb +7 -7
  84. data/lib/pageflow/seeds.rb +10 -10
  85. data/lib/pageflow/theme_customizations.rb +10 -10
  86. data/lib/pageflow/version.rb +1 -1
  87. data/package/editor.js +7 -7
  88. data/spec/factories/accounts.rb +5 -2
  89. data/spec/factories/draft_entries.rb +2 -2
  90. data/spec/factories/entries.rb +2 -2
  91. data/spec/factories/entry_templates.rb +1 -1
  92. data/spec/factories/permalink_directory.rb +1 -1
  93. data/spec/factories/published_entries.rb +2 -2
  94. data/spec/factories/sites.rb +9 -0
  95. metadata +27 -18
  96. data/app/helpers/pageflow/themings_helper.rb +0 -11
  97. data/app/models/pageflow/theming.rb +0 -30
  98. data/app/views/admin/accounts/_theming_defaults_inline_help.html.erb +0 -5
  99. data/app/views/admin/accounts/_theming_details.html.arb +0 -5
  100. data/app/views/pageflow/editor/themings/_theming.json.jbuilder +0 -1
  101. data/spec/factories/themings.rb +0 -7
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.8.0
4
+ version: 16.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-23 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -949,6 +949,7 @@ files:
949
949
  - admins/pageflow/folder.rb
950
950
  - admins/pageflow/membership.rb
951
951
  - admins/pageflow/revisions.rb
952
+ - admins/pageflow/sites.rb
952
953
  - admins/pageflow/user.rb
953
954
  - app/assets/audios/pageflow/unmute.mp3
954
955
  - app/assets/fonts/pageflow/entypo-license.txt
@@ -1406,13 +1407,13 @@ files:
1406
1407
  - app/helpers/pageflow/quota_helper.rb
1407
1408
  - app/helpers/pageflow/render_json_helper.rb
1408
1409
  - app/helpers/pageflow/revision_file_helper.rb
1410
+ - app/helpers/pageflow/sites_helper.rb
1409
1411
  - app/helpers/pageflow/social_share_helper.rb
1410
1412
  - app/helpers/pageflow/social_share_links_helper.rb
1411
1413
  - app/helpers/pageflow/structured_data_helper.rb
1412
1414
  - app/helpers/pageflow/stub_page_configuration.rb
1413
1415
  - app/helpers/pageflow/text_direction_helper.rb
1414
1416
  - app/helpers/pageflow/themes_helper.rb
1415
- - app/helpers/pageflow/themings_helper.rb
1416
1417
  - app/helpers/pageflow/video_files_helper.rb
1417
1418
  - app/helpers/pageflow/widgets_helper.rb
1418
1419
  - app/inputs/pageflow_permalink_input.rb
@@ -1448,7 +1449,7 @@ files:
1448
1449
  - app/models/pageflow/auto_snapshot_pruning.rb
1449
1450
  - app/models/pageflow/chapter.rb
1450
1451
  - app/models/pageflow/chapter_scaffold.rb
1451
- - app/models/pageflow/cname_theming_request_scope.rb
1452
+ - app/models/pageflow/cname_site_request_scope.rb
1452
1453
  - app/models/pageflow/customized_theme.rb
1453
1454
  - app/models/pageflow/draft_entry.rb
1454
1455
  - app/models/pageflow/edit_lock.rb
@@ -1482,13 +1483,13 @@ files:
1482
1483
  - app/models/pageflow/published_entry.rb
1483
1484
  - app/models/pageflow/revision.rb
1484
1485
  - app/models/pageflow/roles.rb
1486
+ - app/models/pageflow/site.rb
1485
1487
  - app/models/pageflow/storyline.rb
1486
1488
  - app/models/pageflow/storyline_scaffold.rb
1487
1489
  - app/models/pageflow/text_track_file.rb
1488
1490
  - app/models/pageflow/text_track_file_url_templates.rb
1489
1491
  - app/models/pageflow/theme_customization.rb
1490
1492
  - app/models/pageflow/theme_customization_file.rb
1491
- - app/models/pageflow/theming.rb
1492
1493
  - app/models/pageflow/thumbnail_file_resolver.rb
1493
1494
  - app/models/pageflow/url_template.rb
1494
1495
  - app/models/pageflow/used_file.rb
@@ -1508,7 +1509,7 @@ files:
1508
1509
  - app/policies/pageflow/file_policy.rb
1509
1510
  - app/policies/pageflow/folder_policy.rb
1510
1511
  - app/policies/pageflow/membership_policy.rb
1511
- - app/policies/pageflow/theming_policy.rb
1512
+ - app/policies/pageflow/site_policy.rb
1512
1513
  - app/policies/pageflow/user_policy.rb
1513
1514
  - app/state_machines/pageflow/image_and_text_track_processing_state_machine.rb
1514
1515
  - app/state_machines/pageflow/media_encoding_state_machine.rb
@@ -1517,19 +1518,22 @@ files:
1517
1518
  - app/views/admin/accounts/_entry_template_details.html.arb
1518
1519
  - app/views/admin/accounts/_form.html.erb
1519
1520
  - app/views/admin/accounts/_share_providers_label.html.erb
1520
- - app/views/admin/accounts/_theming_defaults_inline_help.html.erb
1521
- - app/views/admin/accounts/_theming_details.html.arb
1521
+ - app/views/admin/accounts/_site_defaults_inline_help.html.erb
1522
1522
  - app/views/admin/entries/_attributes_table.html.arb
1523
1523
  - app/views/admin/entries/_form.html.erb
1524
1524
  - app/views/admin/entries/_links.html.arb
1525
1525
  - app/views/admin/entries/_permalink_inputs.html.erb
1526
- - app/views/admin/entries/entry_type_name_input.html.erb
1526
+ - app/views/admin/entries/_site_input.html.erb
1527
+ - app/views/admin/entries/entry_site_and_type_name_input.html.erb
1527
1528
  - app/views/admin/entries/permalink_inputs.html.erb
1528
1529
  - app/views/admin/entry_templates/_form.html.erb
1529
1530
  - app/views/admin/features/_form.html.erb
1530
1531
  - app/views/admin/memberships/_form.html.erb
1531
1532
  - app/views/admin/memberships/_role_hint.html.arb
1532
1533
  - app/views/admin/revisions/_form.html.erb
1534
+ - app/views/admin/sites/_attributes_table.html.arb
1535
+ - app/views/admin/sites/_fields.html.erb
1536
+ - app/views/admin/sites/_form.html.erb
1533
1537
  - app/views/admin/users/_form.html.erb
1534
1538
  - app/views/admin/users/_not_allowed_to_see_user_quota.html.erb
1535
1539
  - app/views/admin/users/delete_me.html.erb
@@ -1551,6 +1555,7 @@ files:
1551
1555
  - app/views/components/pageflow/admin/members_tab.rb
1552
1556
  - app/views/components/pageflow/admin/membership_role_with_tooltip.rb
1553
1557
  - app/views/components/pageflow/admin/revisions_tab.rb
1558
+ - app/views/components/pageflow/admin/sites_tab.rb
1554
1559
  - app/views/components/pageflow/admin/tabs_view.rb
1555
1560
  - app/views/components/pageflow/admin/timestamp.rb
1556
1561
  - app/views/components/pageflow/admin/user_account_badge_list.rb
@@ -1602,14 +1607,14 @@ files:
1602
1607
  - app/views/pageflow/editor/files/index.json.jbuilder
1603
1608
  - app/views/pageflow/editor/image_files/_image_file.json.jbuilder
1604
1609
  - app/views/pageflow/editor/quotas/_published_entries_exhausted.html.erb
1605
- - app/views/pageflow/editor/themings/_theming.json.jbuilder
1610
+ - app/views/pageflow/editor/sites/_site.json.jbuilder
1606
1611
  - app/views/pageflow/editor/video_files/_video_file.json.jbuilder
1607
1612
  - app/views/pageflow/editor/widgets/_widget.json.jbuilder
1608
1613
  - app/views/pageflow/editor/widgets/index.json.jbuilder
1609
1614
  - app/views/pageflow/entries/_analytics.html.erb
1610
1615
  - app/views/pageflow/entries/_mobile_navigation.html.erb
1611
1616
  - app/views/pageflow/entries/_navigation.html.erb
1612
- - app/views/pageflow/entries/_theming.css.erb
1617
+ - app/views/pageflow/entries/_site.css.erb
1613
1618
  - app/views/pageflow/entries/mobile_navigation/_page.html.erb
1614
1619
  - app/views/pageflow/entries/navigation/_bar_bottom.html.erb
1615
1620
  - app/views/pageflow/entries/navigation/_bar_top.html.erb
@@ -1701,6 +1706,10 @@ files:
1701
1706
  - db/migrate/20221024100724_create_pageflow_permalink_directories.rb
1702
1707
  - db/migrate/20221025074049_add_permalink_attributes_to_entries.rb
1703
1708
  - db/migrate/20221027065022_create_pageflow_permalinks.rb
1709
+ - db/migrate/20221215101134_rename_theming_to_site.rb
1710
+ - db/migrate/20221215120856_associate_entry_templates_with_sites.rb
1711
+ - db/migrate/20221219203023_add_name_to_sites.rb
1712
+ - db/migrate/20230103155934_associate_theme_customizations_with_sites.rb
1704
1713
  - entry_types/paged/app/assets/javascripts/pageflow_paged/components.js
1705
1714
  - entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js
1706
1715
  - entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js
@@ -1834,12 +1843,12 @@ files:
1834
1843
  - entry_types/scrolled/package/contentElements-frontend.js
1835
1844
  - entry_types/scrolled/package/editor.js
1836
1845
  - entry_types/scrolled/package/frontend-server.js
1837
- - entry_types/scrolled/package/frontend/EditableInlineText.module-c6672f27.js
1838
- - entry_types/scrolled/package/frontend/PhonePlatformContext-22e65f92.js
1839
- - entry_types/scrolled/package/frontend/Viewer-6b05522f.js
1846
+ - entry_types/scrolled/package/frontend/EditableInlineText.module-14c7b097.js
1847
+ - entry_types/scrolled/package/frontend/PhonePlatformContext-f6093cc6.js
1848
+ - entry_types/scrolled/package/frontend/Viewer-b6becc57.js
1840
1849
  - entry_types/scrolled/package/frontend/Wavesurfer-7d9cf1b7.js
1841
- - entry_types/scrolled/package/frontend/arrowRight-7e3d9dd5.js
1842
- - entry_types/scrolled/package/frontend/components-487daafa.js
1850
+ - entry_types/scrolled/package/frontend/arrowRight-78a7cee4.js
1851
+ - entry_types/scrolled/package/frontend/components-b3160dd7.js
1843
1852
  - entry_types/scrolled/package/frontend/createSuper-d0f30da3.js
1844
1853
  - entry_types/scrolled/package/frontend/index.css
1845
1854
  - entry_types/scrolled/package/frontend/index.js
@@ -2001,11 +2010,11 @@ files:
2001
2010
  - spec/factories/permalinks.rb
2002
2011
  - spec/factories/published_entries.rb
2003
2012
  - spec/factories/revisions.rb
2013
+ - spec/factories/sites.rb
2004
2014
  - spec/factories/storylines.rb
2005
2015
  - spec/factories/test_multi_attachment_files.rb
2006
2016
  - spec/factories/test_revision_components.rb
2007
2017
  - spec/factories/text_track_files.rb
2008
- - spec/factories/themings.rb
2009
2018
  - spec/factories/uploadable_files.rb
2010
2019
  - spec/factories/users.rb
2011
2020
  - spec/factories/video_files.rb
@@ -2053,7 +2062,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2053
2062
  - !ruby/object:Gem::Version
2054
2063
  version: '0'
2055
2064
  requirements: []
2056
- rubygems_version: 3.0.8
2065
+ rubygems_version: 3.0.3.1
2057
2066
  signing_key:
2058
2067
  specification_version: 4
2059
2068
  summary: Multimedia story telling for the web.
@@ -1,11 +0,0 @@
1
- module Pageflow
2
- module ThemingsHelper
3
- DEFAULT_PUBLIC_ENTRY_OPTIONS = lambda do |theming|
4
- theming.cname.present? ? {host: theming.cname} : nil
5
- end
6
-
7
- def pretty_theming_url(theming)
8
- pageflow.public_root_url(Pageflow.config.theming_url_options(theming))
9
- end
10
- end
11
- end
@@ -1,30 +0,0 @@
1
- module Pageflow
2
- class Theming < ApplicationRecord
3
- belongs_to :account
4
-
5
- has_many :entries
6
- has_many :permalink_directories, -> { order('path ASC') }
7
-
8
- scope :with_home_url, -> { where.not(home_url: '') }
9
- scope :for_request, ->(request) { Pageflow.config.theming_request_scope.call(all, request) }
10
-
11
- validates :account, :presence => true
12
-
13
- def cname_domain
14
- cname.split('.').pop(2).join('.')
15
- end
16
-
17
- def name
18
- I18n.t('pageflow.admin.themings.name',
19
- account_name: account.name,
20
- theme_name: 'default')
21
- end
22
-
23
- # @deprecated Depending on what you need this for, consider
24
- # scoping your code to an entry type or look at a specific entry's
25
- # theme name.
26
- def theme_name
27
- account.first_paged_entry_template.theme_name
28
- end
29
- end
30
- end
@@ -1,5 +0,0 @@
1
- <li class="inline_help_item">
2
- <p>
3
- <%= t('pageflow.admin.accounts.theming_defaults_inline_help') %>
4
- </p>
5
- </li>
@@ -1,5 +0,0 @@
1
- extensible_attributes_table_for(account.default_theming,
2
- Pageflow.config_for(account)
3
- .admin_attributes_table_rows.for(:theming)) do
4
- row :cname, class: 'cname'
5
- end
@@ -1 +0,0 @@
1
- json.pretty_url pretty_theming_url(theming)
@@ -1,7 +0,0 @@
1
- module Pageflow
2
- FactoryBot.define do
3
- factory :theming, :class => Pageflow::Theming do
4
- account
5
- end
6
- end
7
- end