This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/related-messages.js.es6
Sam e17a13ce19 FEATURE: additional "related messages" section
This splits out previous message correspondence from suggeted and instead
has a dedicated section called "related messages"
2018-11-12 13:04:42 +11:00

18 lines
574 B
JavaScript

import computed from "ember-addons/ember-computed-decorators";
import { iconHTML } from "discourse-common/lib/icon-library";
export default Ember.Component.extend({
elementId: "related-messages",
classNames: ["suggested-topics"],
@computed("topic")
relatedTitle(topic) {
const href = this.currentUser && this.currentUser.pmPath(topic);
return href
? `<a href="${href}">${iconHTML("envelope", {
class: "private-message-glyph"
})}</a><span>${I18n.t("related_messages.title")}</span>`
: I18n.t("related_messages.title");
}
});