effective_bootstrap 1.14.15 → 1.14.16

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: 971258b7b4cd24b4e66eee2ad49d34fbc8410eccf69292d8a07a449729897262
4
+ data.tar.gz: 9c0c7ae82c414877381c712fb243ebb215fba1cc8eac38d53b43a6823d3a1ee6
5
5
  SHA512:
6
- metadata.gz: 2e13c8c9ad9b760eb94d5d7b6daf609eb49a1b8bd44bb2838b10fca2c934d4c9205f4c5c689606f1050725e06875bbfa7af5214d1d5f88ab76aaa625d475de91
7
- data.tar.gz: 5ff1e5556366fc7d276ba52d04ee2d434fa48a2eb20aa1923a51777b4ccb54f4d60ae351684b721cb853df4f6e38e542861319e0539227fd3c8662f35dae3949
6
+ metadata.gz: 4281a1cbb4bfe79f8463aef11e03b0b280cbb72c2b5f38277efcac3a2295a8b3e7ffc3a4067ce812c888fe5a7d2f1616b74f3e9dad1b4658f27dcc2bae0c317a
7
+ data.tar.gz: f5f68d26b0c28ff2f213e7b9fc0dfbf224d2ffd12c678ee2433570973cebe7a128d26362aea3fb67a51052d131937a802399cf231ea28478450340e05d9a5f2f
@@ -11,4 +11,6 @@ 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; }
15
+
16
+ .effective-table-summary th { width: 200px; }
@@ -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
@@ -27,8 +27,8 @@ module Effective
27
27
 
28
28
  # Render method
29
29
  def to_html(&block)
30
- content_tag(:tr) do
31
- content_tag(:td, label_content) + content_tag(:td, content.presence || '-')
30
+ content_tag(:tr, class: "effective-table-summary-#{label_content.parameterize}") do
31
+ content_tag(:th, label_content) + content_tag(:td, content.presence || '-')
32
32
  end
33
33
  end
34
34
 
@@ -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: "effective-table-summary-#{label_content.parameterize}") 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: "effective-table-summary-#{label_content.parameterize}") 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.16'.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.16
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-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails