aboutsummaryrefslogtreecommitdiff
path: root/mod/activity/views/default/activity/wrapper.php
blob: 88ba6ef576f8a58a5215a06f79f648ab6d6aa017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php

	/**
	 * Elgg activity item wrapper.
	 * Wraps all river items.
	 * 
	 * @package Elgg
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Curverider
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.com/
	 */

	$statement = $vars['statement'];
	$time = $vars['time'];
	$event = $vars['event'];
	$entry = $vars['entry'];
	
	if ($statement->getObject() instanceof ElggEntity) {
		
		$obj = $statement->getObject();
		$subtype = $obj->getSubtype();
		if (empty($subtype)) $subtype = $obj->type;
		if (empty($subtype)) $subtype = "general";
	} else if (is_array($statement->getObject())) {
		$obj = $statement->getObject();
		$subtype = "relationship_" . $obj['relationship'];
	}
?>
<div class="activity_item">

	<div class="activity_<?php echo $subtype; ?>">
		<div class="activity_<?php echo $event; ?>">
			<p class="activity_<?php echo $subtype; ?>_<?php echo $event; ?>">
				<?php
		
					echo $vars['entry'];
				
				?>
				<span class="activity_item_time">
					(<?php
		
						echo friendly_time($time);
					
					?>)
				</span>
			</p>
		</div>
	</div>

</div>