pageflow 13.5.0 → 13.6.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 +4 -4
- data/CHANGELOG.md +6 -10
- data/app/helpers/pageflow/page_types_helper.rb +6 -0
- data/app/views/pageflow/page_types/_page_type.json.jbuilder +1 -3
- data/app/views/pageflow/react/page.html.erb +1 -1
- data/lib/pageflow/built_in_page_type.rb +73 -0
- data/lib/pageflow/built_in_page_types_plugin.rb +3 -74
- data/lib/pageflow/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e9dac37ddc4c26d594df5452f6bcf4a972fbccdc46538e764938984d93f6792
|
4
|
+
data.tar.gz: faf7217c3dd9128b6ab5ddf303a62f3a9df0364063ef0ba2e7156390660385be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8fbafc373c8c663037d5b67b27df6ad5df0586da48e286cd456c218a76f4a63a249a3097948aa27ef31aa36204b626c8a2d32633054d4692c5fd239d3458a94
|
7
|
+
data.tar.gz: c8190274933517b76c164c13fb78423341af6b37989a760a8ba466dfd183df293b11bdda3c2df117a49694637cd5843dd41a2519e2d8c42c5adbaf0bed38625f
|
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,14 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 13.
|
3
|
+
### Version 13.6.0
|
4
4
|
|
5
|
-
2019-03-
|
5
|
+
2019-03-07
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow/compare/13-
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow/compare/13-5-stable...v13.6.0)
|
8
8
|
|
9
|
-
-
|
10
|
-
([#
|
11
|
-
- Allow setting browser feature flags via query string in debug mode
|
12
|
-
([#1130](https://github.com/codevise/pageflow/pull/1130))
|
13
|
-
- Fix cracking noises in audios on Safari
|
14
|
-
([#1127](https://github.com/codevise/pageflow/pull/1127))
|
9
|
+
- Add shared specs to pageflow-support to lint page types
|
10
|
+
([#1134](https://github.com/codevise/pageflow/pull/1134))
|
15
11
|
|
16
12
|
See
|
17
|
-
[13-
|
13
|
+
[13-5-stable branch](https://github.com/codevise/pageflow/blob/13-5-stable/CHANGELOG.md)
|
18
14
|
for previous changes.
|
@@ -8,6 +8,12 @@ module Pageflow
|
|
8
8
|
as: :page_type)
|
9
9
|
end
|
10
10
|
|
11
|
+
def page_type_json_seed(json, page_type)
|
12
|
+
if page_type.json_seed_template
|
13
|
+
json.partial!(template: page_type.json_seed_template, locals: {page_type: page_type})
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
11
17
|
def page_type_templates(entry)
|
12
18
|
safe_join(Pageflow.config.page_types.map do |page_type|
|
13
19
|
content_tag(:script,
|
@@ -17,6 +17,4 @@ json.thumbnail_candidates(page_type.thumbnail_candidates) do |candidate|
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
21
|
-
json.partial!(:template => page_type.json_seed_template, :locals => {:page_type => page_type})
|
22
|
-
end
|
20
|
+
page_type_json_seed(json, page_type)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<% if page.template.present? %>
|
2
2
|
<% concat React::ServerRendering.render(
|
3
3
|
'pageflow.react.ServerSidePage',
|
4
|
-
%Q'{ "resolverSeed": #{@_pageflow_react_entry_seed ||= entry_json_seed(
|
4
|
+
%Q'{ "resolverSeed": #{@_pageflow_react_entry_seed ||= entry_json_seed(entry)}, "pageId": #{page.perma_id}, "pageType": "#{page.template}" }',
|
5
5
|
true) %>
|
6
6
|
<% end %>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
module Pageflow
|
2
|
+
# @api private
|
3
|
+
module BuiltInPageType
|
4
|
+
def self.plain
|
5
|
+
Pageflow::React.create_page_type('background_image',
|
6
|
+
thumbnail_candidates: default_thumbnail_candidates,
|
7
|
+
file_types: [
|
8
|
+
BuiltInFileType.image,
|
9
|
+
BuiltInFileType.video
|
10
|
+
])
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.video
|
14
|
+
Pageflow::React.create_page_type('video',
|
15
|
+
thumbnail_candidates: video_thumbnail_candidates,
|
16
|
+
file_types: [
|
17
|
+
BuiltInFileType.image,
|
18
|
+
BuiltInFileType.video
|
19
|
+
])
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.audio
|
23
|
+
Pageflow::React.create_page_type('audio',
|
24
|
+
thumbnail_candidates: default_thumbnail_candidates,
|
25
|
+
file_types: [
|
26
|
+
BuiltInFileType.audio,
|
27
|
+
BuiltInFileType.image,
|
28
|
+
BuiltInFileType.video
|
29
|
+
])
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.video_thumbnail_candidates
|
33
|
+
[
|
34
|
+
{file_collection: 'image_files', attribute: 'thumbnail_image_id'},
|
35
|
+
{file_collection: 'image_files', attribute: 'poster_image_id'},
|
36
|
+
{file_collection: 'video_files', attribute: 'video_file_id'}
|
37
|
+
]
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.default_thumbnail_candidates
|
41
|
+
[
|
42
|
+
{
|
43
|
+
file_collection: 'image_files',
|
44
|
+
attribute: 'thumbnail_image_id'
|
45
|
+
},
|
46
|
+
{
|
47
|
+
file_collection: 'image_files',
|
48
|
+
attribute: 'background_image_id',
|
49
|
+
unless: {
|
50
|
+
attribute: 'background_type',
|
51
|
+
value: 'video'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
{
|
55
|
+
file_collection: 'image_files',
|
56
|
+
attribute: 'poster_image_id',
|
57
|
+
if: {
|
58
|
+
attribute: 'background_type',
|
59
|
+
value: 'video'
|
60
|
+
}
|
61
|
+
},
|
62
|
+
{
|
63
|
+
file_collection: 'video_files',
|
64
|
+
attribute: 'video_file_id',
|
65
|
+
if: {
|
66
|
+
attribute: 'background_type',
|
67
|
+
value: 'video'
|
68
|
+
}
|
69
|
+
}
|
70
|
+
]
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -1,80 +1,9 @@
|
|
1
1
|
module Pageflow
|
2
2
|
class BuiltInPageTypesPlugin < Plugin
|
3
3
|
def configure(config)
|
4
|
-
config.page_types.register(
|
5
|
-
config.page_types.register(
|
6
|
-
config.page_types.register(
|
7
|
-
end
|
8
|
-
|
9
|
-
private
|
10
|
-
|
11
|
-
def plain_page_type
|
12
|
-
Pageflow::React.create_page_type('background_image',
|
13
|
-
thumbnail_candidates: default_thumbnail_candidates,
|
14
|
-
file_types: [
|
15
|
-
BuiltInFileType.image,
|
16
|
-
BuiltInFileType.video
|
17
|
-
])
|
18
|
-
end
|
19
|
-
|
20
|
-
def video_page_type
|
21
|
-
Pageflow::React.create_page_type('video',
|
22
|
-
thumbnail_candidates: video_thumbnail_candidates,
|
23
|
-
file_types: [
|
24
|
-
BuiltInFileType.image,
|
25
|
-
BuiltInFileType.video
|
26
|
-
])
|
27
|
-
end
|
28
|
-
|
29
|
-
def audio_page_type
|
30
|
-
Pageflow::React.create_page_type('audio',
|
31
|
-
thumbnail_candidates: default_thumbnail_candidates,
|
32
|
-
file_types: [
|
33
|
-
BuiltInFileType.audio,
|
34
|
-
BuiltInFileType.image,
|
35
|
-
BuiltInFileType.video
|
36
|
-
])
|
37
|
-
end
|
38
|
-
|
39
|
-
def video_thumbnail_candidates
|
40
|
-
[
|
41
|
-
{file_collection: 'image_files', attribute: 'thumbnail_image_id'},
|
42
|
-
{file_collection: 'image_files', attribute: 'poster_image_id'},
|
43
|
-
{file_collection: 'video_files', attribute: 'video_file_id'}
|
44
|
-
]
|
45
|
-
end
|
46
|
-
|
47
|
-
def default_thumbnail_candidates
|
48
|
-
[
|
49
|
-
{
|
50
|
-
file_collection: 'image_files',
|
51
|
-
attribute: 'thumbnail_image_id'
|
52
|
-
},
|
53
|
-
{
|
54
|
-
file_collection: 'image_files',
|
55
|
-
attribute: 'background_image_id',
|
56
|
-
unless: {
|
57
|
-
attribute: 'background_type',
|
58
|
-
value: 'video'
|
59
|
-
}
|
60
|
-
},
|
61
|
-
{
|
62
|
-
file_collection: 'image_files',
|
63
|
-
attribute: 'poster_image_id',
|
64
|
-
if: {
|
65
|
-
attribute: 'background_type',
|
66
|
-
value: 'video'
|
67
|
-
}
|
68
|
-
},
|
69
|
-
{
|
70
|
-
file_collection: 'video_files',
|
71
|
-
attribute: 'video_file_id',
|
72
|
-
if: {
|
73
|
-
attribute: 'background_type',
|
74
|
-
value: 'video'
|
75
|
-
}
|
76
|
-
}
|
77
|
-
]
|
4
|
+
config.page_types.register(BuiltInPageType.plain)
|
5
|
+
config.page_types.register(BuiltInPageType.video)
|
6
|
+
config.page_types.register(BuiltInPageType.audio)
|
78
7
|
end
|
79
8
|
end
|
80
9
|
end
|
data/lib/pageflow/version.rb
CHANGED
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: 13.
|
4
|
+
version: 13.6.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: 2019-03-
|
11
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1964,6 +1964,7 @@ files:
|
|
1964
1964
|
- lib/pageflow/admin/tab.rb
|
1965
1965
|
- lib/pageflow/admin/tabs.rb
|
1966
1966
|
- lib/pageflow/built_in_file_type.rb
|
1967
|
+
- lib/pageflow/built_in_page_type.rb
|
1967
1968
|
- lib/pageflow/built_in_page_types_plugin.rb
|
1968
1969
|
- lib/pageflow/built_in_widget_type.rb
|
1969
1970
|
- lib/pageflow/built_in_widget_types_plugin.rb
|