mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 21:19:41 -06:00
DEV: Remove group-members-dropdown
(#11948)
It was introduced inc82b2dcc24
, but sinceb76731d722
and58ee947b35
it's a single-option dropdown, so there's no need to show it (and keep it) instead of a button. We use a button for non-admins already.
This commit is contained in:
parent
39a9651847
commit
155ae06f62
@ -8,19 +8,12 @@
|
||||
|
||||
<div class="group-members-manage">
|
||||
{{#if canManageGroup}}
|
||||
{{#if currentUser.admin}}
|
||||
{{group-members-dropdown
|
||||
groupName=model.full_name
|
||||
showAddMembersModal=(route-action "showAddMembersModal")
|
||||
}}
|
||||
{{else}}
|
||||
{{d-button
|
||||
icon="plus"
|
||||
label="groups.manage.add_members"
|
||||
class="group-members-add"
|
||||
action=(route-action "showAddMembersModal")
|
||||
}}
|
||||
{{/if}}
|
||||
{{d-button
|
||||
icon="plus"
|
||||
label="groups.manage.add_members"
|
||||
class="group-members-add"
|
||||
action=(route-action "showAddMembersModal")
|
||||
}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
import { action, computed } from "@ember/object";
|
||||
import DropdownSelectBoxComponent from "select-kit/components/dropdown-select-box";
|
||||
import I18n from "I18n";
|
||||
|
||||
export default DropdownSelectBoxComponent.extend({
|
||||
classNames: ["group-members-dropdown"],
|
||||
|
||||
selectKitOptions: {
|
||||
icon: "bars",
|
||||
showFullTitle: false,
|
||||
},
|
||||
|
||||
content: computed(function () {
|
||||
const items = [
|
||||
{
|
||||
id: "showAddMembersModal",
|
||||
name: I18n.t("groups.add_members.title", {
|
||||
group_name: this.groupName,
|
||||
}),
|
||||
icon: "user-plus",
|
||||
},
|
||||
];
|
||||
return items;
|
||||
}),
|
||||
|
||||
@action
|
||||
onChange(id) {
|
||||
this.attrs && this.attrs[id] && this.attrs[id]();
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user