Hash :
49025a97
Author :
Thomas de Grivel
Date :
2021-11-21T12:18:50
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<%= form_for @changeset, @action, fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Invalid parameters</p>
</div>
<% end %>
<div class="mb-3">
<%= label f, :slug, class: "form-label" %>
<%= text_input f, :slug, class: "form-control" %>
<%= error_tag f, :slug %>
</div>
<div class="mb-3">
<%= label f, :description, class: "form-label" %>
<%= textarea f, :description, class: "form-control" %>
<%= error_tag f, :description %>
</div>
<div class="mb-3">
<%= if @conn.assigns[:current_repository] do %>
<%= link gettext("Cancel"),
to: Routes.repository_path(@conn, :show, Repository.owner_slug(@current_repository), Repository.splat(@current_repository)),
class: "btn btn-secondary" %>
<%= link gettext("Delete repository"),
to: Routes.repository_path(@conn, :delete, Repository.owner_slug(@current_repository), Repository.splat(@current_repository)),
method: :delete,
class: "btn btn-danger",
data: [confirm: gettext("Are you sure you want to delete the repository %{repo} ?", repo: Repository.full_slug(@current_repository))] %>
<% else %>
<%= link gettext("Cancel"),
to: Routes.slug_path(@conn, :show, @owner.slug.slug),
class: "btn btn-secondary" %>
<% end %>
<%= submit gettext("Submit"), class: "btn btn-primary" %>
</div>
<% end %>