summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-04-15 09:38:19 +0200
committerAdrian Lang <mail@adrianlang.de>2009-04-15 09:38:19 +0200
commit99f4367d03a4bd0676ac2b7ea9b5cfb8cf0f6f83 (patch)
treec84cd6625a0df93ec078317f29eeb0046bb9e59e /actions
parentfc6cedd2227d9d560736e494f431e2b40b26b45c (diff)
parent2fb8c58c84ef02766364e605d28ecaf90c5fc25f (diff)
Merge branch 'link-rel-paginate' of git://gitorious.org/laconica/meitar. Fixed wrong call of common_local_url.
These changes add opera-readable prev/next relations.
Diffstat (limited to 'actions')
-rw-r--r--actions/all.php11
-rw-r--r--actions/favorited.php11
-rw-r--r--actions/groupmembers.php13
-rw-r--r--actions/groups.php11
-rw-r--r--actions/inbox.php11
-rw-r--r--actions/outbox.php11
-rw-r--r--actions/public.php23
-rw-r--r--actions/replies.php11
-rw-r--r--actions/showfavorites.php12
-rw-r--r--actions/showgroup.php11
-rw-r--r--actions/showstream.php11
-rw-r--r--actions/tag.php11
12 files changed, 146 insertions, 1 deletions
diff --git a/actions/all.php b/actions/all.php
index f5bbfe2e3..cb68691ba 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -69,6 +69,17 @@ class AllAction extends ProfileAction
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'all', array('nickname' => $this->user->nickname));
+ }
+
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
diff --git a/actions/favorited.php b/actions/favorited.php
index 09ab1216a..8cf1528b2 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -221,4 +221,15 @@ class FavoritedAction extends Action
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'favorited');
}
+
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'favorited');
+ }
}
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index 00f43a9f5..b80f3d90d 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -137,4 +137,15 @@ class GroupmembersAction extends Action
$this->page, 'groupmembers',
array('nickname' => $this->group->nickname));
}
-} \ No newline at end of file
+
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'groupmembers', array('nickname' => $this->group->nickname));
+ }
+}
diff --git a/actions/groups.php b/actions/groups.php
index 39dc2232b..e158698de 100644
--- a/actions/groups.php
+++ b/actions/groups.php
@@ -129,4 +129,15 @@ class GroupsAction extends Action
$gbm = new GroupsByMembersSection($this);
$gbm->show();
}
+
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'groups', array('nickname' => $this->group->nickname));
+ }
}
diff --git a/actions/inbox.php b/actions/inbox.php
index b553ab26c..7b5cf2d20 100644
--- a/actions/inbox.php
+++ b/actions/inbox.php
@@ -64,6 +64,17 @@ class InboxAction extends MailboxAction
}
/**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'inbox', array('nickname' => $this->user->nickname));
+ }
+
+ /**
* Retrieve the messages for this user and this page
*
* Does a query for the right messages
diff --git a/actions/outbox.php b/actions/outbox.php
index c8d7f2812..deef1cc87 100644
--- a/actions/outbox.php
+++ b/actions/outbox.php
@@ -63,6 +63,17 @@ class OutboxAction extends MailboxAction
}
/**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'outbox', array('nickname' => $this->user->nickname));
+ }
+
+ /**
* retrieve the messages for this user and this page
*
* Does a query for the right messages
diff --git a/actions/public.php b/actions/public.php
index 5a380de9a..961606908 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -56,6 +56,18 @@ class PublicAction extends Action
var $page = null;
+ /**
+ * Number of notices being shown on this page.
+ */
+ // Does this need to be here? Should it be?
+ // If it does, this property needs to be
+ // added to other actions as well, like $page.
+ // I'm trying to find a way to capture the
+ // output of the $cnt variable from this
+ // action's showContent() method but need
+ // to do so earlier, I think...?
+ var $count = null;
+
function isReadOnly()
{
return true;
@@ -136,6 +148,17 @@ class PublicAction extends Action
}
/**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'public');
+ }
+
+ /**
* Extra head elements
*
* We include a <meta> element linking to the publicxrds page, for OpenID
diff --git a/actions/replies.php b/actions/replies.php
index 2769cb422..1b593776e 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
diff --git a/actions/showfavorites.php b/actions/showfavorites.php
index 4d4349505..5ebbfef77 100644
--- a/actions/showfavorites.php
+++ b/actions/showfavorites.php
@@ -151,6 +151,18 @@ class ShowfavoritesAction extends Action
}
/**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showfavorites', array('nickname' => $this->user->nickname));
+ }
+
+
+ /**
* show the personal group nav
*
* @return void
diff --git a/actions/showgroup.php b/actions/showgroup.php
index 79445851f..d5e5a4e11 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -312,6 +312,17 @@ class ShowgroupAction extends Action
}
/**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showgroup', array('nickname' => $this->group->nickname));
+ }
+
+ /**
* Fill in the sidebar.
*
* @return void
diff --git a/actions/showstream.php b/actions/showstream.php
index ce237dae2..3fe604f24 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -135,6 +135,17 @@ class ShowstreamAction extends ProfileAction
sprintf(_('FOAF for %s'), $this->user->nickname)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'showstream', array('nickname' => $this->user->nickname));
+ }
+
function extraHead()
{
// for remote subscriptions etc.
diff --git a/actions/tag.php b/actions/tag.php
index 583879f9c..06411085b 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -77,6 +77,17 @@ class TagAction extends Action
sprintf(_('Feed for tag %s'), $this->tag)));
}
+ /**
+ * Output document relationship links
+ *
+ * @return void
+ */
+ function showRelationshipLinks()
+ {
+ $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
+ $this->page, 'tag', array('tag' => $this->tag));
+ }
+
function showPageNotice()
{
return sprintf(_('Messages tagged "%s", most recent first'), $this->tag);