summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-07-08 16:04:07 +0000
committerDries Buytaert <dries@buytaert.net>2004-07-08 16:04:07 +0000
commit5b73def39b0300cc08bcd21fb46717c7b057c42e (patch)
treeb5f253058c521a10d84124e18db33b0c1884cd6c /themes
parent898bdeffafe913417951ec214d57ec930ea90812 (diff)
downloadbrdo-5b73def39b0300cc08bcd21fb46717c7b057c42e.tar.gz
brdo-5b73def39b0300cc08bcd21fb46717c7b057c42e.tar.bz2
- Changed the way status messages are printed as per Kristjan's suggestion:
http://drupal.org/files/issues/error_messages_list.png (issue #9138). drupal_set_message() has been changed to group message by type and a helper function, theme_status_message(), is added to display the messages. Chameleon and Xtemplate have been updated to use this new function. - Updated CHANGELOG.txt.
Diffstat (limited to 'themes')
-rw-r--r--themes/chameleon/chameleon.theme5
-rw-r--r--themes/chameleon/common.css12
-rw-r--r--themes/xtemplate/default/xtemplate.css2
-rw-r--r--themes/xtemplate/default/xtemplate.xtmpl2
-rw-r--r--themes/xtemplate/pushbutton/xtemplate.css2
-rw-r--r--themes/xtemplate/pushbutton/xtemplate.xtmpl2
-rw-r--r--themes/xtemplate/xtemplate.theme6
7 files changed, 13 insertions, 18 deletions
diff --git a/themes/chameleon/chameleon.theme b/themes/chameleon/chameleon.theme
index 3f24f7406..8af17edf0 100644
--- a/themes/chameleon/chameleon.theme
+++ b/themes/chameleon/chameleon.theme
@@ -77,10 +77,7 @@ function chameleon_page($content, $title = NULL, $breadcrumb = NULL) {
$output .= "<div id=\"help\">$help</div><hr />";
}
- foreach (drupal_get_messages() as $message) {
- list($message, $type) = $message;
- $output .= "<div class=\"message $type\">". ucfirst($message) ."</div>";
- }
+ $output .= theme_status_messages();
$output .= "\n<!-- begin content -->\n";
$output .= $content;
diff --git a/themes/chameleon/common.css b/themes/chameleon/common.css
index ece5c3ab3..7ed4e4ff8 100644
--- a/themes/chameleon/common.css
+++ b/themes/chameleon/common.css
@@ -99,17 +99,17 @@ br {
.block {
width: 180px;
}
-.message {
+.messages {
padding: 0.3em;
- margin: 1em 0em 1em 0em;
+ margin: 0.5em 0em 0.5em 0em;
}
.status {
- border: 1px solid #696;
- color: #696;
+ border: 1px solid #3a3;
+ color: #3a3;
}
.error, form-item input.error {
- border: 1px solid #930;
- color: #930;
+ border: 1px solid red;
+ color: red;
}
/*
diff --git a/themes/xtemplate/default/xtemplate.css b/themes/xtemplate/default/xtemplate.css
index 5e2e7b2c2..8828323a4 100644
--- a/themes/xtemplate/default/xtemplate.css
+++ b/themes/xtemplate/default/xtemplate.css
@@ -142,7 +142,7 @@ table {
.breadcrumb {
margin-bottom: .5em;
}
-.message {
+.messages {
background-color: #eee;
border: 1px solid #ccc;
padding: 0.3em;
diff --git a/themes/xtemplate/default/xtemplate.xtmpl b/themes/xtemplate/default/xtemplate.xtmpl
index c05d34534..e01129a38 100644
--- a/themes/xtemplate/default/xtemplate.xtmpl
+++ b/themes/xtemplate/default/xtemplate.xtmpl
@@ -53,7 +53,7 @@
<div id="help">{help}</div>
<!-- END: help -->
<!-- BEGIN: message -->
- <div class="message {type}">{message}</div>
+ {message}
<!-- END: message -->
<!-- END: header -->
diff --git a/themes/xtemplate/pushbutton/xtemplate.css b/themes/xtemplate/pushbutton/xtemplate.css
index a78cb095f..cdf464eec 100644
--- a/themes/xtemplate/pushbutton/xtemplate.css
+++ b/themes/xtemplate/pushbutton/xtemplate.css
@@ -177,7 +177,7 @@ td#home a:hover img {
.breadcrumb {
margin-bottom: .5em;
}
-.message {
+.messages {
background-color: #eee;
border: 1px solid #ccc;
padding: 0.3em;
diff --git a/themes/xtemplate/pushbutton/xtemplate.xtmpl b/themes/xtemplate/pushbutton/xtemplate.xtmpl
index f847c51c3..5e148eaac 100644
--- a/themes/xtemplate/pushbutton/xtemplate.xtmpl
+++ b/themes/xtemplate/pushbutton/xtemplate.xtmpl
@@ -59,7 +59,7 @@
<div id="help">{help}</div>
<!-- END: help -->
<!-- BEGIN: message -->
- <div class="message {type}">{message}</div>
+ {message}
<!-- END: message -->
<!-- END: header -->
diff --git a/themes/xtemplate/xtemplate.theme b/themes/xtemplate/xtemplate.theme
index 60efdeeb5..1ef3a591c 100644
--- a/themes/xtemplate/xtemplate.theme
+++ b/themes/xtemplate/xtemplate.theme
@@ -164,10 +164,8 @@ function xtemplate_page($content, $title = NULL, $breadcrumb = NULL) {
$xtemplate->template->parse("header.help");
}
- foreach (drupal_get_messages() as $message) {
- list($message, $type) = $message;
- $xtemplate->template->assign("message", ucfirst($message));
- $xtemplate->template->assign("type", $type);
+ if ($message = theme_status_messages()) {
+ $xtemplate->template->assign("message", $message);
$xtemplate->template->parse("header.message");
}