diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-16 21:01:42 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-16 21:01:42 -0300 |
commit | 815bb3bf5a5e8da9a7962a4a532c3129f09d5735 (patch) | |
tree | 41bec5b730cc3dca936438f9e97810e7ab3ede0a /mod/subgroups/views/default/groups/profile | |
parent | c102a5c9f4e9e2f78260019ccab6098435b1df19 (diff) | |
parent | 5f6dc365a8445a48156b45912827eac39fd64fc5 (diff) | |
download | elgg-815bb3bf5a5e8da9a7962a4a532c3129f09d5735.tar.gz elgg-815bb3bf5a5e8da9a7962a4a532c3129f09d5735.tar.bz2 |
Merge commit '5f6dc365a8445a48156b45912827eac39fd64fc5' as 'mod/subgroups'
Diffstat (limited to 'mod/subgroups/views/default/groups/profile')
-rw-r--r-- | mod/subgroups/views/default/groups/profile/fields.php | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/mod/subgroups/views/default/groups/profile/fields.php b/mod/subgroups/views/default/groups/profile/fields.php new file mode 100644 index 000000000..41b0de9a0 --- /dev/null +++ b/mod/subgroups/views/default/groups/profile/fields.php @@ -0,0 +1,41 @@ +<?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 or hidden values + if ($key == 'name' || $valtype == 'hidden') { + continue; + } + + $value = $group->$key; + if (empty($value)) { + continue; + } + + $options = array('value' => $group->$key); + if ($valtype == 'tags') { + $options['tag_names'] = $key; + } + + if ($output = elgg_view("output/$valtype", $options)) { + + echo "<div class=\"{$even_odd}\">"; + echo "<b>"; + echo elgg_echo("groups:$key"); + echo ": </b>"; + echo $output; + echo "</div>"; + + $even_odd = ($even_odd == 'even') ? 'odd' : 'even'; + } + } +} |