This commit is contained in:
parent
026bf22f60
commit
994aa96a20
@ -88,9 +88,7 @@ defmodule MemexWeb.Components.NotesTableComponent do
|
|||||||
|
|
||||||
@spec get_value_for_key(atom(), Note.t(), additional_data :: map()) ::
|
@spec get_value_for_key(atom(), Note.t(), additional_data :: map()) ::
|
||||||
any() | {any(), Rendered.t()}
|
any() | {any(), Rendered.t()}
|
||||||
defp get_value_for_key(:slug, %{slug: slug}, _additional_data) do
|
defp get_value_for_key(:slug, %{slug: slug} = assigns, _additional_data) do
|
||||||
assigns = %{slug: slug}
|
|
||||||
|
|
||||||
slug_block = ~H"""
|
slug_block = ~H"""
|
||||||
<.link navigate={~p"/note/#{@slug}"} class="link">
|
<.link navigate={~p"/note/#{@slug}"} class="link">
|
||||||
<%= @slug %>
|
<%= @slug %>
|
||||||
@ -100,9 +98,7 @@ defmodule MemexWeb.Components.NotesTableComponent do
|
|||||||
{slug, slug_block}
|
{slug, slug_block}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
defp get_value_for_key(:tags, assigns, _additional_data) do
|
||||||
assigns = %{tags: tags}
|
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<div class="flex flex-wrap justify-center space-x-1">
|
<div class="flex flex-wrap justify-center space-x-1">
|
||||||
<.link :for={tag <- @tags} patch={~p"/notes/#{tag}"} class="link">
|
<.link :for={tag <- @tags} patch={~p"/notes/#{tag}"} class="link">
|
||||||
|
@ -89,9 +89,7 @@ defmodule MemexWeb.Components.PipelinesTableComponent do
|
|||||||
|
|
||||||
@spec get_value_for_key(atom(), Pipeline.t(), additional_data :: map()) ::
|
@spec get_value_for_key(atom(), Pipeline.t(), additional_data :: map()) ::
|
||||||
any() | {any(), Rendered.t()}
|
any() | {any(), Rendered.t()}
|
||||||
defp get_value_for_key(:slug, %{slug: slug}, _additional_data) do
|
defp get_value_for_key(:slug, %{slug: slug} = assigns, _additional_data) do
|
||||||
assigns = %{slug: slug}
|
|
||||||
|
|
||||||
slug_block = ~H"""
|
slug_block = ~H"""
|
||||||
<.link navigate={~p"/pipeline/#{@slug}"} class="link">
|
<.link navigate={~p"/pipeline/#{@slug}"} class="link">
|
||||||
<%= @slug %>
|
<%= @slug %>
|
||||||
@ -101,9 +99,7 @@ defmodule MemexWeb.Components.PipelinesTableComponent do
|
|||||||
{slug, slug_block}
|
{slug, slug_block}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:description, %{description: description}, _additional_data) do
|
defp get_value_for_key(:description, %{description: description} = assigns, _additional_data) do
|
||||||
assigns = %{description: description}
|
|
||||||
|
|
||||||
description_block = ~H"""
|
description_block = ~H"""
|
||||||
<div class="truncate max-w-sm">
|
<div class="truncate max-w-sm">
|
||||||
<%= @description %>
|
<%= @description %>
|
||||||
@ -113,9 +109,7 @@ defmodule MemexWeb.Components.PipelinesTableComponent do
|
|||||||
{description, description_block}
|
{description, description_block}
|
||||||
end
|
end
|
||||||
|
|
||||||
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
|
defp get_value_for_key(:tags, assigns, _additional_data) do
|
||||||
assigns = %{tags: tags}
|
|
||||||
|
|
||||||
~H"""
|
~H"""
|
||||||
<div class="flex flex-wrap justify-center space-x-1">
|
<div class="flex flex-wrap justify-center space-x-1">
|
||||||
<.link :for={tag <- @tags} patch={~p"/pipelines/#{tag}"} class="link">
|
<.link :for={tag <- @tags} patch={~p"/pipelines/#{tag}"} class="link">
|
||||||
|
Loading…
Reference in New Issue
Block a user