From 2fbf83b5374e76186dd5b16456bc50926a0a1a10 Mon Sep 17 00:00:00 2001 From: pete Date: Tue, 24 Feb 2009 11:33:43 +0000 Subject: groups:notfound:details text string formatted git-svn-id: https://code.elgg.org/elgg/trunk@2918 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/views/default/groups/groupprofile.php | 152 +++++++++-------------- 1 file changed, 58 insertions(+), 94 deletions(-) (limited to 'mod/groups') diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php index f9f7478cc..e26ecf1fd 100644 --- a/mod/groups/views/default/groups/groupprofile.php +++ b/mod/groups/views/default/groups/groupprofile.php @@ -1,94 +1,58 @@ - - -
-
- - $vars['entity'], - //'align' => "left", - 'size' => $iconsize, - ) - ); - ?> - -
-
- " . elgg_echo("groups:owner") . ": owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "

"; - - ?> -

guid, true, 'user', '', 0, '', 9999, 0, true); ?>

-
-
- -
- group) && sizeof($vars['config']->group) > 0){ - - foreach($vars['config']->group as $shortname => $valtype) { - if ($shortname != "name") { - $value = $vars['entity']->$shortname; - - if (!empty($value)) { - //This function controls the alternating class - $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; - } - - echo "

"; - echo ""; - echo elgg_echo("groups:{$shortname}"); - echo ": "; - - echo elgg_view("output/{$valtype}",array('value' => $vars['entity']->$shortname)); - - echo "

"; - } - } - } - } - ?> -
- -
- -

- -canEdit()) - { - -?> - - - - - - -

-
-
\ No newline at end of file +name; + + // Hide some items from closed groups when the user is not logged in. + $view_all = true; + + $groupaccess = group_gatekeeper(false); + if (!$groupaccess) + $view_all = false; + + + $area2 = elgg_view_title($title); + $area2 .= elgg_view('group/group', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true)); + + if ($view_all) { + //group profile 'items' - these are not real widgets, just contents to display + $area2 .= elgg_view('groups/profileitems',array('entity' => $group)); + + //group members + $area3 = elgg_view('groups/members',array('entity' => $group)); + } + else + { + $area2 .= elgg_view('groups/closedmembership', array('entity' => $group, 'user' => $_SESSION['user'], 'full' => true)); + + } + + $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2, $area3); + } else { + $title = elgg_echo('groups:notfound'); + + $area2 = elgg_view_title($title); + $area2 .= "
" . elgg_echo('groups:notfound:details') . "
"; + + $body = elgg_view_layout('two_column_left_sidebar', "", $area2,""); + } + + // Finally draw the page + page_draw($title, $body); +?> \ No newline at end of file -- cgit v1.2.3