hide register/login links if registration is not open
This commit is contained in:
parent
5962f9eaee
commit
5b97348fb7
|
@ -9,7 +9,8 @@ import Config
|
||||||
|
|
||||||
config :poex,
|
config :poex,
|
||||||
ecto_repos: [Poex.Repo],
|
ecto_repos: [Poex.Repo],
|
||||||
generators: [timestamp_type: :utc_datetime]
|
generators: [timestamp_type: :utc_datetime],
|
||||||
|
open_registration: false
|
||||||
|
|
||||||
# Configures the endpoint
|
# Configures the endpoint
|
||||||
config :poex, PoexWeb.Endpoint,
|
config :poex, PoexWeb.Endpoint,
|
||||||
|
|
|
@ -13,7 +13,9 @@
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-white antialiased">
|
<body class="bg-white antialiased">
|
||||||
|
<%= if Application.get_env(:poex, :open_registration, false) do %>
|
||||||
<ul class="relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end">
|
<ul class="relative z-10 flex items-center gap-4 px-4 sm:px-6 lg:px-8 justify-end">
|
||||||
|
|
||||||
<%= if @current_user do %>
|
<%= if @current_user do %>
|
||||||
<li class="text-[0.8125rem] leading-6 text-zinc-900">
|
<li class="text-[0.8125rem] leading-6 text-zinc-900">
|
||||||
<%= @current_user.email %>
|
<%= @current_user.email %>
|
||||||
|
@ -54,6 +56,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
<% end %>
|
||||||
<%= @inner_content %>
|
<%= @inner_content %>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue