Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
f59a54cb
Commit
f59a54cb
authored
Jul 22, 2012
by
damiankloip
Committed by
tim.plunkett
Oct 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1580816
by damiankloip | cperg: Added Count Records on Current Page.
parent
0dbfc2b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lib/Drupal/views/Plugins/views/area/Result.php
lib/Drupal/views/Plugins/views/area/Result.php
+3
-1
No files found.
lib/Drupal/views/Plugins/views/area/Result.php
View file @
f59a54cb
...
...
@@ -35,6 +35,7 @@ function options_form(&$form, &$form_state) {
'@name -- the human-readable name of the view'
,
'@per_page -- the number of items per page'
,
'@current_page -- the current page number'
,
'@current_record_count -- the current page record count'
,
'@page_count -- the total page count'
,
),
);
...
...
@@ -81,8 +82,9 @@ function render($empty = FALSE) {
$start
=
(
$current_page
-
1
)
*
$per_page
+
1
;
$end
=
$total_count
;
}
$current_record_count
=
(
$end
-
$start
)
+
1
;
// 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
();
foreach
(
$items
as
$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