udongo 7.4.2 → 7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: 782d1c04c4bb2a9ca57a523d068582841d149186dfd382ca2c05ef7b6999e713
4
- data.tar.gz: d82f128c4c5378faf9979f48a2d30bbd92da9135e4ab66f3bdee1207d6a384bd
2
+ SHA1:
3
+ metadata.gz: cc8c7b4bbcf91c6533f4bd2d275a64c63971d114
4
+ data.tar.gz: b5f234c45d64860b99918f7ae082fe955d3398c5
5
5
  SHA512:
6
- metadata.gz: 54a7f0738658edcabda0e6cd23d86eb6ccf959d2297f08a914d61b7e136a63969a56059f5dd3b4129e236a47a561176f9867c62d671f24a4427c75a543b22596
7
- data.tar.gz: 9c2637de8cf436ece920aa6dd4dd8c49c2c44b75300228822de5281e237127083b3aff3b75ab07df74d3647cdb7365aaa085098382d09dda04fc33dd7c9c350b
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-8">
10
- <%= f.input :url, as: :string %>
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
- <% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
18
- <%= f.input :caption, as: content_type %>
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
- <%= render 'backend/form_actions', cancel_url: '#lity-close' %>
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.url.present? %>
5
- <%= link_to object.url, target: object.target do %>
6
- <% if object.disallow_resize? %>
7
- <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
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
+ &nbsp;
7
+ </div>
12
8
 
13
9
  <% else %>
14
10
  <% if object.disallow_resize? %>
15
- <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
11
+ <% img_path = object.asset.image.url %>
16
12
  <% else %>
17
- <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
13
+ <% img_path = object.asset.image.url(max_img_size, max_img_size, quality: 65) %>
18
14
  <% end %>
19
- <% end %>
20
15
 
21
- <% if object.caption.present? %>
22
- <% if Udongo.config.flexible_content.picture_caption_editor? %>
23
- <div class="img-caption">
24
- <%= object.caption.html_safe %>
25
- </div>
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
- <div class="text-center">
28
- <%= object.caption %>
29
- </div>
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 the them in
52
+ * Make it possible for emails to have attachments. You can also see them in
46
53
  the backend.
47
54
 
48
55
 
@@ -82,7 +82,9 @@ en:
82
82
  slide_interval: Interval between slides
83
83
 
84
84
  content_picture:
85
+ background_image: Use in the background
85
86
  disallow_resize: Disallow resize
87
+ min_height: Min. height
86
88
  target: URL target
87
89
 
88
90
  email_template:
@@ -83,7 +83,9 @@ nl:
83
83
  slide_interval: Interval tussen slides
84
84
 
85
85
  content_picture:
86
+ background_image: In de achtergrond gebruiken
86
87
  disallow_resize: Niet automatisch bijschalen
88
+ min_height: Min. hoogte
87
89
  target: Doel van de URL
88
90
 
89
91
  email_template:
@@ -0,0 +1,6 @@
1
+ class AddContentPictureBgImageFields < ActiveRecord::Migration[5.0]
2
+ def change
3
+ add_column :content_pictures, :background_image, :boolean, after: 'target'
4
+ add_column :content_pictures, :min_height, :integer, after: 'disallow_resize'
5
+ end
6
+ end
@@ -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?
@@ -1,3 +1,3 @@
1
1
  module Udongo
2
- VERSION = '7.4.2'
2
+ VERSION = '7.5.0'
3
3
  end
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.2
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-05-02 00:00:00.000000000 Z
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.7.6
1020
+ rubygems_version: 2.5.1
1021
1021
  signing_key:
1022
1022
  specification_version: 4
1023
1023
  summary: Blimp CMS
File without changes