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 +4 -4
- data/README.rdoc +7 -0
- data/app/helpers/ecm/pictures_helper.rb +1 -4
- data/app/views/ecm/pictures/picture_galleries/_picture_gallery.html.erb +3 -1
- data/app/views/ecm/pictures/pictures/_picture.html.erb +3 -1
- data/lib/ecm/pictures/configuration.rb +4 -0
- data/lib/ecm/pictures/version.rb +1 -1
- data/lib/generators/ecm/pictures/install/templates/ecm_pictures.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ebb37d682a26e5debd7b4e20d7d0571f2600ed3
|
4
|
+
data.tar.gz: 76a5edd7c413d0a9328f426b6f2927747df8f5aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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 : '' %>
|
data/lib/ecm/pictures/version.rb
CHANGED
@@ -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
|
+
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-
|
11
|
+
date: 2015-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|