Hash :
a2b79989
Author :
Thomas de Grivel
Date :
2024-05-14T15:38:07
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
<div class="container-fluid">
<h1><%= gettext("Repository %{repo}", repo: Repository.full_slug(@repo)) %></h1>
<table class="table 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_, to: Routes.admin_organisation_path(@conn, :show, owner) %>
<% %User{} -> %>
<%= gettext "User" %>
<%= link User.login(owner), 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>
<%= if @public_access do %>
<tr>
<th><%= gettext "Git HTTP" %></th>
<td><%= Repository.http_url(@repo) %></td>
</tr>
<% end %>
<tr>
<th><%= gettext "Git SSH" %></th>
<td><%= Repository.ssh_url(@repo) %></td>
</tr>
<tr>
<th><%= gettext "Public access ?" %></th>
<td>
<%= if @public_access do %>
<%= gettext "public" %>
<% else %>
<%= gettext "private" %>
<% end %>
</td>
</tr>
<tr>
<th><%= gettext "Description" %></th>
<td>
<%= if @repo.description do %>
<%= raw Markdown.to_html!(@repo.description) %>
<% end %>
</td>
</tr>
<tr>
<th><%= gettext "Members" %></th>
<td>
<%= for user <- @members do %>
<%= link(User.login(user), 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 "Disk usage" %></th>
<td><%= disk_usage(@repo.disk_usage) %></td>
</tr>
<tr>
<th><%= gettext "Deploy keys (read-only)" %></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>