udongo 6.4.1 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/backend/content/rows/videos_controller.rb +1 -1
- data/app/controllers/backend/content/rows_controller.rb +1 -1
- data/app/decorators/content_picture_decorator.rb +4 -0
- data/app/decorators/content_row_decorator.rb +1 -0
- data/app/views/backend/content/_picture.html.erb +1 -1
- data/app/views/backend/content/_video.html.erb +10 -0
- data/app/views/backend/content/rows/edit.html.erb +10 -6
- data/app/views/backend/content/rows/videos/edit.html.erb +7 -0
- data/app/views/frontend/flexible_content/_form.html.erb +3 -0
- data/app/views/frontend/flexible_content/_picture.html.erb +24 -0
- data/app/views/frontend/flexible_content/_rows.html.erb +24 -0
- data/app/views/frontend/flexible_content/_slideshow.html.erb +18 -0
- data/app/views/frontend/flexible_content/_text.html.erb +1 -0
- data/app/views/frontend/flexible_content/_video.html.erb +17 -0
- data/changelog.md +12 -1
- data/config/locales/en_forms.yml +1 -0
- data/config/locales/nl_forms.yml +1 -0
- data/db/migrate/20170623121241_add_no_gutters_to_content_row.rb +5 -0
- data/db/migrate/20170623124218_add_caption_to_content_video.rb +5 -0
- data/lib/udongo/configs/flexible_content.rb +5 -0
- data/lib/udongo/version.rb +1 -1
- data/readme.md +5 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b472cb5a6fd52fc04293198da1bcb0b55d45011d
|
4
|
+
data.tar.gz: 0f77a3f2825ec25f82581e811e118463b221e075
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 253742cc8ec2d84c1ad471d2b5f9fc848ceb0c86b1f194d881094288d989abcb73d2a39f21d862257966fdcc70f8fc25692ab756bc8a823c3282e24b581c6ae4
|
7
|
+
data.tar.gz: c3a932e95ae6ea2ff16ac4d53c8aaa8f6099acb2f3ae828ca0009373bdb8ceea4c4ec27f489cb4c150a12c5e021747c6ba8c96b0ed6711c311c49b5a78df6401
|
@@ -67,7 +67,7 @@ class Backend::Content::RowsController < Backend::BaseController
|
|
67
67
|
def allowed_params
|
68
68
|
params.require(:content_row).permit(
|
69
69
|
:background_color, :margin_top, :margin_bottom, :padding_top,
|
70
|
-
:padding_bottom
|
70
|
+
:padding_bottom, :no_gutters
|
71
71
|
)
|
72
72
|
end
|
73
73
|
end
|
@@ -3,6 +3,16 @@
|
|
3
3
|
<iframe class="embed-responsive-item" src="<%= object.embed_url %>" allowfullscreen></iframe>
|
4
4
|
</div>
|
5
5
|
|
6
|
+
<% if object.caption.present? %>
|
7
|
+
<% if Udongo.config.flexible_content.video_caption_editor? %>
|
8
|
+
<%= object.caption.html_safe %>
|
9
|
+
<% else %>
|
10
|
+
<div class="text-center">
|
11
|
+
<%= object.caption %>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
15
|
+
|
6
16
|
<% else %>
|
7
17
|
<p><%= t 'b.msg.flexible_content.no_video_present' %></p>
|
8
18
|
<% end %>
|
@@ -1,10 +1,4 @@
|
|
1
1
|
<%= simple_form_for [:backend, @row] do |f| %>
|
2
|
-
<div class="row">
|
3
|
-
<div class="col-md-4">
|
4
|
-
<%= f.input :background_color, placeholder: 'eg #336699' %>
|
5
|
-
</div>
|
6
|
-
</div>
|
7
|
-
|
8
2
|
<% pixels = (1..10).map { |i| ["#{i * 16}px", i] } %>
|
9
3
|
|
10
4
|
<div class="row">
|
@@ -27,5 +21,15 @@
|
|
27
21
|
</div>
|
28
22
|
</div>
|
29
23
|
|
24
|
+
<div class="row">
|
25
|
+
<div class="col-md-6">
|
26
|
+
<%= f.input :background_color, placeholder: 'eg #336699' %>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div class="col-md-6">
|
30
|
+
<%= f.input :no_gutters, as: :boolean %>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
30
34
|
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
31
35
|
<% end %>
|
@@ -9,5 +9,12 @@
|
|
9
9
|
</div>
|
10
10
|
</div>
|
11
11
|
|
12
|
+
<div class="row">
|
13
|
+
<div class="col-12">
|
14
|
+
<% content_type = Udongo.config.flexible_content.video_caption_editor? ? :ckeditor : :text %>
|
15
|
+
<%= f.input :caption, as: content_type %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
|
12
19
|
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
13
20
|
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% if object.present? && object.asset.present? %>
|
2
|
+
<% max_img_size = object.max_image_size %>
|
3
|
+
|
4
|
+
<% if object.url.present? %>
|
5
|
+
<%= link_to object.url do %>
|
6
|
+
<%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<% else %>
|
10
|
+
<%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if object.caption.present? %>
|
14
|
+
<% if Udongo.config.flexible_content.picture_caption_editor? %>
|
15
|
+
<div class="img-caption">
|
16
|
+
<%= object.caption.html_safe %>
|
17
|
+
</div>
|
18
|
+
<% else %>
|
19
|
+
<div class="text-center">
|
20
|
+
<%= object.caption %>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<% javascript 'frontend/forms' %>
|
2
|
+
|
3
|
+
<% cache [model, :flexible_content, I18n.locale] do %>
|
4
|
+
<div class="flexible-content">
|
5
|
+
<% model.content_rows.where(locale: I18n.locale).decorate.each do |row| %>
|
6
|
+
<div class="container<%= '-fluid' if row.full_width? %>">
|
7
|
+
<% styles = row.styles.map { |k,v| "#{k}: #{v};" }.join %>
|
8
|
+
<div class="row <%= row.classes.join(' ') %>" style="<%= styles %>">
|
9
|
+
<% row.columns.each do |column| %>
|
10
|
+
<div class="col-sm-<%= column.width_sm %> col-md-<%= column.width_md %> col-lg-<%= column.width_lg %> col-xl-<%= column.width_xl %>">
|
11
|
+
<% content = column.content.decorate %>
|
12
|
+
|
13
|
+
<% Udongo.config.flexible_content.types.each do |content_type| %>
|
14
|
+
<% if content.content_type_is?(content_type) %>
|
15
|
+
<%= render "frontend/flexible_content/#{content_type}", object: content, column: column %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<% end %>
|
23
|
+
</div>
|
24
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% if object.image_collection && object.slide_interval && object.image_collection.images.any? %>
|
2
|
+
<% interval = object.autoplay? ? object.slide_interval * 1000 : false %>
|
3
|
+
<div id="carousel-<%= column.id %>" class="carousel slide" data-ride="carousel" data-interval="<%= interval %>">
|
4
|
+
<ol class="carousel-indicators justify-content-end">
|
5
|
+
<% object.image_collection.images.each_with_index do |_img,i| %>
|
6
|
+
<li data-target="#carousel-<%= column.id %>" data-slide-to="<%= i %>" class="<%= 'active' if i == 0 %>"></li>
|
7
|
+
<% end %>
|
8
|
+
</ol>
|
9
|
+
<div class="carousel-inner" role="listbox">
|
10
|
+
<% object.image_collection.images.each_with_index do |img,i| %>
|
11
|
+
<div class="carousel-item <%= 'active' if i == 0 %>">
|
12
|
+
<%= image_tag img.asset.image.url(800, 800, quality: 65), alt: '' %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= object.render if object.content.present? %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% if object.url.present? && object.aspect_ratio.present? %>
|
2
|
+
<div class="embed-responsive embed-responsive-<%= object.aspect_ratio_class %>">
|
3
|
+
<iframe class="embed-responsive-item" src="<%= object.embed_url %>" allowfullscreen></iframe>
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<% if object.caption.present? %>
|
7
|
+
<% if Udongo.config.flexible_content.video_caption_editor? %>
|
8
|
+
<div class="img-caption">
|
9
|
+
<%= object.caption.html_safe %>
|
10
|
+
</div>
|
11
|
+
<% else %>
|
12
|
+
<div class="text-center">
|
13
|
+
<%= object.caption %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
data/changelog.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
6.5.0 - 2017-06-25
|
2
|
+
--
|
3
|
+
* It's now possible to disable the flexible content row gutters.
|
4
|
+
* Video's can now have a caption. You can configure whether or not this caption
|
5
|
+
uses an editor.
|
6
|
+
* For each flexible content type, we now provide a placeholder as default. In
|
7
|
+
most cases this will be ok. If you want something different, you can simply
|
8
|
+
override this partial. We don't provide a default for 'image' because that's
|
9
|
+
actually discontinued and you should stop using that.
|
10
|
+
|
11
|
+
|
1
12
|
6.4.1 - 2017-06-16
|
2
13
|
--
|
3
14
|
* Make it easier to fetch all the content row styles as a hash.
|
@@ -5,7 +16,7 @@
|
|
5
16
|
|
6
17
|
6.4.0 - 2017-06-16
|
7
18
|
--
|
8
|
-
* Add the
|
19
|
+
* Add the ImageCollection model with a module. This allows you to put certain
|
9
20
|
assets in one or more collections. These can then be used in the future to
|
10
21
|
create slideshows, photo albums and even file lists.
|
11
22
|
* Bugfix: reworked to Udongo::Search::Frontend visible/publishable check tests
|
data/config/locales/en_forms.yml
CHANGED
data/config/locales/nl_forms.yml
CHANGED
@@ -8,10 +8,15 @@ module Udongo
|
|
8
8
|
|
9
9
|
attribute :types, Array, default: %w(text picture video slideshow form image)
|
10
10
|
attribute :picture_caption_editor, Axiom::Types::Boolean, default: false
|
11
|
+
attribute :video_caption_editor, Axiom::Types::Boolean, default: false
|
11
12
|
|
12
13
|
def picture_caption_editor?
|
13
14
|
picture_caption_editor
|
14
15
|
end
|
16
|
+
|
17
|
+
def video_caption_editor?
|
18
|
+
video_caption_editor
|
19
|
+
end
|
15
20
|
end
|
16
21
|
end
|
17
22
|
end
|
data/lib/udongo/version.rb
CHANGED
data/readme.md
CHANGED
@@ -124,6 +124,11 @@ Udongo.config.flexible_content.types = %w(text picture video)
|
|
124
124
|
Udongo.config.flexible_content.picture_caption_editor = false
|
125
125
|
```
|
126
126
|
|
127
|
+
### video_caption_editor
|
128
|
+
```ruby
|
129
|
+
Udongo.config.flexible_content.video_caption_editor = false
|
130
|
+
```
|
131
|
+
|
127
132
|
## Assets
|
128
133
|
### image_white_list
|
129
134
|
```ruby
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: udongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Davy Hellemans
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-06-
|
12
|
+
date: 2017-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -732,6 +732,12 @@ files:
|
|
732
732
|
- app/views/backend/users/edit.html.erb
|
733
733
|
- app/views/backend/users/index.html.erb
|
734
734
|
- app/views/backend/users/new.html.erb
|
735
|
+
- app/views/frontend/flexible_content/_form.html.erb
|
736
|
+
- app/views/frontend/flexible_content/_picture.html.erb
|
737
|
+
- app/views/frontend/flexible_content/_rows.html.erb
|
738
|
+
- app/views/frontend/flexible_content/_slideshow.html.erb
|
739
|
+
- app/views/frontend/flexible_content/_text.html.erb
|
740
|
+
- app/views/frontend/flexible_content/_video.html.erb
|
735
741
|
- app/views/layouts/backend/_top_navigation.html.erb
|
736
742
|
- app/views/layouts/backend/application.html.erb
|
737
743
|
- app/views/layouts/backend/lightbox.html.erb
|
@@ -847,6 +853,8 @@ files:
|
|
847
853
|
- db/migrate/20170615131909_create_content_slideshows.rb
|
848
854
|
- db/migrate/20170615184855_add_content_row_margin_padding_and_bg_color.rb
|
849
855
|
- db/migrate/20170616114757_add_external_ref_to_form_field.rb
|
856
|
+
- db/migrate/20170623121241_add_no_gutters_to_content_row.rb
|
857
|
+
- db/migrate/20170623124218_add_caption_to_content_video.rb
|
850
858
|
- lib/tasks/task_extras.rb
|
851
859
|
- lib/tasks/udongo_tasks.rake
|
852
860
|
- lib/udongo.rb
|