ecm_pictures2 2.0.0 → 2.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: b99e9ac880d8683dcaeb685655a7b05ae393419f
4
- data.tar.gz: 9ec6f5096b217ca3a69e315d72722c90bb684b14
3
+ metadata.gz: f6abb4b95b47ee1df0e85ba8a56eb57b15c9c2c3
4
+ data.tar.gz: 3a3856c4db5b48b6a419fccc876684836fe4a5cc
5
5
  SHA512:
6
- metadata.gz: 0b1fc42b5eb37bd331f8a2efeb23731550d38a27bd55b4ad1b31a558dd0ed0fefd650121c93554d884f78ea0fda2654314d417b15cd57380859e35490ac94c09
7
- data.tar.gz: 988e2c4dcd4502061a81776a801961b72e73864e50618fb5810b0b75e14e78e3b5ac08af8daa82964955d070c786f3e3f74b509fb572bcfe21b332f8f66122e8
6
+ metadata.gz: 873de5eb53c27031ee6623f5f5753d24aac9fa9378e496b554b2fe8ff4919a3b8f9d22e8760eb02c89464900007b2fa9f33a8983a68ac59cc9854d3b6371e820
7
+ data.tar.gz: 5960ab2a6428235444412bf066be52120049fd54ea74e17f2ea23a80c731d87024f6bd569981c553efd966d69577219ae427b46776420facd792d75bef4f4a85
@@ -1,10 +1,24 @@
1
1
  <h1><%= Ecm::Pictures::PictureGallery.model_name.human(:count => :other) %></h1>
2
2
 
3
- <div class="row">
4
- <% @picture_galleries.each do |pg| %>
5
- <%= render :partial => 'ecm/pictures/picture_galleries/picture_gallery_for_index', :locals => { :picture_gallery => pg } %>
3
+ <% case Ecm::Pictures::Configuration.render_picture_gallery_index_as %>
4
+ <% when :thumbnail %>
5
+ <div class="row">
6
+ <% @picture_galleries.each do |pg| %>
7
+ <%= render :partial => 'ecm/pictures/picture_galleries/picture_gallery_for_index', :locals => { :picture_gallery => pg } %>
8
+ <% end %>
9
+ </div>
10
+ <% when :media_object %>
11
+ <%= render_collection(@picture_galleries, Ecm::Pictures::PictureGallery, as: :bootstrap_media_object) do |list| %>
12
+ <h4><%= list.resource.name %>
13
+ <span class="tags">
14
+ <% list.resource.tag_list.each do |tag| %>
15
+ <span class="label label-primary"><%= tag %></span>
16
+ <% end %>
17
+ </span>
18
+ </h4>
19
+ <%= list.media_object title: '', body: mu(list.resource, :description), image_url: list.resource.pictures.first.image.url(:default_thumb) %>
6
20
  <% end %>
7
- </div>
21
+ <% end %>
8
22
 
9
23
  <div class="well page-actions">
10
24
  <%= link_to(t('ecm.pictures.views.actions.back'), main_app.root_path, class: 'btn btn-default') %>
@@ -28,6 +28,10 @@ module Ecm
28
28
  mattr_accessor :prevent_textile_rendering_in_html do
29
29
  true
30
30
  end
31
+
32
+ mattr_accessor :render_picture_gallery_index_as do
33
+ :thumbnail
34
+ end
31
35
  end
32
36
  end
33
37
  end
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Pictures
3
- VERSION = '2.0.0'
3
+ VERSION = '2.1.0'
4
4
  end
5
5
  end
@@ -37,4 +37,11 @@ Ecm::Pictures.configure do |config|
37
37
  # Default: config.prevent_textile_rendering_in_html = true
38
38
  #
39
39
  config.prevent_textile_rendering_in_html = true
40
+
41
+ # Render picture galleries in the index view as :thumbnail
42
+ # or :media_object.
43
+ #
44
+ # Default: config.render_picture_gallery_index_as = :media_object
45
+ #
46
+ config.render_picture_gallery_index_as = :media_object
40
47
  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.0.0
4
+ version: 2.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: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails