diff options
author | cash <cash.costello@gmail.com> | 2011-06-26 15:56:35 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2011-06-26 15:56:35 -0400 |
commit | fe1e3b3923659a4bea73e1596e0ba946f473635c (patch) | |
tree | ae8e98a12caa77f78dbfdbc9c492ee808c411c1c /mod/groups/views/default | |
parent | 3c34ddf59804767e6a7deea3e3ee6c81d4a09601 (diff) | |
download | elgg-fe1e3b3923659a4bea73e1596e0ba946f473635c.tar.gz elgg-fe1e3b3923659a4bea73e1596e0ba946f473635c.tar.bz2 |
this should update all the core pages and plugins using 'buttons'
Diffstat (limited to 'mod/groups/views/default')
-rw-r--r-- | mod/groups/views/default/groups/profile/buttons.php | 57 |
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>'; -} |