This commit is contained in:
@ -9,17 +9,17 @@
|
||||
phx-hook="CtrlEnter"
|
||||
class="flex flex-col justify-start items-stretch space-y-4"
|
||||
>
|
||||
<%= text_input(f, :slug,
|
||||
{text_input(f, :slug,
|
||||
aria_label: gettext("slug"),
|
||||
class: "input input-primary",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTitles",
|
||||
placeholder: gettext("slug"),
|
||||
required: true
|
||||
) %>
|
||||
<%= error_tag(f, :slug) %>
|
||||
)}
|
||||
{error_tag(f, :slug)}
|
||||
|
||||
<%= textarea(f, :description,
|
||||
{textarea(f, :description,
|
||||
id: "pipeline-form-description",
|
||||
class: "input input-primary h-64 min-h-64",
|
||||
phx_update: "ignore",
|
||||
@ -32,32 +32,32 @@
|
||||
"use [[[note-slug]]] to link to a note or use [[context-slug]] to link to a context or [pipeline-slug] to link to a pipeline"
|
||||
),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
<%= error_tag(f, :description) %>
|
||||
)}
|
||||
{error_tag(f, :description)}
|
||||
|
||||
<%= text_input(f, :tags_string,
|
||||
{text_input(f, :tags_string,
|
||||
aria_label: gettext("tag1,tag2"),
|
||||
class: "input input-primary",
|
||||
id: "tags-input",
|
||||
phx_debounce: 300,
|
||||
phx_hook: "SanitizeTags",
|
||||
placeholder: gettext("tag1,tag2")
|
||||
) %>
|
||||
<%= error_tag(f, :tags_string) %>
|
||||
)}
|
||||
{error_tag(f, :tags_string)}
|
||||
|
||||
<div class="flex justify-center items-stretch space-x-4">
|
||||
<%= select(f, :visibility, Ecto.Enum.values(Memex.Pipelines.Pipeline, :visibility),
|
||||
{select(f, :visibility, Ecto.Enum.values(Memex.Pipelines.Pipeline, :visibility),
|
||||
class: "grow input input-primary",
|
||||
prompt: gettext("select privacy"),
|
||||
aria_label: gettext("select privacy"),
|
||||
phx_debounce: 300
|
||||
) %>
|
||||
)}
|
||||
|
||||
<%= submit(dgettext("actions", "save"),
|
||||
{submit(dgettext("actions", "save"),
|
||||
phx_disable_with: gettext("saving..."),
|
||||
class: "mx-auto btn btn-primary"
|
||||
) %>
|
||||
)}
|
||||
</div>
|
||||
<%= error_tag(f, :visibility) %>
|
||||
{error_tag(f, :visibility)}
|
||||
</.form>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="flex flex-col justify-center items-start mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= gettext("pipelines") %>
|
||||
{gettext("pipelines")}
|
||||
</h1>
|
||||
|
||||
<.form
|
||||
@ -11,18 +11,18 @@
|
||||
phx-submit="search"
|
||||
class="flex flex-col items-stretch self-stretch"
|
||||
>
|
||||
<%= text_input(f, :search_term,
|
||||
{text_input(f, :search_term,
|
||||
class: "input input-primary",
|
||||
value: @search,
|
||||
role: "search",
|
||||
phx_debounce: 300,
|
||||
placeholder: gettext("search")
|
||||
) %>
|
||||
)}
|
||||
</.form>
|
||||
|
||||
<%= if @pipelines |> Enum.empty?() do %>
|
||||
<h1 class="self-center text-primary-500">
|
||||
<%= gettext("no pipelines found") %>
|
||||
{gettext("no pipelines found")}
|
||||
</h1>
|
||||
<% else %>
|
||||
<.live_component
|
||||
@ -37,7 +37,7 @@
|
||||
patch={~p"/pipelines/#{pipeline}/edit"}
|
||||
aria-label={dgettext("actions", "edit %{pipeline_slug}", pipeline_slug: pipeline.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<.link
|
||||
:if={@current_user}
|
||||
@ -49,14 +49,14 @@
|
||||
dgettext("actions", "delete %{pipeline_slug}", pipeline_slug: pipeline.slug)
|
||||
}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</.link>
|
||||
</:actions>
|
||||
</.live_component>
|
||||
<% end %>
|
||||
|
||||
<.link :if={@current_user} patch={~p"/pipelines/new"} class="self-end btn btn-primary">
|
||||
<%= dgettext("actions", "new pipeline") %>
|
||||
{dgettext("actions", "new pipeline")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
<div class="flex flex-col justify-center items-stretch mx-auto space-y-4 max-w-3xl">
|
||||
<h1 class="text-xl">
|
||||
<%= @pipeline.slug %>
|
||||
{@pipeline.slug}
|
||||
</h1>
|
||||
|
||||
<div class="flex flex-wrap space-x-1">
|
||||
<.link :for={tag <- @pipeline.tags} navigate={~p"/pipelines/#{tag}"} class="link">
|
||||
<%= tag %>
|
||||
{tag}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<.pipeline_content pipeline={@pipeline} />
|
||||
|
||||
<div :if={@pipeline_backlinks != []} class="flex flex-wrap justify-end items-center self-end">
|
||||
<p><%= gettext("Backlinked by:") %></p>
|
||||
<p>{gettext("Backlinked by:")}</p>
|
||||
<.link
|
||||
:for={backlink <- @pipeline_backlinks}
|
||||
class="m-1 hover:underline"
|
||||
patch={~p"/pipeline/#{backlink}"}
|
||||
>
|
||||
<%= gettext("[%{slug}]", slug: backlink.slug) %>
|
||||
{gettext("[%{slug}]", slug: backlink.slug)}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
<p class="self-end">
|
||||
<%= gettext("Visibility: %{visibility}", visibility: @pipeline.visibility) %>
|
||||
{gettext("Visibility: %{visibility}", visibility: @pipeline.visibility)}
|
||||
</p>
|
||||
|
||||
<div class="flex self-end pb-4 space-x-4">
|
||||
<.link :if={@current_user} class="btn btn-primary" patch={~p"/pipeline/#{@pipeline}/edit"}>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
<button
|
||||
:if={@current_user}
|
||||
@ -38,25 +38,25 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{pipeline_slug}", pipeline_slug: @pipeline.slug)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<hr class="hr" />
|
||||
|
||||
<h2 class="self-center pt-2 text-lg">
|
||||
<%= gettext("steps:") %>
|
||||
{gettext("steps:")}
|
||||
</h2>
|
||||
|
||||
<%= if @steps |> Enum.empty?() do %>
|
||||
<h3 class="self-center text-md text-primary-600">
|
||||
<%= gettext("no steps") %>
|
||||
{gettext("no steps")}
|
||||
</h3>
|
||||
<% else %>
|
||||
<%= for %{id: step_id, position: position, title: title} = step <- @steps do %>
|
||||
<div class="flex justify-between items-center space-x-4">
|
||||
<h3 class="text-md">
|
||||
<%= gettext("%{position}. %{title}", position: position + 1, title: title) %>
|
||||
{gettext("%{position}. %{title}", position: position + 1, title: title)}
|
||||
</h3>
|
||||
|
||||
<%= if @current_user do %>
|
||||
@ -98,7 +98,7 @@
|
||||
patch={~p"/pipeline/#{@pipeline}/#{step_id}"}
|
||||
aria-label={dgettext("actions", "edit %{step_title}", step_title: step.title)}
|
||||
>
|
||||
<%= dgettext("actions", "edit") %>
|
||||
{dgettext("actions", "edit")}
|
||||
</.link>
|
||||
|
||||
<button
|
||||
@ -109,7 +109,7 @@
|
||||
data-confirm={dgettext("prompts", "are you sure?")}
|
||||
aria-label={dgettext("actions", "delete %{step_title}", step_title: step.title)}
|
||||
>
|
||||
<%= dgettext("actions", "delete") %>
|
||||
{dgettext("actions", "delete")}
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
@ -124,7 +124,7 @@
|
||||
class="self-end btn btn-primary"
|
||||
patch={~p"/pipeline/#{@pipeline}/add_step"}
|
||||
>
|
||||
<%= dgettext("actions", "add step") %>
|
||||
{dgettext("actions", "add step")}
|
||||
</.link>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user