iquest-simple_table 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iquest/simple_table/table_builder.rb +11 -6
- data/lib/iquest/simple_table/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65c81c5dadeaf52ded02413640c73a9fca8e6b5d
|
4
|
+
data.tar.gz: 39753d23cb42fdfdce886bf17aa761f17889b3da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0749e3f512ab491bae1cd0db18f0c0abcf839827e7171ba54f9fbfa7783be5b9abc019bea0892adbe2386d149050a83ed9eeb2e17fa14116994a9d7568e4e776
|
7
|
+
data.tar.gz: f82bc1233f8fab071a4fa74e76b2f42eeb9548df376cdbe5bf3dd3745cbd5fcab4a5dc34603b24955e547c6fe47bdf3aaafea6857dce874cd54df8afa97d268b
|
@@ -74,9 +74,13 @@ module Iquest
|
|
74
74
|
|
75
75
|
def to_s
|
76
76
|
if @search
|
77
|
-
|
77
|
+
content_tag :div, '', class: 'filter-table-block' do
|
78
|
+
render_table_with_search
|
79
|
+
end
|
78
80
|
else
|
79
|
-
|
81
|
+
content_tag :div, '', class: 'filter-table-block' do
|
82
|
+
render_table_without_search
|
83
|
+
end
|
80
84
|
end
|
81
85
|
end
|
82
86
|
|
@@ -86,13 +90,15 @@ module Iquest
|
|
86
90
|
render_table_header + render_table_body + render_table_footer
|
87
91
|
end
|
88
92
|
|
89
|
-
if @options[:responsive]
|
93
|
+
out = if @options[:responsive]
|
90
94
|
content_tag :div, class: 'table-responsive' do
|
91
95
|
table
|
92
96
|
end
|
93
97
|
else
|
94
98
|
table
|
95
99
|
end
|
100
|
+
|
101
|
+
out + render_pagination + render_footer_actions
|
96
102
|
end
|
97
103
|
|
98
104
|
include RansackSimpleForm::FormHelper
|
@@ -255,20 +261,19 @@ module Iquest
|
|
255
261
|
def render_table_footer
|
256
262
|
content_tag :tfoot, class: '' do
|
257
263
|
content_tag :tr, class: '' do
|
258
|
-
render_pagination + render_footer_actions
|
259
264
|
end
|
260
265
|
end
|
261
266
|
end
|
262
267
|
|
263
268
|
def render_pagination
|
264
|
-
content_tag :
|
269
|
+
content_tag :div, '', class: 'paginate-block' do
|
265
270
|
paginate @collection if @collection.respond_to?(:current_page)
|
266
271
|
end
|
267
272
|
|
268
273
|
end
|
269
274
|
|
270
275
|
def render_footer_actions
|
271
|
-
content_tag :
|
276
|
+
content_tag :div, '', class: 'totals-block' do
|
272
277
|
page_entries_info @collection, entry_name: @klass.model_name.human if @collection.respond_to?(:current_page)
|
273
278
|
end
|
274
279
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iquest-simple_table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Dusanek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ransack_simple_form
|