aboutsummaryrefslogtreecommitdiff
path: root/views/default/river/elements/summary.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-24 13:42:07 -0400
committercash <cash.costello@gmail.com>2011-06-24 13:42:07 -0400
commit3c2f72753335a5ca793cf8250c4233d04689e5d2 (patch)
tree43fb542574f791bc47546e65e24f858c3eec0698 /views/default/river/elements/summary.php
parent42e02f03c306717002aac0d36f0e2b48bf369fed (diff)
parentd701c3bdf59e2d326c27dd0567323e09a65c00f2 (diff)
downloadelgg-3c2f72753335a5ca793cf8250c4233d04689e5d2.tar.gz
elgg-3c2f72753335a5ca793cf8250c4233d04689e5d2.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'views/default/river/elements/summary.php')
-rw-r--r--views/default/river/elements/summary.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/views/default/river/elements/summary.php b/views/default/river/elements/summary.php
new file mode 100644
index 000000000..eee8754e2
--- /dev/null
+++ b/views/default/river/elements/summary.php
@@ -0,0 +1,36 @@
+<?php
+
+$item = $vars['item'];
+
+$subject = $item->getSubjectEntity();
+$object = $item->getObjectEntity();
+$target = $object->getContainerEntity();
+
+$subject_link = elgg_view('output/url', array(
+ 'href' => $subject->getURL(),
+ 'text' => $subject->name,
+ 'class' => 'elgg-river-subject',
+));
+
+$object_link = elgg_view('output/url', array(
+ 'href' => $object->getURL(),
+ 'text' => $object->title ? $object->title : $object->name,
+ 'class' => 'elgg-river-object',
+));
+
+$action = $item->action_type;
+$type = $item->type;
+$subtype = $item->subtype ? $item->subtype : 'default';
+
+$container = $object->getContainerEntity();
+if ($container instanceof ElggGroup) {
+ $params = array(
+ 'href' => $container->getURL(),
+ 'text' => $container->name,
+ );
+ $group_link = elgg_view('output/url', $params);
+ $group_string = elgg_echo('river:ingroup', array($group_link));
+}
+
+
+echo elgg_echo("river:$action:$type:$subtype", array($subject_link, $object_link)); \ No newline at end of file