id); // Set title, form destination if (isset($vars['collection'])) { $action = "friends/editcollection"; $title = $vars['collection'][0]->name; $highlight = 'default'; } else { $action = "friends/addcollection"; $title = ""; $highlight = 'all'; } $form_body = "
";
if($vars['collection_members']){
$form_body .= elgg_echo("friends:collectionfriends") . "
";
foreach($vars['collection_members'] as $mem){
$form_body .= elgg_view("profile/icon",array('entity' => $mem, 'size' => 'tiny'));
$form_body .= $mem->name;
}
}
$form_body .= "
". elgg_view('friends/picker',array('entities' => $vars['friends'], 'internalname' => 'friends_collection', 'highlight' => $highlight)) . "
"; $form_body .= ""; if (isset($vars['collection'])) { $form_body .= elgg_view('input/hidden', array('internalname' => 'collection_id', 'value' => "{$vars['collection'][0]->id}")); } $form_body .= elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); $form_body .= "