]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3113 pulled group profile fields out of top profile area
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 21 Mar 2011 01:47:20 +0000 (01:47 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 21 Mar 2011 01:47:20 +0000 (01:47 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8800 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/groups/lib/groups.php
mod/groups/views/default/groups/profile/fields.php [new file with mode: 0644]
mod/groups/views/default/groups/profile/summary.php [moved from mod/groups/views/default/groups/profile/profile_block.php with 56% similarity]

index 0855f73d660e6aa10bbfb522342794f72f7e953c..cfab11ebbe8d416dab091ff817dc66dd2cc8cdbb 100644 (file)
@@ -195,7 +195,7 @@ function groups_handle_profile_page($guid) {
        elgg_push_breadcrumb($group->name);
 
        $sidebar = '';
-       $content = elgg_view('groups/profile/profile_block', array('entity' => $group));
+       $content = elgg_view('groups/profile/summary', array('entity' => $group));
        if (group_gatekeeper(false)) {
                $content .= elgg_view('groups/profile/widgets', array('entity' => $group));
                $sidebar = elgg_view('groups/sidebar/members', array('entity' => $group));
diff --git a/mod/groups/views/default/groups/profile/fields.php b/mod/groups/views/default/groups/profile/fields.php
new file mode 100644 (file)
index 0000000..5cd0602
--- /dev/null
@@ -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';
+       }
+}
similarity index 56%
rename from mod/groups/views/default/groups/profile/profile_block.php
rename to mod/groups/views/default/groups/profile/summary.php
index 2f384b4bfecc866799ad91a29f78a71c5eb851c2..b7ae51070ad3913d5a971a8efd1f721fd1ae51bb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Group profile
+ * Group profile summary
  *
  * Icon and profile fields
  *
@@ -15,8 +15,6 @@ if (!isset($vars['entity']) || !$vars['entity']) {
 $group = $vars['entity'];
 $owner = $group->getOwnerEntity();
 
-$profile_fields = elgg_get_config('group');
-
 ?>
 <div class="groups-profile clearfix elgg-image-block">
        <div class="elgg-image">
@@ -42,36 +40,11 @@ $profile_fields = elgg_get_config('group');
        </div>
 
        <div class="groups-profile-fields elgg-body">
-<?php
-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';
-       }
-}
-?>
+               <?php
+                       echo elgg_view('groups/profile/fields', $vars);
+               ?>
        </div>
 </div>
+<?php
+?>
+