Commit c5e8aabe by Alexander Makarov

Fixes #1245: LinkPager now renders disabled links as spans preventing these to be clickable

parent 900100c2
......@@ -164,14 +164,14 @@ class LinkPager extends Widget
*/
protected function renderPageButton($label, $page, $class, $disabled, $active)
{
$options = ['class' => $class === '' ? null : $class];
if ($active) {
$class .= ' ' . $this->activePageCssClass;
Html::addCssClass($options, $this->activePageCssClass);
}
if ($disabled) {
$class .= ' ' . $this->disabledPageCssClass;
Html::addCssClass($options, $this->disabledPageCssClass);
return Html::tag('li', Html::tag('span', $label), $options);
}
$class = trim($class);
$options = ['class' => $class === '' ? null : $class];
return Html::tag('li', Html::a($label, $this->pagination->createUrl($page), ['data-page' => $page]), $options);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment