udongo 7.1.3 → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a8868b90455b60b96f91fe0c563ab19bac5adb6
4
- data.tar.gz: 67b57f1669cd4bde2ae0bb680e1a24d7922ede61
3
+ metadata.gz: 5c701bf9ff7ebe6af8d5ca23fb2f612a910001a7
4
+ data.tar.gz: 4b38b1933f9e41d1706dc20b1bb3d1aa51c21c27
5
5
  SHA512:
6
- metadata.gz: b7b5b8e9df01cf64d6dd188dd19ae627bf0674ca4ac65130b7101d65e3288fc70b0e5099664c364762fead9ac932bbef151c969e3be44177b7775797f193b0ee
7
- data.tar.gz: cb560a8b8025d206a9e78f357e179ba62298fe21c6de05a535137b135a9342074f243c02473556d855694e832f55b2571641c8a4bc3441891a278a5703f0617a
6
+ metadata.gz: 5a188750f343d64da5d6df6b07afaed9357491dde3a1c4839f1e2fe7300c4af3dc849bd6fa91f60f19480290aa94b11fac915fc4edc25aa33a7dd936fa9ae130
7
+ data.tar.gz: 3925dc94bfb6bb8d45dd52a8a0f00bb931c34c2d4dc9dca22ca13663c11720da4798657e4dacfccc5144276f09e332381eaf2962ccd561fa06a1f24eebafa411
@@ -5,7 +5,7 @@ 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
8
+ allowed_params :caption, :url, :disallow_resize
9
9
 
10
10
  def link
11
11
  @model.asset = Asset.find params[:asset_id]
@@ -1,6 +1,10 @@
1
1
  <% if object.present? && object.asset.present? %>
2
2
 
3
- <%= image_tag object.asset.image.url(1100, 1100, quality: 65), alt: '', class: 'img-fluid' %>
3
+ <% if object.disallow_resize? %>
4
+ <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
5
+ <% else %>
6
+ <%= image_tag object.asset.image.url(1100, 1100, quality: 65), alt: '', class: 'img-fluid' %>
7
+ <% end %>
4
8
 
5
9
  <% if object.caption.present? %>
6
10
  <% if Udongo.config.flexible_content.picture_caption_editor? %>
@@ -3,6 +3,7 @@
3
3
  <%= image_tag @model.asset.image.url(900, 900, quality: 65), alt: '', class: 'img-fluid' %>
4
4
 
5
5
  <%= simple_form_for [:backend, @model] do |f| %>
6
+ <%= f.input :disallow_resize, as: :boolean %>
6
7
  <%= f.input :url, as: :string %>
7
8
 
8
9
  <% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
@@ -3,11 +3,19 @@
3
3
 
4
4
  <% if object.url.present? %>
5
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' %>
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 %>
7
11
  <% end %>
8
12
 
9
13
  <% else %>
10
- <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
14
+ <% if object.disallow_resize? %>
15
+ <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
16
+ <% else %>
17
+ <%= image_tag object.asset.image.url(max_img_size, max_img_size, quality: 65), alt: '', class: 'img-fluid' %>
18
+ <% end %>
11
19
  <% end %>
12
20
 
13
21
  <% if object.caption.present? %>
data/changelog.md CHANGED
@@ -1,3 +1,8 @@
1
+ 7.2.0 - 2017-12-17
2
+ --
3
+ * Make it possible to specify that a content picture may not be resized.
4
+
5
+
1
6
  7.1.3 - 2017-11-30
2
7
  --
3
8
  * Added a third parameter to IconHelper#icon that makes it possible to pass
@@ -81,6 +81,9 @@ en:
81
81
  image_collection_id: Image collection
82
82
  slide_interval: Interval between slides
83
83
 
84
+ content_picture:
85
+ disallow_resize: Disallow resize
86
+
84
87
  email_template:
85
88
  from_email: Sender e-mail address
86
89
  from_name: Sender name
@@ -82,6 +82,9 @@ nl:
82
82
  image_collection_id: Afbeeldingsgroep
83
83
  slide_interval: Interval tussen slides
84
84
 
85
+ content_picture:
86
+ disallow_resize: Niet automatisch bijschalen
87
+
85
88
  email_template:
86
89
  from_email: E-mail adres afzender
87
90
  from_name: Naam afzender
@@ -0,0 +1,5 @@
1
+ class AddDisallowResizetoContentPicture < ActiveRecord::Migration[5.0]
2
+ def change
3
+ add_column :content_pictures, :disallow_resize, :boolean, after: 'url'
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module Udongo
2
- VERSION = '7.1.3'
2
+ VERSION = '7.2.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.1.3
4
+ version: 7.2.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-11-30 00:00:00.000000000 Z
12
+ date: 2017-12-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -536,7 +536,6 @@ files:
536
536
  - app/helpers/page_helper.rb
537
537
  - app/helpers/snippet_helper.rb
538
538
  - app/helpers/udongo_helper.rb
539
- - app/inputs/button_radios_input.rb
540
539
  - app/inputs/date_picker_input.rb
541
540
  - app/inputs/date_range_picker_input.rb
542
541
  - app/mailers/general_mailer.rb
@@ -745,7 +744,6 @@ files:
745
744
  - app/views/layouts/backend/login.html.erb
746
745
  - app/views/layouts/frontend/application.html.erb
747
746
  - changelog.md
748
- - config/environment.rb
749
747
  - config/initializers/assets.rb
750
748
  - config/initializers/ckeditor.rb
751
749
  - config/initializers/core_ext/string.rb
@@ -861,6 +859,7 @@ files:
861
859
  - db/migrate/20170728125838_remove_content_images.rb
862
860
  - db/migrate/20170919135942_add_external_reference_to_content_column.rb
863
861
  - db/migrate/20171119182643_larger_email_plain_html_storage.rb
862
+ - db/migrate/20171217163339_add_disallow_resizeto_content_picture.rb
864
863
  - lib/tasks/task_extras.rb
865
864
  - lib/tasks/udongo_tasks.rake
866
865
  - lib/udongo.rb
@@ -1,6 +0,0 @@
1
- class ButtonRadiosInput < SimpleForm::Inputs::Base
2
- def input(wrapper_options = nil)
3
- merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
4
- f.radio_button :toggle, value: 'success_message', as: :boolean
5
- end
6
- end
File without changes