diff options
Diffstat (limited to 'mod/groups/views/default/groups/menu')
4 files changed, 53 insertions, 0 deletions
diff --git a/mod/groups/views/default/groups/menu/actions.php b/mod/groups/views/default/groups/menu/actions.php new file mode 100644 index 000000000..21101ddb8 --- /dev/null +++ b/mod/groups/views/default/groups/menu/actions.php @@ -0,0 +1,44 @@ +<?php + /** + * Elgg group actions + * + * @package ElggGroups + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.com/ + */ + + if (isloggedin()) { + + if ($vars['entity']->isMember($_SESSION['user'])) + { +?> + <p><a href="<?php echo $vars['url']; ?>action/groups/leave?group_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("groups:leave"); ?></a></p> +<?php + } + else + { + if ($vars['entity']->access_id == 2) + { +?> + <p><a href="<?php echo $vars['url']; ?>action/groups/join?group_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("groups:join"); ?></a></p> +<?php + } + else + { +?> + <p><a href="<?php echo $vars['url']; ?>action/groups/joinrequest?group_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("groups:joinrequest"); ?></a></p> +<?php + } + } + + // edit + if ($_SESSION['user']->getGUID() == $vars['entity']->owner_guid) + { + ?> + <p><a href="<?php echo $vars['url']; ?>mod/groups/edit.php?group_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a></p> + <?php + } + } +?>
\ No newline at end of file diff --git a/mod/groups/views/default/groups/menu/adminlinks.php b/mod/groups/views/default/groups/menu/adminlinks.php new file mode 100644 index 000000000..15c5adc7f --- /dev/null +++ b/mod/groups/views/default/groups/menu/adminlinks.php @@ -0,0 +1,3 @@ +<?php + +?>
\ No newline at end of file diff --git a/mod/groups/views/default/groups/menu/links.php b/mod/groups/views/default/groups/menu/links.php new file mode 100644 index 000000000..15c5adc7f --- /dev/null +++ b/mod/groups/views/default/groups/menu/links.php @@ -0,0 +1,3 @@ +<?php + +?>
\ No newline at end of file diff --git a/mod/groups/views/default/groups/menu/ownerlinks.php b/mod/groups/views/default/groups/menu/ownerlinks.php new file mode 100644 index 000000000..15c5adc7f --- /dev/null +++ b/mod/groups/views/default/groups/menu/ownerlinks.php @@ -0,0 +1,3 @@ +<?php + +?>
\ No newline at end of file |