mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 23:48:45 +08:00
37252c1a5e
- support for avatars - support for topic/post/user type in reports - improved totals row UI - minor css tweaks
19 lines
592 B
JavaScript
19 lines
592 B
JavaScript
import computed from "ember-addons/ember-computed-decorators";
|
|
|
|
export default Ember.Component.extend({
|
|
tagName: "th",
|
|
classNames: ["admin-report-table-header"],
|
|
classNameBindings: ["label.mainProperty", "isCurrentSort"],
|
|
attributeBindings: ["label.title:title"],
|
|
|
|
@computed("currentSortLabel.sortProperty", "label.sortProperty")
|
|
isCurrentSort(currentSortField, labelSortField) {
|
|
return currentSortField === labelSortField;
|
|
},
|
|
|
|
@computed("currentSortDirection")
|
|
sortIcon(currentSortDirection) {
|
|
return currentSortDirection === 1 ? "caret-up" : "caret-down";
|
|
}
|
|
});
|