ecm_pictures2 2.1.3 → 2.1.4

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: fff4595aa9c0cc54463c23fef0049beaa28d394c
4
- data.tar.gz: 10c3f0bced0012ac8663159f61dc6341584e7910
3
+ metadata.gz: e80430e123b26bdf4baa6e8c5bbf2634fde0eeac
4
+ data.tar.gz: 123a3e13c56cded1591fad0d4ed743bcdc9574a3
5
5
  SHA512:
6
- metadata.gz: 3c94c2249e7e58e647458c678c6cbaa8c0b2580b68aac2b7c7bcfaa87c30ba5b6a24be4fa8aa587b625e983a81c84a74e7c0b00f15abc76b0e4422d69faa4f5b
7
- data.tar.gz: 464f16e3086fd0d04f5517d217e9b591450ca1bde38454fbc7ed62c0f4b1ec361d5b5563cd6d8c8717611091ad33ce4337f2aafff91927b1798cba77560af937
6
+ metadata.gz: 597d26f961840da32288d8e5194674ec608dbf5363fd1864d35832e033ea13faa4c8151aa48448d01e7c47a31d8736bb63c2223f2160ceaceb75c2b5d2b2efae
7
+ data.tar.gz: c363a66aa568b4a752bce8a9a028444d52a635486484372da6f4ed760e14cfa8f16607d76186702c39c37abfbd70397efb21763d139e357a4ce164f45751de76
@@ -49,15 +49,20 @@ module Ecm::PicturesHelper
49
49
  end
50
50
 
51
51
  def render_picture(name, options = {})
52
- options = { preview_style: :thumb }.merge(options)
52
+ options = { preview_style: :thumb, plain: false }.merge(options)
53
+ plain = options[:plain]
53
54
 
54
55
  picture = Ecm::Pictures::Picture.where(name: name.to_s).first
55
56
  # gallery_identifier = gallery.to_param rescue 'missing'
56
57
 
57
58
  if picture.nil?
58
- content_tag(:div, class: 'warning missing picture') do
59
+ return content_tag(:div, class: 'warning missing picture') do
59
60
  content_tag(:p, I18n.t('ecm.pictures.picture.warnings.missing', name: name.to_s))
60
61
  end
62
+ end
63
+
64
+ if plain
65
+ image_tag picture.image.url
61
66
  else
62
67
  render picture
63
68
  end
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Pictures
3
- VERSION = '2.1.3'
3
+ VERSION = '2.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_pictures2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails