aboutsummaryrefslogtreecommitdiff
path: root/mod/messages/views
diff options
context:
space:
mode:
Diffstat (limited to 'mod/messages/views')
-rw-r--r--mod/messages/views/default/messages/forms/reply.php44
-rw-r--r--mod/messages/views/default/messages/messages.php8
-rw-r--r--mod/messages/views/default/messages/topbar.php10
-rw-r--r--mod/messages/views/default/messages/view.php2
4 files changed, 49 insertions, 15 deletions
diff --git a/mod/messages/views/default/messages/forms/reply.php b/mod/messages/views/default/messages/forms/reply.php
new file mode 100644
index 000000000..c717f9b13
--- /dev/null
+++ b/mod/messages/views/default/messages/forms/reply.php
@@ -0,0 +1,44 @@
+<?php
+
+ /**
+ * Elgg reply to a message form
+ * @uses $vars['entity'] This is the message being replied to
+ */
+
+ // fix for RE: RE: RE: that builds on replies
+ $reply_title = $vars['entity']->title;
+ if (strncmp($reply_title, "RE:", 3) != 0) {
+ $reply_title = "RE: " . $reply_title;
+ }
+?>
+
+<form class="margin_top" id="messages_reply_form" action="<?php echo $vars['url']; ?>action/messages/send" method="post" name="messageForm">
+ <?php echo elgg_view('action/securitytoken'); ?>
+
+ <!-- populate the title space with the orginal message title, inserting re: before it -->
+ <p><label><?php echo elgg_echo("messages:title"); ?>: <br /><input type='text' name='title' class="input_text" value='<?php echo $reply_title; ?>' /></label></p>
+ <p><label><?php echo elgg_echo("messages:message"); ?>: <br /><textarea name='message' value='' class="input_textarea" /></textarea></label></p>
+
+ <p>
+ <?php
+
+ //pass across the guid of the message being replied to
+ echo "<input type='hidden' name='reply' value='" . $vars['entity']->getGUID() . "' />";
+ //pass along the owner of the message being replied to
+ echo "<input type='hidden' name='send_to' value='BAAA" . $vars['entity']->fromId . "' />";
+
+ ?>
+ <input type="submit" class="submit_button" value="<?php echo elgg_echo("messages:fly"); ?>" />
+ </p>
+
+</form>
+
+ <?php
+ //display the message you are replying to
+ if (isset($vars['entity'])) {
+
+ echo "<h3>" . elgg_echo("messages:replying") . "</h3>";
+ echo $vars['entity']->description;
+
+ }
+ ?>
diff --git a/mod/messages/views/default/messages/messages.php b/mod/messages/views/default/messages/messages.php
index 2e179b00f..938c3a77c 100644
--- a/mod/messages/views/default/messages/messages.php
+++ b/mod/messages/views/default/messages/messages.php
@@ -44,14 +44,8 @@ if (isloggedin())
echo elgg_view('page_elements/breadcrumbs', array(
'breadcrumb_root_url' => $url,
'breadcrumb_root_text' => $breadcrumb_root_text,
-/*
- 'breadcrumb_level1_url' => $url,
- 'breadcrumb_level1_text' => $vars['entity']->title,
- 'breadcrumb_level2_url' => $url,
- 'breadcrumb_level2_text' => $vars['entity']->title,
-*/
'breadcrumb_currentpage' => $vars['entity']->title
- ));
+ ));
?>
<!-- display the content header block -->
<div id="content_header" class="clearfloat">
diff --git a/mod/messages/views/default/messages/topbar.php b/mod/messages/views/default/messages/topbar.php
index 7a607f035..485ddadc4 100644
--- a/mod/messages/views/default/messages/topbar.php
+++ b/mod/messages/views/default/messages/topbar.php
@@ -21,14 +21,10 @@ if($num_messages){
if($num == 0) {
?>
-
<a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages" >&nbsp;</a>
-
<?php
- } else {
+ }else{
?>
-
- <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages_new" >[<?php echo $num; ?>]</a>
-
+ <a href="<?php echo $vars['url']; ?>pg/messages/<?php echo $_SESSION['user']->username; ?>" class="privatemessages new" ><span><?php echo $num; ?></span></a>
<?php
- } \ No newline at end of file
+ }
diff --git a/mod/messages/views/default/messages/view.php b/mod/messages/views/default/messages/view.php
index cedd4bb5a..90b9e518e 100644
--- a/mod/messages/views/default/messages/view.php
+++ b/mod/messages/views/default/messages/view.php
@@ -117,7 +117,7 @@ if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
if (!empty($nav)) {
- echo '<div class="pagination"><p>'.$nav.'</p><div class="clearfloat"></div></div>';
+ echo '<div class="pagination"><p>'.$nav.'</p></div>';
}
} else {