Added filler text to popular page for when it's empty, encouraging user to add favorites and/or register.
This commit is contained in:
parent
e1fec6db2f
commit
9698247722
@ -143,6 +143,25 @@ class FavoritedAction extends Action
|
|||||||
$this->elementStart('div', 'instructions');
|
$this->elementStart('div', 'instructions');
|
||||||
$this->raw($output);
|
$this->raw($output);
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
|
|
||||||
|
$favorite = new Fave;
|
||||||
|
|
||||||
|
if ($favorite->count()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' ';
|
||||||
|
|
||||||
|
if (common_logged_in()) {
|
||||||
|
$message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->elementStart('div', 'blankfiller');
|
||||||
|
$this->raw(common_markup_to_html($message));
|
||||||
|
$this->elementEnd('div');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user