aboutsummaryrefslogtreecommitdiff
path: root/mod/embed/views/default/embed
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-18 21:54:58 -0400
committercash <cash.costello@gmail.com>2011-06-18 21:54:58 -0400
commitaeb88b95d16ff1da7e2ce8fadde0eab1f4653d8b (patch)
tree54b47f12b8c7557ffb7ec2b14506217564664d3e /mod/embed/views/default/embed
parentd462b57edfeab81bd90a5d0321ea3d1fcbbddff3 (diff)
downloadelgg-aeb88b95d16ff1da7e2ce8fadde0eab1f4653d8b.tar.gz
elgg-aeb88b95d16ff1da7e2ce8fadde0eab1f4653d8b.tar.bz2
rewrote pagination for embed file listing
Diffstat (limited to 'mod/embed/views/default/embed')
-rw-r--r--mod/embed/views/default/embed/addcontentjs.php3
-rw-r--r--mod/embed/views/default/embed/embed.php8
2 files changed, 9 insertions, 2 deletions
diff --git a/mod/embed/views/default/embed/addcontentjs.php b/mod/embed/views/default/embed/addcontentjs.php
index 18d2927fd..ffed211f5 100644
--- a/mod/embed/views/default/embed/addcontentjs.php
+++ b/mod/embed/views/default/embed/addcontentjs.php
@@ -3,4 +3,5 @@
* Blank for compatibility.
* @deprecated 1.8
*/
-?> \ No newline at end of file
+
+elgg_deprecated_notice("The view 'embed/addcontentjs' has been deprecated.", 1.8);
diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php
index 9f0ac730f..77ce03699 100644
--- a/mod/embed/views/default/embed/embed.php
+++ b/mod/embed/views/default/embed/embed.php
@@ -21,7 +21,7 @@ if (!$sections) {
$content .= elgg_view('embed/tabs', $vars);
$offset = max(0, get_input('offset', 0));
- $limit = get_input('limit', 10);
+ $limit = get_input('limit', 5);
// build the items and layout.
if ($active_section == 'upload' || array_key_exists($active_section, $sections)) {
@@ -55,9 +55,15 @@ if (!$sections) {
if (!isset($embed_info['items']) || !is_array($embed_info['items']) || !count($embed_info['items'])) {
$content .= elgg_echo('embed:no_section_content');
} else {
+
elgg_push_context('widgets');
$content .= elgg_view_entity_list($embed_info['items'], array(
'full_view' => false,
+ 'count' => $embed_info['count'],
+ 'pagination' => true,
+ 'position' => 'before',
+ 'offset' => $offset,
+ 'limit' => $limit,
));
elgg_pop_context();