$notices[] = clone($notice); // *grumble* inefficient as hell
}
+ $this->out->elementStart('ul', 'notices threaded-replies xoxo');
+ $item = new ThreadedNoticeListFavesItem($this->notice, $this->out);
+ $hasFaves = $item->show();
if ($notices) {
- $this->out->elementStart('ul', 'notices threaded-replies xoxo');
- $item = new ThreadedNoticeListFavesItem($this->notice, $this->out);
- $hasFaves = $item->show();
if ($moreCutoff) {
$item = new ThreadedNoticeListMoreItem($moreCutoff, $this->out);
$item->show();
$item = new ThreadedNoticeListSubItem($notice, $this->out);
$item->show();
}
+ }
+ if ($notices || $hasFaves) {
// @fixme do a proper can-post check that's consistent
// with the JS side
if (common_current_user()) {
$item = new ThreadedNoticeListReplyItem($this->notice, $this->out);
$item->show();
}
- $this->out->elementEnd('ul');
}
+ $this->out->elementEnd('ul');
}
parent::showEnd();
{
//
}
+
+ function showEnd()
+ {
+ $item = new ThreadedNoticeListInlineFavesItem($this->notice, $this->out);
+ $hasFaves = $item->show();
+ parent::showEnd();
+ }
}
/**
}
$out = sprintf($msg, $this->magicList($links));
- $this->out->elementStart('li', array('class' => 'notice-faves'));
+ $this->showStart();
$this->out->raw($out);
- $this->out->elementEnd('li');
+ $this->showEnd();
return $count;
} else {
return 0;
}
}
+ function showStart()
+ {
+ $this->out->elementStart('li', array('class' => 'notice-data notice-faves'));
+ }
+
+ function showEnd()
+ {
+ $this->out->elementEnd('li');
+ }
+
function magicList($items)
{
if (count($items) == 0) {
}
}
}
+
+class ThreadedNoticeListInlineFavesItem extends ThreadedNoticeListFavesItem
+{
+ function showStart()
+ {
+ $this->out->elementStart('div', array('class' => 'entry-content notice-faves'));
+ }
+
+ function showEnd()
+ {
+ $this->out->elementEnd('div');
+ }
+}