Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Docs links for teams (#5216)

hq174f02b6cbea7
diff --git a/lib/plausible_web/components/generic.ex b/lib/plausible_web/components/generic.ex
index 513d32cad3..815578f146 100644
--- a/lib/plausible_web/components/generic.ex
+++ b/lib/plausible_web/components/generic.ex
@@ -132,11 +132,15 @@ defmodule PlausibleWeb.Components.Generic do
end
attr(:slug, :string, required: true)
+ attr(:class, :string, default: nil)
def docs_info(assigns) do
~H"""
<a href={"https://plausible.io/docs/#{@slug}"} rel="noopener noreferrer" target="_blank">
- <Heroicons.information_circle class="text-gray-500 dark:text-indigo-500 w-6 h-6 stroke-2 absolute top-4 right-4 hover:text-indigo-500 dark:hover:text-indigo-300" />
+ <Heroicons.information_circle class={[
+ "text-gray-500 dark:text-indigo-500 w-6 h-6 stroke-2 hover:text-indigo-500 dark:hover:text-indigo-300",
+ @class
+ ]} />
</a>
"""
end
@@ -418,7 +422,7 @@ defmodule PlausibleWeb.Components.Generic do
<.title>
{render_slot(@title)}
- <.docs_info :if={@docs} slug={@docs} />
+ <.docs_info :if={@docs} slug={@docs} class="absolute top-4 right-4" />
</.title>
<div class="text-sm mt-px text-gray-500 dark:text-gray-400 leading-5">
{render_slot(@subtitle)}
diff --git a/lib/plausible_web/live/team_setup.ex b/lib/plausible_web/live/team_setup.ex
index 53779b1843..c6438cd67a 100644
--- a/lib/plausible_web/live/team_setup.ex
+++ b/lib/plausible_web/live/team_setup.ex
@@ -59,7 +59,14 @@ defmodule PlausibleWeb.Live.TeamSetup do
def render(assigns) do
~H"""
<.focus_box>
- <:title>Create a new team</:title>
+ <:title>
+ <div class="flex justify-between">
+ <div>Create a new team</div>
+ <div class="ml-auto">
+ <.docs_info slug="users-roles" />
+ </div>
+ </div>
+ </:title>
<:subtitle>
Add your team members and assign their roles
</:subtitle>
diff --git a/lib/plausible_web/templates/settings/team_general.html.heex b/lib/plausible_web/templates/settings/team_general.html.heex
index 962cc3a03e..7315c75cf5 100644
--- a/lib/plausible_web/templates/settings/team_general.html.heex
+++ b/lib/plausible_web/templates/settings/team_general.html.heex
@@ -1,7 +1,7 @@
<.settings_tiles>
- <.tile>
+ <.tile docs="users-roles">
<:title>
- <a id="update-name">Team Information</a>
+ <a id="update-name#changing-the-name-of-a-team">Team Information</a>
</:title>
<:subtitle>
Change the name of your team
@@ -33,7 +33,7 @@
</.button>
</.form>
</.tile>
- <.tile>
+ <.tile docs="users-roles#managing-team-member-roles">
<:title>
<a id="team-members">Team Members</a>
</:title>