Hash :
031737e9
Author :
Thomas de Grivel
Date :
2021-11-30T15:47:51
<div class="container-fluid">
<h1>Repositories</h1>
<table class="table admin-index">
<tr>
<th><%= gettext "Id" %></th>
<th><%= gettext "Owner" %></th>
<th><%= gettext "Slug" %></th>
<th><%= gettext "Actions" %></th>
</tr>
<%= Enum.map @repos, fn(repo) -> %>
<tr>
<td><%= link repo.id, to: Routes.admin_repository_path(@conn, :show, repo) %></td>
<td>
<%= case owner = Repository.owner(repo) do %>
<% %Organisation{} -> %>
<%= link owner.name || owner.slug.slug, to: Routes.admin_organisation_path(@conn, :show, owner) %>
<% %User{} -> %>
<%= link owner.slug.slug, to: Routes.admin_user_path(@conn, :show, owner) %>
<% end %>
</td>
<td><%= link Repository.full_slug(repo), to: Routes.admin_repository_path(@conn, :show, repo) %></td>
<td>
<%= link gettext("Show"), to: Routes.repository_path(@conn, :show, Repository.owner_slug(repo), Repository.splat(repo)), class: "btn btn-sm btn-primary" %>
</td>
</tr>
<% end %>
</table>
</div>