mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
DEV: Remove group-members-dropdown
(#11948)
It was introduced in c82b2dcc24c06634e64a6c388c18a815f039c608, but since b76731d722c099f64446f18fbf92026be7cfd225 and 58ee947b352fa7605ef8cc8560873b9abad541d4 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">
|
<div class="group-members-manage">
|
||||||
{{#if canManageGroup}}
|
{{#if canManageGroup}}
|
||||||
{{#if currentUser.admin}}
|
{{d-button
|
||||||
{{group-members-dropdown
|
icon="plus"
|
||||||
groupName=model.full_name
|
label="groups.manage.add_members"
|
||||||
showAddMembersModal=(route-action "showAddMembersModal")
|
class="group-members-add"
|
||||||
}}
|
action=(route-action "showAddMembersModal")
|
||||||
{{else}}
|
}}
|
||||||
{{d-button
|
|
||||||
icon="plus"
|
|
||||||
label="groups.manage.add_members"
|
|
||||||
class="group-members-add"
|
|
||||||
action=(route-action "showAddMembersModal")
|
|
||||||
}}
|
|
||||||
{{/if}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</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…
x
Reference in New Issue
Block a user