aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-25 11:56:10 -0400
committercash <cash.costello@gmail.com>2011-06-25 11:56:10 -0400
commit8a6aca077a81b6cd654c1944b0a5e2498b1cc655 (patch)
treef529ff8dc1c4c799d25bb3064e91f1368931bc8f /views/default
parentdbf3edd887ee26b85d609481ea9ee247f3d46ac3 (diff)
downloadelgg-8a6aca077a81b6cd654c1944b0a5e2498b1cc655.tar.gz
elgg-8a6aca077a81b6cd654c1944b0a5e2498b1cc655.tar.bz2
added documentation to new river views and improved handling of responses
Diffstat (limited to 'views/default')
-rw-r--r--views/default/river/elements/body.php11
-rw-r--r--views/default/river/elements/responses.php10
-rw-r--r--views/default/river/elements/summary.php5
3 files changed, 21 insertions, 5 deletions
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php
index 6199e0861..f7a9d2426 100644
--- a/views/default/river/elements/body.php
+++ b/views/default/river/elements/body.php
@@ -2,7 +2,11 @@
/**
* Body of river item
*
- * @uses $vars['item']
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['summary'] Alternate summary (the short text summary of action)
+ * @uses $vars['message'] Optional message (usually excerpt of text)
+ * @uses $vars['attachments'] Optional attachments (displaying icons or other non-text data)
+ * @uses $vars['responses'] Alternate respones (comments, replies, etc.)
*/
$item = $vars['item'];
@@ -36,10 +40,7 @@ if ($attachments !== false) {
$attachments = "<div class=\"elgg-river-attachments\">$attachments</div>";
}
-$responses = elgg_extract('responses', $vars, false);
-if ($responses === false) {
- $responses = elgg_view('river/elements/responses', $vars);
-}
+$responses = elgg_view('river/elements/responses', $vars);
if ($responses) {
$responses = "<div class=\"elgg-river-responses\">$responses</div>";
}
diff --git a/views/default/river/elements/responses.php b/views/default/river/elements/responses.php
index f1e79f131..8c5be6316 100644
--- a/views/default/river/elements/responses.php
+++ b/views/default/river/elements/responses.php
@@ -1,8 +1,18 @@
<?php
/**
* River item footer
+ *
+ * @uses $vars['item'] ElggRiverItem
+ * @uses $vars['responses'] Alternate override for this item
*/
+// allow river views to override the response content
+$responses = elgg_extract('responses', $vars, false);
+if ($responses) {
+ echo $responses;
+ return true;
+}
+
$item = $vars['item'];
$object = $item->getObjectEntity();
diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php
index eee8754e2..4d80c29a6 100644
--- a/views/default/river/elements/summary.php
+++ b/views/default/river/elements/summary.php
@@ -1,4 +1,9 @@
<?php
+/**
+ * Short summary of the action that occurred
+ *
+ * @vars['item'] ElggRiverItem
+ */
$item = $vars['item'];