style: consistent back button and some translations
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
carla 2026-02-25 16:25:13 +01:00
parent 91cf7cca6a
commit 0f12befd11
26 changed files with 747 additions and 710 deletions

View file

@ -79,12 +79,14 @@ defmodule MvWeb.GroupLive.Form do
<Layouts.app flash={@flash} current_user={@current_user}>
<.form for={@form} id="group-form" phx-change="validate" phx-submit="save">
<.header>
{@page_title}
<:actions>
<:leading>
<.button navigate={return_path(@return_to, @group)} variant="neutral">
<.icon name="hero-arrow-left" class="size-4" />
{gettext("Back")}
</.button>
</:leading>
{@page_title}
<:actions>
<.button phx-disable-with={gettext("Saving...")} variant="primary" type="submit">
{gettext("Save")}
</.button>

View file

@ -50,7 +50,7 @@ defmodule MvWeb.GroupLive.Show do
end
end
defp load_group_by_slug(socket, slug, actor, params \\ %{}) do
defp load_group_by_slug(socket, slug, actor, params) do
# Load group with members and member_count
# Using explicit load ensures efficient preloading of members relationship
require Ash.Query
@ -92,8 +92,7 @@ defmodule MvWeb.GroupLive.Show do
~H"""
<Layouts.app flash={@flash} current_user={@current_user}>
<.header>
{@group.name}
<:actions>
<:leading>
<.button
navigate={~p"/groups"}
variant="neutral"
@ -102,13 +101,16 @@ defmodule MvWeb.GroupLive.Show do
<.icon name="hero-arrow-left" class="size-4" />
{gettext("Back")}
</.button>
</:leading>
{@group.name}
<:actions>
<%= if can?(@current_user, :update, @group) do %>
<.button
variant="primary"
navigate={~p"/groups/#{@group.slug}/edit"}
data-testid="group-show-edit-btn"
>
{gettext("Edit group")}
<.icon name="hero-pencil-square" /> {gettext("Edit group")}
</.button>
<% end %>
</:actions>