udongo 7.4.2 → 7.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/controllers/backend/content/rows/pictures_controller.rb +2 -1
- data/app/views/backend/content/rows/pictures/edit.html.erb +33 -13
- data/app/views/frontend/flexible_content/_picture.html.erb +24 -19
- data/changelog.md +8 -1
- data/config/locales/en_forms.yml +2 -0
- data/config/locales/nl_forms.yml +2 -0
- data/db/migrate/20180613113816_add_content_picture_bg_image_fields.rb +6 -0
- data/lib/udongo/assets/resizer.rb +1 -0
- data/lib/udongo/version.rb +1 -1
- metadata +4 -4
- data/config/environment.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cc8c7b4bbcf91c6533f4bd2d275a64c63971d114
|
4
|
+
data.tar.gz: b5f234c45d64860b99918f7ae082fe955d3398c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 715f1f441cf1f7dcb94b077ad5f4843473e43316bcfa1db370556fd29ca3b1feea01d303cdcebd3f991a5f9024cc53552641fb56ed567b8f01b71212aaa46c2d
|
7
|
+
data.tar.gz: 47edb83449ec1052d115c6a53b5420205454540ed8cd92c8e23ce20107abad3d35ee475bedd9274faac6b703128e9bd389483a5fe902fa7d3c99e7968912d96a
|
@@ -5,7 +5,8 @@ class Backend::Content::Rows::PicturesController < Backend::BaseController
|
|
5
5
|
before_action :prepare_upload, only: [:link_or_upload, :upload]
|
6
6
|
|
7
7
|
model ContentPicture
|
8
|
-
allowed_params :caption, :url, :target, :disallow_resize
|
8
|
+
allowed_params :caption, :url, :target, :disallow_resize, :background_image,
|
9
|
+
:min_height
|
9
10
|
|
10
11
|
def link
|
11
12
|
@model.asset = Asset.find params[:asset_id]
|
@@ -1,21 +1,41 @@
|
|
1
1
|
<%= render 'backend/general_form_error', object: @model %>
|
2
2
|
|
3
|
-
<%= image_tag @model.asset.image.url(900, 900, quality: 65), alt: '', class: 'img-fluid' %>
|
4
|
-
|
5
3
|
<%= simple_form_for [:backend, @model] do |f| %>
|
6
|
-
<%= f.input :disallow_resize, as: :boolean %>
|
7
|
-
|
8
4
|
<div class="row">
|
9
|
-
<div class="col-md-
|
10
|
-
<%=
|
11
|
-
</div>
|
12
|
-
<div class="col-md-4">
|
13
|
-
<%= f.input :target, collection: ContentPicture::TARGETS, include_blank: false %>
|
5
|
+
<div class="col-md-5">
|
6
|
+
<%= image_tag @model.asset.image.url(900, 900, quality: 65), alt: '', class: 'img-fluid' %>
|
14
7
|
</div>
|
15
|
-
</div>
|
16
8
|
|
17
|
-
|
18
|
-
|
9
|
+
<div class="col-md-7">
|
10
|
+
<div class="row">
|
11
|
+
<div class="col-md-6">
|
12
|
+
<%= f.input :disallow_resize, as: :boolean %>
|
13
|
+
</div>
|
14
|
+
<div class="col-md-6">
|
15
|
+
<%= f.input :background_image, as: :boolean %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<div class="row">
|
20
|
+
<div class="col-md-6">
|
21
|
+
<% pixels = (50..1000).step(50).map { |i| ["#{i}px", i] } %>
|
22
|
+
<%= f.input :min_height, collection: pixels %>
|
23
|
+
</div>
|
24
|
+
</div>
|
19
25
|
|
20
|
-
|
26
|
+
<div class="row">
|
27
|
+
<div class="col-md-8">
|
28
|
+
<%= f.input :url, as: :string %>
|
29
|
+
</div>
|
30
|
+
<div class="col-md-4">
|
31
|
+
<%= f.input :target, collection: ContentPicture::TARGETS, include_blank: false %>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
|
36
|
+
<%= f.input :caption, as: content_type %>
|
37
|
+
|
38
|
+
<%= render 'backend/form_actions', cancel_url: '#lity-close' %>
|
39
|
+
</div>
|
40
|
+
</div>
|
21
41
|
<% end %>
|
@@ -1,32 +1,37 @@
|
|
1
1
|
<% if object.present? && object.asset.present? %>
|
2
2
|
<% max_img_size = object.max_image_size %>
|
3
3
|
|
4
|
-
<% if object.
|
5
|
-
<%=
|
6
|
-
|
7
|
-
|
8
|
-
<% else %>
|
9
|
-
<%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
|
10
|
-
<% end %>
|
11
|
-
<% end %>
|
4
|
+
<% if object.background_image? %>
|
5
|
+
<div style="background-image: url('<%= object.asset.image.url(max_img_size, max_img_size, quality: 65) %>'); height: 100%; min-height: <%= object.min_height %>px">
|
6
|
+
|
7
|
+
</div>
|
12
8
|
|
13
9
|
<% else %>
|
14
10
|
<% if object.disallow_resize? %>
|
15
|
-
|
11
|
+
<% img_path = object.asset.image.url %>
|
16
12
|
<% else %>
|
17
|
-
|
13
|
+
<% img_path = object.asset.image.url(max_img_size, max_img_size, quality: 65) %>
|
18
14
|
<% end %>
|
19
|
-
<% end %>
|
20
15
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
<% if object.url.present? %>
|
17
|
+
<%= link_to object.url, target: object.target do %>
|
18
|
+
<%= image_tag img_path, alt: '', class: 'img-fluid' %>
|
19
|
+
<% end %>
|
20
|
+
|
26
21
|
<% else %>
|
27
|
-
|
28
|
-
|
29
|
-
|
22
|
+
<%= image_tag img_path, alt: '', class: 'img-fluid' %>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<% if object.caption.present? %>
|
26
|
+
<% if Udongo.config.flexible_content.picture_caption_editor? %>
|
27
|
+
<div class="img-caption">
|
28
|
+
<%= object.caption.html_safe %>
|
29
|
+
</div>
|
30
|
+
<% else %>
|
31
|
+
<div class="text-center">
|
32
|
+
<%= object.caption %>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
30
35
|
<% end %>
|
31
36
|
<% end %>
|
32
37
|
<% end %>
|
data/changelog.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
7.5.0 - 2018-06-13
|
2
|
+
--
|
3
|
+
* Make it possible to mark a content picture to be used in the background with a
|
4
|
+
certain min height.
|
5
|
+
* Rework the frontend/flexible_content/_picture.html.erb file.
|
6
|
+
|
7
|
+
|
1
8
|
7.4.2 - 2018-05-02
|
2
9
|
--
|
3
10
|
* Upgrades Rails from 5.0.0 to 5.0.1 to introduce fixes made for Ruby 2.4
|
@@ -42,7 +49,7 @@
|
|
42
49
|
|
43
50
|
7.3.0 - 2018-02-28
|
44
51
|
--
|
45
|
-
* Make it possible for emails to have attachments. You can also see
|
52
|
+
* Make it possible for emails to have attachments. You can also see them in
|
46
53
|
the backend.
|
47
54
|
|
48
55
|
|
data/config/locales/en_forms.yml
CHANGED
data/config/locales/nl_forms.yml
CHANGED
@@ -14,6 +14,7 @@ module Udongo
|
|
14
14
|
background = options[:background].to_s.parameterize
|
15
15
|
|
16
16
|
str = action.to_s.split('_').last
|
17
|
+
# TODO: rekening houden met asset updated_at
|
17
18
|
str << "-q#{quality}" if quality.present?
|
18
19
|
str << "-g#{gravity}" if gravity.present?
|
19
20
|
str << "-b#{background}" if background.present?
|
data/lib/udongo/version.rb
CHANGED
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: 7.
|
4
|
+
version: 7.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: 2018-
|
12
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -745,7 +745,6 @@ files:
|
|
745
745
|
- app/views/layouts/backend/login.html.erb
|
746
746
|
- app/views/layouts/frontend/application.html.erb
|
747
747
|
- changelog.md
|
748
|
-
- config/environment.rb
|
749
748
|
- config/initializers/assets.rb
|
750
749
|
- config/initializers/ckeditor.rb
|
751
750
|
- config/initializers/core_ext/string.rb
|
@@ -868,6 +867,7 @@ files:
|
|
868
867
|
- db/migrate/20180419115752_add_target_to_content_picture.rb
|
869
868
|
- db/migrate/20180427144338_add_missing_seo_fields_to_tags.rb
|
870
869
|
- db/migrate/20180427150844_remove_locales_and_seo_locales_from_tags.rb
|
870
|
+
- db/migrate/20180613113816_add_content_picture_bg_image_fields.rb
|
871
871
|
- lib/tasks/task_extras.rb
|
872
872
|
- lib/tasks/udongo_tasks.rake
|
873
873
|
- lib/udongo.rb
|
@@ -1017,7 +1017,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1017
1017
|
version: '0'
|
1018
1018
|
requirements: []
|
1019
1019
|
rubyforge_project:
|
1020
|
-
rubygems_version: 2.
|
1020
|
+
rubygems_version: 2.5.1
|
1021
1021
|
signing_key:
|
1022
1022
|
specification_version: 4
|
1023
1023
|
summary: Blimp CMS
|
data/config/environment.rb
DELETED
File without changes
|