aboutsummaryrefslogtreecommitdiff
path: root/views/default/messages
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 20:26:12 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-10-16 20:26:12 +0000
commitc66831fa5138a277a9729174caf14c7eb323fb07 (patch)
tree2444b54badf4914b59c88700cc1ce30a57ae7ff1 /views/default/messages
parent8048313e87b9fd5ab6734e29a0e951524fa33e45 (diff)
downloadelgg-c66831fa5138a277a9729174caf14c7eb323fb07.tar.gz
elgg-c66831fa5138a277a9729174caf14c7eb323fb07.tar.bz2
Standardizing views.`
git-svn-id: http://code.elgg.org/elgg/trunk@3555 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/messages')
-rw-r--r--views/default/messages/errors/error.php31
-rw-r--r--views/default/messages/errors/list.php53
-rw-r--r--views/default/messages/exceptions/exception.php67
-rw-r--r--views/default/messages/list.php39
-rw-r--r--views/default/messages/messages/list.php56
-rw-r--r--views/default/messages/messages/message.php31
6 files changed, 122 insertions, 155 deletions
diff --git a/views/default/messages/errors/error.php b/views/default/messages/errors/error.php
index 468505c89..26a24c807 100644
--- a/views/default/messages/errors/error.php
+++ b/views/default/messages/errors/error.php
@@ -1,20 +1,17 @@
<?php
-
- /**
- * Elgg error message
- * Displays a single error message
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An error message (string)
- */
+/**
+ * Elgg error message
+ * Displays a single error message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An error message (string)
+ */
?>
- <p>
- <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
- </p> \ No newline at end of file
+<p>
+ <?php echo elgg_view('output/longtext', array('value' => $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
index e9b9b2ebb..846e22a80 100644
--- a/views/default/messages/errors/list.php
+++ b/views/default/messages/errors/list.php
@@ -1,57 +1,50 @@
<?php
-
- /**
- * Elgg list errors
- * Lists error messages
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of error messages
- */
-
- if (!empty($vars['object']) && is_array($vars['object'])) {
+/**
+ * Elgg list errors
+ * Lists error messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of error messages
+ */
+
+if (!empty($vars['object']) && is_array($vars['object'])) {
?>
<!-- used to fade out the system messages after 3 seconds -->
<script>
$(document).ready(function () {
- $('.messages_error').animate({opacity: 1.0}, 1000);
+ $('.messages_error').animate({opacity: 1.0}, 1000);
$('.messages_error').animate({opacity: 1.0}, 5000);
$('.messages_error').fadeOut('slow');
-
+
$('span.closeMessages a').click(function () {
$(".messages_error").stop();
$('.messages_error').fadeOut('slow');
return false;
- });
-
+ });
+
$('div.messages_error').click(function () {
$(".messages_error").stop();
$('.messages_error').fadeOut('slow');
return false;
- });
+ });
-});
+});
</script>
<div class="messages_error">
<span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
<?php
- foreach($vars['object'] as $error) {
- echo elgg_view('messages/errors/error',array('object' => $error));
- }
+ foreach($vars['object'] as $error) {
+ echo elgg_view('messages/errors/error',array('object' => $error));
+ }
?>
</div>
<?php
- }
-
-
-
-?> \ No newline at end of file
+} \ No newline at end of file
diff --git a/views/default/messages/exceptions/exception.php b/views/default/messages/exceptions/exception.php
index 0b482d845..c93883cbc 100644
--- a/views/default/messages/exceptions/exception.php
+++ b/views/default/messages/exceptions/exception.php
@@ -1,44 +1,39 @@
<?php
+/**
+ * Elgg exception
+ * Displays a single exception
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An exception
+ */
- /**
- * Elgg exception
- * Displays a single exception
- *
- * @package Elgg
- * @subpackage Core
+global $CONFIG;
- * @author Curverider Ltd
+$class = get_class($vars['object']);
+$message = elgg_view('output/longtext', array('value' => $vars['object']->getMessage()));
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An exception
- */
+$body = <<< END
+<p class="messages-exception">
+ <span title="$class">
+ <b>$message</b>
+ </span>
+</p>
+END;
- global $CONFIG;
-
- $class = get_class($vars['object']);
- $message = elgg_view('output/longtext', array('value' => $vars['object']->getMessage()));
-
- $body = <<< END
- <p class="messages-exception">
- <span title="$class">
- <b>$message</b>
- </span>
+if ($CONFIG->debug) {
+ $details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')));
+ $body .= <<< END
+ <hr />
+ <p class="messages-exception-detail">
+ $details
</p>
END;
+}
- if ($CONFIG->debug)
- {
- $details = elgg_view('output/longtext', array('value' => htmlentities(print_r($vars['object'], true), ENT_QUOTES, 'UTF-8')));
- $body .= <<< END
- <hr />
- <p class="messages-exception-detail">
- $details
- </p>
-END;
- }
-
- $title = $class;
-
- echo elgg_view_layout("one_column", elgg_view_title($title) . $body);
-?> \ No newline at end of file
+$title = $class;
+
+echo elgg_view_layout("one_column", elgg_view_title($title) . $body); \ No newline at end of file
diff --git a/views/default/messages/list.php b/views/default/messages/list.php
index dd02fdac5..62500882c 100644
--- a/views/default/messages/list.php
+++ b/views/default/messages/list.php
@@ -1,25 +1,18 @@
<?php
+/**
+ * Elgg global system message list
+ * Lists all system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] The array of message registers
+ */
- /**
- * Elgg global system message list
- * Lists all system messages
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @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
+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));
+ }
+}
diff --git a/views/default/messages/messages/list.php b/views/default/messages/messages/list.php
index 81f3a45a8..67da01657 100644
--- a/views/default/messages/messages/list.php
+++ b/views/default/messages/messages/list.php
@@ -1,58 +1,50 @@
<?php
-
- /**
- * Elgg list system messages
- * Lists system messages
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['object'] An array of system messages
- */
-
- if (!empty($vars['object']) && is_array($vars['object'])) {
+/**
+ * Elgg list system messages
+ * Lists system messages
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] An array of system messages
+ */
+
+if (!empty($vars['object']) && is_array($vars['object'])) {
?>
<!-- used to fade out the system messages after 3 seconds -->
<script type="text/javascript">
$(document).ready(function () {
- $('.messages').animate({opacity: 1.0}, 1000);
+ $('.messages').animate({opacity: 1.0}, 1000);
$('.messages').animate({opacity: 1.0}, 5000);
$('.messages').fadeOut('slow');
-
+
$('span.closeMessages a').click(function () {
$(".messages").stop();
$('.messages').fadeOut('slow');
return false;
- });
-
+ });
+
$('div.messages').click(function () {
$(".messages").stop();
$('.messages').fadeOut('slow');
return false;
- });
-});
+ });
+});
</script>
<div class="messages">
<span class="closeMessages"><a href="#"><?php echo elgg_echo('systemmessages:dismiss'); ?></a></span>
<?php
-
-
- foreach($vars['object'] as $message) {
- echo elgg_view('messages/messages/message',array('object' => $message));
- }
-
+ foreach($vars['object'] as $message) {
+ echo elgg_view('messages/messages/message',array('object' => $message));
+ }
?>
</div>
-
-<?php
- }
+<?php
-?> \ No newline at end of file
+}
diff --git a/views/default/messages/messages/message.php b/views/default/messages/messages/message.php
index bd3514e7a..717fd5e57 100644
--- a/views/default/messages/messages/message.php
+++ b/views/default/messages/messages/message.php
@@ -1,20 +1,17 @@
<?php
-
- /**
- * Elgg standard message
- * Displays a single Elgg system message
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @uses $vars['object'] A system message (string)
- */
+/**
+ * Elgg standard message
+ * Displays a single Elgg system message
+ *
+ * @package Elgg
+ * @subpackage Core
+ * @author Curverider Ltd
+ * @link http://elgg.org/
+ *
+ * @uses $vars['object'] A system message (string)
+ */
?>
- <p>
- <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
- </p> \ No newline at end of file
+<p>
+ <?php echo elgg_view('output/longtext', array('value' => $vars['object'])); ?>
+</p> \ No newline at end of file