Class: Liquor::Pagination::UrlGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/liquor/extensions/pagination.rb

Overview

pagination start: % <div class='digg_pagination'>

{% if page.is_current then: %}
<span class="disabled previous_page">&#8592; Previous</span>
{% else %}
<a href="{{ previous_page_path }}" rel="previous" class="previous_page_page">&#8592; Previous</a>
{% end if %}

page: %

{% if page.is_current then: %}
<em class="current">{{ page.number }}</em>
{% elsif page.is_next then: %}
<a href="{{ page.path }}" rel="next">{{ page.number }}</a>
{% elsif page.is_prev then: %}
<a href="{{ page.path }}" rel="previous">{{ page.number }}</a>
{% else %}
<a href="{{ page.path }}">3</a>
{% end if %}

gap: %

<span class="gap">&hellip;</span>

end: %

{% if page.is_current then: %}
<span class="disabled next_page">Next &#8594;</span>
{% else %}
<a href="{{ next_page_path }}" rel="next" class="next_page">Next &#8594;</a></div>
{% end if %}

end pagination %

Class Method Summary collapse

Class Method Details

.bootstrapObject



40
41
42
43
44
45
46
47
# File 'lib/liquor/extensions/pagination.rb', line 40

def self.bootstrap
  unless @bootstrapped
    include ::Rails.application.routes.url_helpers
    @bootstrapped = true
  end

  self
end