mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-17 04:18:24 +00:00
Twitter Bootstrap Compatibility
Wrap inactive elements in span (current page, prev/next buttons at ends of range).
This commit is contained in:
parent
c94886a988
commit
b034d9d869
1 changed files with 4 additions and 4 deletions
|
@ -471,10 +471,10 @@ class PaginatorHelper extends AppHelper {
|
||||||
$url = array_merge(array('page' => $paging['page'] + ($which == 'Prev' ? $step * -1 : $step)), $url);
|
$url = array_merge(array('page' => $paging['page'] + ($which == 'Prev' ? $step * -1 : $step)), $url);
|
||||||
|
|
||||||
if ($this->{$check}($model)) {
|
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 {
|
} else {
|
||||||
unset($options['rel']);
|
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 @@ class PaginatorHelper extends AppHelper {
|
||||||
if ($class) {
|
if ($class) {
|
||||||
$currentClass .= ' ' . $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']) {
|
if ($i != $params['pageCount']) {
|
||||||
$out .= $separator;
|
$out .= $separator;
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ class PaginatorHelper extends AppHelper {
|
||||||
if ($class) {
|
if ($class) {
|
||||||
$currentClass .= ' ' . $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 {
|
} else {
|
||||||
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'));
|
$out .= $this->Html->tag($tag, $this->link($i, array('page' => $i), $options), compact('class'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue