mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 19:01:52 +08:00
FIX: allows invite modal from topic-map post-actions (#7047)
This commit is contained in:
parent
e69634ec3a
commit
8d779db270
|
@ -45,7 +45,6 @@ export default {
|
|||
}
|
||||
|
||||
showModal("share-and-invite", {
|
||||
model: this.get("topic"),
|
||||
modalClass: "share-and-invite",
|
||||
panels
|
||||
});
|
||||
|
|
|
@ -48,6 +48,31 @@ const TopicRoute = Discourse.Route.extend({
|
|||
},
|
||||
|
||||
actions: {
|
||||
showInvite() {
|
||||
let invitePanelTitle;
|
||||
|
||||
if (this.get("isPM")) {
|
||||
invitePanelTitle = "topic.invite_private.title";
|
||||
} else if (this.get("invitingToTopic")) {
|
||||
invitePanelTitle = "topic.invite_reply.title";
|
||||
} else {
|
||||
invitePanelTitle = "user.invited.create";
|
||||
}
|
||||
|
||||
showModal("share-and-invite", {
|
||||
modalClass: "share-and-invite",
|
||||
panels: [
|
||||
{
|
||||
id: "invite",
|
||||
title: invitePanelTitle,
|
||||
model: {
|
||||
inviteModel: this.modelFor("topic")
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
},
|
||||
|
||||
showFlags(model) {
|
||||
let controller = showModal("flag", { model });
|
||||
controller.setProperties({ flagTopic: false });
|
||||
|
|
|
@ -200,7 +200,8 @@
|
|||
selectReplies=(action "selectReplies")
|
||||
selectBelow=(action "selectBelow")
|
||||
fillGapBefore=(action "fillGapBefore")
|
||||
fillGapAfter=(action "fillGapAfter")}}
|
||||
fillGapAfter=(action "fillGapAfter")
|
||||
showInvite=(route-action "showInvite")}}
|
||||
{{/unless}}
|
||||
|
||||
{{conditional-loading-spinner condition=model.postStream.loadingBelow}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user