fix attachment rendering for mail

This commit is contained in:
Mario Vavti 2015-12-02 09:44:25 +01:00
parent 78e18fcdcf
commit 593423434c
4 changed files with 13 additions and 2 deletions

View File

@ -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));
}
}

View File

@ -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'),

View File

@ -24,3 +24,7 @@
#prvmail-rotator {
margin: 15px;
}
.mail-conv-outside-wrapper {
margin-bottom: 20px;
}

View File

@ -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>