Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carets to arrows #15

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
source "http://rubygems.org"

# Declare your gem's dependencies in bootstrap-kaminari-views.gemspec.
# Declare your gem's dependencies in dvl-kaminari-views.gemspec.
# Bundler will treat runtime dependencies like base dependencies, and
# development dependencies will be added by default to the :development group.
gemspec

# jquery-rails is used by the dummy application
gem "jquery-rails"

# Declare any dependencies that are still in development here instead of in
# your gemspec. These might include edge Rails or gems from your path or
# Git. Remember to move these dependencies to your gemspec before releasing
Expand Down
20 changes: 0 additions & 20 deletions MIT-LICENSE

This file was deleted.

15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Dvl Kaminari Views

Integrates Kaminari and [dvl-core](https://github.com/dobtco/dvl-core).

### Usage

```rb
# Gemfile
gem 'kaminari'
gem 'dvl-kaminari-views'
```

### License

[MIT](http://dobtco.mit-license.org/)
50 changes: 0 additions & 50 deletions README.rdoc

This file was deleted.

38 changes: 0 additions & 38 deletions Rakefile

This file was deleted.

9 changes: 9 additions & 0 deletions app/helpers/dvl_kaminari_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module DvlKaminariHelper
def paginate(objects, options = {})
super(objects, options.reverse_merge(
theme: 'dvl',
window: 3,
outer_window: 2
))
end
end
1 change: 1 addition & 0 deletions app/views/kaminari/dvl/_gap.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<li><span>&hellip;</span></li>
7 changes: 7 additions & 0 deletions app/views/kaminari/dvl/_next_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% if current_page.last? %>
<li><span>&rarr;</span></li>
<% else %>
<li>
<%= link_to '&rarr;'.html_safe, url, :rel => 'next', :remote => remote %>
</li>
<% end %>
9 changes: 9 additions & 0 deletions app/views/kaminari/dvl/_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<% if page.current? %>
<li class='active'>
<span><%= page %></span>
</li>
<% else %>
<li>
<%= link_to page, url, opts = {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
</li>
<% end %>
17 changes: 17 additions & 0 deletions app/views/kaminari/dvl/_paginator.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<% pagination_class ||= "" %>

<%= paginator.render do -%>
<div class="pagination <%= pagination_class %>">
<ul>
<%= prev_page_tag %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag %>
</ul>
</div>
<% end -%>
7 changes: 7 additions & 0 deletions app/views/kaminari/dvl/_prev_page.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<% if current_page.first? %>
<li><span>&larr;</span></li>
<% else %>
<li>
<%= link_to '&larr;'.html_safe, url, :rel => 'prev', :remote => remote %>
</li>
<% end %>
13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap-3/_first_page.html.erb

This file was deleted.

8 changes: 0 additions & 8 deletions app/views/kaminari/twitter-bootstrap-3/_gap.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap-3/_last_page.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap-3/_next_page.html.erb

This file was deleted.

12 changes: 0 additions & 12 deletions app/views/kaminari/twitter-bootstrap-3/_page.html.erb

This file was deleted.

24 changes: 0 additions & 24 deletions app/views/kaminari/twitter-bootstrap-3/_paginator.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap-3/_prev_page.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap/_first_page.html.erb

This file was deleted.

8 changes: 0 additions & 8 deletions app/views/kaminari/twitter-bootstrap/_gap.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap/_last_page.html.erb

This file was deleted.

13 changes: 0 additions & 13 deletions app/views/kaminari/twitter-bootstrap/_next_page.html.erb

This file was deleted.

12 changes: 0 additions & 12 deletions app/views/kaminari/twitter-bootstrap/_page.html.erb

This file was deleted.

27 changes: 0 additions & 27 deletions app/views/kaminari/twitter-bootstrap/_paginator.html.erb

This file was deleted.

Loading