Hash :
eb410d96
Author :
Thomas de Grivel
Date :
2022-01-27T10:00:12
<div class="container-fluid">
<div class="row">
<div class="col col-12 col-md-7">
<h1><%= gettext "Organisations" %></h1>
</div>
<div class="col col-12 col-md-5">
<%= link gettext("Create"), to: Routes.admin_organisation_path(@conn, :new), class: "btn btn-primary" %>
</div>
</div>
<table class="table admin-index">
<thead>
<tr>
<th><%= link gettext("Id"), to: Routes.admin_organisation_path(@conn, :index, sort: "id#{if @sort == "id" && !@rev, do: "-"}") %><%= if @sort == "id" do %><%= if @rev do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
<th><%= link gettext("Name"), to: Routes.admin_organisation_path(@conn, :index, sort: "name#{if @sort == "name" && !@rev, do: "-"}") %><%= if @sort == "name" do %><%= if @rev do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
<th><%= link gettext("Slug"), to: Routes.admin_organisation_path(@conn, :index, sort: "slug#{if @sort == "slug" && !@rev, do: "-"}") %><%= if @sort == "slug" do %><%= if @rev do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
<th><%= link gettext("Disk usage"), to: Routes.admin_organisation_path(@conn, :index, sort: "du#{if @sort != "du" || (@sort == "du" && !@rev), do: "-"}") %><%= if @sort == "du" do %><%= if @rev do %> <i class="fa fa-angle-down"></i><% else %> <i class="fa fa-angle-up"></i><% end %><% end %></th>
<th><%= gettext("Actions") %></th>
</tr>
</thead>
<tbody>
<%= for org <- @orgs do %>
<tr>
<td><%= link org.id, to: Routes.admin_organisation_path(@conn, :show, org) %></td>
<td><%= link org.name, to: Routes.admin_organisation_path(@conn, :show, org) %></td>
<td><%= link org.slug.slug, to: Routes.admin_organisation_path(@conn, :show, org) %></td>
<td><%= disk_usage(org.disk_usage) %></td>
<td>
<%= link gettext("Show"), to: Routes.slug_path(@conn, :show, org.slug.slug), class: "btn btn-sm btn-primary" %>
</td>
</tr>
<% end %>
</tbody>
</table>
</div>