summaryrefslogtreecommitdiff
path: root/lib/noticelist.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-08 17:31:23 -0500
committerEvan Prodromou <evan@status.net>2009-12-08 17:31:23 -0500
commit41cbb90faeabc0a6002b41d40d392f45a59a7aba (patch)
treec4f21de0111e3ad39769c71fa29f1ebb383304f0 /lib/noticelist.php
parent48a93810abe5fd5098ef4f91e2b9d5991e217748 (diff)
add (ugly) form to forward notices
Diffstat (limited to 'lib/noticelist.php')
-rw-r--r--lib/noticelist.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/noticelist.php b/lib/noticelist.php
index 21cec528f..b38860880 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->showForwardForm();
$this->showDeleteLink();
$this->out->elementEnd('div');
}
@@ -531,6 +532,26 @@ class NoticeListItem extends Widget
}
/**
+ * show the form to forward a notice
+ *
+ * @return void
+ */
+
+ function showForwardForm()
+ {
+ $user = common_current_user();
+ if ($user) {
+ $profile = $user->getProfile();
+ if ($profile->hasForwarded($this->notice->id)) {
+ $this->out->text(_('Forwarded'));
+ } else {
+ $ff = new ForwardForm($this->out, $this->notice);
+ $ff->show();
+ }
+ }
+ }
+
+ /**
* if the user is the author, let them delete the notice
*
* @return void