mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 12:15:47 +08:00
16 lines
500 B
Plaintext
16 lines
500 B
Plaintext
|
import { iconHTML } from 'discourse-common/lib/icon-library';
|
||
|
|
||
|
export default Ember.Helper.extend({
|
||
|
compute([disposition]) {
|
||
|
if (!disposition) { return null; }
|
||
|
let icon;
|
||
|
let title = 'admin.flags.dispositions.' + disposition;
|
||
|
switch (disposition) {
|
||
|
case "deferred": { icon = "external-link"; break; }
|
||
|
case "agreed": { icon = "thumbs-o-up"; break; }
|
||
|
case "disagreed": { icon = "thumbs-o-down"; break; }
|
||
|
}
|
||
|
return iconHTML(icon, { title }).htmlSafe();
|
||
|
}
|
||
|
});
|