c80_album_gallery 0.1.0.2 → 0.1.0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72a054b6d904fd315f071fbdc214dfcbbf62c890
|
4
|
+
data.tar.gz: 746041e28c3e2c1cba63103bf908cac9f1a169d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f1013647f98a3490bb86cc920c62f7d6d20f7497ac54b121c91264d5eb32c54ac634ba4c3b172d1d325a5e1eceb5289bb966e54d58060c154dbcee68b492314
|
7
|
+
data.tar.gz: 0b7b95680fc6b66de863572c3da203b4326d9f8315866298be6029471b85374db122d4497c4d372b23ace30753224ad11042154b82587e4708fc913e30eee63d
|
@@ -62,10 +62,16 @@ module C80AlbumGallery
|
|
62
62
|
# 3. С помощью css_klass можно регулировать количество элементов в ряду.
|
63
63
|
# 4. С помощью css_list_klass можно кастомизировать внеший вид списка.
|
64
64
|
# 5. С помощью thumb_size можно регулировать размер картинки
|
65
|
-
def render_gallery_list_slots(count=
|
66
|
-
css_list_klass=
|
67
|
-
css_item_klass=
|
68
|
-
thumb_size=
|
65
|
+
def render_gallery_list_slots(count=nil,
|
66
|
+
css_list_klass=nil,
|
67
|
+
css_item_klass=nil,
|
68
|
+
thumb_size=nil,
|
69
|
+
section_title=nil)
|
70
|
+
|
71
|
+
count = count.present? ? count : 3
|
72
|
+
css_list_klass = css_list_klass.present? ? css_list_klass : ''
|
73
|
+
css_item_klass = css_item_klass.present? ? css_item_klass : 'col-lg-4 col-md-4 col-sm-6 col-xs-6'
|
74
|
+
thumb_size = thumb_size.present? ? thumb_size : 'thumb_md'
|
69
75
|
|
70
76
|
# извлечём нужное количество альбомов (нужно помнить, что нужного количества может и не набраться)
|
71
77
|
galleries = Gallery.all.def_order.limit(count).order('rand()')
|
@@ -87,7 +93,8 @@ module C80AlbumGallery
|
|
87
93
|
count: count,
|
88
94
|
css_list_klass: css_list_klass,
|
89
95
|
css_item_klass: css_item_klass,
|
90
|
-
thumb_size: thumb_size
|
96
|
+
thumb_size: thumb_size,
|
97
|
+
section_title: section_title
|
91
98
|
}
|
92
99
|
|
93
100
|
end
|
@@ -101,7 +108,8 @@ module C80AlbumGallery
|
|
101
108
|
def render_gallery_list( css_list_klass='style_1',
|
102
109
|
css_item_klass='col-lg-4 col-md-4 col-sm-6 col-xs-6',
|
103
110
|
thumb_size='thumb_md',
|
104
|
-
is_grayscaled=false
|
111
|
+
is_grayscaled=false,
|
112
|
+
section_title=nil)
|
105
113
|
|
106
114
|
partial_name = 'c80_album_gallery/gallery_list'
|
107
115
|
if is_grayscaled
|
@@ -123,7 +131,8 @@ module C80AlbumGallery
|
|
123
131
|
css_item_klass: css_item_klass,
|
124
132
|
thumb_size: thumb_size,
|
125
133
|
w_style: w_style,
|
126
|
-
h_style: h_style
|
134
|
+
h_style: h_style,
|
135
|
+
section_title: section_title
|
127
136
|
}
|
128
137
|
|
129
138
|
end
|
@@ -1,5 +1,9 @@
|
|
1
1
|
<div class="gallery_list_slots <%= css_list_klass %> clearfix">
|
2
2
|
|
3
|
+
<% if section_title.present? %>
|
4
|
+
<h3 class="section_title h3_for_gallery_list_slots"><%= section_title %></h3>
|
5
|
+
<% end %>
|
6
|
+
|
3
7
|
<% count.times do |i| %>
|
4
8
|
<% gallery = list[i] %>
|
5
9
|
<% title = gallery.title %>
|
@@ -1,5 +1,9 @@
|
|
1
1
|
<div class="gallery_list <%= css_list_klass %> clearfix">
|
2
2
|
|
3
|
+
<% if section_title.present? %>
|
4
|
+
<h3 class="section_title h3_for_gallery_list"><%= section_title %></h3>
|
5
|
+
<% end %>
|
6
|
+
|
3
7
|
<% list.each_with_index do |gallery,i| %>
|
4
8
|
<% title = gallery.title %>
|
5
9
|
<% image = nil %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_album_gallery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|