From 10bec18dce2a29fb2947888547756438d0972cb7 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 28 Mar 2009 18:14:57 +0000 Subject: condensed group "widget" and profile widget to one view --- views/default/tidypics/groupprofile_albums.php | 61 ++------------------------ 1 file changed, 3 insertions(+), 58 deletions(-) (limited to 'views/default/tidypics/groupprofile_albums.php') diff --git a/views/default/tidypics/groupprofile_albums.php b/views/default/tidypics/groupprofile_albums.php index de61b0845..060c540d4 100644 --- a/views/default/tidypics/groupprofile_albums.php +++ b/views/default/tidypics/groupprofile_albums.php @@ -1,64 +1,9 @@ photos_enable != 'no') { - - //the number of files to display - $number = (int) $vars['entity']->num_display; - //if no number has been set, default to 5 - if (!$number) - $number = 5; - - $owner = page_owner_entity(); - $owner_albums = get_entities("object", "album", page_owner(), "", $number, 0, false); - echo '
'; - echo '

' . elgg_echo('albums') . '

'; - - if ($owner_albums) { - echo '
'; - foreach($owner_albums as $album){ - - //get album cover if one was set - if($album->cover) - $album_cover = 'album cover'; - else - $album_cover = 'new album'; - - ?> -
- -
time_created);?>
- getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")
"; - ?> - -
- username) || empty($owner->username)) { - echo '' . elgg_echo('album:all') . ''; - } else { - echo '' . elgg_echo('album:more') . ''; - } - - //close album_widget_container div - echo "
"; - } else { - - //echo '
'; - //echo '

'.elgg_echo("album:none").'

'; - if ($owner && ($owner->canWriteToContainer($_SESSION['user']))){ - //echo 'username.'>'.elgg_echo("album:add").''; - //echo '
'; - } - - } - //close group_albums_widget div - echo "
"; + echo '

' . elgg_echo('album:group') . '

'; + echo elgg_view('tidypics/albums', array('num_albums' => 5)); + echo ''; } ?> \ No newline at end of file -- cgit v1.2.3