From: Mikael Nordfeldth Date: Thu, 12 Mar 2015 14:53:28 +0000 (+0100) Subject: Add ProfileNoticeList[Item] as separate lib class files X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7ddf586da7fe11905c25dd20de3b5302f0f83bb1;p=quix0rs-gnu-social.git Add ProfileNoticeList[Item] as separate lib class files --- diff --git a/lib/profilenoticelist.php b/lib/profilenoticelist.php new file mode 100644 index 0000000000..d95709e7e9 --- /dev/null +++ b/lib/profilenoticelist.php @@ -0,0 +1,11 @@ +out); + } +} diff --git a/lib/profilenoticelistitem.php b/lib/profilenoticelistitem.php new file mode 100644 index 0000000000..d7773cab31 --- /dev/null +++ b/lib/profilenoticelistitem.php @@ -0,0 +1,49 @@ +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->getFancyName(); + } + + $this->out->elementStart('span', 'repeat'); + + $text_link = XMLStringer::estring('a', $attrs, $this->profile->nickname); + + // TRANS: Link to the author of a repeated notice. %s is a linked nickname. + $this->out->raw(sprintf(_('Repeat of %s'), $text_link)); + + $this->out->elementEnd('span'); + } + } +}