ct_table_for 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/app/helpers/ct_table_for/application_helper.rb +2 -2
- data/lib/ct_table_for/engine.rb +2 -0
- data/lib/ct_table_for/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: 35f88964e733b7e5d6a5c549a266c35cefd54971fe00937114f6cd70b8cd3dc0
|
|
4
|
+
data.tar.gz: 1e941e3020dfd09e63a0f8d7d776f6bbe8b4556ec96b568d62d258a724608028
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ed74339d7b949db47cfdf9645910924063e44597745413c835d1f02b6f679532a679e882cd06484ce56a9182a44c6691fe9529c78305bb4af76942e15692ee7
|
|
7
|
+
data.tar.gz: 7c2c694adff037159c3e643bc49581fff62ce7ae052b250acc345f77570ef8776f7053f1049d61c59082cce0ffb41368329a28361961770edb5272a85d7a1995
|
data/README.md
CHANGED
|
@@ -84,6 +84,7 @@ CtTableFor.setup do |config|
|
|
|
84
84
|
config.table_for_truncate_length = 50
|
|
85
85
|
config.table_for_truncate_separator = " "
|
|
86
86
|
config.table_for_truncate_omission = "..."
|
|
87
|
+
config.table_for_td_default_prefix_class = "td-item"
|
|
87
88
|
end
|
|
88
89
|
```
|
|
89
90
|
You can also define the breakpoint in your `sass` before importing `table_for`:
|
|
@@ -110,7 +110,7 @@ module CtTableFor
|
|
|
110
110
|
nil
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
html << %Q{<td data-title="#{model.human_attribute_name("#{attribute}")}">}
|
|
113
|
+
html << %Q{<td data-title="#{model.human_attribute_name("#{attribute}")}" class="#{CtTableFor.table_for_td_default_prefix_class}-#{attribute}">}
|
|
114
114
|
case value
|
|
115
115
|
when NilClass
|
|
116
116
|
html << %Q{<i class="fa fa-minus text-muted"></i>}
|
|
@@ -179,7 +179,7 @@ module CtTableFor
|
|
|
179
179
|
def table_for_actions(record, options: {} )
|
|
180
180
|
return "" if options[:actions].blank?
|
|
181
181
|
html = ""
|
|
182
|
-
html << %Q{<td data-link-enabled="false">}
|
|
182
|
+
html << %Q{<td data-link-enabled="false" class="#{CtTableFor.table_for_td_default_prefix_class}-actions">}
|
|
183
183
|
html << %Q{<div class="btn-group btn-group-sm" role="group" aria-label="#{I18n.t(:actions, scope: [:table_for]).capitalize}">}
|
|
184
184
|
nesting = (options[:actions][:premodel] || []) + [record]
|
|
185
185
|
buttons = options[:actions][:buttons].map{ |b| b.split("|")}
|
data/lib/ct_table_for/engine.rb
CHANGED
|
@@ -12,6 +12,7 @@ module CtTableFor
|
|
|
12
12
|
mattr_accessor :table_for_truncate_length
|
|
13
13
|
mattr_accessor :table_for_truncate_separator
|
|
14
14
|
mattr_accessor :table_for_truncate_omission
|
|
15
|
+
mattr_accessor :table_for_td_default_prefix_class
|
|
15
16
|
|
|
16
17
|
self.table_for_wrapper_default_class = "table-responsive"
|
|
17
18
|
self.table_for_default_class = "table table-striped table-bordered table-condensed table-hover"
|
|
@@ -25,6 +26,7 @@ module CtTableFor
|
|
|
25
26
|
self.table_for_truncate_length = 50
|
|
26
27
|
self.table_for_truncate_separator = " "
|
|
27
28
|
self.table_for_truncate_omission = "..."
|
|
29
|
+
self.table_for_td_default_prefix_class = "td-item"
|
|
28
30
|
end
|
|
29
31
|
|
|
30
32
|
# this function maps the vars from your app into your engine
|
data/lib/ct_table_for/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ct_table_for
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Agustí B.R.
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2019-
|
|
13
|
+
date: 2019-09-26 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|