insert profile flags more or less correctly

This commit is contained in:
Evan Prodromou
2009-11-01 23:25:30 -05:00
parent 70e4580c3f
commit f2b642ce82
5 changed files with 97 additions and 2 deletions

View File

@@ -128,9 +128,20 @@ class UserFlagPlugin extends Plugin
if (!empty($user)) {
$form = new FlagProfileForm($action, $profile);
$action->elementStart('li', 'entity_flag');
$form->show();
if (User_flag_profile::exists($profile->id, $user->id,
Profile_flag::DEFAULTFLAG)) {
$action->element('span',
_('Flagged for review'));
} else {
$form = new FlagProfileForm($action, $profile,
array('action' => 'showstream',
'nickname' => $profile->nickname));
$form->show();
}
$action->elementEnd('li');
}
return true;