udongo 7.3.5 → 7.4.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
2
  SHA1:
3
- metadata.gz: 23b0abf6ffac51e5c3d5cfbf4d1fc2d43ddb2e1f
4
- data.tar.gz: 0a8dfea964ff8271a8567e8eab56a3010337c7bf
3
+ metadata.gz: 11b2aeb4979d4fca8f1274b0dce729807dbf797c
4
+ data.tar.gz: f684fbfb3794fcabf4d524c9d4d43113f060c98d
5
5
  SHA512:
6
- metadata.gz: 1efec8809f119ca1cc0eeb7ac289a1d9798e546935acb3598d061ec1239cee753655565a3710d97ad89d9cff77d48592c31c250b1bdde1012762470bc28eee23
7
- data.tar.gz: 3cc644ad130ab942a44495b187878729500df206980e1693113d76a5b6bafff978e54af7e4f4c8f7a0b309c5271fde37bf8eb386c71dcc8508f0d3ae44607414
6
+ metadata.gz: 64861a406fc432d4e22a1a79cd1b034cd5168c076ef108b1a21adbce9799a8156e37c7f887bf369a6853c53dc796a0de4ba63dd7773d25fcd6da614b65064be6
7
+ data.tar.gz: 821bbab8349cbbbb2d16681fbf52c2b059c98d1670d8bf45b2073005db9b82bc6bb720b93c348d2ff107015a1642be3faed7e11149c92ec51ae2991473461a06
@@ -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, :disallow_resize
8
+ allowed_params :caption, :url, :target, :disallow_resize
9
9
 
10
10
  def link
11
11
  @model.asset = Asset.find params[:asset_id]
@@ -1,6 +1,8 @@
1
1
  class ContentPicture < ApplicationRecord
2
2
  include Concerns::ContentType
3
3
 
4
+ TARGETS = %w(_self _blank)
5
+
4
6
  belongs_to :asset
5
7
 
6
8
  def content_type
@@ -4,7 +4,15 @@
4
4
 
5
5
  <%= simple_form_for [:backend, @model] do |f| %>
6
6
  <%= f.input :disallow_resize, as: :boolean %>
7
- <%= f.input :url, as: :string %>
7
+
8
+ <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 %>
14
+ </div>
15
+ </div>
8
16
 
9
17
  <% content_type = Udongo.config.flexible_content.picture_caption_editor? ? :ckeditor : :text %>
10
18
  <%= f.input :caption, as: content_type %>
@@ -2,7 +2,7 @@
2
2
  <% max_img_size = object.max_image_size %>
3
3
 
4
4
  <% if object.url.present? %>
5
- <%= link_to object.url do %>
5
+ <%= link_to object.url, target: object.target do %>
6
6
  <% if object.disallow_resize? %>
7
7
  <%= image_tag object.asset.image.url, alt: '', class: 'img-fluid' %>
8
8
  <% else %>
data/changelog.md CHANGED
@@ -1,6 +1,12 @@
1
+ 7.4.0 - 2018-04-19
2
+ --
3
+ * Add target to content pictures (eg _blank).
4
+
5
+
1
6
  7.3.5 - 2018-03-30
2
7
  --
3
8
  * The tag summary is no longer a mandatory field.
9
+ * Email vars if-conditionals can now contain numbers in the var name.
4
10
 
5
11
 
6
12
  7.3.4 - 2018-03-15
@@ -83,6 +83,7 @@ en:
83
83
 
84
84
  content_picture:
85
85
  disallow_resize: Disallow resize
86
+ target: URL target
86
87
 
87
88
  email_template:
88
89
  from_email: Sender e-mail address
@@ -84,6 +84,7 @@ nl:
84
84
 
85
85
  content_picture:
86
86
  disallow_resize: Niet automatisch bijschalen
87
+ target: Doel van de URL
87
88
 
88
89
  email_template:
89
90
  from_email: E-mail adres afzender
@@ -0,0 +1,5 @@
1
+ class AddTargetToContentPicture < ActiveRecord::Migration[5.0]
2
+ def change
3
+ add_column :content_pictures, :target, :string, after: 'url'
4
+ end
5
+ 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?
@@ -14,7 +14,7 @@ module Udongo::EmailVarsParser
14
14
  end
15
15
 
16
16
  def replace_ifs(content, vars)
17
- content.to_s.scan(/\[if\:([a-z\._\-]+)\](.*?)\[\/if\]/mi).each do |match|
17
+ content.to_s.scan(/\[if\:([a-z0-9\._\-]+)\](.*?)\[\/if\]/mi).each do |match|
18
18
  if_var = match.first
19
19
  if_content = match.last
20
20
 
@@ -1,3 +1,3 @@
1
1
  module Udongo
2
- VERSION = '7.3.5'
2
+ VERSION = '7.4.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.3.5
4
+ version: 7.4.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-03-30 00:00:00.000000000 Z
12
+ date: 2018-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -747,7 +747,6 @@ files:
747
747
  - app/views/layouts/backend/login.html.erb
748
748
  - app/views/layouts/frontend/application.html.erb
749
749
  - changelog.md
750
- - config/environment.rb
751
750
  - config/initializers/assets.rb
752
751
  - config/initializers/ckeditor.rb
753
752
  - config/initializers/core_ext/string.rb
@@ -867,6 +866,7 @@ files:
867
866
  - db/migrate/20180228071957_add_attachments_to_emails.rb
868
867
  - db/migrate/20180301093228_add_locales_to_tags.rb
869
868
  - db/migrate/20180301101320_add_seo_locales_to_tags.rb
869
+ - db/migrate/20180419115752_add_target_to_content_picture.rb
870
870
  - lib/tasks/task_extras.rb
871
871
  - lib/tasks/udongo_tasks.rake
872
872
  - lib/udongo.rb
File without changes