From b034d9d8690d629bb079078ba3e361046d131ae3 Mon Sep 17 00:00:00 2001 From: Harold Putman Date: Mon, 1 Oct 2012 12:14:57 -0400 Subject: [PATCH] Twitter Bootstrap Compatibility Wrap inactive elements in span (current page, prev/next buttons at ends of range). --- lib/Cake/View/Helper/PaginatorHelper.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/View/Helper/PaginatorHelper.php b/lib/Cake/View/Helper/PaginatorHelper.php index 252aea8a493..a42b23c6c39 100644 --- a/lib/Cake/View/Helper/PaginatorHelper.php +++ b/lib/Cake/View/Helper/PaginatorHelper.php @@ -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'))); } } @@ -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; } @@ -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')); }