Hash :
78dee358
Author :
Thomas de Grivel
Date :
2022-06-18T14:48:16
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
<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>
<%= render(KmxgitWeb.LayoutView, "search.html", assigns) %>
<%= render("pagination.html", assigns) %>
<table class="table admin-index">
<thead>
<tr>
<th><%= link gettext("Id"), to: Routes.admin_organisation_path(@conn, :index, search: @search, sort: "id#{if @index.column == "id" && !@index.reverse, do: "-"}") %><%= if @index.column == "id" do %><%= if @index.reverse 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, search: @search, sort: "name#{if @index.column == "name" && !@index.reverse, do: "-"}") %><%= if @index.column == "name" do %><%= if @index.reverse 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, search: @search, sort: "slug#{if @index.column == "slug" && !@index.reverse, do: "-"}") %><%= if @index.column == "slug" do %><%= if @index.reverse 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, search: @search, sort: "du#{if @index.column != "du" || (@index.column == "du" && !@index.reverse), do: "-"}") %><%= if @index.column == "du" do %><%= if @index.reverse 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 <- @pagination.result 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_, 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_), class: "btn btn-sm btn-primary" %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= render("pagination.html", assigns) %>
</div>