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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75432066a1237861541f816f3174ee43fb13f7942cb71ad418a1dc16ed6ae728
4
- data.tar.gz: f98c2b0602c4892cad8d7e3212e2a7029f89bd52ecd999cbce3dd4ac9134c463
3
+ metadata.gz: af2549f2ba32f64fc74a0ae241dd5ff3e5f426f36f5af01680de3f14adcd6c3b
4
+ data.tar.gz: ec2bebf9c1c4c7f6b94e9f655960e186908d01f4b5f2d35de995c299f52c5d5d
5
5
  SHA512:
6
- metadata.gz: 2e13c8c9ad9b760eb94d5d7b6daf609eb49a1b8bd44bb2838b10fca2c934d4c9205f4c5c689606f1050725e06875bbfa7af5214d1d5f88ab76aaa625d475de91
7
- data.tar.gz: 5ff1e5556366fc7d276ba52d04ee2d434fa48a2eb20aa1923a51777b4ccb54f4d60ae351684b721cb853df4f6e38e542861319e0539227fd3c8662f35dae3949
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.end_with?('price') ? price_field(name) : text_field(name)
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(:td, label_content) + content_tag(:td, content.presence || '-')
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('YES')
17
+ template.badge('Yes', class: 'badge badge-primary mr-2')
10
18
  else
11
- template.badge('NO', class: 'badge badge-light')
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(:td, label_content) + content_tag(:td, template.capture(&block))
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
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '1.14.15'.freeze
2
+ VERSION = '1.14.17'.freeze
3
3
  end
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.15
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-08-25 00:00:00.000000000 Z
11
+ date: 2023-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails