From a8a36677748b304faf20742598b90f3d9634f393 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 8 Sep 2008 14:16:24 -0400 Subject: initial non-Ajax version of favorites darcs-hash:20080908181624-84dde-8200e1d91eb5f560ef0f296c9e1c56f93ef1b0c5.gz --- lib/stream.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib/stream.php') diff --git a/lib/stream.php b/lib/stream.php index c50167841..62d1cd67c 100644 --- a/lib/stream.php +++ b/lib/stream.php @@ -60,6 +60,11 @@ class StreamAction extends Action { _('Profile'), ($user_profile && $user_profile->fullname) ? $user_profile->fullname : $nickname, $action == 'showstream'); + common_menu_item(common_local_url('showfavorites', array('nickname' => + $nickname)), + _('Favorites'), + sprintf(_('%s\'s favorite notices'), ($user_profile) ? $user_profile->getBestName() : _('User')), + $action == 'showfavorites'); common_element_end('ul'); } @@ -133,10 +138,17 @@ class StreamAction extends Action { common_raw('×'); common_element_end('a'); } + if ($user) { + if ($user->hasFave($notice)) { + common_disfavor_form($notice); + } else { + common_favor_form($notice); + } + } common_element_end('p'); common_element_end('li'); } - + function source_link($source) { $source_name = _($source); switch ($source) { -- cgit v1.2.3-54-g00ecf