pageflow 12.6.0 → 13.0.0.beta1
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 +78 -16
- data/README.md +8 -1
- data/Rakefile +0 -4
- data/admins/pageflow/accounts.rb +6 -9
- data/admins/pageflow/entry.rb +1 -1
- data/admins/pageflow/folder.rb +1 -1
- data/admins/pageflow/user.rb +4 -4
- data/app/assets/javascripts/pageflow/asset_urls.js.erb +1 -1
- data/app/assets/javascripts/pageflow/audio/multi_player.js +0 -4
- data/app/assets/javascripts/pageflow/audio_player.js +1 -1
- data/app/assets/javascripts/pageflow/base.js +0 -2
- data/app/assets/javascripts/pageflow/browser/agent.js +78 -92
- data/app/assets/javascripts/pageflow/browser/autoplay_support.js +2 -2
- data/app/assets/javascripts/pageflow/browser/video.js +1 -6
- data/app/assets/javascripts/pageflow/dist/react.js +1100 -2209
- data/app/assets/javascripts/pageflow/editor/models/configuration.js +5 -5
- data/app/assets/javascripts/pageflow/editor/templates/background_positioning_sliders.jst.ejs +0 -8
- data/app/assets/javascripts/pageflow/editor/views/background_positioning_sliders_view.js +23 -37
- data/app/assets/javascripts/pageflow/editor/views/background_positioning_view.js +2 -2
- data/app/assets/javascripts/pageflow/editor/views/configuration_editors/video.js +1 -1
- data/app/assets/javascripts/pageflow/editor/views/edit_widget_view.js +0 -9
- data/app/assets/javascripts/pageflow/jquery_utils.js +0 -10
- data/app/assets/javascripts/pageflow/media_player.js +3 -7
- data/app/assets/javascripts/pageflow/media_player/catch_play_promise.js +23 -0
- data/app/assets/javascripts/pageflow/media_player/volume_binding.js +1 -2
- data/app/assets/javascripts/pageflow/media_player/volume_fading/web_audio.js +24 -73
- data/app/assets/javascripts/pageflow/ready.js +1 -2
- data/app/assets/javascripts/pageflow/seed_entry_data.js +3 -3
- data/app/assets/javascripts/pageflow/slideshow.js +9 -17
- data/app/assets/javascripts/pageflow/slideshow/adjacent_pages.js +4 -9
- data/app/assets/javascripts/pageflow/slideshow/{successor_preparer.js → adjacent_preparer.js} +11 -14
- data/app/assets/javascripts/pageflow/slideshow/atmo.js +12 -23
- data/app/assets/javascripts/pageflow/slideshow/lazy_page_widget.js +2 -2
- data/app/assets/javascripts/pageflow/slideshow/progressive_preload.js +42 -0
- data/app/assets/javascripts/pageflow/ui/views/configuration_editor_view.js +2 -2
- data/app/assets/javascripts/pageflow/video_player/filter_sources.js +2 -16
- data/app/assets/javascripts/pageflow/video_player/lazy.js +1 -1
- data/app/assets/javascripts/pageflow/visited.js +0 -2
- data/app/assets/javascripts/pageflow/widgets.js +0 -1
- data/app/assets/javascripts/pageflow/widgets/multimedia_alert.js +1 -2
- data/app/assets/javascripts/pageflow/widgets/navigation.js +0 -1
- data/app/assets/javascripts/pageflow/widgets/navigation_mobile.js +0 -1
- data/app/assets/javascripts/pageflow/widgets/overview.js +1 -3
- data/app/assets/stylesheets/pageflow/admin.scss +2 -0
- data/app/assets/stylesheets/pageflow/admin/status_tags.scss +13 -0
- data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +10 -34
- data/app/assets/stylesheets/pageflow/navigation_bar.scss +4 -0
- data/app/assets/stylesheets/pageflow/page_types/video.scss +4 -1
- data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +0 -5
- data/app/assets/stylesheets/pageflow/themes/default/base.scss +0 -2
- data/app/assets/stylesheets/pageflow/themes/default/overview/icons/icon_font.scss +1 -4
- data/app/assets/stylesheets/pageflow/themes/default/page.scss +0 -19
- data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +0 -4
- data/app/assets/stylesheets/pageflow/themes/default/slideshow.scss +0 -1
- data/app/controllers/concerns/pageflow/edit_locking.rb +2 -2
- data/app/controllers/concerns/pageflow/public_https_mode.rb +1 -5
- data/app/controllers/concerns/pageflow/quota_verification.rb +1 -1
- data/app/controllers/pageflow/application_controller.rb +2 -2
- data/app/controllers/pageflow/chapters_controller.rb +2 -2
- data/app/controllers/pageflow/edit_locks_controller.rb +1 -1
- data/app/controllers/pageflow/editor/encoding_confirmations_controller.rb +1 -1
- data/app/controllers/pageflow/editor/entries_controller.rb +1 -1
- data/app/controllers/pageflow/editor/entry_publications_controller.rb +1 -1
- data/app/controllers/pageflow/editor/files_controller.rb +1 -1
- data/app/controllers/pageflow/entries_controller.rb +5 -11
- data/app/controllers/pageflow/files_controller.rb +1 -1
- data/app/controllers/pageflow/pages_controller.rb +2 -2
- data/app/controllers/pageflow/revisions_controller.rb +1 -1
- data/app/controllers/pageflow/storylines_controller.rb +2 -3
- data/app/helpers/pageflow/common_entry_seed_helper.rb +0 -1
- data/app/helpers/pageflow/entries_helper.rb +6 -31
- data/app/helpers/pageflow/entry_json_seed_helper.rb +1 -1
- data/app/helpers/pageflow/public_i18n_helper.rb +1 -6
- data/app/jobs/pageflow/application_job.rb +6 -0
- data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +2 -4
- data/app/jobs/pageflow/poll_zencoder_job.rb +8 -8
- data/app/jobs/pageflow/process_file_job.rb +4 -4
- data/app/jobs/pageflow/prune_auto_snapshots_job.rb +3 -3
- data/app/jobs/pageflow/request_meta_data_from_zencoder_job.rb +4 -4
- data/app/jobs/pageflow/submit_file_to_zencoder_job.rb +4 -4
- data/app/jobs/pageflow/upload_file_to_s3_job.rb +5 -5
- data/app/mailers/pageflow/user_mailer.rb +1 -15
- data/app/models/concerns/pageflow/uploaded_file.rb +3 -3
- data/app/models/pageflow/audio_file.rb +1 -1
- data/app/models/pageflow/chapter.rb +1 -1
- data/app/models/pageflow/entry.rb +1 -1
- data/app/models/pageflow/invited_user.rb +1 -1
- data/app/models/pageflow/membership.rb +4 -2
- data/app/models/pageflow/page.rb +1 -1
- data/app/models/pageflow/published_entry.rb +3 -4
- data/app/models/pageflow/revision.rb +5 -3
- data/app/models/pageflow/storyline.rb +5 -1
- data/app/models/pageflow/theming.rb +1 -2
- data/app/models/pageflow/used_file.rb +12 -0
- data/app/models/pageflow/video_file.rb +1 -1
- data/app/views/admin/accounts/_form.html.erb +0 -8
- data/app/views/admin/accounts/_theming_details.html.arb +0 -3
- data/app/views/pageflow/entries/_mobile_navigation.html.erb +3 -2
- data/app/views/pageflow/entries/navigation/_page.html.erb +1 -3
- data/app/views/pageflow/entries/overview/_page.html.erb +1 -1
- data/app/views/pageflow/entry_json_seed/_entry.json.jbuilder +1 -1
- data/app/views/pageflow/user_mailer/invitation.html.erb +2 -2
- data/app/views/pageflow/user_mailer/invitation.text.erb +1 -1
- data/config/locales/de.yml +6 -16
- data/config/locales/en.yml +8 -18
- data/config/routes.rb +0 -6
- data/db/migrate/20140418225525_setup_schema.rb +295 -203
- data/db/migrate/20140418240000_add_attributes_to_users.rb +3 -6
- data/lib/generators/pageflow/resque/resque_generator.rb +6 -3
- data/lib/pageflow.rb +1 -1
- data/lib/pageflow/ability_mixin.rb +0 -1
- data/lib/pageflow/active_admin_patches/views/attributes_table.rb +1 -1
- data/lib/pageflow/active_admin_patches/views/table_for.rb +1 -1
- data/lib/pageflow/built_in_widget_type.rb +0 -8
- data/lib/pageflow/built_in_widget_types_plugin.rb +0 -2
- data/lib/pageflow/configuration.rb +0 -10
- data/lib/pageflow/engine.rb +5 -9
- data/lib/pageflow/user_mixin.rb +5 -0
- data/lib/pageflow/version.rb +1 -1
- data/lib/tasks/pageflow_tasks.rake +1 -11
- data/spec/factories/accounts.rb +1 -1
- data/spec/factories/audio_files.rb +1 -1
- data/spec/factories/chapters.rb +1 -3
- data/spec/factories/edit_locks.rb +2 -4
- data/spec/factories/entries.rb +1 -1
- data/spec/factories/feature_targets.rb +1 -1
- data/spec/factories/file_usages.rb +1 -1
- data/spec/factories/folders.rb +1 -1
- data/spec/factories/hosted_files.rb +6 -6
- data/spec/factories/image_files.rb +1 -1
- data/spec/factories/invited_user.rb +1 -1
- data/spec/factories/memberships.rb +1 -1
- data/spec/factories/pages.rb +1 -1
- data/spec/factories/revisions.rb +1 -1
- data/spec/factories/storylines.rb +1 -1
- data/spec/factories/text_track_files.rb +1 -1
- data/spec/factories/themings.rb +1 -1
- data/spec/factories/users.rb +1 -1
- data/spec/factories/video_files.rb +1 -1
- data/spec/factories/widgets.rb +1 -1
- data/vendor/assets/javascripts/audio5.min.js +129 -280
- metadata +103 -219
- data/app/assets/audios/pageflow/unmute.mp3 +0 -0
- data/app/assets/javascripts/pageflow/background_media.js +0 -22
- data/app/assets/javascripts/pageflow/cookie_notice.js +0 -7
- data/app/assets/javascripts/pageflow/editor/views/info_box_view.js +0 -8
- data/app/assets/javascripts/pageflow/editor/views/widget_types/cookie_notice_bar.js +0 -15
- data/app/assets/javascripts/pageflow/media_player/handle_failed_play.js +0 -34
- data/app/assets/javascripts/pageflow/slideshow/adjacent_preloader.js +0 -26
- data/app/assets/stylesheets/pageflow/page_types/video/mobile_poster.scss +0 -15
- data/app/assets/stylesheets/pageflow/themes/default/background_media_unmute_button.scss +0 -77
- data/app/assets/stylesheets/pageflow/themes/default/cookie_notice_bar.scss +0 -57
- data/app/assets/stylesheets/pageflow/themes/default/page/hyphenate.scss +0 -24
- data/app/controllers/pageflow/admin/initial_passwords_controller.rb +0 -8
- data/app/views/pageflow/admin/initial_passwords/edit.html.erb +0 -16
- data/app/views/pageflow/entries/mobile_navigation/_page.html.erb +0 -5
- data/db/migrate/20140624135420_create_themings.rb +0 -15
- data/db/migrate/20140624135421_create_themings_for_existing_accounts.rb +0 -26
- data/db/migrate/20140624135422_change_theme_references_to_theming_references.rb +0 -45
- data/db/migrate/20140624135423_remove_attributes_from_themes.rb +0 -10
- data/db/migrate/20140624135424_create_accounts_themes_join_table.rb +0 -8
- data/db/migrate/20140624135425_move_cname_from_account_to_theming.rb +0 -21
- data/db/migrate/20140625184800_drop_themes.rb +0 -14
- data/db/migrate/20140704110631_add_confirmed_by_to_encoded_files.rb +0 -6
- data/db/migrate/20140819081454_add_home_url_attributes_to_themings_and_revisions.rb +0 -9
- data/db/migrate/20141027102310_create_widgets.rb +0 -11
- data/db/migrate/20141028125408_add_emphasize_chapter_beginning_to_revisions.rb +0 -5
- data/db/migrate/20141119164526_add_emphasize_new_pages_to_revisions.rb +0 -5
- data/db/migrate/20141119174032_add_sharing_image_to_revisions.rb +0 -7
- data/db/migrate/20141128150305_add_locale_to_users.rb +0 -5
- data/db/migrate/20141208161030_add_locale_to_revisions.rb +0 -5
- data/db/migrate/20141211110226_add_configuration_to_chapters.rb +0 -5
- data/db/migrate/20150115175116_add_features_configuration_to_accounts.rb +0 -5
- data/db/migrate/20150115175207_add_features_configuration_to_entries.rb +0 -5
- data/db/migrate/20150603091823_add_password_attributes_to_revisions.rb +0 -6
- data/db/migrate/20150825133449_update_audio_loop_pages_to_use_atmo.rb +0 -24
- data/db/migrate/20150826125417_create_pageflow_storylines.rb +0 -12
- data/db/migrate/20150826125744_add_storyline_id_to_chapters.rb +0 -6
- data/db/migrate/20150826125745_insert_main_storylines.rb +0 -28
- data/db/migrate/20150830105831_remove_revision_id_from_chapters.rb +0 -5
- data/db/migrate/20150830110006_remove_entry_id_from_chapters.rb +0 -5
- data/db/migrate/20151022080518_add_first_published_at_to_entries.rb +0 -14
- data/db/migrate/20160131222203_add_cache_counters.rb +0 -23
- data/db/migrate/20160201130118_add_additional_cnames_to_themings.rb +0 -5
- data/db/migrate/20160216130336_add_meta_fields_to_revision.rb +0 -7
- data/db/migrate/20160225075853_add_overview_button_enabled_to_revisions.rb +0 -5
- data/db/migrate/20160304072911_rename_membership_entry_and_make_polymorphic.rb +0 -19
- data/db/migrate/20160304151327_add_role_to_membership.rb +0 -19
- data/db/migrate/20160310080213_add_edited_at_to_entries.rb +0 -9
- data/db/migrate/20160425192648_add_index_for_revision_publication_timestamps.rb +0 -5
- data/db/migrate/20160504093145_replace_role_and_account_on_user.rb +0 -42
- data/db/migrate/20160531152500_update_users_count.rb +0 -27
- data/db/migrate/20160617123557_add_meta_fields_to_theming.rb +0 -7
- data/db/migrate/20160707125400_add_output_presences_to_video_files.rb +0 -5
- data/db/migrate/20160715105408_add_share_url_to_revisions.rb +0 -5
- data/db/migrate/20160824115000_add_parent_file_to_video_files.rb +0 -8
- data/db/migrate/20160824115100_add_parent_file_to_audio_files.rb +0 -8
- data/db/migrate/20160824115200_add_parent_file_to_image_files.rb +0 -8
- data/db/migrate/20160929102700_add_configuration_to_files.rb +0 -7
- data/db/migrate/20161007144500_add_text_track_files.rb +0 -31
- data/db/migrate/20161216175734_move_configuration_from_file_to_file_usage.rb +0 -27
- data/db/migrate/20161230144429_add_processed_attachment_to_text_track_files.rb +0 -8
- data/db/migrate/20170201074328_add_configuration_to_widgets.rb +0 -5
- data/db/migrate/20170222124848_update_video_file_output_presences.rb +0 -12
- data/db/migrate/20170315130000_add_theme_name_to_revisions.rb +0 -12
- data/db/migrate/20170421112300_turn_background_video_pages_into_background_image_pages.rb +0 -22
- data/db/migrate/20170912165050_reset_copied_snapshot_type.rb +0 -24
- data/db/migrate/20170913105048_fix_hls_output_presences_for_legacy_video_files.rb +0 -12
- data/db/migrate/20180528144334_add_privacy_link_url_to_themings.rb +0 -5
- data/db/migrate/20190109085744_add_default_locale_to_themings.rb +0 -6
- data/lib/generators/pageflow/resque/templates/devise_async.rb +0 -6
- data/lib/generators/pageflow/resque/templates/resque_logger.rb +0 -16
- data/lib/generators/pageflow/resque/templates/resque_mailer.rb +0 -4
- data/lib/pageflow/primary_domain_entry_redirect.rb +0 -25
@@ -1,5 +1,4 @@
|
|
1
1
|
@import "./video/content_hiding";
|
2
|
-
@import "./video/mobile_poster";
|
3
2
|
|
4
3
|
.has_native_video_player .page .videoPage .videoWrapper {
|
5
4
|
margin-right: 0;
|
@@ -115,3 +114,7 @@
|
|
115
114
|
.js .non_js_video {
|
116
115
|
display: none;
|
117
116
|
}
|
117
|
+
|
118
|
+
.has_no_native_video_player .videoPage .background_image {
|
119
|
+
display: none;
|
120
|
+
}
|
@@ -1,7 +1,3 @@
|
|
1
|
-
/// Color of the caret icon displayed in front of links. Same as text
|
2
|
-
/// color by default.
|
3
|
-
$anchor-icon-color: null !default;
|
4
|
-
|
5
1
|
%anchor {
|
6
2
|
@include fa-caret-right-icon;
|
7
3
|
|
@@ -29,6 +25,5 @@ $anchor-icon-color: null !default;
|
|
29
25
|
top: 7px;
|
30
26
|
width: 10px;
|
31
27
|
height: 12px;
|
32
|
-
color: $anchor-icon-color;
|
33
28
|
}
|
34
29
|
}
|
@@ -16,14 +16,12 @@
|
|
16
16
|
|
17
17
|
@import "./built_in_page_types";
|
18
18
|
@import "./anchors";
|
19
|
-
@import "./cookie_notice_bar";
|
20
19
|
@import "./loading_spinner";
|
21
20
|
@import "./logo";
|
22
21
|
@import "./page";
|
23
22
|
@import "./indicators";
|
24
23
|
@import "./navigation";
|
25
24
|
@import "./mobile_navigation";
|
26
|
-
@import "./background_media_unmute_button";
|
27
25
|
@import "./multimedia_alert";
|
28
26
|
@import "./overview";
|
29
27
|
@import "./player_controls";
|
@@ -11,9 +11,6 @@ $page-header-typography: () !default;
|
|
11
11
|
/// Typography for header tagline.
|
12
12
|
$page-header-tagline-typography: () !default;
|
13
13
|
|
14
|
-
/// Typography for header tagline in phone layout.
|
15
|
-
$page-header-tagline-phone-typography: () !default;
|
16
|
-
|
17
14
|
/// Typography for header title.
|
18
15
|
$page-header-title-typography: () !default;
|
19
16
|
|
@@ -29,9 +26,6 @@ $page-header-first-page-title-phone-typography: () !default;
|
|
29
26
|
/// Typography for header subtitle.
|
30
27
|
$page-header-subtitle-typography: () !default;
|
31
28
|
|
32
|
-
/// Typography for header subtitle in phone layout.
|
33
|
-
$page-header-subtitle-phone-typography: () !default;
|
34
|
-
|
35
29
|
/// Typography for content text.
|
36
30
|
$page-content-text-typography: () !default;
|
37
31
|
|
@@ -90,7 +84,6 @@ $page-content-text-font-size: 1.2em !default;
|
|
90
84
|
$page-content-text-line-height: 1.5em !default;
|
91
85
|
|
92
86
|
@import "./page/anchors";
|
93
|
-
@import "./page/hyphenate";
|
94
87
|
@import "./page/paddings";
|
95
88
|
@import "./page/scroller";
|
96
89
|
@import "./page/shadow";
|
@@ -148,12 +141,6 @@ $page-content-text-line-height: 1.5em !default;
|
|
148
141
|
letter-spacing: 0
|
149
142
|
)
|
150
143
|
);
|
151
|
-
|
152
|
-
@include phone {
|
153
|
-
@include typography(
|
154
|
-
$page-header-tagline-phone-typography
|
155
|
-
);
|
156
|
-
}
|
157
144
|
}
|
158
145
|
|
159
146
|
.title {
|
@@ -194,12 +181,6 @@ $page-content-text-line-height: 1.5em !default;
|
|
194
181
|
margin-bottom: $page-header-subtitle-margin-bottom
|
195
182
|
)
|
196
183
|
);
|
197
|
-
|
198
|
-
@include phone {
|
199
|
-
@include typography(
|
200
|
-
$page-header-subtitle-phone-typography
|
201
|
-
);
|
202
|
-
}
|
203
184
|
}
|
204
185
|
}
|
205
186
|
|
@@ -8,14 +8,10 @@ $page-anchor-color: #fff !default;
|
|
8
8
|
/// Color of links inside the text on inverted pages
|
9
9
|
$page-anchor-inverted-color: #000 !default;
|
10
10
|
|
11
|
-
/// Typography settings of links in page content text
|
12
|
-
$page-anchor-typography: () !default;
|
13
|
-
|
14
11
|
.contentText a {
|
15
12
|
@extend %anchor;
|
16
13
|
color: $page-anchor-color;
|
17
14
|
pointer-events: all;
|
18
|
-
@include typography($page-anchor-typography)
|
19
15
|
}
|
20
16
|
|
21
17
|
.invert .contentText a {
|
@@ -5,7 +5,7 @@ module Pageflow
|
|
5
5
|
included do
|
6
6
|
rescue_from EditLock::NotHeldError, EditLock::HeldByOtherSessionError do |exception|
|
7
7
|
respond_to do |format|
|
8
|
-
format.html {
|
8
|
+
format.html { redirect_back fallback_location: admin_root_path, :alert => t('pageflow.edit_locks.required') }
|
9
9
|
format.json do
|
10
10
|
render(:status => :conflict, :json => {
|
11
11
|
:error_message => exception.message,
|
@@ -17,7 +17,7 @@ module Pageflow
|
|
17
17
|
|
18
18
|
rescue_from EditLock::HeldByOtherUserError do |exception|
|
19
19
|
respond_to do |format|
|
20
|
-
format.html {
|
20
|
+
format.html { redirect_back fallback_location: admin_root_path, :alert => t('pageflow.edit_locks.required_but_held_by_other_user') }
|
21
21
|
format.json do
|
22
22
|
render(:status => :conflict, :json => {
|
23
23
|
:error_message => exception.message,
|
@@ -2,16 +2,12 @@ module Pageflow
|
|
2
2
|
module PublicHttpsMode
|
3
3
|
protected
|
4
4
|
|
5
|
-
def
|
5
|
+
def check_public_https_mode
|
6
6
|
if request.ssl? && Pageflow.config.public_https_mode == :prevent
|
7
7
|
redirect_to("http://#{request.host}#{request.fullpath}", status: :moved_permanently)
|
8
|
-
true
|
9
8
|
elsif !request.ssl? && Pageflow.config.public_https_mode == :enforce
|
10
9
|
redirect_to("https://#{request.host}#{request.fullpath}", status: :moved_permanently)
|
11
|
-
true
|
12
10
|
end
|
13
11
|
end
|
14
|
-
|
15
|
-
alias_method :check_public_https_mode, :redirect_according_to_public_https_mode
|
16
12
|
end
|
17
13
|
end
|
@@ -6,7 +6,7 @@ module Pageflow
|
|
6
6
|
rescue_from Quota::ExhaustedError do |exception|
|
7
7
|
respond_to do |format|
|
8
8
|
format.html do
|
9
|
-
|
9
|
+
redirect_back fallback_location: admin_root_path, alert: t('pageflow.quotas.exhausted')
|
10
10
|
end
|
11
11
|
format.json do
|
12
12
|
render(:status => :forbidden,
|
@@ -5,7 +5,7 @@ module Pageflow
|
|
5
5
|
class ApplicationController < ActionController::Base
|
6
6
|
layout 'pageflow/application'
|
7
7
|
|
8
|
-
|
8
|
+
before_action do
|
9
9
|
I18n.locale = current_user.try(:locale) || locale_from_accept_language_header || I18n.default_locale
|
10
10
|
end
|
11
11
|
|
@@ -17,7 +17,7 @@ module Pageflow
|
|
17
17
|
|
18
18
|
rescue_from ActionController::UnknownFormat do |exception|
|
19
19
|
debug_log_with_backtrace(exception)
|
20
|
-
render(status: 404,
|
20
|
+
render(status: 404, plain: 'Not found')
|
21
21
|
end
|
22
22
|
|
23
23
|
rescue_from ActiveRecord::RecordNotFound do |exception|
|
@@ -2,7 +2,7 @@ module Pageflow
|
|
2
2
|
class ChaptersController < Pageflow::ApplicationController
|
3
3
|
respond_to :json
|
4
4
|
|
5
|
-
|
5
|
+
before_action :authenticate_user!
|
6
6
|
|
7
7
|
def create
|
8
8
|
storyline = Storyline.find(params[:storyline_id])
|
@@ -64,7 +64,7 @@ module Pageflow
|
|
64
64
|
private
|
65
65
|
|
66
66
|
def chapter_params
|
67
|
-
configuration = params.require(:chapter)[:configuration].try(:permit!)
|
67
|
+
configuration = params.require(:chapter)[:configuration].try(:permit!) || {}
|
68
68
|
|
69
69
|
params.require(:chapter)
|
70
70
|
.permit(:position, :title)
|
@@ -3,7 +3,11 @@ module Pageflow
|
|
3
3
|
include PublicHttpsMode
|
4
4
|
include EntryPasswordProtection
|
5
5
|
|
6
|
-
|
6
|
+
before_action :authenticate_user!, except: [:index, :show, :page]
|
7
|
+
|
8
|
+
before_action :check_public_https_mode,
|
9
|
+
only: [:index, :show],
|
10
|
+
unless: lambda { |controller| controller.request.format.json? }
|
7
11
|
|
8
12
|
after_action :allow_iframe_for_embed, only: :show
|
9
13
|
|
@@ -26,12 +30,6 @@ module Pageflow
|
|
26
30
|
@entry = PublishedEntry.find(params[:id], entry_request_scope)
|
27
31
|
I18n.locale = @entry.locale
|
28
32
|
|
29
|
-
if redirect_location = entry_redirect(@entry)
|
30
|
-
return redirect_to(redirect_location, status: :moved_permanently)
|
31
|
-
end
|
32
|
-
|
33
|
-
return if redirect_according_to_public_https_mode
|
34
|
-
|
35
33
|
if !request.format.css?
|
36
34
|
check_entry_password_protection(@entry)
|
37
35
|
end
|
@@ -99,10 +97,6 @@ module Pageflow
|
|
99
97
|
Pageflow.config.public_entry_request_scope.call(Entry, request)
|
100
98
|
end
|
101
99
|
|
102
|
-
def entry_redirect(entry)
|
103
|
-
Pageflow.config.public_entry_redirect.call(entry, request)
|
104
|
-
end
|
105
|
-
|
106
100
|
def allow_iframe_for_embed
|
107
101
|
if params[:embed]
|
108
102
|
response.headers.except! 'X-Frame-Options'
|
@@ -2,7 +2,7 @@ module Pageflow
|
|
2
2
|
class PagesController < Pageflow::ApplicationController
|
3
3
|
respond_to :json
|
4
4
|
|
5
|
-
|
5
|
+
before_action :authenticate_user!
|
6
6
|
|
7
7
|
def create
|
8
8
|
chapter = Chapter.find(params[:chapter_id])
|
@@ -53,7 +53,7 @@ module Pageflow
|
|
53
53
|
private
|
54
54
|
|
55
55
|
def page_params
|
56
|
-
configuration = params.require(:page)[:configuration].try(:permit!)
|
56
|
+
configuration = params.require(:page)[:configuration].try(:permit!) || {}
|
57
57
|
params.require(:page).permit(:template, :position, :title).merge(:configuration => configuration)
|
58
58
|
end
|
59
59
|
end
|
@@ -2,7 +2,7 @@ module Pageflow
|
|
2
2
|
class RevisionsController < Pageflow::ApplicationController
|
3
3
|
include QuotaVerification
|
4
4
|
|
5
|
-
|
5
|
+
before_action :authenticate_user!, :unless => lambda { |controller| controller.request.format.css? }
|
6
6
|
|
7
7
|
respond_to :json
|
8
8
|
|
@@ -2,7 +2,7 @@ module Pageflow
|
|
2
2
|
class StorylinesController < Pageflow::ApplicationController
|
3
3
|
respond_to :json
|
4
4
|
|
5
|
-
|
5
|
+
before_action :authenticate_user!
|
6
6
|
|
7
7
|
def create
|
8
8
|
entry = DraftEntry.find(params[:entry_id])
|
@@ -62,8 +62,7 @@ module Pageflow
|
|
62
62
|
private
|
63
63
|
|
64
64
|
def storyline_params
|
65
|
-
configuration
|
66
|
-
params.require(:storyline).permit.merge(configuration: configuration)
|
65
|
+
{configuration: params.dig(:storyline, :configuration).try(:permit!)}
|
67
66
|
end
|
68
67
|
end
|
69
68
|
end
|
@@ -10,7 +10,6 @@ module Pageflow
|
|
10
10
|
{
|
11
11
|
locale: entry.locale,
|
12
12
|
slug: entry.slug,
|
13
|
-
theming: entry.theming.as_json(only: [:privacy_link_url]),
|
14
13
|
page_types: PageTypesSeed.new(config).as_json,
|
15
14
|
file_url_templates: FileUrlTemplatesSeed.new(config).as_json,
|
16
15
|
file_model_types: config.file_types
|
@@ -27,29 +27,11 @@ module Pageflow
|
|
27
27
|
|
28
28
|
def entry_global_links(entry)
|
29
29
|
links = []
|
30
|
-
|
31
30
|
if entry.theming.imprint_link_label.present? && entry.theming.imprint_link_url.present?
|
32
|
-
links << link_to(raw(entry.theming.imprint_link_label),
|
33
|
-
entry.theming.imprint_link_url,
|
34
|
-
target: '_blank',
|
35
|
-
tabindex: 2,
|
36
|
-
class: 'legal')
|
31
|
+
links << link_to(raw(entry.theming.imprint_link_label), entry.theming.imprint_link_url, :target => '_blank', :tabindex => 2, :class => 'legal')
|
37
32
|
end
|
38
|
-
|
39
33
|
if entry.theming.copyright_link_label.present? && entry.theming.copyright_link_url.present?
|
40
|
-
links << link_to(raw(entry.theming.copyright_link_label),
|
41
|
-
entry.theming.copyright_link_url,
|
42
|
-
target: '_blank',
|
43
|
-
tabindex: 2,
|
44
|
-
class: 'copy')
|
45
|
-
end
|
46
|
-
|
47
|
-
if entry.theming.privacy_link_url.present?
|
48
|
-
links << link_to(I18n.t('pageflow.public.privacy_notice'),
|
49
|
-
"#{entry.theming.privacy_link_url}?lang=#{entry.locale}",
|
50
|
-
target: '_blank',
|
51
|
-
tabindex: 2,
|
52
|
-
class: 'privacy')
|
34
|
+
links << link_to(raw(entry.theming.copyright_link_label), entry.theming.copyright_link_url, :target => '_blank', :tabindex => 2, :class => 'copy')
|
53
35
|
end
|
54
36
|
|
55
37
|
if links.any?
|
@@ -71,22 +53,15 @@ module Pageflow
|
|
71
53
|
p: Pageflow::VERSION,
|
72
54
|
format: 'css')
|
73
55
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
# `Configuration#public_entry_redirect` which might depend on
|
78
|
-
# the hostname.
|
79
|
-
tag(:link,
|
80
|
-
rel: 'stylesheet',
|
81
|
-
href: url,
|
82
|
-
media: 'all',
|
83
|
-
data: {name: 'entry'})
|
56
|
+
stylesheet_link_tag(url,
|
57
|
+
media: 'all',
|
58
|
+
data: {name: 'entry'})
|
84
59
|
end
|
85
60
|
|
86
61
|
def entry_mobile_navigation_pages(entry)
|
87
62
|
entry.pages.displayed_in_navigation.tap do |pages|
|
88
63
|
if entry.pages.any? && !entry.pages.first.display_in_navigation
|
89
|
-
|
64
|
+
[entry.pages.first, pages].flatten
|
90
65
|
end
|
91
66
|
end
|
92
67
|
end
|
@@ -7,16 +7,11 @@ module Pageflow
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def public_i18n_translations(entry)
|
10
|
-
merge_ignoring_nil = lambda do |_, fallback, value|
|
11
|
-
value.presence || fallback
|
12
|
-
end
|
13
|
-
|
14
10
|
{
|
15
11
|
pageflow: {
|
16
12
|
public: I18n.t('pageflow.public', locale: I18n.default_locale)
|
17
13
|
.dup
|
18
|
-
.deep_merge(I18n.t('pageflow.public', locale: entry.locale)
|
19
|
-
&merge_ignoring_nil)
|
14
|
+
.deep_merge(I18n.t('pageflow.public', locale: entry.locale))
|
20
15
|
}
|
21
16
|
}
|
22
17
|
end
|