From 7ddf586da7fe11905c25dd20de3b5302f0f83bb1 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Thu, 12 Mar 2015 15:53:28 +0100 Subject: [PATCH] Add ProfileNoticeList[Item] as separate lib class files --- lib/profilenoticelist.php | 11 ++++++++ lib/profilenoticelistitem.php | 49 +++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 lib/profilenoticelist.php create mode 100644 lib/profilenoticelistitem.php 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'); + } + } +} -- 2.39.5