From f2c274eeba80146dfecd6ddc0e1b28b3c6cb3f9d Mon Sep 17 00:00:00 2001 From: dave Date: Sat, 7 Feb 2009 16:05:17 +0000 Subject: small additions to the activity view git-svn-id: https://code.elgg.org/elgg/trunk@2676 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/activity/all.php | 6 ++- mod/activity/friends.php | 1 + mod/activity/index.php | 2 + mod/activity/languages/en.php | 60 +++++++++++++------------- mod/activity/views/default/activity/offset.php | 27 ++++++++++++ 5 files changed, 65 insertions(+), 31 deletions(-) create mode 100644 mod/activity/views/default/activity/offset.php (limited to 'mod') diff --git a/mod/activity/all.php b/mod/activity/all.php index 6cd30e160..cd19a7507 100644 --- a/mod/activity/all.php +++ b/mod/activity/all.php @@ -20,10 +20,12 @@ global $autofeed; $autofeed = true; - if (elgg_get_viewtype()=='opendd') + if (elgg_get_viewtype()=='opendd'){ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity_opendd($limit, $offset, $type, $subtype))); - else + }else{ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity($limit, $offset, $type, $subtype))); + $body .= elgg_view('activity/offset', array('offset' => $offset)); + } page_draw(elgg_echo('activity:all'),elgg_view_layout("two_column_left_sidebar", '', $title . $body)); diff --git a/mod/activity/friends.php b/mod/activity/friends.php index 5fc468277..f3a9fa89f 100644 --- a/mod/activity/friends.php +++ b/mod/activity/friends.php @@ -28,6 +28,7 @@ $autofeed = true; $body = elgg_view('activity/dashboard', array('activity' => $activity)); + $body .= elgg_view('activity/offset', array('offset' => $offset, 'add_to_url' => 'friends')); } else $body = elgg_echo('activity:nofriendactivity'); diff --git a/mod/activity/index.php b/mod/activity/index.php index b9173976a..583edf555 100644 --- a/mod/activity/index.php +++ b/mod/activity/index.php @@ -26,6 +26,8 @@ $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity_opendd($limit, $offset, $type, $subtype, page_owner()))); else $body = elgg_view('activity/dashboard', array('activity' => activity_get_activity($limit, $offset, $type, $subtype, page_owner()))); + $body .= elgg_view('activity/offset', array('offset' => $offset, 'add_to_url' => 'own')); + } else $body = elgg_echo('activity:usernotfound'); diff --git a/mod/activity/languages/en.php b/mod/activity/languages/en.php index 2af3a53e6..890192d2a 100644 --- a/mod/activity/languages/en.php +++ b/mod/activity/languages/en.php @@ -1,30 +1,32 @@ - 'Site activity', - 'activity' => 'Activity', - 'activity:your' => 'Your activity', - 'activity:friends' => 'Friend\'s activity', - 'activity:person' => '%s\'s activity', - 'activity:person:friends' => '%s\'s friend\'s activity', - - 'activity:useasdashboard' => 'Do you wish to use the activity stream as the dashboard?', - - 'activity:noactivity' => 'Sorry, there is currently no activity that matches your search criteria', - - 'activity:usernotfound' => 'User not found', - 'activity:nofriendactivity' => 'No activity, perhaps you should add some more friends?', - ); - - add_translation("en",$english); + 'Site activity', + 'activity' => 'Activity', + 'activity:your' => 'Your activity', + 'activity:friends' => 'Friend\'s activity', + 'activity:person' => '%s\'s activity', + 'activity:person:friends' => '%s\'s friend\'s activity', + + 'activity:useasdashboard' => 'Do you wish to use the activity stream as the dashboard?', + + 'activity:noactivity' => 'Sorry, there is currently no activity that matches your search criteria', + 'activity:forward' => "forward", + 'activity:back' => "back", + + 'activity:usernotfound' => 'User not found', + 'activity:nofriendactivity' => 'No activity, perhaps you should add some more friends?', + ); + + add_translation("en",$english); ?> \ No newline at end of file diff --git a/mod/activity/views/default/activity/offset.php b/mod/activity/views/default/activity/offset.php new file mode 100644 index 000000000..638cf9150 --- /dev/null +++ b/mod/activity/views/default/activity/offset.php @@ -0,0 +1,27 @@ +username . "/friends/"; + + if($add_to_url == "own") + $url = "pg/activity/" . $_SESSION['user']->username; + + + if($offset > 19) + $backset = $offset - 20;//set backset + + $offset = $offset + 20;//set new offset + + echo "
"; + + if($backset != '-1') + echo "". elgg_echo('activity:forward') . " "; + + echo "" . elgg_echo('activity:back') . "
"; + +?> \ No newline at end of file -- cgit v1.2.3