aboutsummaryrefslogtreecommitdiff
path: root/views/default/messages/errors
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 11:06:28 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-02-13 11:06:28 +0000
commitd8373e8e48ab49cda7a616116d7795eb139a7142 (patch)
tree1c497000dafa6c7bde361af4372fa62816d53240 /views/default/messages/errors
parent478086b662e23267137f12bf57f6a7ad56025d98 (diff)
downloadelgg-d8373e8e48ab49cda7a616116d7795eb139a7142.tar.gz
elgg-d8373e8e48ab49cda7a616116d7795eb139a7142.tar.bz2
Some error reporting and initial (very, very basic) templating
git-svn-id: https://code.elgg.org/elgg/trunk@11 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/messages/errors')
-rw-r--r--views/default/messages/errors/error.php20
-rw-r--r--views/default/messages/errors/list.php31
2 files changed, 51 insertions, 0 deletions
diff --git a/views/default/messages/errors/error.php b/views/default/messages/errors/error.php
new file mode 100644
index 000000000..078e25949
--- /dev/null
+++ b/views/default/messages/errors/error.php
@@ -0,0 +1,20 @@
+<?php
+
+ /**
+ * Elgg error message
+ * Displays a single error message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An error message (string)
+ */
+?>
+
+ <p>
+ <?php echo nl2br($vars['object']); ?>
+ </p> \ No newline at end of file
diff --git a/views/default/messages/errors/list.php b/views/default/messages/errors/list.php
new file mode 100644
index 000000000..9644b7f5a
--- /dev/null
+++ b/views/default/messages/errors/list.php
@@ -0,0 +1,31 @@
+<?php
+
+ /**
+ * Elgg list errors
+ * Lists error messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of error messages
+ */
+
+?>
+
+ <div class="messages">
+ <div class="messages-errors">
+
+<?php
+ if (!empty($vars['object']) && is_array($vars['object'])) {
+ foreach($vars['object'] as $error) {
+ echo elgg_view('messages/errors/error',array('object' => $error));
+ }
+ }
+
+?>
+ </div>
+ </div> \ No newline at end of file