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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b583f66f6d1a4bb7cbb97779f5328740b08b1c1f
4
- data.tar.gz: bbe3c4203d1b0ff0cdf5cc5b486b7513432953ca
3
+ metadata.gz: 412308032fd3d102aba96d6431d8995449047551
4
+ data.tar.gz: 5aa22abc05bbbf39fdbe504b6f92e1eed5b55f4e
5
5
  SHA512:
6
- metadata.gz: 7cc537b958cf168a041b967bde69d3453a277301f026f50695ee99baa3a1e7c565288ab1356c6b09f1e955cc5a0418525d59c742803356509d79d536140ec57d
7
- data.tar.gz: f8e1f99e6f71b1e9476d9efe6166e028aa465a29148cd205e82170d4d772ac4e4aa6a85334575a14c7577eb9447ced2ea56bb26205e2d98c5263b0e71f8bf42c
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(:td) do
66
- if attachment.image?
67
- content_tag(:img, '', class: '', src: url, alt: attachment.filename.to_s)
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, link_to(attachment.filename, url)) +
72
- content_tag(:td, (attachment.content_type + '<br>' + @template.number_to_human_size(attachment.byte_size)).html_safe) +
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
- content = if attachment.image?
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect