aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/css/admin.php26
-rw-r--r--views/default/layout/shells/admin.php17
-rw-r--r--views/default/page/shells/admin.php1
3 files changed, 43 insertions, 1 deletions
diff --git a/views/default/css/admin.php b/views/default/css/admin.php
index 15e7f09ff..e1aee66fe 100644
--- a/views/default/css/admin.php
+++ b/views/default/css/admin.php
@@ -202,6 +202,32 @@ table.mceLayout {
content: "";
}
+.elgg-system-messages {
+ padding: 20px 40px 0;
+ width: 500px;
+ margin-bottom: -10px;
+}
+.elgg-system-messages p {
+ margin: 0;
+}
+.elgg-message {
+ padding: 10px;
+ margin-bottom: 10px;
+ border: 2px solid #dddddd;
+}
+
+.elgg-state-error {
+ background: #fbe3e4;
+ color: #8a1f11;
+ border-color: #fbc2c4;
+}
+
+.elgg-state-success {
+ background: #e6efc2;
+ color: #264409;
+ border-color: #c6d880;
+}
+
/* ***************************************
BODY
*************************************** */
diff --git a/views/default/layout/shells/admin.php b/views/default/layout/shells/admin.php
index 64144830f..988606ec1 100644
--- a/views/default/layout/shells/admin.php
+++ b/views/default/layout/shells/admin.php
@@ -37,6 +37,23 @@ $logout = elgg_view('output/url', array(
</div>
</div>
+<?php
+// @todo clean up system messages code
+$messages = null;
+if (count_messages()) {
+ // get messages - try for errors first
+ $messages = system_messages(NULL, "error");
+ if (count($messages["error"]) == 0) {
+ // no errors so grab rest of messages
+ $messages = system_messages(null, "");
+ } else {
+ // we have errors - clear out remaining messages
+ system_messages(null, "");
+ }
+}
+echo elgg_view('page/elements/messages', array('object' => $messages));
+?>
+
<div class="elgg-page-body">
<div class="elgg-sidebar clearfix">
<?php
diff --git a/views/default/page/shells/admin.php b/views/default/page/shells/admin.php
index 4326a986b..2c5cd2226 100644
--- a/views/default/page/shells/admin.php
+++ b/views/default/page/shells/admin.php
@@ -16,7 +16,6 @@ header("Content-type: text/html; charset=UTF-8");
echo elgg_view('page/elements/html_begin', $vars);
echo '<div class="elgg-page elgg-admin">';
-echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages']));
echo $vars['body'];
echo '</div>';