Skip to content

Commit

Permalink
REFACTOR: user directories without <table>, second attempt (#20515)
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomerobot committed Mar 2, 2023
1 parent 435761e commit fac7841
Show file tree
Hide file tree
Showing 30 changed files with 963 additions and 735 deletions.
2 changes: 1 addition & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
"directory-item-value",
"directory-table-header-title",
"loading-spinner",
"mobile-directory-item-label",
"directory-item-label",
],
},
"no-implicit-this": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@ export default Controller.extend(CanCheckEmails, {
return I18n.t("admin.users.titles." + query);
},

@discourseComputed("showEmails")
columnCount(showEmails) {
let colCount = 7; // note that the first column is hardcoded in the template

if (showEmails) {
colCount += 1;
}

if (this.siteSettings.must_approve_users) {
colCount += 1;
}

return colCount;
},

@observes("listFilter")
_filterUsers() {
discourseDebounce(this, this.resetFilters, INPUT_DELAY);
Expand Down
Loading

0 comments on commit fac7841

Please sign in to comment.