-
-/**
- * widget for displaying a single notice
- *
- * This widget has the core smarts for showing a single notice: what to display,
- * where, and under which circumstances. Its key method is show(); this is a recipe
- * that calls all the other show*() methods to build up a single notice. The
- * ProfileNoticeListItem subclass, for example, overrides showAuthor() to skip
- * author info (since that's implicit by the data in the page).
- *
- * @category UI
- * @package StatusNet
- * @author Evan Prodromou <evan@status.net>
- * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link http://status.net/
- * @see NoticeList
- * @see ProfileNoticeListItem
- */
-
-class ThreadedNoticeListItem extends NoticeListItem
-{
- /**
- * finish the notice
- *
- * Close the last elements in the notice list item
- *
- * @return void
- */
-
- function showEnd()
- {
- $notice = Notice::conversationStream($this->notice->conversation);
- $notices = array();
- while ($notice->fetch()) {
- if ($notice->id == $this->notice->id) {
- // Skip!
- continue;
- }
- $notices[] = clone($notice); // *grumble* inefficient as hell
- }
-
- if ($notices) {
- $this->out->elementStart('ul', 'notices threaded-notices xoxo');
- foreach (array_reverse($notices) as $notice) {
- $item = new ThreadedNoticeListSubItem($notice, $this->out);
- $item->show();
- }
- $this->out->elementEnd('ul');
- }
-
- parent::showEnd();
- }
-}
-
-class ThreadedNoticeListSubItem extends NoticeListItem
-{
-
- function avatarSize()
- {
- return AVATAR_STREAM_SIZE; // @fixme would like something in between
- }
-
- function showNoticeLocation()
- {
- //
- }
-
- function showNoticeSource()
- {
- //
- }
-}
\ No newline at end of file