<!-- Pagination Twitter Bootstrap style
     http://twitter.github.com/bootstrap/components.html#pagination
     -->

<div class="pagination-centered listingBar"
  i18n:domain="plone"
  metal:define-macro="navigation"
  tal:define="batch view/batch|nothing;"
  tal:condition="batch">

  <ul class="castle-pagination"
    tal:condition="batch/multiple_pages">

    <!-- Previous -->
    <li class="arrow" tal:condition="batch/has_previous">
      <a href="" tal:attributes="href python:view.make_link(batch.previouspage)">«
      </a>
    </li>

    <!-- Pagelist with links to previous pages for quick navigation -->
    <li tal:repeat="pagenumber batch/previous_pages">
      <a href="" tal:content="pagenumber"
        tal:attributes="href python:view.make_link(pagenumber)"/>
    </li>

    <!-- Current page -->
    <li class="current" tal:condition="batch/navlist">
      <a href="#" tal:content="batch/pagenumber">Current page number</a>
    </li>

    <!-- Pagelist with links to next pages for quick navigation -->
    <li tal:repeat="pagenumber batch/next_pages">
      <a href="" tal:content="pagenumber"
        tal:attributes="href python:view.make_link(pagenumber)"/>
    </li>

    <li tal:condition="batch/show_link_to_last">
    &hellip;
    </li>
    <li class="next" tal:condition="batch/show_link_to_last">
      <a href="" tal:attributes="href python:view.make_link(batch.lastpage)">
        <span tal:condition="not:view/minimal_navigation" tal:omit-tag=""
          tal:content="batch/lastpage">Last item</span>
      </a>
    </li>

    <li class="arrow" tal:condition="batch/has_next">
      <a href="" tal:attributes="href python:view.make_link(batch.nextpage)">»
      </a>
    </li>
  </ul>

</div>
