Files
old-holivud2/app/views/admin/accounts/index.html.erb
2020-08-20 06:50:51 +02:00

41 lines
1.4 KiB
Plaintext

<div class="d-flex flex-row-reverse justify-content-between align-items-right mb-3">
<%= bootstrap_form_with url: admin_accounts_path, method: :get, remote: true, layout: :inline, id: "search" do |form| %>
<%= form.search_field :query, hide_label: true, placeholder: t(".actions.search"), class: "rounded-pill-right", value: params[:query], prepend: form.button(fa_icon("search"), id: "search-button", class: "btn btn-light border rounded-pill-left") %>
<% end%>
<% if policy(Account).new? %>
<%= link_to fa_icon("plus", text: "New Account"), [:new, :admin, :account], class: "btn btn-primary mb-3" %>
<% end %>
</div>
<div class="border bg-white rounded shadow-sm pb-3 table-responsive">
<table class="table table-striped tr-px-4 align-all-middle">
<thead class="thead-light">
<tr>
<th>Name</th>
<th>Plan</th>
<th># Projects</th>
<th># Releases Signed</th>
<th>Monthly Video Upload Minutes</th>
<th>Total Video Upload Minutes</th>
<th>Total Storage</th>
<th>Created At</th>
<th></th>
</tr>
</thead>
<tbody id="accounts">
<% if @accounts.any? %>
<%= render @accounts %>
<% else %>
<tr>
<td colspan="6" class="py-4 text-center text-muted"><%= t(".empty") %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div id="accounts_pagination" class="mt-3">
<%= will_paginate @accounts %>
</div>