mirror of
https://github.com/flarum/framework.git
synced 2025-01-09 20:44:05 +08:00
13 lines
346 B
JavaScript
13 lines
346 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Handlebars.makeBoundHelper(function(user, options) {
|
|
var username;
|
|
if (user) {
|
|
username = user.get('username');
|
|
}
|
|
username = username || '[deleted]';
|
|
|
|
return new Ember.Handlebars.SafeString('<span class="username">'+Ember.Handlebars.Utils.escapeExpression(username)+'</span>');
|
|
});
|
|
|