Updated Paginator to fit better with bootstrap 2.1
The Paginator Renders a list of links compatible with bootstrap 2.1 standards ... so the irritating bug that used to be there on active and disabled pages is gone
This commit is contained in:
@@ -183,7 +183,7 @@ class Paginator {
|
|||||||
$links = $this->slider($adjacent);
|
$links = $this->slider($adjacent);
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $this->previous().' '.$links.' '.$this->next();
|
$content = '<ul>' . $this->previous() . $links . $this->next() . '</ul>';
|
||||||
|
|
||||||
return '<div class="pagination">'.$content.'</div>';
|
return '<div class="pagination">'.$content.'</div>';
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ class Paginator {
|
|||||||
// the "first" element should be a span instead of a link.
|
// the "first" element should be a span instead of a link.
|
||||||
if ($disabled($this->page, $this->last))
|
if ($disabled($this->page, $this->last))
|
||||||
{
|
{
|
||||||
return HTML::span($text, array('class' => "{$class} disabled"));
|
return '<li'.HTML::attributes(array('class'=>"{$class} disabled")).'><a href="#">'.$text.'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -349,7 +349,7 @@ class Paginator {
|
|||||||
{
|
{
|
||||||
if ($this->page == $page)
|
if ($this->page == $page)
|
||||||
{
|
{
|
||||||
$pages[] = HTML::span($page, array('class' => 'current'));
|
$pages[] = '<li class="active"><a href="#">'.$page.'</a></li>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -372,7 +372,7 @@ class Paginator {
|
|||||||
{
|
{
|
||||||
$query = '?page='.$page.$this->appendage($this->appends);
|
$query = '?page='.$page.$this->appendage($this->appends);
|
||||||
|
|
||||||
return HTML::link(URI::current().$query, $text, compact('class'), Request::secure());
|
return '<li'.HTML::attributes(compact($class)).'>'. HTML::link(URI::current().$query, $text, [], Request::secure()).'</li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user