From 355752598cc7f33db32d6a98d68fb59fb3a0e978 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 19 Mar 2023 15:09:44 -0400 Subject: [PATCH] show link to ammo pack in ammo pack table while viewing ammo type --- CHANGELOG.md | 5 +++-- .../live/ammo_type_live/show.html.heex | 15 +++++++++++++++ priv/gettext/actions.pot | 1 + priv/gettext/de/LC_MESSAGES/actions.po | 1 + priv/gettext/en/LC_MESSAGES/actions.po | 1 + priv/gettext/es/LC_MESSAGES/actions.po | 1 + priv/gettext/fr/LC_MESSAGES/actions.po | 1 + priv/gettext/ga/LC_MESSAGES/actions.po | 1 + 8 files changed, 24 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1af9ec..ed35633 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,11 @@ # v0.8.6 - Fix duplicate entries showing up -- Show ammo groups under a type in a table by default +- Show ammo packs under a type in a table by default - Only show historical ammo type information when displaying "Show used" in table -- Only show historical ammo group information when displaying "Show used" in table +- Only show historical ammo pack information when displaying "Show used" in table - Fix some values not being sorted in tables properly - Code quality improvements +- Show link to ammo pack in ammo pack table while viewing ammo type # v0.8.5 - Add link in readme to github mirror diff --git a/lib/cannery_web/live/ammo_type_live/show.html.heex b/lib/cannery_web/live/ammo_type_live/show.html.heex index f9fb9d0..aeb852c 100644 --- a/lib/cannery_web/live/ammo_type_live/show.html.heex +++ b/lib/cannery_web/live/ammo_type_live/show.html.heex @@ -180,6 +180,21 @@ <%= container_name %> + <:actions :let={%{count: ammo_group_count} = ammo_group}> +
+ <.link + navigate={Routes.ammo_group_show_path(Endpoint, :show, ammo_group)} + class="text-primary-600 link" + aria-label={ + dgettext("actions", "View ammo group of %{ammo_group_count} bullets", + ammo_group_count: ammo_group_count + ) + } + > + + +
+ <% else %>
diff --git a/priv/gettext/actions.pot b/priv/gettext/actions.pot index fcadfa8..b2496ca 100644 --- a/priv/gettext/actions.pot +++ b/priv/gettext/actions.pot @@ -354,6 +354,7 @@ msgid "Delete ammo group of %{ammo_group_count} bullets" msgstr "" #: lib/cannery_web/live/ammo_group_live/index.html.heex:132 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:189 #, elixir-autogen, elixir-format msgid "View ammo group of %{ammo_group_count} bullets" msgstr "" diff --git a/priv/gettext/de/LC_MESSAGES/actions.po b/priv/gettext/de/LC_MESSAGES/actions.po index 0540423..b31dedb 100644 --- a/priv/gettext/de/LC_MESSAGES/actions.po +++ b/priv/gettext/de/LC_MESSAGES/actions.po @@ -367,6 +367,7 @@ msgid "Delete ammo group of %{ammo_group_count} bullets" msgstr "" #: lib/cannery_web/live/ammo_group_live/index.html.heex:132 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:189 #, elixir-autogen, elixir-format, fuzzy msgid "View ammo group of %{ammo_group_count} bullets" msgstr "" diff --git a/priv/gettext/en/LC_MESSAGES/actions.po b/priv/gettext/en/LC_MESSAGES/actions.po index e22e880..bb71360 100644 --- a/priv/gettext/en/LC_MESSAGES/actions.po +++ b/priv/gettext/en/LC_MESSAGES/actions.po @@ -354,6 +354,7 @@ msgid "Delete ammo group of %{ammo_group_count} bullets" msgstr "" #: lib/cannery_web/live/ammo_group_live/index.html.heex:132 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:189 #, elixir-autogen, elixir-format, fuzzy msgid "View ammo group of %{ammo_group_count} bullets" msgstr "" diff --git a/priv/gettext/es/LC_MESSAGES/actions.po b/priv/gettext/es/LC_MESSAGES/actions.po index 4396184..95888b6 100644 --- a/priv/gettext/es/LC_MESSAGES/actions.po +++ b/priv/gettext/es/LC_MESSAGES/actions.po @@ -367,6 +367,7 @@ msgid "Delete ammo group of %{ammo_group_count} bullets" msgstr "" #: lib/cannery_web/live/ammo_group_live/index.html.heex:132 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:189 #, elixir-autogen, elixir-format, fuzzy msgid "View ammo group of %{ammo_group_count} bullets" msgstr "" diff --git a/priv/gettext/fr/LC_MESSAGES/actions.po b/priv/gettext/fr/LC_MESSAGES/actions.po index 2e704dc..b71af9e 100644 --- a/priv/gettext/fr/LC_MESSAGES/actions.po +++ b/priv/gettext/fr/LC_MESSAGES/actions.po @@ -367,6 +367,7 @@ msgid "Delete ammo group of %{ammo_group_count} bullets" msgstr "" #: lib/cannery_web/live/ammo_group_live/index.html.heex:132 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:189 #, elixir-autogen, elixir-format, fuzzy msgid "View ammo group of %{ammo_group_count} bullets" msgstr "" diff --git a/priv/gettext/ga/LC_MESSAGES/actions.po b/priv/gettext/ga/LC_MESSAGES/actions.po index 4857c5c..de4401e 100644 --- a/priv/gettext/ga/LC_MESSAGES/actions.po +++ b/priv/gettext/ga/LC_MESSAGES/actions.po @@ -365,6 +365,7 @@ msgid "Delete ammo group of %{ammo_group_count} bullets" msgstr "" #: lib/cannery_web/live/ammo_group_live/index.html.heex:132 +#: lib/cannery_web/live/ammo_type_live/show.html.heex:189 #, elixir-autogen, elixir-format, fuzzy msgid "View ammo group of %{ammo_group_count} bullets" msgstr ""