memEx/lib/memex_web/live/pipeline_live/index.html.heex

65 lines
1.6 KiB
Plaintext
Raw Normal View History

2022-07-25 20:12:11 -04:00
<h1>Listing Pipelines</h1>
<%= if @live_action in [:new, :edit] do %>
<.modal return_to={Routes.pipeline_index_path(@socket, :index)}>
<.live_component
module={MemexWeb.PipelineLive.FormComponent}
id={@pipeline.id || :new}
title={@page_title}
action={@live_action}
pipeline={@pipeline}
return_to={Routes.pipeline_index_path(@socket, :index)}
/>
</.modal>
<% end %>
<table>
<thead>
<tr>
<th>Title</th>
<th>Description</th>
<th>Visibility</th>
<th></th>
</tr>
</thead>
<tbody id="pipelines">
<%= for pipeline <- @pipelines do %>
<tr id={"pipeline-#{pipeline.id}"}>
<td><%= pipeline.title %></td>
<td><%= pipeline.description %></td>
<td><%= pipeline.visibility %></td>
<td>
2022-07-25 22:05:54 -04:00
<span>
2022-11-16 21:11:02 -05:00
<.link navigate={Routes.pipeline_show_path(@socket, :show, pipeline)}>
<%= dgettext("actions", "Show") %>
</.link>
2022-07-25 22:05:54 -04:00
</span>
<span>
2022-11-16 21:11:02 -05:00
<.link patch={Routes.pipeline_index_path(@socket, :edit, pipeline)}>
<%= dgettext("actions", "Edit") %>
</.link>
2022-07-25 22:05:54 -04:00
</span>
<span>
2022-11-16 21:11:02 -05:00
<.link
href="#"
phx-click="delete"
phx-value-id={pipeline.id}
data-confirm={dgettext("prompts", "Are you sure?")}
>
<%= dgettext("actions", "Delete") %>
</.link>
2022-07-25 22:05:54 -04:00
</span>
2022-07-25 20:12:11 -04:00
</td>
</tr>
<% end %>
</tbody>
</table>
2022-11-16 21:11:02 -05:00
<span>
<.link patch={Routes.pipeline_index_path(@socket, :new)}>
<%= dgettext("actions", "New Pipeline") %>
</.link>
</span>