create.php 1003 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * River view for group discussion replies
  4. */
  5. $item = $vars['item'];
  6. /* @var ElggRiverItem $item */
  7. $reply = $item->getObjectEntity();
  8. $subject = $item->getSubjectEntity();
  9. $target = $item->getTargetEntity();
  10. $subject_link = elgg_view('output/url', array(
  11. 'href' => $subject->getURL(),
  12. 'text' => $subject->name,
  13. 'class' => 'elgg-river-subject',
  14. 'is_trusted' => true,
  15. ));
  16. $target_link = elgg_view('output/url', array(
  17. 'href' => $target->getURL(),
  18. 'text' => $target->getDisplayName(),
  19. 'class' => 'elgg-river-target',
  20. 'is_trusted' => true,
  21. ));
  22. $reply_link = elgg_view('output/url', array(
  23. 'href' => $reply->getURL(),
  24. 'text' => elgg_echo('river:reply:view'),
  25. 'class' => 'elgg-river-target',
  26. 'is_trusted' => true,
  27. ));
  28. $summary = elgg_echo('river:reply:object:groupforumtopic', array($subject_link, $target_link));
  29. echo elgg_view('river/elements/layout', array(
  30. 'item' => $item,
  31. 'message' => elgg_get_excerpt($reply->description). ' ' .$reply_link,
  32. 'summary' => $summary,
  33. ));