summaryrefslogtreecommitdiff
path: root/actions/showstream.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-12-11 12:16:11 -0500
committerEvan Prodromou <evan@status.net>2009-12-11 12:16:11 -0500
commit0cb1feed51522abc35bfd4252089ca8c4df52bda (patch)
tree76c19650319568e009337937967695edb40e2fe5 /actions/showstream.php
parent962f391f3ebd4908ae7187673426f03e57083b02 (diff)
show repeated notice's author on profile page
Diffstat (limited to 'actions/showstream.php')
-rw-r--r--actions/showstream.php46
1 files changed, 46 insertions, 0 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index 663638c18..74b46cc95 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -269,4 +269,50 @@ class ProfileNoticeListItem extends NoticeListItem
{
return;
}
+
+ /**
+ * show a link to the author of repeat
+ *
+ * @return void
+ */
+
+ function showRepeat()
+ {
+ if (!empty($this->repeat)) {
+
+ // FIXME: this code is almost identical to default; need to refactor
+
+ $attrs = array('href' => $this->profile->profileurl,
+ 'class' => 'url');
+
+ if (!empty($this->profile->fullname)) {
+ $attrs['title'] = $this->profile->fullname . ' (' . $this->profile->nickname . ')';
+ }
+
+ $this->out->elementStart('span', 'repeat');
+
+ $this->out->elementStart('a', $attrs);
+
+ $avatar = $this->profile->getAvatar(AVATAR_MINI_SIZE);
+
+ $this->out->element('img', array('src' => ($avatar) ?
+ $avatar->displayUrl() :
+ Avatar::defaultImage(AVATAR_MINI_SIZE),
+ 'class' => 'avatar photo',
+ 'width' => AVATAR_MINI_SIZE,
+ 'height' => AVATAR_MINI_SIZE,
+ 'alt' =>
+ ($this->profile->fullname) ?
+ $this->profile->fullname :
+ $this->profile->nickname));
+
+ $this->out->elementEnd('a');
+
+ $text_link = XMLStringer::estring('a', $attrs, $this->profile->nickname);
+
+ $this->out->raw(sprintf(_('Repeat of %s'), $text_link));
+
+ $this->out->elementEnd('span');
+ }
+ }
}