diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-10 13:02:04 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-10 13:02:04 +0000 |
commit | e378f5961943faf16995acda327b81a2d5a0bd05 (patch) | |
tree | d0f9284dc195e396313e28e3970840aae6ee2f8f /mod/groups/views | |
parent | 01a482ddf2684612a989772a732c13e9bc9cc04c (diff) | |
download | elgg-e378f5961943faf16995acda327b81a2d5a0bd05.tar.gz elgg-e378f5961943faf16995acda327b81a2d5a0bd05.tar.bz2 |
moved most of the groups pages into its library
git-svn-id: http://code.elgg.org/elgg/trunk@7867 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views')
-rw-r--r-- | mod/groups/views/default/groups/group_sort_menu.php | 23 | ||||
-rw-r--r-- | mod/groups/views/default/groups/profile/buttons.php | 2 |
2 files changed, 11 insertions, 14 deletions
diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php index b25f682e7..958c4084d 100644 --- a/mod/groups/views/default/groups/group_sort_menu.php +++ b/mod/groups/views/default/groups/group_sort_menu.php @@ -1,24 +1,21 @@ <?php +/** + * All groups navigation menu + */ - /** - * A simple view to provide the user with group filters and the number of group on the site - **/ - - $num_groups = $vars['count']; - if(!$num_groups) - $num_groups = 0; - - $filter = $vars['filter']; +$group_count = (int)elgg_get_entities(array('types' => 'group', 'count' => true)); + +$selected = elgg_get_array_value('selected', $vars); //url $url = elgg_get_site_url() . "pg/groups/world/"; ?> <div class="elgg-tabs margin-top"> -<div class="group_count"><?php echo $num_groups . " " . elgg_echo("groups:count"); ?></div> +<div class="group_count"><?php echo $group_count . " " . elgg_echo("groups:count"); ?></div> <ul> - <li <?php if($filter == "newest") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=newest"><?php echo elgg_echo('groups:newest'); ?></a></li> - <li <?php if($filter == "pop") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=pop"><?php echo elgg_echo('groups:popular'); ?></a></li> - <li <?php if($filter == "active") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=active"><?php echo elgg_echo('groups:latestdiscussion'); ?></a></li> + <li <?php if($selected == "newest") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=newest"><?php echo elgg_echo('groups:newest'); ?></a></li> + <li <?php if($selected == "pop") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=pop"><?php echo elgg_echo('groups:popular'); ?></a></li> + <li <?php if($selected == "active") echo "class='selected'"; ?>><a href="<?php echo $url; ?>?filter=active"><?php echo elgg_echo('groups:latestdiscussion'); ?></a></li> </ul> </div> diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php index 68cd2591a..cd4ee49dd 100644 --- a/mod/groups/views/default/groups/profile/buttons.php +++ b/mod/groups/views/default/groups/profile/buttons.php @@ -15,7 +15,7 @@ $actions = array(); // group owners if ($vars['entity']->canEdit()) { // edit and invite - $url = elgg_get_site_url() . "mod/groups/edit.php?group_guid={$vars['entity']->getGUID()}"; + $url = elgg_get_site_url() . "pg/groups/edit/{$vars['entity']->getGUID()}"; $actions[$url] = elgg_echo('groups:edit'); $url = elgg_get_site_url() . "mod/groups/invite.php?group_guid={$vars['entity']->getGUID()}"; $actions[$url] = elgg_echo('groups:invite'); |