aboutsummaryrefslogtreecommitdiff
path: root/mod/reportedcontent/views/default/object/reported_content.php
blob: cc33f54fb748436286df138c1372d9d563903d22 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
 * Elgg reported content object view
 *
 * @package ElggReportContent
 */

$report = $vars['entity'];
$reporter = $report->getOwnerEntity();

$archive_url = elgg_get_site_url() . "action/reportedcontent/archive?guid=$report->guid";
$delete_url = elgg_get_site_url() . "action/reportedcontent/delete?guid=$report->guid";

//find out if the report is current or archive
if ($report->state == 'archived') {
	$reportedcontent_background = "reported-content-archived";
} else {
	$reportedcontent_background = "reported-content-active";
}

?>

<div class="reported-content <?php echo $reportedcontent_background; ?>">
	<div class="clearfix">
		<div class="clearfix controls">
<?php
	if ($report->state != 'archived') {
		$params = array(
			'href' => $archive_url,
			'text' => elgg_echo('reportedcontent:archive'),
			'is_action' => true,
			'is_trusted' => true,
			'class' => 'elgg-button elgg-button-action',
		);
		echo elgg_view('output/url', $params);
	}
	$params = array(
		'href' => $delete_url,
		'text' => elgg_echo('reportedcontent:delete'),
		'is_action' => true,
		'is_trusted' => true,
		'class' => 'elgg-button elgg-button-action',
	);
	echo elgg_view('output/url', $params);
?>
		</div>
		<p>
			<b><?php echo elgg_echo('reportedcontent:by'); ?>:</b>
			<?php echo elgg_view('output/url', array(
				'href' => $reporter->getURL(),
				'text' => $reporter->name,
				'is_trusted' => true,
			));
			?>,
			<?php echo elgg_view_friendly_time($report->time_created); ?>
		</p>
		<p>
			<b><?php echo elgg_echo('reportedcontent:objecttitle'); ?>:</b>
			<?php echo $report->title; ?>
		<p>
			<b><?php echo elgg_echo('reportedcontent:objecturl'); ?>:</b>
			<?php echo elgg_view('output/url', array(
				'href' => $report->address,
				'text' => elgg_echo('reportedcontent:visit'),
				'is_trusted' => true,
			));
			?>
		</p>
		<p>
			<?php echo elgg_view('output/url', array(
				'href' => "#report-$report->guid",
				'text' => elgg_echo('reportedcontent:moreinfo'),
				'rel' => "toggle",
			));
			?>
		</p>
	</div>
	<div class="report-details hidden" id="report-<?php echo $report->getGUID();?>">
		<p>
			<b><?php echo elgg_echo('reportedcontent:reason'); ?>:</b>
			<?php echo $report->description; ?>
		</p>
	</div>
</div>