Only use "File Uploaded" prefix on files

pull/7652/head
Martin Schoeler 8 years ago
parent 5288f02652
commit 2e5efd9ede
  1. 1
      packages/rocketchat-file-upload/server/methods/sendFileMessage.js
  2. 2
      packages/rocketchat-message-attachments/client/messageAttachment.html
  3. 5
      packages/rocketchat-message-attachments/client/messageAttachment.js

@ -24,6 +24,7 @@ Meteor.methods({
const attachment = {
title: file.name,
type: 'file',
description: file.description,
title_link: fileUrl,
title_link_download: true

@ -30,7 +30,7 @@
{{#if title}}
<div class="attachment-title">
{{#if title_link}}
<a href="{{fixCordova title_link}}" target="_blank">{{_ "Attachment_File_Uploaded"}} : {{title}}</a>
<a href="{{fixCordova title_link}}" target="_blank">{{#if isFile}} {{_ "Attachment_File_Uploaded"}}: {{/if}}{{title}}</a>
{{#if title_link_download}}
<a class="icon-download attachment-download-icon" href="{{fixCordova title_link}}" target="_blank" download=""></a>
{{/if}}

@ -70,5 +70,10 @@ Template.messageAttachment.helpers({
},
injectIndex(data, previousIndex, index) {
data.index = `${ previousIndex }.attachments.${ index }`;
},
isFile() {
console.log(this.type === 'file');
return this.type === 'file';
}
});

Loading…
Cancel
Save