diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-06-24 07:13:18 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-06-24 07:13:18 -0400 |
commit | a3a03a721f62bcf1426a475a543b0b1fcd322bcf (patch) | |
tree | 4e6349bcf673d21e7513381b9acd1f832654fc02 /views/default/river/elements/body.php | |
parent | 344e47862b1f39eca19e39a000f97f799cc87a12 (diff) | |
parent | cf85a49c7e74133feaec7d52d8f289d22b59a56c (diff) | |
download | elgg-a3a03a721f62bcf1426a475a543b0b1fcd322bcf.tar.gz elgg-a3a03a721f62bcf1426a475a543b0b1fcd322bcf.tar.bz2 |
Merge branch '3404-river-revamp' of https://github.com/ewinslow/Elgg into ewinslow-3404-river-revamp
Conflicts:
languages/en.php
Diffstat (limited to 'views/default/river/elements/body.php')
-rw-r--r-- | views/default/river/elements/body.php | 57 |
1 files changed, 39 insertions, 18 deletions
diff --git a/views/default/river/elements/body.php b/views/default/river/elements/body.php index f9ecbc03c..080c04644 100644 --- a/views/default/river/elements/body.php +++ b/views/default/river/elements/body.php @@ -6,28 +6,49 @@ */ $item = $vars['item']; -$subject = $item->getSubjectEntity(); + +$menu = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority')); // river item header -$params = array( - 'href' => $subject->getURL(), - 'text' => $subject->name, -); -$subject_link = elgg_view('output/url', $params); $timestamp = elgg_get_friendly_time($item->getPostedTime()); -$header = elgg_view_menu('river', array('item' => $item, 'sort_by' => 'priority')); -$header .= "$subject_link <span class=\"elgg-river-timestamp\">$timestamp</span>"; +$summary = elgg_extract('summary', $vars, elgg_view('river/elements/summary', array('item' => $vars['item']))); +if ($summary === false) { + $subject = $item->getSubjectEntity(); + $summary = elgg_view('output/url', array( + 'href' => $subject->getURL(), + 'text' => $subject->name, + 'class' => 'elgg-river-subject', + )); +} + +$message = elgg_extract('message', $vars, false); +if ($message !== false) { + $message = "<div class=\"elgg-river-message\">$message</div>"; +} + +$attachments = elgg_extract('attachments', $vars, false); +if ($attachments !== false) { + $attachments = "<div class=\"elgg-river-attachments\">$attachments</div>"; +} -// body -$body = elgg_view($item->getView(), array('item' => $item)); +$responses = elgg_view('river/elements/responses', $vars); -// footer -$footer = elgg_view('river/elements/footer', $vars); +$group_string = ''; +$object = $item->getObjectEntity(); +$container = $object->getContainerEntity(); +if ($container instanceof ElggGroup && $container->guid != elgg_get_page_owner_guid()) { + $group_link = elgg_view('output/url', array( + 'href' => $container->getURL(), + 'text' => $container->name, + )); + $group_string = elgg_echo('river:ingroup', array($group_link)); +} -echo elgg_view('page/components/module', array( - 'header' => $header, - 'body' => $body, - 'footer' => $footer, - 'class' => 'mbn', -));
\ No newline at end of file +echo <<<RIVER +$menu +<div class="elgg-river-summary">$summary $group_string <span class="elgg-river-timestamp">$timestamp</span></div> +$message +$attachments +$responses +RIVER; |