diff --git a/lib/plausible_web/controllers/stats_controller.ex b/lib/plausible_web/controllers/stats_controller.ex index bd4c02a69..ab5d71b41 100644 --- a/lib/plausible_web/controllers/stats_controller.ex +++ b/lib/plausible_web/controllers/stats_controller.ex @@ -32,9 +32,11 @@ defmodule PlausibleWeb.StatsController do |> render("waiting_first_pageview.html", site: site) site.locked -> + owner = Plausible.Sites.owner_for(site) + conn |> assign(:skip_plausible_tracking, true) - |> render("site_locked.html", site: site) + |> render("site_locked.html", owner: owner, site: site) end end diff --git a/lib/plausible_web/templates/stats/site_locked.html.eex b/lib/plausible_web/templates/stats/site_locked.html.eex index bf70cb986..38c768af2 100644 --- a/lib/plausible_web/templates/stats/site_locked.html.eex +++ b/lib/plausible_web/templates/stats/site_locked.html.eex @@ -1,31 +1,46 @@
- This site is locked because you don't have an active subscription. We are still counting stats in the background but your access to the dashboard is restricted. Subscribe with the link below to access your stats again. -
-+ <%= case @conn.assigns[:current_user_role] do %> + <%= :owner -> %> +
+ This site is locked because you don't have an active subscription. We are still counting stats in the background but your access to the dashboard is restricted. Subscribe with the link below to access your stats again. +
++ This site is currently locked and cannot be accessed. The site owner <%= @owner.email %> must upgrage their subscription plan in order to + unlock the site. +
+Want to pay for this site with the account you're logged in with?
+Contact <%= @owner.email %> and ask them to <%= link("tranfer the ownership", class: "text-indigo-500", to: "https://plausible.io/docs/transfer-ownership", rel: "noreferrer") %> of the site over to you
+This site is currently locked and cannot be accessed. You can check back later or contact the site owner to unlock it. -
-