diff options
Diffstat (limited to 'views/default/river/elements/summary.php')
-rw-r--r-- | views/default/river/elements/summary.php | 41 |
1 files changed, 41 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..4d80c29a6 --- /dev/null +++ b/views/default/river/elements/summary.php @@ -0,0 +1,41 @@ +<?php +/** + * Short summary of the action that occurred + * + * @vars['item'] ElggRiverItem + */ + +$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 |