aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-06-27 03:12:42 -0700
committerCash Costello <cash.costello@gmail.com>2011-06-27 03:12:42 -0700
commite82534d0bceb80f7a9e7ba8f00748ee1eb32b214 (patch)
treeae8e98a12caa77f78dbfdbc9c492ee808c411c1c /mod/groups/views/default
parent33f5c59d5318bc1e9a607215a31e48c6f7ab5b29 (diff)
parentfe1e3b3923659a4bea73e1596e0ba946f473635c (diff)
downloadelgg-e82534d0bceb80f7a9e7ba8f00748ee1eb32b214.tar.gz
elgg-e82534d0bceb80f7a9e7ba8f00748ee1eb32b214.tar.bz2
Merge pull request #52 from cash/banishing-auto-button
Fixes #3616 Banishing auto 'add' button
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r--mod/groups/views/default/groups/profile/buttons.php57
1 files changed, 0 insertions, 57 deletions
diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php
deleted file mode 100644
index 55e99f59c..000000000
--- a/mod/groups/views/default/groups/profile/buttons.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * Content header action buttons
- *
- * @uses $vars['entity']
- *
- * @todo This should be done by registering menu items with the page actions menu
- */
-
-if (!elgg_is_logged_in()) {
- return true;
-}
-
-
-$actions = array();
-
-// group owners
-if ($vars['entity']->canEdit()) {
- // edit and invite
- $url = elgg_get_site_url() . "groups/edit/{$vars['entity']->getGUID()}";
- $actions[$url] = elgg_echo('groups:edit');
- $url = elgg_get_site_url() . "groups/invite/{$vars['entity']->getGUID()}";
- $actions[$url] = elgg_echo('groups:invite');
-}
-
-// group members
-if ($vars['entity']->isMember($user)) {
- // leave
- $url = elgg_get_site_url() . "action/groups/leave?group_guid={$vars['entity']->getGUID()}";
- $url = elgg_add_action_tokens_to_url($url);
- $actions[$url] = elgg_echo('groups:leave');
-} else {
- // join - admins can always join.
- $url = elgg_get_site_url() . "action/groups/join?group_guid={$vars['entity']->getGUID()}";
- $url = elgg_add_action_tokens_to_url($url);
- if ($vars['entity']->isPublicMembership() || $vars['entity']->canEdit()) {
- $actions[$url] = elgg_echo('groups:join');
- } else {
- // request membership
- $actions[$url] = elgg_echo('groups:joinrequest');
- }
-}
-
-// display action buttons
-if ($actions) {
- echo '<ul class="elgg-menu elgg-menu-title elgg-menu-hz">';
- foreach ($actions as $url => $action) {
- echo '<li>';
- echo elgg_view('output/url', array(
- 'text' => $action,
- 'href' => $url,
- 'class' => 'elgg-button elgg-button-action',
- ));
- echo '</li>';
- }
- echo '</ul>';
-}