aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/views')
-rw-r--r--mod/groups/views/default/groups/group_sort_menu.php23
-rw-r--r--mod/groups/views/default/groups/profile/buttons.php2
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');