Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
556fff9f
Commit
556fff9f
authored
Jul 21, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added better language support for Pagination library.
parent
46a15cf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
paginator.php
system/paginator.php
+5
-4
No files found.
system/paginator.php
View file @
556fff9f
...
...
@@ -81,14 +81,15 @@ class Paginator {
/**
* Create the HTML pagination links.
*
* @param string $language
* @param int $adjacent
* @return string
*/
public
function
links
(
$adjacent
=
3
)
public
function
links
(
$
language
=
null
,
$
adjacent
=
3
)
{
if
(
$this
->
last_page
()
>
1
)
{
return
'<div class="pagination">'
.
$this
->
previous
(
)
.
$this
->
numbers
(
$adjacent
)
.
$this
->
next
(
);
return
'<div class="pagination">'
.
$this
->
previous
(
$language
)
.
$this
->
numbers
(
$adjacent
)
.
$this
->
next
(
$language
);
}
return
''
;
...
...
@@ -145,7 +146,7 @@ class Paginator {
*/
public
function
previous
(
$language
=
null
)
{
$text
=
Lang
::
line
(
'pagination.previous'
)
->
get
(
$language
);
$text
=
Lang
::
line
(
'pagination.previous'
)
->
get
(
$language
,
'« Previous'
);
if
(
$this
->
page
>
1
)
{
...
...
@@ -163,7 +164,7 @@ class Paginator {
*/
public
function
next
(
$language
=
null
)
{
$text
=
Lang
::
line
(
'pagination.next'
)
->
get
(
$language
);
$text
=
Lang
::
line
(
'pagination.next'
)
->
get
(
$language
,
'Next »'
);
if
(
$this
->
page
<
$this
->
last_page
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment