Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b7f78ee2
Commit
b7f78ee2
authored
Jul 22, 2012
by
damiankloip
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Issue
#1580816
by damiankloip | cperg: Added Count Records on Current Page.
parent
e35cfb25
Changes
1
Hide whitespace changes
Inline
Side-by-side
handlers/views_handler_area_result.inc
View file @
b7f78ee2
...
@@ -33,6 +33,7 @@ function options_form(&$form, &$form_state) {
...
@@ -33,6 +33,7 @@ function options_form(&$form, &$form_state) {
'@name -- the human-readable name of the view'
,
'@name -- the human-readable name of the view'
,
'@per_page -- the number of items per page'
,
'@per_page -- the number of items per page'
,
'@current_page -- the current page number'
,
'@current_page -- the current page number'
,
'@current_record_count -- the current page record count'
,
'@page_count -- the total page count'
,
'@page_count -- the total page count'
,
),
),
);
);
...
@@ -79,8 +80,9 @@ function render($empty = FALSE) {
...
@@ -79,8 +80,9 @@ function render($empty = FALSE) {
$start
=
(
$current_page
-
1
)
*
$per_page
+
1
;
$start
=
(
$current_page
-
1
)
*
$per_page
+
1
;
$end
=
$total_count
;
$end
=
$total_count
;
}
}
$current_record_count
=
(
$end
-
$start
)
+
1
;
// Get the search information.
// Get the search information.
$items
=
array
(
'start'
,
'end'
,
'total'
,
'name'
,
'per_page'
,
'current_page'
,
'page_count'
);
$items
=
array
(
'start'
,
'end'
,
'total'
,
'name'
,
'per_page'
,
'current_page'
,
'current_record_count'
,
'page_count'
);
$replacements
=
array
();
$replacements
=
array
();
foreach
(
$items
as
$item
)
{
foreach
(
$items
as
$item
)
{
$replacements
[
"@
$item
"
]
=
${$item}
;
$replacements
[
"@
$item
"
]
=
${$item}
;
...
...
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