aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/admin_notice.php
blob: 45485a1dcb12c6041e30d3e6a133325e083c6556 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 * A persistent admin notice to be displayed on all admin pages until cleared.
 */

if (isset($vars['entity']) && elgg_instanceof($vars['entity'], 'object', 'admin_notice')) {
	$notice = $vars['entity'];
	$message = $notice->description;

	$delete = elgg_view('output/url', array(
		'href' => "action/admin/delete_admin_notice?guid=$notice->guid",
		'text' => '<span class="elgg-icon elgg-icon-delete"></span>',
		'encode' => false,
		'is_action' => true,
		'class' => 'elgg-admin-notice'
	));

	echo "<p>$message$delete</p>";
}