effective_bootstrap 1.14.15 → 1.14.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/effective_bootstrap/overrides.scss +1 -1
- data/app/models/effective/table_builder.rb +2 -2
- data/app/models/effective/table_row.rb +6 -2
- data/app/models/effective/table_rows/boolean.rb +10 -2
- data/app/models/effective/table_rows/content_for.rb +2 -2
- data/lib/effective_bootstrap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af2549f2ba32f64fc74a0ae241dd5ff3e5f426f36f5af01680de3f14adcd6c3b
|
4
|
+
data.tar.gz: ec2bebf9c1c4c7f6b94e9f655960e186908d01f4b5f2d35de995c299f52c5d5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09b9c54ade1926de6b3643665d375ef2490c0b2bee23415b719f98fae8aed04d414bc499f569d95c3aade9f6639c5f7783f6ffba619afa4136f8cde2ec0e45a9'
|
7
|
+
data.tar.gz: d2b3953a4470819ad35324b503b29046635c84ba736f9d11808ef172ccc2f8791366510f411050a3e03403f6d1252e88de2e4c53f6a24e7bac1f2b16bfc8863f
|
@@ -11,4 +11,4 @@ ul.nav.nav-tabs { margin-bottom: 1rem; }
|
|
11
11
|
// cursor on disabled radios
|
12
12
|
.custom-control-input:disabled ~ .custom-control-label { cursor: no-drop; }
|
13
13
|
.custom-control-input:disabled ~ .custom-control-label::after { cursor: no-drop; }
|
14
|
-
.custom-control-input:disabled ~ .custom-control-label::before { cursor: no-drop; }
|
14
|
+
.custom-control-input:disabled ~ .custom-control-label::before { cursor: no-drop; }
|
@@ -40,7 +40,7 @@ module Effective
|
|
40
40
|
content = content.except(*except) if except.present?
|
41
41
|
content = content.except(*filtered) if filtered.present?
|
42
42
|
|
43
|
-
content_tag(:table, class: options.fetch(:class, 'table table-striped table-hover')) do
|
43
|
+
content_tag(:table, class: options.fetch(:class, 'table table-sm table-striped table-hover effective-table-summary')) do
|
44
44
|
content_tag(:tbody, content.values.join.html_safe)
|
45
45
|
end
|
46
46
|
end
|
@@ -64,7 +64,7 @@ module Effective
|
|
64
64
|
when :boolean
|
65
65
|
boolean_row(name)
|
66
66
|
when :integer
|
67
|
-
name.to_s.
|
67
|
+
['price', 'discount', '_fee'].any? { |p| name.to_s.include?(p) } ? price_field(name) : text_field(name)
|
68
68
|
when :string
|
69
69
|
name.to_s.include?('email') ? email_field(name) : text_field(name)
|
70
70
|
when :text
|
@@ -25,10 +25,14 @@ module Effective
|
|
25
25
|
value
|
26
26
|
end
|
27
27
|
|
28
|
+
def tr_class
|
29
|
+
"row-#{name}" # This matches datatables which is "col-#{name}"
|
30
|
+
end
|
31
|
+
|
28
32
|
# Render method
|
29
33
|
def to_html(&block)
|
30
|
-
content_tag(:tr) do
|
31
|
-
content_tag(:
|
34
|
+
content_tag(:tr, class: tr_class) do
|
35
|
+
content_tag(:th, label_content) + content_tag(:td, content.presence || '-')
|
32
36
|
end
|
33
37
|
end
|
34
38
|
|
@@ -4,11 +4,19 @@ module Effective
|
|
4
4
|
module TableRows
|
5
5
|
class Boolean < Effective::TableRow
|
6
6
|
|
7
|
+
def to_html(&block)
|
8
|
+
content_tag(:tr, class: tr_class) do
|
9
|
+
content_tag(:td, colspan: 2) do
|
10
|
+
content_tag(:span, content.presence || '-') + label_content
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
7
15
|
def content
|
8
16
|
if value
|
9
|
-
template.badge('
|
17
|
+
template.badge('Yes', class: 'badge badge-primary mr-2')
|
10
18
|
else
|
11
|
-
template.badge('
|
19
|
+
template.badge('No', class: 'badge badge-secondary mr-2')
|
12
20
|
end
|
13
21
|
end
|
14
22
|
|
@@ -5,8 +5,8 @@ module Effective
|
|
5
5
|
class ContentFor < Effective::TableRow
|
6
6
|
|
7
7
|
def to_html(&block)
|
8
|
-
content_tag(:tr) do
|
9
|
-
content_tag(:
|
8
|
+
content_tag(:tr, class: tr_class) do
|
9
|
+
content_tag(:th, label_content) + content_tag(:td, template.capture(&block))
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|