aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/message.php2
-rw-r--r--mod/mail.php3
-rw-r--r--view/css/mod_mail.css4
-rwxr-xr-xview/tpl/mail_conv.tpl6
4 files changed, 13 insertions, 2 deletions
diff --git a/include/message.php b/include/message.php
index 820d814b6..169f394d9 100644
--- a/include/message.php
+++ b/include/message.php
@@ -173,7 +173,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
'revision' => $r['data']['revision']
);
}
- $body = str_replace($match[1],'',$body);
+ $body = trim(str_replace($match[1],'',$body));
}
}
diff --git a/mod/mail.php b/mod/mail.php
index 536149a28..44c4b479d 100644
--- a/mod/mail.php
+++ b/mod/mail.php
@@ -329,7 +329,8 @@ function mail_content(&$a) {
'to_url' => chanlink_hash($message['to_xchan']),
'to_photo' => $message['to']['xchan_photo_s'],
'subject' => $message['title'],
- 'body' => smilies(bbcode($message['body']) . $s),
+ 'body' => smilies(bbcode($message['body'])),
+ 'attachments' => $s,
'delete' => t('Delete message'),
'dreport' => t('Delivery report'),
'recall' => t('Recall message'),
diff --git a/view/css/mod_mail.css b/view/css/mod_mail.css
index 5fd646765..1346eecd5 100644
--- a/view/css/mod_mail.css
+++ b/view/css/mod_mail.css
@@ -24,3 +24,7 @@
#prvmail-rotator {
margin: 15px;
}
+
+.mail-conv-outside-wrapper {
+ margin-bottom: 20px;
+}
diff --git a/view/tpl/mail_conv.tpl b/view/tpl/mail_conv.tpl
index 4f54f1a6a..5e5d9808d 100755
--- a/view/tpl/mail_conv.tpl
+++ b/view/tpl/mail_conv.tpl
@@ -13,6 +13,12 @@
{{$mail.body}}
<div class="clear"></div>
</div>
+ {{if $mail.attachments}}
+ <div class="dropdown pull-left">
+ <button type="button" class="btn btn-default btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="attachment-menu-{{$item.id}}"><i class="icon-paperclip"></i></button>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="attachment-menu-{{$item.id}}">{{$mail.attachments}}</ul>
+ </div>
+ {{/if}}
<div class="pull-right dropdown">
<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="mail-item-menu-{{$mail.id}}">
<i class="icon-caret-down"></i>