diff --git a/lib/cannery_web/live/ammo_group_live/index.ex b/lib/cannery_web/live/ammo_group_live/index.ex
index c217dcd1..d4ee8142 100644
--- a/lib/cannery_web/live/ammo_group_live/index.ex
+++ b/lib/cannery_web/live/ammo_group_live/index.ex
@@ -121,19 +121,21 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
{staged,
~H"""
-
+
+
- <%= live_patch(dgettext("actions", "Record shots"),
- to: Routes.ammo_group_index_path(Endpoint, :add_shot_group, ammo_group),
- class: "btn btn-primary"
- ) %>
+ <%= live_patch(dgettext("actions", "Record shots"),
+ to: Routes.ammo_group_index_path(Endpoint, :add_shot_group, ammo_group),
+ class: "mx-2 my-1 btn btn-primary"
+ ) %>
+
"""}
end
@@ -174,11 +176,17 @@ defmodule CanneryWeb.AmmoGroupLive.Index do
defp get_value_for_key("container", %{container: nil}), do: {nil, nil}
defp get_value_for_key("container", %{container: %{name: container_name}} = ammo_group) do
+ assigns = %{ammo_group: ammo_group}
+
{container_name,
- live_patch(container_name,
- to: Routes.ammo_group_index_path(Endpoint, :move, ammo_group),
- class: "btn btn-primary"
- )}
+ ~H"""
+
+ <%= live_patch(@ammo_group.container.name,
+ to: Routes.ammo_group_index_path(Endpoint, :move, @ammo_group),
+ class: "btn btn-primary"
+ ) %>
+
+ """}
end
defp get_value_for_key(key, ammo_group),