Skip to content

Commit

Permalink
Twitter Bootstrap Compatibility
Browse files Browse the repository at this point in the history
Wrap inactive elements in span (current page, prev/next buttons at ends
of range).
  • Loading branch information
HaroldPutman committed Oct 1, 2012
1 parent c94886a commit b034d9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/View/Helper/PaginatorHelper.php
Expand Up @@ -471,10 +471,10 @@ protected function _pagingLink($which, $title = null, $options = array(), $disab
$url = array_merge(array('page' => $paging['page'] + ($which == 'Prev' ? $step * -1 : $step)), $url);

if ($this->{$check}($model)) {
return $this->Html->tag($tag, $this->link($title, $url, array_merge($options, compact('escape', 'model'))), compact('class'));
return $this->Html->tag($tag, $this->link($title, $url, array_merge($options, compact('escape'))), compact('class'));
} else {
unset($options['rel']);
return $this->Html->tag($tag, $title, array_merge($options, compact('escape', 'class')));
return $this->Html->tag($tag, $this->Html->tag('span', $title, compact('escape')), array_merge($options, compact('class')));
}
}

Expand Down Expand Up @@ -714,7 +714,7 @@ public function numbers($options = array()) {
if ($class) {
$currentClass .= ' ' . $class;
}
$out .= $this->Html->tag($tag, $params['page'], array('class' => $currentClass));
$out .= $this->Html->tag($tag, $this->Html->tag('span', $params['page']), array('class' => $currentClass));
if ($i != $params['pageCount']) {
$out .= $separator;
}
Expand Down Expand Up @@ -747,7 +747,7 @@ public function numbers($options = array()) {
if ($class) {
$currentClass .= ' ' . $class;
}
$out .= $this->Html->tag($tag, $i, array('class' => $currentClass));
$out .= $this->Html->tag($tag, $this->Html->tag('span',$i), array('class' => $currentClass));
} else {
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'));
}
Expand Down

0 comments on commit b034d9d

Please sign in to comment.