diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-15 22:28:46 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-15 22:28:46 +0000 |
commit | 43c33492d2ab65a783c17559cf8dabd7832e9ea1 (patch) | |
tree | 7107fed1b5424db1405b842972c7e4c47f11bfd3 /mod/messages/views/default/forms | |
parent | e8d148970261207efbe5435e1abcf68c5ed59cc8 (diff) | |
download | elgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.gz elgg-43c33492d2ab65a783c17559cf8dabd7832e9ea1.tar.bz2 |
Updated the messages plugin to use the new CSS/HTML
git-svn-id: http://code.elgg.org/elgg/trunk@7886 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/messages/views/default/forms')
-rw-r--r-- | mod/messages/views/default/forms/messages/process.php | 41 | ||||
-rw-r--r-- | mod/messages/views/default/forms/messages/reply.php | 47 | ||||
-rw-r--r-- | mod/messages/views/default/forms/messages/send.php | 47 |
3 files changed, 135 insertions, 0 deletions
diff --git a/mod/messages/views/default/forms/messages/process.php b/mod/messages/views/default/forms/messages/process.php new file mode 100644 index 000000000..2c97fcb6f --- /dev/null +++ b/mod/messages/views/default/forms/messages/process.php @@ -0,0 +1,41 @@ +<?php +/** + * Messages folder view (inbox, sent) + * + * Provides form body for mass deleting messages + * + * @uses $vars['list'] List of messages + * + */ + +echo $vars['list']; + +echo '<div class="messages-buttonbank">'; +echo elgg_view('input/submit', array( + 'value' => elgg_echo('delete'), + 'internalname' => 'delete', +)); + +if ($vars['folder'] == "inbox") { + echo elgg_view('input/submit', array( + 'value' => elgg_echo('messages:markread'), + 'internalname' => 'read', + )); +} + +echo elgg_view('input/button', array( + 'value' => elgg_echo('messages:toggle'), + 'class' => 'elgg-cancel-button', + 'internalid' => 'messages-toggle', +)); + +echo '</div>'; + +?> +<script type="text/javascript"> +$(document).ready(function() { + $("#messages-toggle").click(function() { + $('input[type=checkbox]').click(); + }); +}); +</script> diff --git a/mod/messages/views/default/forms/messages/reply.php b/mod/messages/views/default/forms/messages/reply.php new file mode 100644 index 000000000..22c982ec2 --- /dev/null +++ b/mod/messages/views/default/forms/messages/reply.php @@ -0,0 +1,47 @@ +<?php +/** + * Reply form + * + * @uses $vars['message'] + */ + +// fix for RE: RE: RE: that builds on replies +$reply_title = $vars['message']->title; +if (strncmp($reply_title, "RE:", 3) != 0) { + $reply_title = "RE: " . $reply_title; +} + +echo elgg_view('input/hidden', array( + 'internalname' => 'recipient_guid', + 'value' => $vars['message']->fromId, +)); +?> + +<p> + <label><?php echo elgg_echo("messages:title"); ?>: <br /></label> + <?php echo elgg_view('input/text', array( + 'internalname' => 'subject', + 'value' => $reply_title, + )); + ?> +</p> +<p> + <label><?php echo elgg_echo("messages:message"); ?>:</label> + <?php echo elgg_view("input/longtext", array( + 'internalname' => 'body', + 'value' => '', + )); + ?> +</p> +<p> + <?php echo elgg_view('input/submit', array('value' => elgg_echo('messages:send'))); ?> +</p> + +<script type="text/javascript"> +$(document).ready(function() { + $("#messages-show-reply").click(function() { + $('#messages-reply-form').slideToggle('medium'); + }); +}); + +</script>
\ No newline at end of file diff --git a/mod/messages/views/default/forms/messages/send.php b/mod/messages/views/default/forms/messages/send.php new file mode 100644 index 000000000..0a251091b --- /dev/null +++ b/mod/messages/views/default/forms/messages/send.php @@ -0,0 +1,47 @@ +<?php +/** + * Compse message form + * + * @package ElggMessages + * @uses $vars['friends'] + */ + +$recipient_guid = elgg_get_array_value('recipient_guid', $vars, 0); +$subject = elgg_get_array_value('subject', $vars, ''); +$body = elgg_get_array_value('body', $vars, ''); + +$recipients_options = array(); +foreach ($vars['friends'] as $friend) { + $recipients_options[$friend->guid] = $friend->name; +} + +$recipient_drop_down = elgg_view('input/pulldown', array( + 'internalname' => 'recipient_guid', + 'value' => $recipient_guid, + 'options_values' => $recipients_options, +)); + +?> +<p> + <label><?php echo elgg_echo("messages:to"); ?>: </label> + <?php echo $recipient_drop_down; ?> +</p> +<p> + <label><?php echo elgg_echo("messages:title"); ?>: <br /></label> + <?php echo elgg_view('input/text', array( + 'internalname' => 'subject', + 'value' => $subject, + )); + ?> +</p> +<p> + <label><?php echo elgg_echo("messages:message"); ?>:</label> + <?php echo elgg_view("input/longtext", array( + 'internalname' => 'body', + 'value' => $body, + )); + ?> +</p> +<p> + <?php echo elgg_view('input/submit', array('value' => elgg_echo('messages:send'))); ?> +</p> |