style: consistent back button and some translations
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
91cf7cca6a
commit
0f12befd11
26 changed files with 747 additions and 710 deletions
|
|
@ -23,13 +23,15 @@ defmodule MvWeb.RoleLive.Form do
|
|||
<Layouts.app flash={@flash} current_user={@current_user}>
|
||||
<.form class="max-w-xl" for={@form} id="role-form" phx-change="validate" phx-submit="save">
|
||||
<.header>
|
||||
{@page_title}
|
||||
<:subtitle>{gettext("Use this form to manage roles in your database.")}</:subtitle>
|
||||
<:actions>
|
||||
<:leading>
|
||||
<.button navigate={return_path(@return_to, @role)} variant="neutral">
|
||||
<.icon name="hero-arrow-left" class="size-4" />
|
||||
{gettext("Back")}
|
||||
</.button>
|
||||
</:leading>
|
||||
{@page_title}
|
||||
<:subtitle>{gettext("Use this form to manage roles in your database.")}</:subtitle>
|
||||
<:actions>
|
||||
<.button phx-disable-with={gettext("Saving...")} variant="primary" type="submit">
|
||||
{gettext("Save")}
|
||||
</.button>
|
||||
|
|
|
|||
|
|
@ -161,10 +161,7 @@ defmodule MvWeb.RoleLive.Show do
|
|||
~H"""
|
||||
<Layouts.app flash={@flash} current_user={@current_user}>
|
||||
<.header>
|
||||
{gettext("Role")} {@role.name}
|
||||
<:subtitle>{gettext("Role details and permissions.")}</:subtitle>
|
||||
|
||||
<:actions>
|
||||
<:leading>
|
||||
<.button
|
||||
navigate={~p"/admin/roles"}
|
||||
variant="neutral"
|
||||
|
|
@ -173,13 +170,18 @@ defmodule MvWeb.RoleLive.Show do
|
|||
<.icon name="hero-arrow-left" class="size-4" />
|
||||
{gettext("Back")}
|
||||
</.button>
|
||||
</:leading>
|
||||
{gettext("Role")} {@role.name}
|
||||
<:subtitle>{gettext("Role details and permissions.")}</:subtitle>
|
||||
|
||||
<:actions>
|
||||
<%= if can?(@current_user, :update, Mv.Authorization.Role) do %>
|
||||
<.button
|
||||
variant="primary"
|
||||
navigate={~p"/admin/roles/#{@role}/edit"}
|
||||
data-testid="role-show-edit-btn"
|
||||
>
|
||||
{gettext("Edit role")}
|
||||
<.icon name="hero-pencil-square" /> {gettext("Edit role")}
|
||||
</.button>
|
||||
<% end %>
|
||||
</:actions>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue