aboutsummaryrefslogtreecommitdiff
path: root/views/default/groups/profile/fields.php
blob: 6a666cfb741a1ceb94035f60179ac6665a3cf69d (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
<?php
/**
 * Group profile fields
 */

$group = $vars['entity'];

$profile_fields = elgg_get_config('group');

echo "<dl class=\"elgg-profile\">";
if (is_array($profile_fields) && count($profile_fields) > 0) {

	foreach ($profile_fields as $key => $valtype) {
		// do not show the name
		if ($key == 'name') {
			continue;
		}

		$value = $group->$key;
		if (empty($value)) {
			continue;
		}

		$options = array('value' => $group->$key);
		if ($valtype == 'tags') {
			$options['tag_names'] = $key;
		}

		echo "<dt>";
		echo elgg_echo("groups:$key");
		echo "</dt><dd>";
		echo elgg_view("output/$valtype", $options);
		echo "</dd>";
	}
}
echo "</dl>";