aboutsummaryrefslogtreecommitdiff
path: root/mod/logbrowser/views/default/object/logwrapper.php
blob: a46b166cd69d29de19ac68303aa881f7884332a1 (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
<?php
	/**
	 * Elgg log browser.
	 * 
	 * @package ElggLogBrowser
	 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
	 * @author Marcus Povey
	 * @copyright Curverider Ltd 2008
	 * @link http://elgg.com/
	 */

	$entry = $vars['entity']->entry;
	
	$by = get_entity($entry->performed_by_guid);
	$object = get_object_from_log_entry($entry->id);
	
	if (is_callable(array($object, 'getURL')))
		$obj_url = $object->getURL();
	
	//echo elgg_view_listing($icon, $info);
?>
	<table class="log_entry">
		<tr>
			<td class="log_entry_time">
			<?php echo date('r', $entry->time_created ); ?>
			</td>
			<td class="log_entry_user">
			<?php if ($by) {echo "<a href=\"".$by->getURL()."\">{$by->name}</a>"; } else echo "&nbsp;"; ?>
			<td>
			<td class="log_entry_item">
			<?php 
					if ($obj_url) echo "<a href=\"$obj_url\">";
					echo "{$entry->object_class}";
					if ($obj_url) echo "</a>"; 
			?>
			</td>
			<td class="log_entry_action">
				<div class="log_entry_action_<?php echo $entry->event; ?>">
					<?php echo elgg_echo($entry->event); ?>
				</div>
			</td>
		</tr>
	</table>