2018-04-06 17:11:00 +08:00
|
|
|
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
2020-02-03 21:22:14 +08:00
|
|
|
import { computed } from "@ember/object";
|
2018-04-06 17:11:00 +08:00
|
|
|
|
|
|
|
export default DropdownSelectBoxComponent.extend({
|
2020-02-03 21:22:14 +08:00
|
|
|
classNames: ["group-members-dropdown"],
|
2019-05-28 18:15:12 +08:00
|
|
|
|
2020-02-03 21:22:14 +08:00
|
|
|
selectKitOptions: {
|
|
|
|
icon: "bars",
|
|
|
|
showFullTitle: false
|
2019-05-28 18:15:12 +08:00
|
|
|
},
|
|
|
|
|
2020-02-03 21:22:14 +08:00
|
|
|
content: computed(function() {
|
2018-04-06 17:11:00 +08:00
|
|
|
const items = [
|
|
|
|
{
|
|
|
|
id: "showAddMembersModal",
|
|
|
|
name: I18n.t("groups.add_members.title"),
|
|
|
|
icon: "user-plus"
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
if (this.currentUser.admin) {
|
|
|
|
items.push({
|
|
|
|
id: "showBulkAddModal",
|
|
|
|
name: I18n.t("admin.groups.bulk_add.title"),
|
|
|
|
icon: "users"
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
return items;
|
2020-02-03 21:22:14 +08:00
|
|
|
})
|
2018-04-06 17:11:00 +08:00
|
|
|
});
|