summaryrefslogtreecommitdiff
path: root/actions/replies.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-05-19 17:43:14 +0000
committerEvan Prodromou <evan@controlyourself.ca>2009-05-19 17:43:14 +0000
commit003c63e587128c6d095386c563c2615c2ac245c2 (patch)
treeefb11a3b7aee0a40128e96164d64648bdb7e497d /actions/replies.php
parent095aecdd5cdd77f26ec6e61fc9eda97c10a522fc (diff)
parent09e95cc33fb2228066d524e399bcc549e85eb565 (diff)
Merge branch '0.8.x' of git://gitorious.org/laconica/dev into dev/0.8.x
Diffstat (limited to 'actions/replies.php')
-rw-r--r--actions/replies.php37
1 files changed, 36 insertions, 1 deletions
diff --git a/actions/replies.php b/actions/replies.php
index 4ab9b14ed..dfb520d64 100644
--- a/actions/replies.php
+++ b/actions/replies.php
@@ -139,6 +139,17 @@ class RepliesAction extends Action
}
/**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'replies', array('nickname' => $this->user->nickname));
+ }
+
+ /**
* show the personal group nav
*
* @return void
@@ -166,13 +177,37 @@ class RepliesAction extends Action
$nl = new NoticeList($notice, $this);
$cnt = $nl->show();
+ if (0 === $cnt) {
+ $this->showEmptyListMessage();
+ }
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'replies',
array('nickname' => $this->user->nickname));
}
- function isReadOnly()
+ function showEmptyListMessage()
+ {
+ $message = sprintf(_('This is the timeline showing replies to %s but %s hasn\'t received a notice to his attention yet.'), $this->user->nickname, $this->user->nickname) . ' ';
+
+ if (common_logged_in()) {
+ $current_user = common_current_user();
+ if ($this->user->id === $current_user->id) {
+ $message .= _('You can engage other users in a conversation, subscribe to more people or [join groups](%%action.groups%%).');
+ } else {
+ $message .= sprintf(_('You can try to [nudge %s](../%s) or [post something to his or her attention](%%%%action.newnotice%%%%?status_textarea=%s).'), $this->user->nickname, $this->user->nickname, '@' . $this->user->nickname);
+ }
+ }
+ else {
+ $message .= sprintf(_('Why not [register an account](%%%%action.register%%%%) and then nudge %s or post a notice to his or her attention.'), $this->user->nickname);
+ }
+
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
+ }
+
+ function isReadOnly($args)
{
return true;
}