aboutsummaryrefslogtreecommitdiff
path: root/views/default/page_elements/messages.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-06 12:47:29 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-06 12:47:29 +0000
commitb2b840fd9a86732542845addc4e1d458daeb7cc6 (patch)
tree0571779de99f27a402f30010261fa991c822d7bf /views/default/page_elements/messages.php
parent92f9928dc58c635abd1af8d5748afedd687225d3 (diff)
downloadelgg-b2b840fd9a86732542845addc4e1d458daeb7cc6.tar.gz
elgg-b2b840fd9a86732542845addc4e1d458daeb7cc6.tar.bz2
cleaned up system messages display code
git-svn-id: http://code.elgg.org/elgg/trunk@7548 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/page_elements/messages.php')
-rw-r--r--views/default/page_elements/messages.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/views/default/page_elements/messages.php b/views/default/page_elements/messages.php
new file mode 100644
index 000000000..f44d1204b
--- /dev/null
+++ b/views/default/page_elements/messages.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Elgg global system message list
+ * Lists all system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['object'] The array of message registers
+ */
+
+if (isset($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) {
+
+ echo '<ul class="elgg-system-messages">';
+
+ foreach ($vars['object'] as $type => $list ) {
+ foreach ($list as $message) {
+ echo "<li class=\"elgg-state-$type radius8\">";
+ echo elgg_view('output/longtext', array(
+ 'value' => $message,
+ 'parse_urls' => false
+ ));
+ echo '</li>';
+ }
+ }
+
+ echo '</ul>';
+}