Hash :
031737e9
Author :
Thomas de Grivel
Date :
2021-11-30T15:47:51
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
<div class="container-fluid">
<h1><%= gettext("Repository %{repo}", repo: Repository.full_slug(@repo)) %></h1>
<table class="table admin-properties">
<tr>
<th><%= gettext "Id" %></th>
<td><%= @repo.id %></td>
</tr>
<tr>
<th><%= gettext "Owner" %></th>
<td>
<%= case owner = Repository.owner(@repo) do %>
<% %Organisation{} -> %>
<%= gettext "Organisation" %>
<%= link owner.name || owner.slug.slug, to: Routes.admin_organisation_path(@conn, :show, owner) %>
<% %User{} -> %>
<%= gettext "User" %>
<%= link owner.slug.slug, to: Routes.admin_user_path(@conn, :show, owner) %>
<% end %>
</td>
</tr>
<tr>
<th><%= gettext "Slug" %></th>
<td><%= link Repository.full_slug(@repo), to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo)) %></td>
</tr>
<tr>
<th><%= gettext "Description" %></th>
<td>
<%= if @repo.description do %>
<%= raw Earmark.as_html!(@repo.description) %>
<% end %>
</td>
</tr>
<tr>
<th><%= gettext "Members" %></th>
<td>
<%= for user <- @members do %>
<%= link(user.slug.slug, to: Routes.admin_user_path(@conn, :show, user), class: "user") %>
<% end %>
<%= link "-",
to: Routes.admin_repository__path(@conn, :remove_user, @repo),
class: "btn btn-danger btn-sm" %>
<%= link "+",
to: Routes.admin_repository__path(@conn, :add_user, @repo),
class: "btn btn-primary btn-sm" %>
</td>
</tr>
<tr>
<th><%= gettext "Deploy keys" %></th>
<td><pre class="admin_ssh_keys"><%= @repo.deploy_keys %></pre></td>
</tr>
</table>
<%= link gettext("Delete repo"),
to: Routes.admin_repository_path(@conn, :delete, @repo),
class: "btn btn-danger",
data: [confirm: gettext("Are you sure you want to delete this repo ?")],
method: :delete %>
<%= link gettext("Edit repo"),
to: Routes.admin_repository_path(@conn, :edit, @repo),
class: "btn btn-primary" %>
<%= link gettext("Show"),
to: Routes.repository_path(@conn, :show, Repository.owner_slug(@repo), Repository.splat(@repo)),
class: "btn btn-primary" %>
</div>