aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/views/default/groups/profile/fields.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-21 01:47:20 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-21 01:47:20 +0000
commit7f4e7c8a0a9bf500f9c888fc49aece9644fee8fd (patch)
tree7cebbe2613836f8501f3e3379e9e1f9e992c4438 /mod/groups/views/default/groups/profile/fields.php
parente6999787767a2c6f514575885d6df75e3e66a8ea (diff)
downloadelgg-7f4e7c8a0a9bf500f9c888fc49aece9644fee8fd.tar.gz
elgg-7f4e7c8a0a9bf500f9c888fc49aece9644fee8fd.tar.bz2
Fixes #3113 pulled group profile fields out of top profile area
git-svn-id: http://code.elgg.org/elgg/trunk@8800 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/groups/profile/fields.php')
-rw-r--r--mod/groups/views/default/groups/profile/fields.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/mod/groups/views/default/groups/profile/fields.php b/mod/groups/views/default/groups/profile/fields.php
new file mode 100644
index 000000000..5cd06025f
--- /dev/null
+++ b/mod/groups/views/default/groups/profile/fields.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * Group profile fields
+ */
+
+$group = $vars['entity'];
+
+$profile_fields = elgg_get_config('group');
+
+if (is_array($profile_fields) && count($profile_fields) > 0) {
+
+ $even_odd = 'odd';
+ 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 "<p class=\"{$even_odd}\">";
+ echo "<b>";
+ echo elgg_echo("groups:$key");
+ echo ": </b>";
+ echo elgg_view("output/$valtype", $options);
+ echo "</p>";
+
+ $even_odd = ($even_odd == 'even') ? 'odd' : 'even';
+ }
+}