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/controllers/about.js.es6
Maja Komel 4b455e741e DEV: Ember 3.8.0
Co-Authored-By: majakomel <maja.komel@gmail.com>
2019-04-26 12:16:21 +02:00

26 lines
684 B
JavaScript

import computed from "ember-addons/ember-computed-decorators";
export default Ember.Controller.extend({
faqOverriden: Ember.computed.gt("siteSettings.faq_url.length", 0),
@computed
contactInfo() {
if (this.siteSettings.contact_url) {
return I18n.t("about.contact_info", {
contact_info:
"<a href='" +
this.siteSettings.contact_url +
"' target='_blank'>" +
this.siteSettings.contact_url +
"</a>"
});
} else if (this.siteSettings.contact_email) {
return I18n.t("about.contact_info", {
contact_info: this.siteSettings.contact_email
});
} else {
return null;
}
}
});