ecm_pictures2 1.0.4 → 1.1.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: 56efd2330fe8b7f52f39c203f30416e2b9f450da
4
- data.tar.gz: b9c8d765cbd1402387f324d1f84cd797145f5f67
3
+ metadata.gz: 5ebb37d682a26e5debd7b4e20d7d0571f2600ed3
4
+ data.tar.gz: 76a5edd7c413d0a9328f426b6f2927747df8f5aa
5
5
  SHA512:
6
- metadata.gz: 0b9944e3cb14f066dfbc42e8a83311182972ee9c2f4800ca8d50d09d9634ff50234048ef5379c500754949a6ac6f7420dd1dd10841ae6d8cf6d54f95c4d53f9e
7
- data.tar.gz: 8857b732b77defee31aeacaa277046aa1c703d0012cac146ceba7add2b5588501086149798f2adff133a3305f1a4432e9f75b94ebb5cccc9b1869c33d6adac5f
6
+ metadata.gz: c152100dce2d3741bdf07aceac6cda5f8fef753dd5cbcb4f8fa8013d09fcdcfb4cb6a2dafdb224da2f28bcfedd3326fcfdd3e3685447f3f9a2e5d866c62c556b
7
+ data.tar.gz: 766523c638f92f3f2e326e2fda97b8a82f232af7d49df78c528787e0241a621d58ccf3dda3d7580d0d4cbca812ccd3e704aa9f0901a66becccb8636ff3e75816
data/README.rdoc CHANGED
@@ -51,6 +51,13 @@ Migrate:
51
51
 
52
52
  > rake db:migrate
53
53
 
54
+ Add the helper to your application controller:
55
+
56
+ # app/controllers/application_controller.rb
57
+ class ApplicationController < ActionController::Base
58
+ helper Ecm::PicturesHelper
59
+ ...
60
+ end
54
61
 
55
62
  == Optional: Generate locale files
56
63
 
@@ -46,7 +46,6 @@ module Ecm::PicturesHelper
46
46
  return link_options
47
47
  end
48
48
 
49
- # TODO: Implement this.
50
49
  def render_picture(name, options = {})
51
50
  begin
52
51
  options = {:preview_style => :thumb}.merge(options)
@@ -59,9 +58,7 @@ module Ecm::PicturesHelper
59
58
  content_tag(:p, I18n.t('ecm.pictures.picture.warnings.missing', :name => name.to_s))
60
59
  end
61
60
  else
62
- content_tag(:div, :class => 'row') do
63
- render picture
64
- end
61
+ render picture
65
62
  end
66
63
 
67
64
  rescue Exception => e
@@ -1,7 +1,9 @@
1
+ <%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '<notextile>'.html_safe : '' %>
1
2
  <div class="picture-gallery-description">
2
3
  <%= mu picture_gallery, :description %>
3
4
  </div>
4
5
 
5
6
  <div class="picture-gallery-pictures row" data-target="#modal-gallery" data-toggle="modal-gallery">
6
7
  <%= render picture_gallery.pictures %>
7
- </div>
8
+ </div>
9
+ <%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '</notextile>'.html_safe : '' %>
@@ -1,5 +1,7 @@
1
+ <%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '<notextile>'.html_safe : '' %>
1
2
  <div class="col-xs-6 col-md-3">
2
3
  <%= link_to("#{picture.image.url}#{File.extname(picture.image_file_name).downcase}", :'data-gallery' => "gallery", :class => 'thumbnail') do %>
3
4
  <%= image_tag(picture.image.url(:default_thumb)) %>
4
5
  <% end %>
5
- </div>
6
+ </div>
7
+ <%= Ecm::Pictures::Configuration.prevent_textile_rendering_in_html ? '</notextile>'.html_safe : '' %>
@@ -25,6 +25,10 @@ module Ecm
25
25
  'ApplicationController'
26
26
  end
27
27
 
28
+ mattr_accessor :prevent_textile_rendering_in_html do
29
+ true
30
+ end
31
+
28
32
  # def paperclip_options=(paperclip_options)
29
33
  # @@paperclip_options = picture_image_styles.with_indifferent_access
30
34
  # end
@@ -1,6 +1,6 @@
1
1
  module Ecm
2
2
  module Pictures
3
- VERSION = "1.0.4"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
6
6
 
@@ -31,5 +31,11 @@ Ecm::Pictures.configure do |config|
31
31
  # Default: config.base_controller = 'ApplicationController'
32
32
  #
33
33
  config.base_controller = 'ApplicationController'
34
+
35
+ # Adds <notextile> tags around the to fix html output.
36
+ #
37
+ # Default: config.prevent_textile_rendering_in_html = true
38
+ #
39
+ config.prevent_textile_rendering_in_html = true
34
40
  end
35
41
 
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: 1.0.4
4
+ version: 1.1.0
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: 2015-10-28 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails