aboutsummaryrefslogtreecommitdiff
path: root/views/default/user
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/user')
-rw-r--r--views/default/user/default.php44
1 files changed, 26 insertions, 18 deletions
diff --git a/views/default/user/default.php b/views/default/user/default.php
index 7106e6016..55be639ab 100644
--- a/views/default/user/default.php
+++ b/views/default/user/default.php
@@ -4,11 +4,15 @@
*
* @package Elgg
* @subpackage Core
+ *
+ * @uses $vars['entity'] ElggUser entity
+ * @uses $vars['size'] Size of the icon
*/
$user = $vars['entity'];
+$size = elgg_extract('size', $vars, 'tiny');
-$icon = elgg_view_entity_icon($user, 'tiny');
+$icon = elgg_view_entity_icon($user, $size);
// Simple XFN
$rel = '';
@@ -29,22 +33,26 @@ if (elgg_in_context('owner_block') || elgg_in_context('widgets')) {
$metadata = '';
}
-if ($user->isBanned()) {
- $params = array(
- 'entity' => $user,
- 'title' => $title,
- 'metadata' => '<ul class="elgg-menu elgg-menu-metadata"><li>banned</li></ul>',
- );
+if (elgg_get_context() == 'gallery') {
+ echo $icon;
} else {
- $params = array(
- 'entity' => $user,
- 'title' => $title,
- 'metadata' => $metadata,
- 'subtitle' => $user->briefdescription,
- 'content' => elgg_view('user/status', array('entity' => $user)),
- );
+ if ($user->isBanned()) {
+ $params = array(
+ 'entity' => $user,
+ 'title' => $title,
+ 'metadata' => '<ul class="elgg-menu elgg-menu-metadata"><li>banned</li></ul>',
+ );
+ } else {
+ $params = array(
+ 'entity' => $user,
+ 'title' => $title,
+ 'metadata' => $metadata,
+ 'subtitle' => $user->briefdescription,
+ 'content' => elgg_view('user/status', array('entity' => $user)),
+ );
+ }
+
+ $list_body = elgg_view('page/components/list/body', $params);
+
+ echo elgg_view_image_block($icon, $list_body);
}
-
-$list_body = elgg_view('page/components/list/body', $params);
-
-echo elgg_view_image_block($icon, $list_body);