From 81843f2acd5375a9072d091fd58c6a6af079295e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 11 Dec 2009 10:49:26 -0500 Subject: show the repeat form in notice lists --- lib/noticelist.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'lib/noticelist.php') diff --git a/lib/noticelist.php b/lib/noticelist.php index 21cec528f..924056ece 100644 --- a/lib/noticelist.php +++ b/lib/noticelist.php @@ -212,6 +212,7 @@ class NoticeListItem extends Widget $this->out->elementStart('div', 'notice-options'); $this->showFaveForm(); $this->showReplyLink(); + $this->showRepeatForm(); $this->showDeleteLink(); $this->out->elementEnd('div'); } @@ -551,6 +552,26 @@ class NoticeListItem extends Widget } } + /** + * show the form to repeat a notice + * + * @return void + */ + + function showRepeatForm() + { + $user = common_current_user(); + if ($user && $user->id != $this->notice->profile_id) { + $profile = $user->getProfile(); + if ($profile->hasRepeated($this->notice->id)) { + $this->out->text(_('Repeated')); + } else { + $rf = new RepeatForm($this->out, $this->notice); + $rf->show(); + } + } + } + /** * finish the notice * -- cgit v1.2.3-54-g00ecf