FEATURE: Add invite link to the sidebar (#29448)

This commit adds a new "Invite" link to the sidebar for all users who can invite to the site. Clicking the link opens the invite modal without changing the current route the user is on. Admins can customize the new link or remove it entirely if they wish by editing the sidebar section.

Internal topic: t/129752.
This commit is contained in:
Osama Sayegh
2024-10-30 05:31:14 +03:00
committed by GitHub
parent fc8fff88f6
commit 19672faba6
16 changed files with 219 additions and 11 deletions

View File

@@ -1964,6 +1964,7 @@ en:
title: "Invite Link"
success: "Invite link generated successfully!"
error: "There was an error generating Invite link"
cannot_invite_to_forum: "Sorry, you don't have permission to create invites. Please contact an admin to grant you invite permission."
invite:
new_title: "Invite members"
@@ -4945,6 +4946,9 @@ en:
pending_count:
one: "%{count} pending"
other: "%{count} pending"
invite:
content: "Invite"
title: "Invite new members"
global_section: "Global section, visible to everyone"
panels:
forum:

View File

@@ -1351,6 +1351,7 @@ Discourse::Application.routes.draw do
get "new-topic" => "new_topic#index"
get "new-message" => "new_topic#index"
get "new-invite" => "new_invite#index"
# Topic routes
get "t/id_for/:slug" => "topics#id_for_slug"