diff options
author | Mario Vavti <mario@mariovavti.com> | 2015-12-02 09:44:25 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2015-12-02 09:44:25 +0100 |
commit | 593423434c0c0e8d1ebb43d97b2dda7e6b4d67bd (patch) | |
tree | c93fb653017a28e8ec6c24ea10ff14e24b67618c | |
parent | 78e18fcdcfaa879db1d7bf487c2e5de0e43e34b0 (diff) | |
download | volse-hubzilla-593423434c0c0e8d1ebb43d97b2dda7e6b4d67bd.tar.gz volse-hubzilla-593423434c0c0e8d1ebb43d97b2dda7e6b4d67bd.tar.bz2 volse-hubzilla-593423434c0c0e8d1ebb43d97b2dda7e6b4d67bd.zip |
fix attachment rendering for mail
-rw-r--r-- | include/message.php | 2 | ||||
-rw-r--r-- | mod/mail.php | 3 | ||||
-rw-r--r-- | view/css/mod_mail.css | 4 | ||||
-rwxr-xr-x | view/tpl/mail_conv.tpl | 6 |
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> |