inline_forms 3.0.20 → 3.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MGUzZjFmYzQ3YjVkODljN2ZmNzJlZmUyYjYwMjVkZjgxODBjNTQ5ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTI2MGQwMzEzZWNmN2E4ODJiNTlmM2JhZjE0NjcxNWVhZWE5OTYyYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjFiMjMwNDUxOTFjZGM1NWVmNmQ0MTQxMmNiZGFhZjExMzRhZTdlZjA2YTBl
|
10
|
+
ZWY0ZWU5OTIzMmFmZmY3ZmY0YzI1NmEwOGRjZWE1YThiY2E3YmUzYjliYTBh
|
11
|
+
ZjI2NDM2Y2UxYTM2YWQzNjQ2ZTJhZmIzMmJkM2ZiNmUyMGY1ODQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MmM5NmRhOGMyZmQ5YjBhYmIxZjEwZWYwMzcwMDg2MjRmYzkyMDA5MDk5YmVk
|
14
|
+
NjFmODU4OTE5MGNiMTc3ZGFlYmMxOThmNDUxY2I5MjgyMjQ0MzA5OGI4MDky
|
15
|
+
MjhjZmMwMzgwMDQyOTYzM2JjY2IxOTMyYjI1ZGI2YTRiNzJhMmM=
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# not needed here, since this is only used in the views InlineForms::SPECIAL_COLUMN_TYPES[:info]=:string
|
3
|
+
|
4
|
+
# this will NOT stay in inline_forms, it belongs in an app.
|
5
|
+
|
6
|
+
def chicas_family_photo_list_show(object, attribute)
|
7
|
+
# the attribute should be like members_photos
|
8
|
+
# then it will look for object.family.members.photos
|
9
|
+
# I know it's crappy.
|
10
|
+
members, photos = attribute.to_s.split('_')
|
11
|
+
photo_list = {}
|
12
|
+
object.family.send(members).each do |member|
|
13
|
+
member.send(photos).each do |photo|
|
14
|
+
photo_list[photo.rating] ||= []
|
15
|
+
photo_list[photo.rating] << photo
|
16
|
+
end
|
17
|
+
end
|
18
|
+
out = ''
|
19
|
+
if photo_list.empty?
|
20
|
+
out = "<div class='row #{cycle('odd', 'even')}'>no photos</div>"
|
21
|
+
else
|
22
|
+
out << "<div class='row #{cycle('odd', 'even')}'>"
|
23
|
+
photo_list.sort.reverse.each do |rating, photos|
|
24
|
+
photos.each do |photo|
|
25
|
+
out << image_tag(photo.image.url(:thumb),
|
26
|
+
onclick: "this.src='#{photo.image.url(:palm)}'",
|
27
|
+
onmouseout: "this.src='#{photo.image.url(:thumb)}'")
|
28
|
+
end
|
29
|
+
end
|
30
|
+
out << '</div>'
|
31
|
+
end
|
32
|
+
out.html_safe
|
33
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# not needed here, since this is only used in the views InlineForms::SPECIAL_COLUMN_TYPES[:info]=:string
|
3
|
+
|
4
|
+
# this will NOT stay in inline_forms, it belongs in an app.
|
5
|
+
|
6
|
+
def chicas_photo_list_show(object, attribute)
|
7
|
+
# the attribute should be like members_photos
|
8
|
+
# then it will look for object.members.photos
|
9
|
+
# I know it's crappy.
|
10
|
+
members, photos = attribute.to_s.split('_')
|
11
|
+
photo_list = {}
|
12
|
+
object.send(members).each do |member|
|
13
|
+
member.send(photos).each do |photo|
|
14
|
+
photo_list[photo.rating] ||= []
|
15
|
+
photo_list[photo.rating] << photo
|
16
|
+
end
|
17
|
+
end
|
18
|
+
out = ''
|
19
|
+
if photo_list.empty?
|
20
|
+
out = "<div class='row #{cycle('odd', 'even')}'>no photos</div>"
|
21
|
+
else
|
22
|
+
out << "<div class='row #{cycle('odd', 'even')}'>"
|
23
|
+
photo_list.sort.reverse.each do |rating, photos|
|
24
|
+
photos.each do |photo|
|
25
|
+
out << image_tag(photo.image.url(:thumb), onclick: "this.src='#{photo.image.url(:palm)}'", onmouseout: "this.src='#{photo.image.url(:thumb)}'")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
out << '</div>'
|
29
|
+
end
|
30
|
+
out.html_safe
|
31
|
+
end
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ace Suares
|
@@ -186,6 +186,8 @@ files:
|
|
186
186
|
- lib/app/controllers/inline_forms_controller.rb
|
187
187
|
- lib/app/helpers/form_elements/check_box.rb
|
188
188
|
- lib/app/helpers/form_elements/check_list.rb
|
189
|
+
- lib/app/helpers/form_elements/chicas_family_photo_list.rb
|
190
|
+
- lib/app/helpers/form_elements/chicas_photo_list.rb
|
189
191
|
- lib/app/helpers/form_elements/date.rb
|
190
192
|
- lib/app/helpers/form_elements/decimal_field.rb
|
191
193
|
- lib/app/helpers/form_elements/devise_password_field.rb
|