Skip to content

Commit

Permalink
Merge pull request #9184 from RocketChat/add-snippet-name
Browse files Browse the repository at this point in the history
Fix: Snippet name to not showing in snippet list
  • Loading branch information
rodrigok committed Dec 20, 2017
1 parent a013e68 commit 1a4ddaa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,7 @@
"SMTP_Username": "SMTP Username",
"snippet-message": "Snippet Message",
"snippet-message_description": "Permission to create snippet message",
"Snippet_name": "Snippet name",
"Snippet_Added": "Created on %s",
"Snippet_Messages": "Snippet Messages",
"Snippeted_a_message": "Created a snippet __snippetLink__",
Expand Down Expand Up @@ -2123,4 +2124,4 @@
"your_message_optional": "your message (optional)",
"Your_password_is_wrong": "Your password is wrong!",
"Your_push_was_sent_to_s_devices": "Your push was sent to %s devices"
}
}
3 changes: 3 additions & 0 deletions packages/rocketchat-ui-message/client/message.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@
{{/if}}
</span>
<div class="body color-primary-font-color {{system true}}" dir="auto" data-unread-text="{{_ "Unread_Messages"}}">
{{#if isSnippet}}
<div class="snippet-name">{{_ "Snippet_name"}}: {{snippetName}}</div>
{{/if}}
{{{body}}}
{{#if hasOembed}}
{{#each urls}}
Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-ui-message/client/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ Template.message.helpers({
}

return RocketChat.MessageAction.getButtons(Template.currentData(), context, messageGroup);
},
isSnippet() {
return this.actionContext === 'snippeted';
}
});

Expand Down

0 comments on commit 1a4ddaa

Please sign in to comment.