aboutsummaryrefslogtreecommitdiff
path: root/views/default/object/admin_notice.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/object/admin_notice.php')
-rw-r--r--views/default/object/admin_notice.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/views/default/object/admin_notice.php b/views/default/object/admin_notice.php
new file mode 100644
index 000000000..11524567e
--- /dev/null
+++ b/views/default/object/admin_notice.php
@@ -0,0 +1,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>',
+ 'is_action' => true,
+ 'class' => 'elgg-admin-notice',
+ 'is_trusted' => true,
+ ));
+
+ echo "<p>$delete$message</p>";
+}
+