2024-07-28 21:52:12 +05:00
|
|
|
|
defmodule ComfycampWeb.AdminPageHTML do
|
|
|
|
|
use ComfycampWeb, :html
|
|
|
|
|
|
|
|
|
|
def home(assigns) do
|
|
|
|
|
~H"""
|
2024-08-31 17:06:02 +05:00
|
|
|
|
<div>
|
|
|
|
|
<h3>Управление сайтом</h3>
|
|
|
|
|
<div class="stats">
|
|
|
|
|
<.stat name="Всего пользователей" value={@user_count} />
|
|
|
|
|
<.stat
|
|
|
|
|
name="Неодобренных пользователей"
|
|
|
|
|
value={@unapproved_user_count}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
"""
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
@doc """
|
|
|
|
|
Card for statistical data.
|
|
|
|
|
"""
|
|
|
|
|
attr :name, :string, required: true
|
|
|
|
|
attr :value, :any, required: true
|
|
|
|
|
|
|
|
|
|
def stat(assigns) do
|
|
|
|
|
~H"""
|
|
|
|
|
<div class="stat">
|
|
|
|
|
<div class="value"><%= @value %></div>
|
|
|
|
|
<div class="name"><%= @name %></div>
|
|
|
|
|
</div>
|
2024-07-28 21:52:12 +05:00
|
|
|
|
"""
|
|
|
|
|
end
|
|
|
|
|
end
|