search tags when on click
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-12-15 22:33:10 -05:00
parent 0b4449c8a8
commit c3ceb877b2
21 changed files with 152 additions and 55 deletions

View File

@ -105,7 +105,17 @@ defmodule MemexWeb.Components.ContextsTableComponent do
end
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
tags |> Enum.join(", ")
assigns = %{tags: tags}
~H"""
<div class="flex flex-wrap justify-center space-x-1">
<%= for tag <- @tags do %>
<.link patch={Routes.context_index_path(Endpoint, :search, tag)} class="link">
<%= tag %>
</.link>
<% end %>
</div>
"""
end
defp get_value_for_key(:actions, context, %{actions: actions}) do

View File

@ -105,7 +105,17 @@ defmodule MemexWeb.Components.NotesTableComponent do
end
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
tags |> Enum.join(", ")
assigns = %{tags: tags}
~H"""
<div class="flex flex-wrap justify-center space-x-1">
<%= for tag <- @tags do %>
<.link patch={Routes.note_index_path(Endpoint, :search, tag)} class="link">
<%= tag %>
</.link>
<% end %>
</div>
"""
end
defp get_value_for_key(:actions, note, %{actions: actions}) do

View File

@ -118,7 +118,17 @@ defmodule MemexWeb.Components.PipelinesTableComponent do
end
defp get_value_for_key(:tags, %{tags: tags}, _additional_data) do
tags |> Enum.join(", ")
assigns = %{tags: tags}
~H"""
<div class="flex flex-wrap justify-center space-x-1">
<%= for tag <- @tags do %>
<.link patch={Routes.pipeline_index_path(Endpoint, :search, tag)} class="link">
<%= tag %>
</.link>
<% end %>
</div>
"""
end
defp get_value_for_key(:actions, pipeline, %{actions: actions}) do

View File

@ -3,7 +3,13 @@
<%= @context.slug %>
</h1>
<p><%= if @context.tags, do: @context.tags |> Enum.join(", ") %></p>
<div class="flex flex-wrap space-x-1">
<%= for tag <- @context.tags do %>
<.link navigate={Routes.context_index_path(Endpoint, :search, tag)} class="link">
<%= tag %>
</.link>
<% end %>
</div>
<.context_content context={@context} />

View File

@ -3,7 +3,13 @@
<%= @note.slug %>
</h1>
<p><%= if @note.tags, do: @note.tags |> Enum.join(", ") %></p>
<div class="flex flex-wrap space-x-1">
<%= for tag <- @note.tags do %>
<.link navigate={Routes.note_index_path(Endpoint, :search, tag)} class="link">
<%= tag %>
</.link>
<% end %>
</div>
<.note_content note={@note} />

View File

@ -3,7 +3,13 @@
<%= @pipeline.slug %>
</h1>
<p><%= if @pipeline.tags, do: @pipeline.tags |> Enum.join(", ") %></p>
<div class="flex flex-wrap space-x-1">
<%= for tag <- @pipeline.tags do %>
<.link navigate={Routes.pipeline_index_path(Endpoint, :search, tag)} class="link">
<%= tag %>
</.link>
<% end %>
</div>
<%= if @pipeline.description do %>
<textarea

View File

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>
<%= dgettext("errors", "Error") %>| memEx
<%= dgettext("errors", "Error") %> | memEx
</title>
<link rel="stylesheet" href="/css/app.css" />
<script defer type="text/javascript" src="/js/app.js">