diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-07 22:18:56 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-07 22:18:56 +0000 |
commit | 09627b07545c1c3ef13ac24bf5c496cb69c86bb6 (patch) | |
tree | e1d3f95efc4b035cd2f1dbd0898629ed65104825 | |
parent | 101c850e6723d55759a6cf75965a2473ec2a55d5 (diff) | |
download | elgg-09627b07545c1c3ef13ac24bf5c496cb69c86bb6.tar.gz elgg-09627b07545c1c3ef13ac24bf5c496cb69c86bb6.tar.bz2 |
Fixes #2783 - updated installation message code to mirror default views
git-svn-id: http://code.elgg.org/elgg/trunk@7861 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | install/css/install.css | 6 | ||||
-rw-r--r-- | views/installation/messages/errors/error.php | 15 | ||||
-rw-r--r-- | views/installation/messages/errors/list.php | 25 | ||||
-rw-r--r-- | views/installation/messages/list.php | 16 | ||||
-rw-r--r-- | views/installation/messages/messages/list.php | 28 | ||||
-rw-r--r-- | views/installation/messages/messages/message.php | 15 | ||||
-rw-r--r-- | views/installation/page/elements/messages.php | 21 | ||||
-rw-r--r-- | views/installation/page/shells/default.php | 2 |
8 files changed, 25 insertions, 103 deletions
diff --git a/install/css/install.css b/install/css/install.css index 8ce4dfb38..016437c14 100644 --- a/install/css/install.css +++ b/install/css/install.css @@ -229,17 +229,17 @@ select { cursor: default; } -#elgg-system-message { +.elgg-system-messages li { padding: 3px 10px 3px 10px; margin-bottom: 20px; } -.success { +.elgg-state-success { border: 1px solid #00cc00; background: #ccffcc; } -.error { +.elgg-state-error { border: 1px solid #D3322A; background: #F7DAD8; } diff --git a/views/installation/messages/errors/error.php b/views/installation/messages/errors/error.php deleted file mode 100644 index 296fb1a6e..000000000 --- a/views/installation/messages/errors/error.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -/** - * Elgg error message - * Displays a single error message - * - * @package Elgg - * @subpackage Core - * - * @uses $vars['object'] An error message (string) - */ -?> - -<p> - <?php echo $vars['object']; ?> -</p>
\ No newline at end of file diff --git a/views/installation/messages/errors/list.php b/views/installation/messages/errors/list.php deleted file mode 100644 index 2f69213e9..000000000 --- a/views/installation/messages/errors/list.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * Elgg list errors - * Lists error messages - * - * @package Elgg - * @subpackage Core - * - * @uses $vars['object'] An array of error messages - */ - -if (!empty($vars['object']) && is_array($vars['object'])) { - -?> - - <div class="messages error"> - -<?php - foreach ($vars['object'] as $error) { - echo elgg_view('messages/errors/error', array('object' => $error)); - } -?> - </div> -<?php -}
\ No newline at end of file diff --git a/views/installation/messages/list.php b/views/installation/messages/list.php deleted file mode 100644 index 2944ce5a6..000000000 --- a/views/installation/messages/list.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -/** - * Elgg global system message list - * Lists all system messages - * - * @package Elgg - * @subpackage Core - * - * @uses $vars['object'] The array of message registers - */ - -if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { - foreach($vars['object'] as $register => $list ) { - echo elgg_view("messages/{$register}/list", array('object' => $list)); - } -}
\ No newline at end of file diff --git a/views/installation/messages/messages/list.php b/views/installation/messages/messages/list.php deleted file mode 100644 index bd996bef7..000000000 --- a/views/installation/messages/messages/list.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Elgg list system messages - * Lists system messages - * - * @package Elgg - * @subpackage Core - * - * @uses $vars['object'] An array of system messages - */ - -if (!empty($vars['object']) && is_array($vars['object'])) { - -?> - - <div class="messages success"> - -<?php - foreach($vars['object'] as $message) { - echo elgg_view('messages/messages/message',array('object' => $message)); - } -?> - - </div> - -<?php - -}
\ No newline at end of file diff --git a/views/installation/messages/messages/message.php b/views/installation/messages/messages/message.php deleted file mode 100644 index 94c9303cd..000000000 --- a/views/installation/messages/messages/message.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php -/** - * Elgg standard message - * Displays a single Elgg system message - * - * @package Elgg - * @subpackage Core - * - * @uses $vars['object'] A system message (string) - */ -?> - -<p> - <?php echo nl2br($vars['object']); ?> -</p>
\ No newline at end of file diff --git a/views/installation/page/elements/messages.php b/views/installation/page/elements/messages.php new file mode 100644 index 000000000..2a06a7b1e --- /dev/null +++ b/views/installation/page/elements/messages.php @@ -0,0 +1,21 @@ +<?php +/** + * Lists all system messages + * + * @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\">"; + echo autop($message); + echo '</li>'; + } + } + + echo '</ul>'; +} diff --git a/views/installation/page/shells/default.php b/views/installation/page/shells/default.php index fbc5ccbf2..abee13dba 100644 --- a/views/installation/page/shells/default.php +++ b/views/installation/page/shells/default.php @@ -40,7 +40,7 @@ header('Expires: Fri, 05 Feb 1982 00:00:00 -0500', TRUE); </div> <div id="elgg-content"> <h2><?php echo $vars['title']; ?></h2> - <?php echo elgg_view('messages/list', array('object' => $vars['sysmessages'])); ?> + <?php echo elgg_view('page/elements/messages', array('object' => $vars['sysmessages'])); ?> <?php echo $vars['body']; ?> </div> <div class="clearfloat"></div> |