aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:02:11 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 23:02:11 +0000
commit99175d2417bc5d3657cc3e548affe21eda76f648 (patch)
tree3bcacce06877a1d7a2bd6634fe614a9618968f8c
parentbfb0a3e9b289e4036bfeb3e694586387fc4f904e (diff)
downloadelgg-99175d2417bc5d3657cc3e548affe21eda76f648.tar.gz
elgg-99175d2417bc5d3657cc3e548affe21eda76f648.tar.bz2
Refs #3045 adds a gallery context based view for users
git-svn-id: http://code.elgg.org/elgg/trunk@8676 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/views.php2
-rw-r--r--views/default/page/components/gallery.php4
-rw-r--r--views/default/page/components/list.php2
-rw-r--r--views/default/user/default.php44
4 files changed, 32 insertions, 20 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 637e9c460..ae089add6 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1265,7 +1265,7 @@ function elgg_view_list_item($item, array $vars = array()) {
case 'object':
case 'group':
case 'site':
- return elgg_view_entity($item, $full_view);
+ return elgg_view_entity($item, $vars);
case 'annotation':
return elgg_view_annotation($item, $full_view);
case 'river':
diff --git a/views/default/page/components/gallery.php b/views/default/page/components/gallery.php
index c6764d92f..8d3052ed9 100644
--- a/views/default/page/components/gallery.php
+++ b/views/default/page/components/gallery.php
@@ -23,6 +23,10 @@ $position = elgg_extract('position', $vars, 'after');
$num_columns = 4;
+// @todo standardize on full_view - will require backward compatible code
+if (isset($vars['full_view'])) {
+ $vars['full'] = $vars['full_view'];
+}
if ($pagination && $count) {
$nav .= elgg_view('navigation/pagination', array(
diff --git a/views/default/page/components/list.php b/views/default/page/components/list.php
index 5e8c8432d..3a4fc21c8 100644
--- a/views/default/page/components/list.php
+++ b/views/default/page/components/list.php
@@ -25,7 +25,7 @@ $pagination = elgg_extract('pagination', $vars, true);
$offset_key = elgg_extract('offset_key', $vars, 'offset');
$position = elgg_extract('position', $vars, 'after');
-// @todo standardize on full - will require backward compatible code
+// @todo standardize on full_view - will require backward compatible code
if (isset($vars['full_view'])) {
$vars['full'] = $vars['full_view'];
}
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);