<!--!  Copyright (C) 2008-2021 Edgewall Software

  This software is licensed as described in the file COPYING, which
  you should have received as part of this distribution. The terms
  are also available at https://trac.edgewall.org/wiki/TracLicense.

  This software consists of voluntary contributions made by many
  individuals. For the exact contribution history, see the revision
  history and logs, available at https://trac.edgewall.org/.

Display a page index.

Arguments:
 - `paginator` must be a trac.util.presentation.Paginator instance
-->
<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:py="http://genshi.edgewall.org/" class="paging" py:if="paginator.has_more_pages">

    <span py:if="paginator.has_previous_page"
          py:with="prevlink = chrome.links.prev[0]" class="previous">
      <a href="${prevlink.href}" title="${prevlink.title}">&larr;</a>
    </span>
    <py:for each="page in paginator.shown_pages">
      <span py:if="page.string == paginator.current_page.string">
        <span py:if="page.string == paginator.current_page.string" class="${paginator.current_page['class']}">${paginator.current_page.string}</span>
      </span>
      <span py:if="page.string != paginator.current_page.string">
        <a href="${page.href}" title="${page.title}">${page.string}</a>
      </span>
    </py:for>
    <span py:if="paginator.has_next_page"
          py:with="nextlink = chrome.links.next[0]" class="next">
      <a href="${nextlink.href}" title="${nextlink.title}">&rarr;</a>
    </span>

</div>

