aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/groups/groupprofile.php
blob: 5232e9a6fd4155522ed1dfbf1867ddee613df138 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
/**
 * Elgg groups plugin full profile view.
 *
 * @package ElggGroups
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.com/
 */
?>
<div id="content_header" class="clearfloat">
	<div class="content_header_title">
		<h2><?php echo $vars['entity']->name; ?></h2>
	</div>
	<?php
		if ($vars['entity']->canEdit())	{
	?>
		<div class="content_header_options">
			<a class="action_button" href="<?php echo $vars['url']; ?>mod/groups/edit.php?group_guid=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("groups:edit"); ?></a>
		</div>
	<?php
		}
	?>
</div>

<div class="group_profile clearfloat">
	<div class="group_profile_column icon">
		<div class="group_profile_icon">
		<?php
		echo elgg_view(
			"groups/icon", array(
			'entity' => $vars['entity'],
			'size' => 'large',
			));
		?>
		</div>
		
		<div class="group_stats">
			<?php
				echo "<p><b>" . elgg_echo("groups:owner") . ": </b><a href=\"" . get_user($vars['entity']->owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "</a></p>";
			?>
			<p><?php echo elgg_echo('groups:members') . ": " . get_entities_from_relationship('member', $vars['entity']->guid, true, 'user', '', 0, '', 9999, 0, true); ?></p>
		</div>
	</div>
	
	<div class="group_profile_column info">
		<?php
			if ($vars['full'] == true) {
				if (is_array($vars['config']->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 "<p class=\"{$even_odd}\">";
							echo "<b>";
							echo elgg_echo("groups:{$shortname}");
							echo ": </b>";
	
							$options = array(
								'value' => $vars['entity']->$shortname
							);
	
							if ($valtype == 'tags') {
								$options['tag_names'] = $shortname;
							}
	
							echo elgg_view("output/{$valtype}", $options);
	
							echo "</p>";
						}
					}
				}
			}
		?>
	</div>
</div>