aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 03:34:27 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-08 03:34:27 +0000
commit44b5bfdf1fb994d91757be63cf4d4b4e8cc8b63d (patch)
treec78663cbb0eb0c22c48a96a9b71ae2cb46d186d8 /views
parentccc3bca78bb319d130daa3aae2f2af964ca79f4f (diff)
downloadelgg-44b5bfdf1fb994d91757be63cf4d4b4e8cc8b63d.tar.gz
elgg-44b5bfdf1fb994d91757be63cf4d4b4e8cc8b63d.tar.bz2
rough system messages implementation for admin backend
git-svn-id: http://code.elgg.org/elgg/trunk@8068 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-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>';