bootstrap-kaminari-views 0.0.2 → 0.0.3
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 +7 -0
- data/README.rdoc +14 -1
- data/app/views/kaminari/twitter-bootstrap-3/_first_page.html.erb +13 -0
- data/app/views/kaminari/twitter-bootstrap-3/_gap.html.erb +8 -0
- data/app/views/kaminari/twitter-bootstrap-3/_last_page.html.erb +13 -0
- data/app/views/kaminari/twitter-bootstrap-3/_next_page.html.erb +13 -0
- data/app/views/kaminari/twitter-bootstrap-3/_page.html.erb +12 -0
- data/app/views/kaminari/twitter-bootstrap-3/_paginator.html.erb +23 -0
- data/app/views/kaminari/twitter-bootstrap-3/_prev_page.html.erb +13 -0
- data/app/views/kaminari/twitter-bootstrap/_paginator.html.erb +3 -1
- data/lib/bootstrap-kaminari-views/version.rb +1 -1
- metadata +37 -28
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 75668e9b76c74656ae586a5fa955f122c12b89cc
|
4
|
+
data.tar.gz: 6cef5eb530104434052b80a1414e4bc6bfe7934d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9456476d3718b23ba4afb2b54adbd62f1d0930fe24bf188e201584a32e9216cdb0e2307c9b4dcf013122ce6982336a46772278bac2f57268b8a8d17a1278de8f
|
7
|
+
data.tar.gz: 30fab3f62dabee652d0a978cbe8fd7ca9f6c93476d87a21df8cd31d94623ae855ccd8a4effd820d6c2150fe5f2f3a4637e0f738e46e1c6200d6185f31edc9921
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= Bootstrap Kaminari Views
|
2
2
|
|
3
|
-
Basic Gem for quick default inclusion of {Kaminari}[https://github.com/amatsuda/kaminari] theme compatible with {Twitter Bootstrap 2.0}[http://
|
3
|
+
Basic Gem for quick default inclusion of {Kaminari}[https://github.com/amatsuda/kaminari] theme compatible with {Twitter Bootstrap 2.0}[http://getbootstrap.com/2.3.2/] and {Twitter Bootstrap 3.0}[http://getbootstrap.com]
|
4
4
|
|
5
5
|
= Usage
|
6
6
|
|
@@ -12,9 +12,22 @@ Ensure your gemfile contains
|
|
12
12
|
Render Pagination with a theme
|
13
13
|
|
14
14
|
= paginate @posts, :theme => 'twitter-bootstrap'
|
15
|
+
|
16
|
+
= paginate @posts, :theme => 'twitter-bootstrap-3'
|
17
|
+
|
18
|
+
Render with specific pagination classes
|
19
|
+
|
20
|
+
= paginate @posts, :theme => 'twitter-bootstrap-3',
|
21
|
+
:pagination_class => "pagination-sm"
|
22
|
+
|
23
|
+
Render with specific pagination classes
|
24
|
+
|
25
|
+
= paginate @posts, :theme => 'twitter-bootstrap',
|
26
|
+
:pagination_class => "pagination-small pagination-centered"
|
15
27
|
|
16
28
|
= Credits
|
17
29
|
|
18
30
|
{Kaminari}[https://github.com/amatsuda/kaminari] - For making an awesome gem
|
19
31
|
|
20
32
|
{twitter-bootstrap-kaminari-views}[https://github.com/gabetax/twitter-bootstrap-kaminari-views] - Non Gemified Implementation
|
33
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# Link to the "First" page
|
2
|
+
- available local variables
|
3
|
+
url: url to the first page
|
4
|
+
current_page: a page object for the currently displayed page
|
5
|
+
num_pages: total number of pages
|
6
|
+
per_page: number of items to fetch per page
|
7
|
+
remote: data-remote
|
8
|
+
-%>
|
9
|
+
<% unless current_page.first? %>
|
10
|
+
<li class="first">
|
11
|
+
<%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<%# Non-link tag that stands for skipped pages...
|
2
|
+
- available local variables
|
3
|
+
current_page: a page object for the currently displayed page
|
4
|
+
num_pages: total number of pages
|
5
|
+
per_page: number of items to fetch per page
|
6
|
+
remote: data-remote
|
7
|
+
-%>
|
8
|
+
<li class="page gap disabled"><a href="#" onclick="return false;"><%= raw(t 'views.pagination.truncate') %></a></li>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# Link to the "Last" page
|
2
|
+
- available local variables
|
3
|
+
url: url to the last page
|
4
|
+
current_page: a page object for the currently displayed page
|
5
|
+
num_pages: total number of pages
|
6
|
+
per_page: number of items to fetch per page
|
7
|
+
remote: data-remote
|
8
|
+
-%>
|
9
|
+
<% unless current_page.last? %>
|
10
|
+
<li class="last next"><%# "next" class present for border styling in twitter bootstrap %>
|
11
|
+
<%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# Link to the "Next" page
|
2
|
+
- available local variables
|
3
|
+
url: url to the next page
|
4
|
+
current_page: a page object for the currently displayed page
|
5
|
+
num_pages: total number of pages
|
6
|
+
per_page: number of items to fetch per page
|
7
|
+
remote: data-remote
|
8
|
+
-%>
|
9
|
+
<% unless current_page.last? %>
|
10
|
+
<li class="next_page">
|
11
|
+
<%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%# Link showing page number
|
2
|
+
- available local variables
|
3
|
+
page: a page object for "this" page
|
4
|
+
url: url to this page
|
5
|
+
current_page: a page object for the currently displayed page
|
6
|
+
num_pages: total number of pages
|
7
|
+
per_page: number of items to fetch per page
|
8
|
+
remote: data-remote
|
9
|
+
-%>
|
10
|
+
<li class="page<%= ' active' if page.current? %>">
|
11
|
+
<%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
|
12
|
+
</li>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<%# The container tag
|
2
|
+
- available local variables
|
3
|
+
current_page: a page object for the currently displayed page
|
4
|
+
num_pages: total number of pages
|
5
|
+
per_page: number of items to fetch per page
|
6
|
+
remote: data-remote
|
7
|
+
paginator: the paginator that renders the pagination tags inside
|
8
|
+
-%>
|
9
|
+
<%= paginator.render do -%>
|
10
|
+
<ul class="pagination">
|
11
|
+
<%= first_page_tag unless current_page.first? %>
|
12
|
+
<%= prev_page_tag unless current_page.first? %>
|
13
|
+
<% each_page do |page| -%>
|
14
|
+
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
|
15
|
+
<%= page_tag page %>
|
16
|
+
<% elsif !page.was_truncated? -%>
|
17
|
+
<%= gap_tag %>
|
18
|
+
<% end -%>
|
19
|
+
<% end -%>
|
20
|
+
<%= next_page_tag unless current_page.last? %>
|
21
|
+
<%= last_page_tag unless current_page.last? %>
|
22
|
+
</ul>
|
23
|
+
<% end -%>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# Link to the "Previous" page
|
2
|
+
- available local variables
|
3
|
+
url: url to the previous page
|
4
|
+
current_page: a page object for the currently displayed page
|
5
|
+
num_pages: total number of pages
|
6
|
+
per_page: number of items to fetch per page
|
7
|
+
remote: data-remote
|
8
|
+
-%>
|
9
|
+
<% unless current_page.first? %>
|
10
|
+
<li class="prev">
|
11
|
+
<%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
@@ -6,8 +6,10 @@
|
|
6
6
|
remote: data-remote
|
7
7
|
paginator: the paginator that renders the pagination tags inside
|
8
8
|
-%>
|
9
|
+
<% pagination_class ||= "" %>
|
10
|
+
|
9
11
|
<%= paginator.render do -%>
|
10
|
-
<div class="pagination">
|
12
|
+
<div class="pagination <%= pagination_class %>">
|
11
13
|
<ul>
|
12
14
|
<%= first_page_tag unless current_page.first? %>
|
13
15
|
<%= prev_page_tag unless current_page.first? %>
|
metadata
CHANGED
@@ -1,50 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-kaminari-views
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Matenia Rossides
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.1'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: kaminari
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
33
|
version: '0.13'
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.13'
|
36
41
|
- !ruby/object:Gem::Dependency
|
37
42
|
name: sqlite3
|
38
|
-
requirement:
|
39
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
40
44
|
requirements:
|
41
|
-
- -
|
45
|
+
- - '>='
|
42
46
|
- !ruby/object:Gem::Version
|
43
47
|
version: '0'
|
44
48
|
type: :development
|
45
49
|
prerelease: false
|
46
|
-
version_requirements:
|
47
|
-
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Bootstrap-ify pagination with Kaminari - Compatible with Bootstrap 2.x,
|
56
|
+
3.x
|
48
57
|
email:
|
49
58
|
- matenia@gmail.com
|
50
59
|
executables: []
|
@@ -58,6 +67,13 @@ files:
|
|
58
67
|
- app/views/kaminari/twitter-bootstrap/_page.html.erb
|
59
68
|
- app/views/kaminari/twitter-bootstrap/_paginator.html.erb
|
60
69
|
- app/views/kaminari/twitter-bootstrap/_prev_page.html.erb
|
70
|
+
- app/views/kaminari/twitter-bootstrap-3/_first_page.html.erb
|
71
|
+
- app/views/kaminari/twitter-bootstrap-3/_gap.html.erb
|
72
|
+
- app/views/kaminari/twitter-bootstrap-3/_last_page.html.erb
|
73
|
+
- app/views/kaminari/twitter-bootstrap-3/_next_page.html.erb
|
74
|
+
- app/views/kaminari/twitter-bootstrap-3/_page.html.erb
|
75
|
+
- app/views/kaminari/twitter-bootstrap-3/_paginator.html.erb
|
76
|
+
- app/views/kaminari/twitter-bootstrap-3/_prev_page.html.erb
|
61
77
|
- lib/bootstrap-kaminari-views/version.rb
|
62
78
|
- lib/bootstrap-kaminari-views.rb
|
63
79
|
- lib/tasks/bootstrap-kaminari-views_tasks.rake
|
@@ -66,32 +82,25 @@ files:
|
|
66
82
|
- README.rdoc
|
67
83
|
homepage: http://github.com/matenia/bootstrap-kaminari-views
|
68
84
|
licenses: []
|
85
|
+
metadata: {}
|
69
86
|
post_install_message:
|
70
87
|
rdoc_options: []
|
71
88
|
require_paths:
|
72
89
|
- lib
|
73
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
91
|
requirements:
|
76
|
-
- -
|
92
|
+
- - '>='
|
77
93
|
- !ruby/object:Gem::Version
|
78
94
|
version: '0'
|
79
|
-
segments:
|
80
|
-
- 0
|
81
|
-
hash: 2081008391199556187
|
82
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
96
|
requirements:
|
85
|
-
- -
|
97
|
+
- - '>='
|
86
98
|
- !ruby/object:Gem::Version
|
87
99
|
version: '0'
|
88
|
-
segments:
|
89
|
-
- 0
|
90
|
-
hash: 2081008391199556187
|
91
100
|
requirements: []
|
92
101
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 2.1.11
|
94
103
|
signing_key:
|
95
|
-
specification_version:
|
104
|
+
specification_version: 4
|
96
105
|
summary: Bootstrap-ify pagination with Kaminari
|
97
106
|
test_files: []
|