effective_bootstrap 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/form_inputs/file_field.rb +7 -14
- data/lib/effective_bootstrap/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 412308032fd3d102aba96d6431d8995449047551
|
4
|
+
data.tar.gz: 5aa22abc05bbbf39fdbe504b6f92e1eed5b55f4e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3164c1721ab82d59d409440d53782d770f4f4071feccf43c7c7453f6d9a292b9dd961f4d3b5c9d6a6d6f1b16d494b58d5695d466ef2f2b15ea7a1727879d7bb5
|
7
|
+
data.tar.gz: 28e4cce1f0fea0ec4da9b40c44be94b7bf3d90ccfe609c4d64ef684eb58227bd81ff2f9eb5fbb905f83534ef652e824e32bc7ad3e005444573b0915da9d724c8
|
@@ -62,24 +62,17 @@ module Effective
|
|
62
62
|
url = (@template.url_for(attachment) rescue false)
|
63
63
|
return unless url
|
64
64
|
|
65
|
-
content_tag(:
|
66
|
-
|
67
|
-
|
68
|
-
end
|
69
|
-
end +
|
65
|
+
image_tag = content_tag(:img, '', class: '', src: url, alt: attachment.filename.to_s) if attachment.image?
|
66
|
+
link_tag = link_to(attachment.filename, url)
|
67
|
+
size_tag = (attachment.content_type + '<br>' + @template.number_to_human_size(attachment.byte_size)).html_safe
|
70
68
|
|
71
|
-
content_tag(:td,
|
72
|
-
content_tag(:td,
|
69
|
+
content_tag(:td, image_tag) +
|
70
|
+
content_tag(:td, link_tag) +
|
71
|
+
content_tag(:td, size_tag) +
|
73
72
|
|
74
73
|
content_tag(:td) do
|
75
74
|
if attachments_style == :ck_assets
|
76
|
-
|
77
|
-
content_tag(:img, '', class: '', src: url, alt: attachment.filename.to_s)
|
78
|
-
else
|
79
|
-
link_to(attachment.filename, url)
|
80
|
-
end
|
81
|
-
|
82
|
-
link_to('Attach', url, class: 'btn btn-primary', 'data-effective-file-insert-ck-asset': true, 'data-asset': content, 'data-asset-id': 3)
|
75
|
+
link_to('Attach', url, class: 'btn btn-primary', 'data-insert-ck-asset': true, alt: attachment.filename.to_s)
|
83
76
|
end
|
84
77
|
end
|
85
78
|
end
|