* @see NoticeList
* @see ProfileNoticeListItem
*/
-
class NoticeListItem extends Widget
{
/** The notice this item will show. */
-
var $notice = null;
/** The notice that was repeated. */
-
var $repeat = null;
/** The profile of the author of the notice, extracted once for convenience. */
-
var $profile = null;
/**
*
* @param Notice $notice The notice we'll display
*/
-
function __construct($notice, $out=null)
{
parent::__construct($out);
*
* @return void
*/
-
function show()
{
if (empty($this->notice)) {
*
* @return void
*/
-
function showStart()
{
if (Event::handle('StartOpenNoticeListItemElement', array($this))) {
*
* @return void
*/
-
function showFaveForm()
{
if (Event::handle('StartShowFaveForm', array($this))) {
*
* @return void
*/
-
function showAuthor()
{
$this->out->elementStart('span', 'vcard author');
*
* @return void
*/
-
function showAvatar()
{
$avatar_size = $this->avatarSize();
*
* @return void
*/
-
function showNickname()
{
$this->out->raw('<span class="nickname fn">' .
*
* @return void
*/
-
function showContent()
{
// FIXME: URL, image, video, audio
*
* @return void
*/
-
function showNoticeLink()
{
$noticeurl = $this->notice->bestUrl();
*
* @return void
*/
-
function showNoticeLocation()
{
$id = $this->notice->id;
*
* @return void
*/
-
function showNoticeSource()
{
$ns = $this->notice->getSource();
*
* @return void
*/
-
function showContext()
{
if ($this->notice->hasConversation()) {
*
* @return void
*/
-
function showRepeat()
{
if (!empty($this->repeat)) {
*
* @return void
*/
-
function showReplyLink()
{
if (common_logged_in()) {
*
* @return void
*/
-
function showDeleteLink()
{
$user = common_current_user();
*
* @return void
*/
-
function showRepeatForm()
{
if ($this->notice->scope == Notice::PUBLIC_SCOPE ||
$profile = $user->getProfile();
if ($profile->hasRepeated($this->notice->id)) {
$this->out->element('span', array('class' => 'repeated',
- 'title' => _('Notice repeated')),
+ // TRANS: Title for repeat form status in notice list when a notice has been repeated.
+ 'title' => _('Notice repeated.')),
+ // TRANS: Repeat form status in notice list when a notice has been repeated.
_('Repeated'));
} else {
$rf = new RepeatForm($this->out, $this->notice);
*
* @return void
*/
-
function showEnd()
{
if (Event::handle('StartCloseNoticeListItemElement', array($this))) {