pageflow 12.0.4 → 12.1.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 +158 -374
- data/README.md +24 -3
- data/Rakefile +2 -2
- data/admins/pageflow/accounts.rb +30 -4
- data/admins/pageflow/entry.rb +59 -9
- data/admins/pageflow/membership.rb +57 -6
- data/admins/pageflow/user.rb +25 -4
- data/app/assets/images/pageflow/themes/default/preview.png +0 -0
- data/app/assets/images/pageflow/themes/default/preview_thumbnail.png +0 -0
- data/app/assets/javascripts/pageflow/admin/entries.js +5 -3
- data/app/assets/javascripts/pageflow/admin/users.js +33 -0
- data/app/assets/javascripts/pageflow/admin.js +4 -1
- data/app/assets/javascripts/pageflow/audio_context.js +28 -0
- data/app/assets/javascripts/pageflow/audio_player/get_media_element_method.js +5 -0
- data/app/assets/javascripts/pageflow/audio_player.js +2 -0
- data/app/assets/javascripts/pageflow/base.js +4 -22
- data/app/assets/javascripts/pageflow/dist/react.js +323 -242
- data/app/assets/javascripts/pageflow/editor/api/widget_type.js +23 -0
- data/app/assets/javascripts/pageflow/editor/api/widget_types.js +53 -0
- data/app/assets/javascripts/pageflow/editor/api.js +9 -1
- data/app/assets/javascripts/pageflow/editor/base.js +0 -1
- data/app/assets/javascripts/pageflow/editor/collections/pages_collection.js +1 -0
- data/app/assets/javascripts/pageflow/editor/collections/subset_collection.js +21 -1
- data/app/assets/javascripts/pageflow/editor/collections/themes_collection.js +13 -0
- data/app/assets/javascripts/pageflow/editor/collections/widgets_collection.js +23 -8
- data/app/assets/javascripts/pageflow/editor/controllers/sidebar_controller.js +7 -1
- data/app/assets/javascripts/pageflow/editor/initializers/setup_collections.js +10 -3
- data/app/assets/javascripts/pageflow/editor/initializers/setup_widget_types.js +5 -1
- data/app/assets/javascripts/pageflow/editor/initializers/stylesheet_reloading.js +8 -3
- data/app/assets/javascripts/pageflow/editor/models/edit_lock_container.js +1 -1
- data/app/assets/javascripts/pageflow/editor/models/entry.js +7 -4
- data/app/assets/javascripts/pageflow/editor/models/entry_configuration.js +1 -1
- data/app/assets/javascripts/pageflow/editor/models/file_stage.js +1 -0
- data/app/assets/javascripts/pageflow/editor/models/page.js +3 -1
- data/app/assets/javascripts/pageflow/editor/models/preview_entry_data.js +2 -2
- data/app/assets/javascripts/pageflow/editor/models/theme.js +25 -0
- data/app/assets/javascripts/pageflow/editor/models/theming.js +1 -19
- data/app/assets/javascripts/pageflow/editor/models/widget.js +22 -1
- data/app/assets/javascripts/pageflow/editor/models/widget_configuration.js +5 -0
- data/app/assets/javascripts/pageflow/editor/routers/sidebar_router.js +1 -0
- data/app/assets/javascripts/pageflow/editor/templates/change_theme_dialog.jst.ejs +23 -0
- data/app/assets/javascripts/pageflow/editor/templates/edit_widget.jst.ejs +1 -2
- data/app/assets/javascripts/pageflow/editor/templates/inputs/reference.jst.ejs +2 -2
- data/app/assets/javascripts/pageflow/editor/templates/static_thumbnail.jst.ejs +1 -0
- data/app/assets/javascripts/pageflow/editor/templates/theme_item.jst.ejs +5 -0
- data/app/assets/javascripts/pageflow/editor/templates/widget_item.jst.ejs +3 -0
- data/app/assets/javascripts/pageflow/editor/utils/stylesheet.js +23 -0
- data/app/assets/javascripts/pageflow/editor/views/change_theme_dialog_view.js +76 -0
- data/app/assets/javascripts/pageflow/editor/views/configuration_editors/groups/options.js +4 -2
- data/app/assets/javascripts/pageflow/editor/views/edit_meta_data_view.js +17 -4
- data/app/assets/javascripts/pageflow/editor/views/edit_widget_view.js +11 -21
- data/app/assets/javascripts/pageflow/editor/views/edit_widgets_view.js +1 -3
- data/app/assets/javascripts/pageflow/editor/views/file_meta_data_item_value_view.js +10 -1
- data/app/assets/javascripts/pageflow/editor/views/inputs/reference_input_view.js +36 -4
- data/app/assets/javascripts/pageflow/editor/views/inputs/theme_input_view.js +26 -0
- data/app/assets/javascripts/pageflow/editor/views/model_thumbnail_view.js +28 -14
- data/app/assets/javascripts/pageflow/editor/views/static_thumbnail_view.js +20 -0
- data/app/assets/javascripts/pageflow/editor/views/theme_item_view.js +41 -0
- data/app/assets/javascripts/pageflow/editor/views/widget_item_view.js +49 -0
- data/app/assets/javascripts/pageflow/history.js +7 -1
- data/app/assets/javascripts/pageflow/media_player/volume_fading/interval.js +65 -0
- data/app/assets/javascripts/pageflow/media_player/volume_fading/noop.js +5 -0
- data/app/assets/javascripts/pageflow/media_player/volume_fading/web_audio.js +109 -0
- data/app/assets/javascripts/pageflow/media_player/volume_fading.js +14 -65
- data/app/assets/javascripts/pageflow/slideshow/dom_order_scroll_navigator.js +5 -2
- data/app/assets/javascripts/pageflow/slideshow.js +19 -8
- data/app/assets/javascripts/pageflow/ui/views/configuration_editor_view.js +4 -0
- data/app/assets/javascripts/pageflow/ui/views/inputs/text_area_input_view.js +10 -5
- data/app/assets/javascripts/pageflow/ui/views/inputs/text_input_view.js +4 -48
- data/app/assets/javascripts/pageflow/ui/views/mixins/input_with_placeholder_text.js +58 -0
- data/app/assets/javascripts/pageflow/vendor.js +16 -0
- data/app/assets/javascripts/pageflow/video_player/get_media_element_method.js +6 -0
- data/app/assets/javascripts/pageflow/video_player.js +2 -0
- data/app/assets/stylesheets/pageflow/admin/entries.scss +1 -1
- data/app/assets/stylesheets/pageflow/admin/quotas.scss +1 -1
- data/app/assets/stylesheets/pageflow/admin.scss +2 -0
- data/app/assets/stylesheets/pageflow/base.scss +0 -1
- data/app/assets/stylesheets/pageflow/editor/base.scss +2 -0
- data/app/assets/stylesheets/pageflow/editor/change_theme.scss +114 -0
- data/app/assets/stylesheets/pageflow/editor/static_thumbnails.scss +4 -0
- data/app/assets/stylesheets/pageflow/editor/widgets.scss +26 -2
- data/app/assets/stylesheets/pageflow/page.scss +1 -14
- data/app/assets/stylesheets/pageflow/themes/default/indicators.scss +12 -0
- data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +11 -0
- data/app/assets/stylesheets/pageflow/themes/default/logo/alignment.scss +27 -0
- data/app/assets/stylesheets/pageflow/themes/default/logo/variant/background_image.scss +20 -2
- data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +4 -1
- data/app/assets/stylesheets/pageflow/themes/default/page/line_lengths.scss +113 -0
- data/app/assets/stylesheets/pageflow/themes/default/page.scss +1 -0
- data/app/controllers/pageflow/editor/widgets_controller.rb +15 -1
- data/app/controllers/pageflow/entries_controller.rb +1 -1
- data/app/helpers/pageflow/admin/entries_helper.rb +0 -9
- data/app/helpers/pageflow/admin/memberships_helper.rb +43 -123
- data/app/helpers/pageflow/admin/users_helper.rb +15 -0
- data/app/helpers/pageflow/entries_helper.rb +3 -1
- data/app/helpers/pageflow/entry_json_seed_helper.rb +9 -3
- data/app/helpers/pageflow/public_i18n_helper.rb +2 -2
- data/app/helpers/pageflow/quota_helper.rb +2 -2
- data/app/helpers/pageflow/social_share_helper.rb +3 -2
- data/app/helpers/pageflow/themes_helper.rb +11 -3
- data/app/helpers/pageflow/widgets_helper.rb +10 -2
- data/app/jobs/pageflow/prune_auto_snapshots_job.rb +9 -0
- data/app/mailers/pageflow/user_mailer.rb +11 -1
- data/app/models/concerns/pageflow/feature_target.rb +1 -1
- data/app/models/concerns/pageflow/hosted_file.rb +9 -0
- data/app/models/concerns/pageflow/output_source.rb +2 -1
- data/app/models/concerns/pageflow/serialization_blacklist.rb +19 -0
- data/app/models/concerns/pageflow/serialized_configuration.rb +17 -0
- data/app/models/concerns/pageflow/theme_referencer.rb +23 -0
- data/app/models/pageflow/account.rb +6 -1
- data/app/models/pageflow/account_member_query.rb +6 -12
- data/app/models/pageflow/account_role_query.rb +68 -0
- data/app/models/pageflow/application_query.rb +13 -0
- data/app/models/pageflow/application_record.rb +5 -0
- data/app/models/pageflow/audio_file.rb +1 -1
- data/app/models/pageflow/auto_snapshot_pruning.rb +26 -0
- data/app/models/pageflow/chapter.rb +4 -8
- data/app/models/pageflow/draft_entry.rb +2 -1
- data/app/models/pageflow/edit_lock.rb +11 -5
- data/app/models/pageflow/encoding_confirmation.rb +2 -1
- data/app/models/pageflow/entry.rb +13 -2
- data/app/models/pageflow/entry_publication.rb +2 -0
- data/app/models/pageflow/entry_role_query.rb +24 -9
- data/app/models/pageflow/entry_title_or_account_name_query.rb +33 -0
- data/app/models/pageflow/file_usage.rb +3 -7
- data/app/models/pageflow/folder.rb +1 -1
- data/app/models/pageflow/home_button.rb +1 -1
- data/app/models/pageflow/image_file.rb +22 -4
- data/app/models/pageflow/invitation_form.rb +10 -4
- data/app/models/pageflow/managed_user_query.rb +44 -0
- data/app/models/pageflow/membership.rb +1 -1
- data/app/models/pageflow/overview_button.rb +3 -4
- data/app/models/pageflow/page.rb +3 -7
- data/app/models/pageflow/potential_memberships.rb +112 -0
- data/app/models/pageflow/published_entry.rb +2 -1
- data/app/models/pageflow/revision.rb +13 -4
- data/app/models/pageflow/storyline.rb +3 -4
- data/app/models/pageflow/text_track_file.rb +1 -1
- data/app/models/pageflow/theming.rb +15 -10
- data/app/models/pageflow/url_template.rb +8 -2
- data/app/models/pageflow/user_name_query.rb +30 -0
- data/app/models/pageflow/video_file.rb +5 -1
- data/app/models/pageflow/widget.rb +3 -1
- data/app/models/pageflow/zencoder_attachment.rb +16 -5
- data/app/policies/pageflow/account_policy.rb +31 -61
- data/app/policies/pageflow/application_policy.rb +6 -0
- data/app/policies/pageflow/entry_policy.rb +11 -3
- data/app/policies/pageflow/membership_policy.rb +1 -2
- data/app/policies/pageflow/user_policy.rb +20 -1
- data/app/views/admin/accounts/_form.html.erb +4 -4
- data/app/views/admin/accounts/_theming_defaults_inline_help.html.erb +5 -0
- data/app/views/admin/memberships/_form.html.erb +9 -14
- data/app/views/admin/memberships/_role_hint.html.arb +1 -1
- data/app/views/admin/users/invitation.html.erb +18 -9
- data/app/views/admin/users/me.html.erb +2 -2
- data/app/views/admin/users/quota_state.html.erb +1 -0
- data/app/views/components/pageflow/admin/add_membership_button.rb +81 -0
- data/app/views/components/pageflow/admin/members_tab.rb +6 -4
- data/app/views/components/pageflow/admin/revisions_tab.rb +16 -4
- data/app/views/components/pageflow/admin/user_accounts_tab.rb +8 -2
- data/app/views/components/pageflow/admin/user_entries_tab.rb +6 -2
- data/app/views/components/pageflow/admin/users_tab.rb +9 -5
- data/app/views/layouts/pageflow/application.html.erb +2 -1
- data/app/views/pageflow/admin/users/_quota_exhausted.html.erb +1 -0
- data/app/views/pageflow/admin/users/_quota_state.html.erb +7 -0
- data/app/views/pageflow/config/_editor_seeds.json.jbuilder +2 -0
- data/app/views/pageflow/editor/entries/_entry.json.jbuilder +1 -0
- data/app/views/pageflow/editor/entries/seed.json.erb +3 -1
- data/app/views/pageflow/editor/image_files/_image_file.json.jbuilder +1 -1
- data/app/views/pageflow/editor/themings/_theming.json.jbuilder +0 -7
- data/app/views/pageflow/editor/widgets/_widget.json.jbuilder +1 -1
- data/app/views/pageflow/entries/_entry.html.erb +5 -5
- data/app/views/pageflow/entries/edit.html.erb +1 -1
- data/app/views/pageflow/entries/show.html.erb +1 -1
- data/app/views/pageflow/entry_json_seed/_entry.json.jbuilder +1 -0
- data/app/views/pageflow/themes/_theme.json.jbuilder +13 -0
- data/config/initializers/admin_resource_tabs.rb +19 -6
- data/config/initializers/features.rb +1 -0
- data/config/locales/de.yml +26 -3
- data/config/locales/en.yml +26 -3
- data/db/migrate/20170201074328_add_configuration_to_widgets.rb +5 -0
- data/db/migrate/20170222124848_update_video_file_output_presences.rb +1 -1
- data/db/migrate/20170315130000_add_theme_name_to_revisions.rb +12 -0
- data/db/migrate/20170912165050_reset_copied_snapshot_type.rb +24 -0
- data/lib/generators/pageflow/routes/routes_generator.rb +11 -1
- data/lib/generators/pageflow/seeds/seeds_generator.rb +5 -0
- data/lib/generators/pageflow/seeds/templates/seeds.rb +5 -3
- data/lib/generators/pageflow/theme/templates/preview.png +0 -0
- data/lib/generators/pageflow/theme/templates/preview_thumbnail.png +0 -0
- data/lib/generators/pageflow/theme/theme_generator.rb +3 -0
- data/lib/pageflow/ability_mixin.rb +27 -6
- data/lib/pageflow/active_admin_can_can_fix.rb +34 -0
- data/lib/pageflow/configuration/permissions.rb +27 -0
- data/lib/pageflow/configuration.rb +28 -0
- data/lib/pageflow/engine.rb +25 -19
- data/lib/pageflow/images/palette.png +0 -0
- data/lib/pageflow/seeds.rb +1 -1
- data/lib/pageflow/theme.rb +8 -0
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow/widget_type.rb +13 -0
- data/lib/pageflow/zencoder_video_output_definition.rb +16 -16
- data/lib/tasks/pageflow_tasks.rake +14 -0
- data/spec/factories/entries.rb +4 -0
- data/spec/factories/revisions.rb +10 -0
- data/spec/factories/users.rb +6 -0
- data/spec/factories/video_files.rb +4 -0
- data/vendor/assets/javascripts/audio5.min.js +3 -0
- metadata +78 -15
- data/app/assets/javascripts/pageflow/editor/models/mixins/widget_subject.js +0 -37
- data/app/assets/javascripts/pageflow/editor/utils/reload_stylesheet.js +0 -9
- data/app/assets/stylesheets/pageflow/text_variants.scss +0 -24
- data/app/views/admin/accounts/_widgets_inline_help.html.erb +0 -5
- data/app/views/admin/memberships/_entity_account_input.html.erb +0 -5
- data/app/views/admin/memberships/_entity_entry_input.html.erb +0 -5
- data/app/views/admin/users/_quota_exhausted.html.erb +0 -1
- data/app/views/components/pageflow/admin/add_membership_button_if_needed.rb +0 -62
@@ -1,24 +0,0 @@
|
|
1
|
-
.text_position_right {
|
2
|
-
&.page .contentText > * {
|
3
|
-
margin-left: auto;
|
4
|
-
}
|
5
|
-
|
6
|
-
&.page {
|
7
|
-
h1, h2 span.subtitle, h2 span.tagline, h3, p {
|
8
|
-
margin-left: auto;
|
9
|
-
}
|
10
|
-
h2 .title {
|
11
|
-
margin-left: auto;
|
12
|
-
max-width: 500px;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
.page_header {
|
17
|
-
margin-left: auto;
|
18
|
-
width: 100%;
|
19
|
-
|
20
|
-
@include mobile {
|
21
|
-
width: 100%;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
<p>Replace by creating <code>app/views/admin/users/_quota_exhausted.html.erb</code></p>
|
@@ -1,62 +0,0 @@
|
|
1
|
-
module Pageflow
|
2
|
-
module Admin
|
3
|
-
class AddMembershipButtonIfNeeded < ViewComponent
|
4
|
-
builder_method :add_membership_button_if_needed
|
5
|
-
|
6
|
-
def build(user, parent, entity_type)
|
7
|
-
if parent.is_a?(User)
|
8
|
-
button_label = I18n.t("pageflow.admin.#{entity_type}.add")
|
9
|
-
path = new_admin_user_membership_path(parent, entity_type: entity_type.to_sym)
|
10
|
-
data_tooltip = I18n.t("pageflow.admin.#{entity_type}.none_addable_tooltip")
|
11
|
-
rel = "add_#{entity_type}_membership"
|
12
|
-
elsif parent.is_a?(Entry)
|
13
|
-
path = new_admin_entry_membership_path(parent, entity_type: entity_type.to_sym)
|
14
|
-
else
|
15
|
-
path = new_admin_account_membership_path(parent, entity_type: entity_type.to_sym)
|
16
|
-
end
|
17
|
-
|
18
|
-
unless parent.is_a?(User)
|
19
|
-
button_label = I18n.t('pageflow.admin.users.add')
|
20
|
-
data_tooltip = I18n.t('pageflow.admin.user.none_addable_tooltip')
|
21
|
-
rel = 'add_member'
|
22
|
-
end
|
23
|
-
|
24
|
-
if membership_possible_for(user, parent, entity_type)
|
25
|
-
para do
|
26
|
-
link_to(button_label, path, class: 'button', data: {rel: rel})
|
27
|
-
end
|
28
|
-
else
|
29
|
-
para(content_tag('a',
|
30
|
-
button_label,
|
31
|
-
class: 'button disabled',
|
32
|
-
data: {rel: rel}),
|
33
|
-
'data-tooltip' => data_tooltip)
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
private
|
38
|
-
|
39
|
-
def membership_possible_for(user, parent, entity_type)
|
40
|
-
entity_type == 'entry' && entry_membership_possible_for_creator_and(user, parent) ||
|
41
|
-
entity_type == 'account' && account_membership_possible_for_creator_and(user, parent)
|
42
|
-
end
|
43
|
-
|
44
|
-
def entry_membership_possible_for_creator_and(user, parent)
|
45
|
-
Pageflow::EntryPolicy::Scope.new(user, Pageflow::Entry).member_addable &&
|
46
|
-
((parent.is_a?(User) &&
|
47
|
-
!membership_entries_collection(parent, Pageflow::Membership.new(user: parent))
|
48
|
-
.blank?) ||
|
49
|
-
(parent.is_a?(Entry) &&
|
50
|
-
!membership_users_collection(parent, Membership.new(entity: parent)).blank?))
|
51
|
-
end
|
52
|
-
|
53
|
-
def account_membership_possible_for_creator_and(user, parent)
|
54
|
-
Pageflow::AccountPolicy::Scope.new(user, Pageflow::Account).member_addable &&
|
55
|
-
((parent.is_a?(User) &&
|
56
|
-
!membership_accounts_collection(user, Pageflow::Membership.new(user: user)).blank?) ||
|
57
|
-
(parent.is_a?(Account) &&
|
58
|
-
!membership_users_collection(parent, Membership.new(entity: parent)).blank?))
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|