paginated_table 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/paginated_table/column_description.rb +46 -0
- data/lib/paginated_table/data_page.rb +20 -0
- data/lib/paginated_table/link_renderer.rb +34 -0
- data/lib/paginated_table/page_params.rb +22 -0
- data/lib/paginated_table/row_description.rb +36 -0
- data/lib/paginated_table/table_description.rb +41 -0
- data/lib/paginated_table/table_renderer.rb +113 -0
- data/lib/paginated_table/version.rb +1 -1
- data/test/dummy/log/test.log +358 -0
- metadata +10 -3
@@ -0,0 +1,46 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class ColumnDescription
|
3
|
+
attr_reader :name
|
4
|
+
|
5
|
+
def initialize(row, name, options = {}, &block)
|
6
|
+
@row = row
|
7
|
+
@name = name
|
8
|
+
@block = block
|
9
|
+
@options = options
|
10
|
+
end
|
11
|
+
|
12
|
+
def render_header
|
13
|
+
@options.fetch(:title, @name.to_s.titleize)
|
14
|
+
end
|
15
|
+
|
16
|
+
def render_cell(datum)
|
17
|
+
if @block
|
18
|
+
@block.call(datum)
|
19
|
+
else
|
20
|
+
datum.send(@name)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def sortable?
|
25
|
+
@options.fetch(:sortable, true)
|
26
|
+
end
|
27
|
+
|
28
|
+
def span
|
29
|
+
@options.fetch(:span, false)
|
30
|
+
end
|
31
|
+
|
32
|
+
def html_attributes
|
33
|
+
html_attributes = {}
|
34
|
+
if @options[:class]
|
35
|
+
html_attributes[:class] = Array(@options[:class]).join(' ')
|
36
|
+
end
|
37
|
+
if @options[:style]
|
38
|
+
html_attributes[:style] = @options[:style]
|
39
|
+
end
|
40
|
+
if span
|
41
|
+
html_attributes[:colspan] = @row.colspan(span)
|
42
|
+
end
|
43
|
+
html_attributes
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class DataPage
|
3
|
+
attr_reader :page, :data
|
4
|
+
|
5
|
+
def initialize(collection, page)
|
6
|
+
@page = page
|
7
|
+
@data = collection.order(order_clause).paginate(pagination_params)
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def order_clause
|
13
|
+
"#{@page.sort_column} #{@page.sort_direction}"
|
14
|
+
end
|
15
|
+
|
16
|
+
def pagination_params
|
17
|
+
{ :page => @page.number, :per_page => @page.rows }
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class LinkRenderer < WillPaginate::ActionView::LinkRenderer
|
3
|
+
def initialize(page)
|
4
|
+
super()
|
5
|
+
@paginated_table_page = page
|
6
|
+
end
|
7
|
+
|
8
|
+
def sort_link(text, sort_on)
|
9
|
+
@template.link_to(text, sort_url(sort_on), :remote => true)
|
10
|
+
end
|
11
|
+
|
12
|
+
def tag(name, value, attributes = {})
|
13
|
+
if name == :a
|
14
|
+
@template.link_to(value.to_s.html_safe, attributes.delete(:href), attributes.merge(:remote => true))
|
15
|
+
else
|
16
|
+
super
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def sort_url(sort_on)
|
23
|
+
new_page = @paginated_table_page.page_for_sort_column(sort_on)
|
24
|
+
new_page_params = PageParams.to_params(new_page)
|
25
|
+
params = merge_get_params({})
|
26
|
+
symbolized_update(params, new_page_params)
|
27
|
+
@template.url_for(params)
|
28
|
+
end
|
29
|
+
|
30
|
+
def default_url_params
|
31
|
+
PageParams.to_params(@paginated_table_page)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class PageParams
|
3
|
+
def self.create_page(request_params, defaults = {})
|
4
|
+
params = request_params.reverse_merge(defaults)
|
5
|
+
Page.new(
|
6
|
+
:number => params[:page],
|
7
|
+
:rows => params[:per_page],
|
8
|
+
:sort_column => params[:sort_column],
|
9
|
+
:sort_direction => params[:sort_direction]
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.to_params(page)
|
14
|
+
{
|
15
|
+
:page => page.number.to_s,
|
16
|
+
:per_page => page.rows.to_s,
|
17
|
+
:sort_column => page.sort_column,
|
18
|
+
:sort_direction => page.sort_direction
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class RowDescription
|
3
|
+
attr_reader :columns
|
4
|
+
|
5
|
+
def initialize(table, options, description_proc)
|
6
|
+
@table = table
|
7
|
+
@options = options
|
8
|
+
@columns = []
|
9
|
+
description_proc.call(self) if description_proc
|
10
|
+
end
|
11
|
+
|
12
|
+
def title
|
13
|
+
@options.fetch(:title, :header)
|
14
|
+
end
|
15
|
+
|
16
|
+
def cycle
|
17
|
+
@options.fetch(:cycle, %w(odd even))
|
18
|
+
end
|
19
|
+
|
20
|
+
def hidden
|
21
|
+
@options.fetch(:hidden, false)
|
22
|
+
end
|
23
|
+
|
24
|
+
def data_type
|
25
|
+
@options.fetch(:data_type, false)
|
26
|
+
end
|
27
|
+
|
28
|
+
def column(*args, &block)
|
29
|
+
@columns << ColumnDescription.new(self, *args, &block)
|
30
|
+
end
|
31
|
+
|
32
|
+
def colspan(span)
|
33
|
+
@table.colspan(span)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class TableDescription
|
3
|
+
attr_reader :columns, :rows
|
4
|
+
|
5
|
+
def initialize(description_proc = nil)
|
6
|
+
@columns = []
|
7
|
+
@rows = []
|
8
|
+
description_proc.call(self) if description_proc
|
9
|
+
end
|
10
|
+
|
11
|
+
def row(options = {}, &block)
|
12
|
+
@explicit_rows = true
|
13
|
+
create_row(options, block)
|
14
|
+
end
|
15
|
+
|
16
|
+
def column(*args, &block)
|
17
|
+
raise Invalid if @explicit_rows
|
18
|
+
default_row.column(*args, &block)
|
19
|
+
end
|
20
|
+
|
21
|
+
def colspan(span)
|
22
|
+
raise ArgumentError unless span == :all
|
23
|
+
rows.map { |row| row.columns.length }.max.to_s
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def default_row
|
29
|
+
@default_row ||= create_row
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_row(options = {}, block = nil)
|
33
|
+
row = RowDescription.new(self, options, block)
|
34
|
+
@rows << row
|
35
|
+
row
|
36
|
+
end
|
37
|
+
|
38
|
+
class Invalid < StandardError
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,113 @@
|
|
1
|
+
module PaginatedTable
|
2
|
+
class TableRenderer
|
3
|
+
def initialize(view, description, data_page, link_renderer)
|
4
|
+
@view = view
|
5
|
+
@description = description
|
6
|
+
@data_page = data_page
|
7
|
+
@link_renderer = link_renderer
|
8
|
+
end
|
9
|
+
|
10
|
+
def render
|
11
|
+
pagination_area = render_pagination_area
|
12
|
+
content = pagination_area + render_table + pagination_area
|
13
|
+
@view.content_tag('div', content, :class => 'paginated_table')
|
14
|
+
end
|
15
|
+
|
16
|
+
def render_pagination_area
|
17
|
+
content = render_pagination_info + render_pagination_links
|
18
|
+
@view.content_tag('div', content, :class => 'header')
|
19
|
+
end
|
20
|
+
|
21
|
+
def render_pagination_info
|
22
|
+
content = @view.page_entries_info(@data_page.data)
|
23
|
+
@view.content_tag('div', content, :class => 'info')
|
24
|
+
end
|
25
|
+
|
26
|
+
def render_pagination_links
|
27
|
+
content = @view.will_paginate(@data_page.data, :renderer => @link_renderer)
|
28
|
+
@view.content_tag('div', content, :class => 'links')
|
29
|
+
end
|
30
|
+
|
31
|
+
def render_table
|
32
|
+
content = render_table_header + render_table_body
|
33
|
+
@view.content_tag('table', content, :class => 'paginated')
|
34
|
+
end
|
35
|
+
|
36
|
+
def render_table_header
|
37
|
+
@view.content_tag('thead', render_table_header_rows)
|
38
|
+
end
|
39
|
+
|
40
|
+
def render_table_header_rows
|
41
|
+
@description.rows.select { |row|
|
42
|
+
row.title == :header
|
43
|
+
}.map { |row|
|
44
|
+
render_table_header_row(row)
|
45
|
+
}.reduce(&:+)
|
46
|
+
end
|
47
|
+
|
48
|
+
def render_table_header_row(row)
|
49
|
+
content = row.columns.map { |column|
|
50
|
+
render_table_header_column(column)
|
51
|
+
}.reduce(&:+)
|
52
|
+
@view.content_tag('tr', content)
|
53
|
+
end
|
54
|
+
|
55
|
+
def render_table_header_column(column)
|
56
|
+
css = []
|
57
|
+
if column.sortable?
|
58
|
+
css << 'sortable'
|
59
|
+
end
|
60
|
+
if @data_page.page.sort_column == column.name.to_s
|
61
|
+
css << "sorted_#{@data_page.page.sort_direction}"
|
62
|
+
end
|
63
|
+
attributes = {}
|
64
|
+
attributes[:class] = css.join(' ') unless css.empty?
|
65
|
+
@view.content_tag('th', render_table_header_column_content(column), attributes)
|
66
|
+
end
|
67
|
+
|
68
|
+
def render_table_header_column_content(column)
|
69
|
+
text = column.render_header
|
70
|
+
if column.sortable?
|
71
|
+
@link_renderer.sort_link(text, column.name.to_s)
|
72
|
+
else
|
73
|
+
text
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
def render_table_body
|
78
|
+
content = @data_page.data.map { |datum|
|
79
|
+
render_table_body_rows(datum)
|
80
|
+
}.reduce(&:+)
|
81
|
+
@view.content_tag('tbody', content)
|
82
|
+
end
|
83
|
+
|
84
|
+
def render_table_body_rows(datum)
|
85
|
+
@description.rows.map { |row|
|
86
|
+
render_table_body_row(row, datum)
|
87
|
+
}.reduce(&:+)
|
88
|
+
end
|
89
|
+
|
90
|
+
def render_table_body_row(row, datum)
|
91
|
+
content = row.columns.map { |column|
|
92
|
+
render_table_body_cell(datum, column)
|
93
|
+
}.reduce(&:+)
|
94
|
+
options = {}
|
95
|
+
if row.cycle
|
96
|
+
options[:class] = @view.cycle(*row.cycle)
|
97
|
+
end
|
98
|
+
if row.hidden
|
99
|
+
options[:style] = 'display: none'
|
100
|
+
end
|
101
|
+
if row.data_type
|
102
|
+
options[:"data-type"] = row.data_type
|
103
|
+
end
|
104
|
+
dom_id = @view.dom_id(datum)
|
105
|
+
options[:"data-datum-id"] = dom_id
|
106
|
+
@view.content_tag('tr', content, options)
|
107
|
+
end
|
108
|
+
|
109
|
+
def render_table_body_cell(datum, column)
|
110
|
+
@view.content_tag('td', column.render_cell(datum), column.html_attributes)
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
data/test/dummy/log/test.log
CHANGED
@@ -99366,3 +99366,361 @@ Processing by DataController#index as HTML
|
|
99366
99366
|
Rendered data/_data.html.erb (7.1ms)
|
99367
99367
|
Rendered data/index.html.erb within layouts/application (7.3ms)
|
99368
99368
|
Completed 200 OK in 9ms (Views: 8.4ms)
|
99369
|
+
|
99370
|
+
|
99371
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:56 -0400 2012
|
99372
|
+
Processing by DataController#index as HTML
|
99373
|
+
Rendered data/_data.html.erb (19.3ms)
|
99374
|
+
Rendered data/index.html.erb within layouts/application (23.2ms)
|
99375
|
+
Completed 200 OK in 31ms (Views: 30.4ms)
|
99376
|
+
|
99377
|
+
|
99378
|
+
Started GET "/assets/application.css" for 127.0.0.1 at Mon May 14 13:45:56 -0400 2012
|
99379
|
+
Served asset /application.css - 200 OK (3ms)
|
99380
|
+
|
99381
|
+
|
99382
|
+
Started GET "/assets/application.js" for 127.0.0.1 at Mon May 14 13:45:56 -0400 2012
|
99383
|
+
Served asset /application.js - 200 OK (6ms)
|
99384
|
+
|
99385
|
+
|
99386
|
+
Started GET "/data?page=4&per_page=10&sort_column=id&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:45:56 -0400 2012
|
99387
|
+
Processing by DataController#index as JS
|
99388
|
+
Parameters: {"sort_column"=>"id", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"4"}
|
99389
|
+
Rendered data/_data.html.erb (7.8ms)
|
99390
|
+
Completed 200 OK in 11ms (Views: 10.3ms)
|
99391
|
+
|
99392
|
+
|
99393
|
+
Started GET "/data?page=3&per_page=10&sort_column=id&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99394
|
+
Processing by DataController#index as JS
|
99395
|
+
Parameters: {"sort_column"=>"id", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"3"}
|
99396
|
+
Rendered data/_data.html.erb (7.6ms)
|
99397
|
+
Completed 200 OK in 9ms (Views: 8.0ms)
|
99398
|
+
|
99399
|
+
|
99400
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99401
|
+
Processing by DataController#index as HTML
|
99402
|
+
Rendered data/_data.html.erb (7.8ms)
|
99403
|
+
Rendered data/index.html.erb within layouts/application (8.1ms)
|
99404
|
+
Completed 200 OK in 10ms (Views: 9.6ms)
|
99405
|
+
|
99406
|
+
|
99407
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99408
|
+
Processing by DataController#index as HTML
|
99409
|
+
Rendered data/_data.html.erb (8.0ms)
|
99410
|
+
Rendered data/index.html.erb within layouts/application (8.3ms)
|
99411
|
+
Completed 200 OK in 10ms (Views: 9.4ms)
|
99412
|
+
|
99413
|
+
|
99414
|
+
Started GET "/data?page=2&per_page=10&sort_column=id&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99415
|
+
Processing by DataController#index as JS
|
99416
|
+
Parameters: {"sort_column"=>"id", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"2"}
|
99417
|
+
Rendered data/_data.html.erb (8.2ms)
|
99418
|
+
Completed 200 OK in 9ms (Views: 8.7ms)
|
99419
|
+
|
99420
|
+
|
99421
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99422
|
+
Processing by DataController#index as HTML
|
99423
|
+
Rendered data/_data.html.erb (48.5ms)
|
99424
|
+
Rendered data/index.html.erb within layouts/application (48.8ms)
|
99425
|
+
Completed 200 OK in 50ms (Views: 49.9ms)
|
99426
|
+
|
99427
|
+
|
99428
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99429
|
+
Processing by DataController#index as HTML
|
99430
|
+
Rendered data/_data.html.erb (7.2ms)
|
99431
|
+
Rendered data/index.html.erb within layouts/application (7.5ms)
|
99432
|
+
Completed 200 OK in 9ms (Views: 8.6ms)
|
99433
|
+
|
99434
|
+
|
99435
|
+
Started GET "/data?sort_column=id&per_page=10&sort_direction=asc&page=2" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99436
|
+
Processing by DataController#index as HTML
|
99437
|
+
Parameters: {"sort_column"=>"id", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"2"}
|
99438
|
+
Rendered data/_data.html.erb (8.9ms)
|
99439
|
+
Rendered data/index.html.erb within layouts/application (9.1ms)
|
99440
|
+
Completed 200 OK in 11ms (Views: 10.2ms)
|
99441
|
+
|
99442
|
+
|
99443
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99444
|
+
Processing by DataController#index as HTML
|
99445
|
+
Rendered data/_data.html.erb (7.2ms)
|
99446
|
+
Rendered data/index.html.erb within layouts/application (7.6ms)
|
99447
|
+
Completed 200 OK in 9ms (Views: 8.7ms)
|
99448
|
+
|
99449
|
+
|
99450
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99451
|
+
Processing by DataController#index as HTML
|
99452
|
+
Rendered data/_data.html.erb (7.1ms)
|
99453
|
+
Rendered data/index.html.erb within layouts/application (7.4ms)
|
99454
|
+
Completed 200 OK in 9ms (Views: 8.5ms)
|
99455
|
+
|
99456
|
+
|
99457
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99458
|
+
Processing by DataController#index as HTML
|
99459
|
+
Rendered data/_data.html.erb (7.9ms)
|
99460
|
+
Rendered data/index.html.erb within layouts/application (8.1ms)
|
99461
|
+
Completed 200 OK in 10ms (Views: 9.2ms)
|
99462
|
+
|
99463
|
+
|
99464
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99465
|
+
Processing by DataController#index as HTML
|
99466
|
+
Rendered data/_data.html.erb (9.4ms)
|
99467
|
+
Rendered data/index.html.erb within layouts/application (9.6ms)
|
99468
|
+
Completed 200 OK in 12ms (Views: 10.7ms)
|
99469
|
+
|
99470
|
+
|
99471
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99472
|
+
Processing by DataController#index as HTML
|
99473
|
+
Rendered data/_data.html.erb (49.4ms)
|
99474
|
+
Rendered data/index.html.erb within layouts/application (49.7ms)
|
99475
|
+
Completed 200 OK in 51ms (Views: 50.8ms)
|
99476
|
+
|
99477
|
+
|
99478
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99479
|
+
Processing by DataController#index as HTML
|
99480
|
+
Rendered data/_data.html.erb (7.1ms)
|
99481
|
+
Rendered data/index.html.erb within layouts/application (7.3ms)
|
99482
|
+
Completed 200 OK in 9ms (Views: 8.4ms)
|
99483
|
+
|
99484
|
+
|
99485
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99486
|
+
Processing by DataController#index as HTML
|
99487
|
+
Rendered data/_data.html.erb (7.9ms)
|
99488
|
+
Rendered data/index.html.erb within layouts/application (8.2ms)
|
99489
|
+
Completed 200 OK in 10ms (Views: 9.3ms)
|
99490
|
+
|
99491
|
+
|
99492
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99493
|
+
Processing by DataController#index as HTML
|
99494
|
+
Rendered data/_data.html.erb (7.6ms)
|
99495
|
+
Rendered data/index.html.erb within layouts/application (7.9ms)
|
99496
|
+
Completed 200 OK in 9ms (Views: 8.9ms)
|
99497
|
+
|
99498
|
+
|
99499
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99500
|
+
Processing by DataController#index as HTML
|
99501
|
+
Rendered data/_data.html.erb (7.2ms)
|
99502
|
+
Rendered data/index.html.erb within layouts/application (7.4ms)
|
99503
|
+
Completed 200 OK in 9ms (Views: 8.5ms)
|
99504
|
+
|
99505
|
+
|
99506
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99507
|
+
Processing by DataController#index as HTML
|
99508
|
+
Rendered data/_data.html.erb (8.8ms)
|
99509
|
+
Rendered data/index.html.erb within layouts/application (9.0ms)
|
99510
|
+
Completed 200 OK in 11ms (Views: 10.1ms)
|
99511
|
+
|
99512
|
+
|
99513
|
+
Started GET "/data?page=2&per_page=10&sort_column=id&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:45:57 -0400 2012
|
99514
|
+
Processing by DataController#index as JS
|
99515
|
+
Parameters: {"sort_column"=>"id", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"2"}
|
99516
|
+
Rendered data/_data.html.erb (8.8ms)
|
99517
|
+
Completed 200 OK in 10ms (Views: 9.3ms)
|
99518
|
+
|
99519
|
+
|
99520
|
+
Started GET "/data?search=secondhalf" for 127.0.0.1 at Mon May 14 13:45:59 -0400 2012
|
99521
|
+
Processing by DataController#index as HTML
|
99522
|
+
Parameters: {"search"=>"secondhalf"}
|
99523
|
+
Rendered data/_data.html.erb (6.0ms)
|
99524
|
+
Rendered data/index.html.erb within layouts/application (6.3ms)
|
99525
|
+
Completed 200 OK in 50ms (Views: 49.8ms)
|
99526
|
+
|
99527
|
+
|
99528
|
+
Started GET "/data?search=secondhalf" for 127.0.0.1 at Mon May 14 13:45:59 -0400 2012
|
99529
|
+
Processing by DataController#index as HTML
|
99530
|
+
Parameters: {"search"=>"secondhalf"}
|
99531
|
+
Rendered data/_data.html.erb (6.0ms)
|
99532
|
+
Rendered data/index.html.erb within layouts/application (6.2ms)
|
99533
|
+
Completed 200 OK in 8ms (Views: 7.3ms)
|
99534
|
+
|
99535
|
+
|
99536
|
+
Started GET "/data?sort_column=id&per_page=10&sort_direction=asc&page=2&search=secondhalf" for 127.0.0.1 at Mon May 14 13:45:59 -0400 2012
|
99537
|
+
Processing by DataController#index as HTML
|
99538
|
+
Parameters: {"sort_column"=>"id", "per_page"=>"10", "sort_direction"=>"asc", "search"=>"secondhalf", "page"=>"2"}
|
99539
|
+
Rendered data/_data.html.erb (6.0ms)
|
99540
|
+
Rendered data/index.html.erb within layouts/application (6.2ms)
|
99541
|
+
Completed 200 OK in 8ms (Views: 7.3ms)
|
99542
|
+
|
99543
|
+
|
99544
|
+
Started GET "/data?search=secondhalf" for 127.0.0.1 at Mon May 14 13:45:59 -0400 2012
|
99545
|
+
Processing by DataController#index as HTML
|
99546
|
+
Parameters: {"search"=>"secondhalf"}
|
99547
|
+
Rendered data/_data.html.erb (7.1ms)
|
99548
|
+
Rendered data/index.html.erb within layouts/application (7.4ms)
|
99549
|
+
Completed 200 OK in 9ms (Views: 8.4ms)
|
99550
|
+
|
99551
|
+
|
99552
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=1&search=secondhalf" for 127.0.0.1 at Mon May 14 13:45:59 -0400 2012
|
99553
|
+
Processing by DataController#index as HTML
|
99554
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "search"=>"secondhalf", "page"=>"1"}
|
99555
|
+
Rendered data/_data.html.erb (45.7ms)
|
99556
|
+
Rendered data/index.html.erb within layouts/application (46.0ms)
|
99557
|
+
Completed 200 OK in 48ms (Views: 47.6ms)
|
99558
|
+
|
99559
|
+
|
99560
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99561
|
+
Processing by DataController#index as HTML
|
99562
|
+
Rendered data/_data.html.erb (6.9ms)
|
99563
|
+
Rendered data/index.html.erb within layouts/application (7.2ms)
|
99564
|
+
Completed 200 OK in 9ms (Views: 8.3ms)
|
99565
|
+
|
99566
|
+
|
99567
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99568
|
+
Processing by DataController#index as HTML
|
99569
|
+
Rendered data/_data.html.erb (8.3ms)
|
99570
|
+
Rendered data/index.html.erb within layouts/application (8.5ms)
|
99571
|
+
Completed 200 OK in 10ms (Views: 9.7ms)
|
99572
|
+
|
99573
|
+
|
99574
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99575
|
+
Processing by DataController#index as HTML
|
99576
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99577
|
+
Rendered data/_data.html.erb (49.6ms)
|
99578
|
+
Rendered data/index.html.erb within layouts/application (49.9ms)
|
99579
|
+
Completed 200 OK in 51ms (Views: 51.0ms)
|
99580
|
+
|
99581
|
+
|
99582
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99583
|
+
Processing by DataController#index as HTML
|
99584
|
+
Rendered data/_data.html.erb (7.0ms)
|
99585
|
+
Rendered data/index.html.erb within layouts/application (7.2ms)
|
99586
|
+
Completed 200 OK in 9ms (Views: 8.3ms)
|
99587
|
+
|
99588
|
+
|
99589
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99590
|
+
Processing by DataController#index as HTML
|
99591
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99592
|
+
Rendered data/_data.html.erb (8.1ms)
|
99593
|
+
Rendered data/index.html.erb within layouts/application (8.3ms)
|
99594
|
+
Completed 200 OK in 10ms (Views: 9.4ms)
|
99595
|
+
|
99596
|
+
|
99597
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=desc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99598
|
+
Processing by DataController#index as HTML
|
99599
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"desc", "page"=>"1"}
|
99600
|
+
Rendered data/_data.html.erb (7.8ms)
|
99601
|
+
Rendered data/index.html.erb within layouts/application (8.1ms)
|
99602
|
+
Completed 200 OK in 10ms (Views: 9.2ms)
|
99603
|
+
|
99604
|
+
|
99605
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99606
|
+
Processing by DataController#index as HTML
|
99607
|
+
Rendered data/_data.html.erb (48.8ms)
|
99608
|
+
Rendered data/index.html.erb within layouts/application (49.1ms)
|
99609
|
+
Completed 200 OK in 51ms (Views: 50.3ms)
|
99610
|
+
|
99611
|
+
|
99612
|
+
Started GET "/data?page=1&per_page=10&sort_column=name&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99613
|
+
Processing by DataController#index as JS
|
99614
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99615
|
+
Rendered data/_data.html.erb (7.2ms)
|
99616
|
+
Completed 200 OK in 8ms (Views: 7.7ms)
|
99617
|
+
|
99618
|
+
|
99619
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99620
|
+
Processing by DataController#index as HTML
|
99621
|
+
Rendered data/_data.html.erb (9.0ms)
|
99622
|
+
Rendered data/index.html.erb within layouts/application (9.3ms)
|
99623
|
+
Completed 200 OK in 11ms (Views: 10.3ms)
|
99624
|
+
|
99625
|
+
|
99626
|
+
Started GET "/data?page=1&per_page=10&sort_column=name&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99627
|
+
Processing by DataController#index as JS
|
99628
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99629
|
+
Rendered data/_data.html.erb (7.2ms)
|
99630
|
+
Completed 200 OK in 8ms (Views: 7.6ms)
|
99631
|
+
|
99632
|
+
|
99633
|
+
Started GET "/data?page=1&per_page=10&sort_column=name&sort_direction=desc" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99634
|
+
Processing by DataController#index as JS
|
99635
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"desc", "page"=>"1"}
|
99636
|
+
Rendered data/_data.html.erb (50.4ms)
|
99637
|
+
Completed 200 OK in 52ms (Views: 51.3ms)
|
99638
|
+
|
99639
|
+
|
99640
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99641
|
+
Processing by DataController#index as HTML
|
99642
|
+
Rendered data/_data.html.erb (7.4ms)
|
99643
|
+
Rendered data/index.html.erb within layouts/application (7.7ms)
|
99644
|
+
Completed 200 OK in 9ms (Views: 8.8ms)
|
99645
|
+
|
99646
|
+
|
99647
|
+
Started GET "/data?page=1&per_page=10&sort_column=name&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99648
|
+
Processing by DataController#index as JS
|
99649
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99650
|
+
Rendered data/_data.html.erb (8.0ms)
|
99651
|
+
Completed 200 OK in 9ms (Views: 8.5ms)
|
99652
|
+
|
99653
|
+
|
99654
|
+
Started GET "/data?page=2&per_page=10&sort_column=name&sort_direction=asc" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99655
|
+
Processing by DataController#index as JS
|
99656
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"2"}
|
99657
|
+
Rendered data/_data.html.erb (8.5ms)
|
99658
|
+
Completed 200 OK in 10ms (Views: 9.0ms)
|
99659
|
+
|
99660
|
+
|
99661
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99662
|
+
Processing by DataController#index as HTML
|
99663
|
+
Rendered data/_data.html.erb (51.7ms)
|
99664
|
+
Rendered data/index.html.erb within layouts/application (52.0ms)
|
99665
|
+
Completed 200 OK in 54ms (Views: 53.2ms)
|
99666
|
+
|
99667
|
+
|
99668
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99669
|
+
Processing by DataController#index as HTML
|
99670
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99671
|
+
Rendered data/_data.html.erb (6.9ms)
|
99672
|
+
Rendered data/index.html.erb within layouts/application (7.2ms)
|
99673
|
+
Completed 200 OK in 9ms (Views: 8.3ms)
|
99674
|
+
|
99675
|
+
|
99676
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=desc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99677
|
+
Processing by DataController#index as HTML
|
99678
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"desc", "page"=>"1"}
|
99679
|
+
Rendered data/_data.html.erb (7.5ms)
|
99680
|
+
Rendered data/index.html.erb within layouts/application (7.8ms)
|
99681
|
+
Completed 200 OK in 9ms (Views: 8.9ms)
|
99682
|
+
|
99683
|
+
|
99684
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99685
|
+
Processing by DataController#index as HTML
|
99686
|
+
Rendered data/_data.html.erb (50.2ms)
|
99687
|
+
Rendered data/index.html.erb within layouts/application (50.5ms)
|
99688
|
+
Completed 200 OK in 52ms (Views: 51.6ms)
|
99689
|
+
|
99690
|
+
|
99691
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99692
|
+
Processing by DataController#index as HTML
|
99693
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99694
|
+
Rendered data/_data.html.erb (7.2ms)
|
99695
|
+
Rendered data/index.html.erb within layouts/application (7.5ms)
|
99696
|
+
Completed 200 OK in 9ms (Views: 8.5ms)
|
99697
|
+
|
99698
|
+
|
99699
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99700
|
+
Processing by DataController#index as HTML
|
99701
|
+
Rendered data/_data.html.erb (7.6ms)
|
99702
|
+
Rendered data/index.html.erb within layouts/application (7.8ms)
|
99703
|
+
Completed 200 OK in 9ms (Views: 8.9ms)
|
99704
|
+
|
99705
|
+
|
99706
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=1" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99707
|
+
Processing by DataController#index as HTML
|
99708
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"1"}
|
99709
|
+
Rendered data/_data.html.erb (8.1ms)
|
99710
|
+
Rendered data/index.html.erb within layouts/application (8.3ms)
|
99711
|
+
Completed 200 OK in 10ms (Views: 9.4ms)
|
99712
|
+
|
99713
|
+
|
99714
|
+
Started GET "/data?sort_column=name&per_page=10&sort_direction=asc&page=2" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99715
|
+
Processing by DataController#index as HTML
|
99716
|
+
Parameters: {"sort_column"=>"name", "per_page"=>"10", "sort_direction"=>"asc", "page"=>"2"}
|
99717
|
+
Rendered data/_data.html.erb (7.6ms)
|
99718
|
+
Rendered data/index.html.erb within layouts/application (7.9ms)
|
99719
|
+
Completed 200 OK in 52ms (Views: 9.0ms)
|
99720
|
+
|
99721
|
+
|
99722
|
+
Started GET "/data" for 127.0.0.1 at Mon May 14 13:46:00 -0400 2012
|
99723
|
+
Processing by DataController#index as HTML
|
99724
|
+
Rendered data/_data.html.erb (7.1ms)
|
99725
|
+
Rendered data/index.html.erb within layouts/application (7.5ms)
|
99726
|
+
Completed 200 OK in 9ms (Views: 8.6ms)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paginated_table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Donald Ball
|
@@ -129,11 +129,18 @@ extra_rdoc_files: []
|
|
129
129
|
|
130
130
|
files:
|
131
131
|
- lib/paginated_table.rb
|
132
|
+
- lib/paginated_table/column_description.rb
|
132
133
|
- lib/paginated_table/config.rb
|
133
134
|
- lib/paginated_table/controller_helpers.rb
|
135
|
+
- lib/paginated_table/data_page.rb
|
134
136
|
- lib/paginated_table/engine.rb
|
137
|
+
- lib/paginated_table/link_renderer.rb
|
135
138
|
- lib/paginated_table/page.rb
|
139
|
+
- lib/paginated_table/page_params.rb
|
136
140
|
- lib/paginated_table/railtie.rb
|
141
|
+
- lib/paginated_table/row_description.rb
|
142
|
+
- lib/paginated_table/table_description.rb
|
143
|
+
- lib/paginated_table/table_renderer.rb
|
137
144
|
- lib/paginated_table/version.rb
|
138
145
|
- lib/paginated_table/view_helpers.rb
|
139
146
|
- vendor/assets/javascripts/paginated_table.js
|