kaminari_bootstrap_paginator 0.1.0
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/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +4 -0
- data/README.md +39 -0
- data/Rakefile +1 -0
- data/app/views/kaminari/bootstrap/_first_page.html.erb +11 -0
- data/app/views/kaminari/bootstrap/_gap.html.erb +11 -0
- data/app/views/kaminari/bootstrap/_last_page.html.erb +11 -0
- data/app/views/kaminari/bootstrap/_next_page.html.erb +11 -0
- data/app/views/kaminari/bootstrap/_page.html.erb +17 -0
- data/app/views/kaminari/bootstrap/_paginator.html.erb +23 -0
- data/app/views/kaminari/bootstrap/_prev_page.html.erb +11 -0
- data/kaminari_bootstrap_paginator.gemspec +23 -0
- data/lib/kaminari_bootstrap_paginator.rb +5 -0
- data/lib/kaminari_bootstrap_paginator/engine.rb +4 -0
- data/lib/kaminari_bootstrap_paginator/version.rb +3 -0
- metadata +102 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 799807e3c3e81e8bb867971a19241927435a4f07
|
|
4
|
+
data.tar.gz: 3335b7604c788b48b1f6cd5bd4d0e5e4bd963d38
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: eb2bb9d70e3a92087aa7cb9fc4027f2ea98c9b5f01e833c6f67b68a69da482ff706c86f3f2c016867257a92ba081da25e445723f4c9e8271adc20adfa48dcef4
|
|
7
|
+
data.tar.gz: 8a2f25406b4bc77be940df76ae5732abff95c2f01b65ec954d0c38c8dadbf2ac44a6fc86b3ab7fbf8ff68793542dcd153451b4151c376e4eadb5ae1b4eae96d1
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# KaminariBootstrapPaginator
|
|
2
|
+
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/kaminari_bootstrap_paginator`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'kaminari_bootstrap_paginator'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install kaminari_bootstrap_paginator
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
TODO: Write usage instructions here
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
+
|
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
1. Fork it ( https://github.com/[my-github-username]/kaminari_bootstrap_paginator/fork )
|
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
39
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require 'bundler/gem_tasks'
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
<li class="<%= 'disabled' if current_page.first? %>">
|
|
10
|
+
<%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote %>
|
|
11
|
+
</li>
|
|
@@ -0,0 +1,11 @@
|
|
|
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="disabled">
|
|
9
|
+
<span><%= raw(t 'views.pagination.truncate') %></span>
|
|
10
|
+
</li>
|
|
11
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
<li class="<%= 'disabled' if current_page.last? %>">
|
|
10
|
+
<%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote} %>
|
|
11
|
+
</li>
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
<li class="<%= 'disabled' if current_page.last? %>">
|
|
10
|
+
<%= link_to raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote %>
|
|
11
|
+
</li>
|
|
@@ -0,0 +1,17 @@
|
|
|
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="<%= 'active' if page.current? %>">
|
|
11
|
+
<% if page.current? %>
|
|
12
|
+
<span><%= number_with_delimiter(page.to_s) %></span>
|
|
13
|
+
<% else %>
|
|
14
|
+
<%= link_to number_with_delimiter(page.to_s), url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
|
|
15
|
+
<% end %>
|
|
16
|
+
</li>
|
|
17
|
+
|
|
@@ -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 now using the Bootstrap paginator class
|
|
10
|
+
-%>
|
|
11
|
+
<%= paginator.render do -%>
|
|
12
|
+
<ul class="pagination">
|
|
13
|
+
<%= prev_page_tag %>
|
|
14
|
+
<%= next_page_tag %>
|
|
15
|
+
<% each_relevant_page do |page| -%>
|
|
16
|
+
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
|
|
17
|
+
<%= page_tag page %>
|
|
18
|
+
<% elsif !page.was_truncated? -%>
|
|
19
|
+
<%= gap_tag %>
|
|
20
|
+
<% end -%>
|
|
21
|
+
<% end -%>
|
|
22
|
+
</ul>
|
|
23
|
+
<% end -%>
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
<li class="<%= 'disabled' if current_page.first? %>">
|
|
10
|
+
<%= link_to raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote %>
|
|
11
|
+
</li>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'kaminari_bootstrap_paginator/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'kaminari_bootstrap_paginator'
|
|
8
|
+
spec.version = KaminariBootstrapPaginator::VERSION
|
|
9
|
+
spec.authors = ['Chris Beer']
|
|
10
|
+
spec.email = ['cabeer@stanford.edu']
|
|
11
|
+
|
|
12
|
+
spec.summary = 'Bootstrap styles for kaminari'
|
|
13
|
+
|
|
14
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
15
|
+
spec.bindir = 'exe'
|
|
16
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
17
|
+
spec.require_paths = ['lib']
|
|
18
|
+
|
|
19
|
+
spec.add_dependency 'rails'
|
|
20
|
+
|
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.9'
|
|
22
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
|
23
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: kaminari_bootstrap_paginator
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Chris Beer
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-05-19 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rails
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.9'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.9'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '10.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '10.0'
|
|
55
|
+
description:
|
|
56
|
+
email:
|
|
57
|
+
- cabeer@stanford.edu
|
|
58
|
+
executables: []
|
|
59
|
+
extensions: []
|
|
60
|
+
extra_rdoc_files: []
|
|
61
|
+
files:
|
|
62
|
+
- ".gitignore"
|
|
63
|
+
- ".rspec"
|
|
64
|
+
- ".travis.yml"
|
|
65
|
+
- Gemfile
|
|
66
|
+
- README.md
|
|
67
|
+
- Rakefile
|
|
68
|
+
- app/views/kaminari/bootstrap/_first_page.html.erb
|
|
69
|
+
- app/views/kaminari/bootstrap/_gap.html.erb
|
|
70
|
+
- app/views/kaminari/bootstrap/_last_page.html.erb
|
|
71
|
+
- app/views/kaminari/bootstrap/_next_page.html.erb
|
|
72
|
+
- app/views/kaminari/bootstrap/_page.html.erb
|
|
73
|
+
- app/views/kaminari/bootstrap/_paginator.html.erb
|
|
74
|
+
- app/views/kaminari/bootstrap/_prev_page.html.erb
|
|
75
|
+
- kaminari_bootstrap_paginator.gemspec
|
|
76
|
+
- lib/kaminari_bootstrap_paginator.rb
|
|
77
|
+
- lib/kaminari_bootstrap_paginator/engine.rb
|
|
78
|
+
- lib/kaminari_bootstrap_paginator/version.rb
|
|
79
|
+
homepage:
|
|
80
|
+
licenses: []
|
|
81
|
+
metadata: {}
|
|
82
|
+
post_install_message:
|
|
83
|
+
rdoc_options: []
|
|
84
|
+
require_paths:
|
|
85
|
+
- lib
|
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
87
|
+
requirements:
|
|
88
|
+
- - ">="
|
|
89
|
+
- !ruby/object:Gem::Version
|
|
90
|
+
version: '0'
|
|
91
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
|
+
requirements:
|
|
93
|
+
- - ">="
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: '0'
|
|
96
|
+
requirements: []
|
|
97
|
+
rubyforge_project:
|
|
98
|
+
rubygems_version: 2.4.5
|
|
99
|
+
signing_key:
|
|
100
|
+
specification_version: 4
|
|
101
|
+
summary: Bootstrap styles for kaminari
|
|
102
|
+
test_files: []
|