Fix pagination markup

refs #5543
This commit is contained in:
Eric Lippmann 2015-09-30 17:13:36 +02:00
parent 7e81b00a96
commit a1d6711b2a

View File

@ -13,7 +13,7 @@ if ($this->pageCount <= 1) return;
($this->current - 1) * $this->itemCountPerPage, ($this->current - 1) * $this->itemCountPerPage,
$this->totalItemCount $this->totalItemCount
) ?> ) ?>
<li> <li class="nav-item">
<a href="<?= Url::fromRequest()->overwriteParams(array('page' => $this->previous)) ?>" <a href="<?= Url::fromRequest()->overwriteParams(array('page' => $this->previous)) ?>"
title="<?= $label ?>" title="<?= $label ?>"
aria-label="<?= $label ?>"> aria-label="<?= $label ?>">
@ -21,7 +21,7 @@ if ($this->pageCount <= 1) return;
</a> </a>
</li> </li>
<?php else: ?> <?php else: ?>
<li class="disabled" aria-hidden="true"> <li class="nav-item disabled" aria-hidden="true">
<span> <span>
<span class="sr-only"><?= $this->translate('Previous page') ?></span> <span class="sr-only"><?= $this->translate('Previous page') ?></span>
<?= $this->icon('angle-double-left') ?> <?= $this->icon('angle-double-left') ?>
@ -30,7 +30,7 @@ if ($this->pageCount <= 1) return;
<?php endif ?> <?php endif ?>
<?php foreach ($this->pagesInRange as $page): ?> <?php foreach ($this->pagesInRange as $page): ?>
<?php if ($page === '...'): ?> <?php if ($page === '...'): ?>
<li class="disabled"> <li class="nav-item disabled">
<span>...</span> <span>...</span>
</li> </li>
<?php else: ?> <?php else: ?>
@ -46,7 +46,7 @@ if ($this->pageCount <= 1) return;
$this->totalItemCount $this->totalItemCount
); );
?> ?>
<li<?= $page === $this->current ? ' class="active"' : '' ?>> <li<?= $page === $this->current ? ' class="active nav-item"' : ' class="nav-item"' ?>>
<a href="<?= Url::fromRequest()->overwriteParams(array('page' => $page)) ?>" <a href="<?= Url::fromRequest()->overwriteParams(array('page' => $page)) ?>"
title="<?= $label ?>" title="<?= $label ?>"
aria-label="<?= $label ?>"> aria-label="<?= $label ?>">
@ -62,7 +62,7 @@ if ($this->pageCount <= 1) return;
($this->current + 1) * $this->itemCountPerPage, ($this->current + 1) * $this->itemCountPerPage,
$this->totalItemCount $this->totalItemCount
) ?> ) ?>
<li> <li class="nav-item">
<a href="<?= Url::fromRequest()->overwriteParams(array('page' => $this->next)) ?>" <a href="<?= Url::fromRequest()->overwriteParams(array('page' => $this->next)) ?>"
title="<?= $label ?>" title="<?= $label ?>"
aria-label="<?= $label ?>"> aria-label="<?= $label ?>">
@ -70,7 +70,7 @@ if ($this->pageCount <= 1) return;
</a> </a>
</li> </li>
<?php else: ?> <?php else: ?>
<li class="disabled" aria-hidden="true"> <li class="disabled nav-item" aria-hidden="true">
<span> <span>
<span class="sr-only"><?= $this->translate('Next page') ?></span> <span class="sr-only"><?= $this->translate('Next page') ?></span>
<?= $this->icon('angle-double-right') ?> <?= $this->icon('angle-double-right') ?>