<% content_for :head do %>
  <%= javascript_include_tag 'dataTable/datatables.min.js' %>
<% end %>

<%= render 'shared/page_banner_header', title: 'Settings', items: ['Settings', 'Permissions'] %>

<div class="panel-body">
  <div class="row">
    <div class="col-sm-12">
      <% @databases.each do |database| %>
        <button class="accordion"><%= database.friendly_name %><span class="float-right"><img src="/assets/images/icons/plus-thick.png"></span></button>
        <div class="panel">
          <table id="target-table-permissions-<%= database.id %>" class="data-table-permissions table" data-table-name="permissions" data-database-id="<%= database.id %>">
            <thead>
              <tr>
                <% @headers.each do |header|%>
                  <th class="column-<%= header %>"><%= header.humanize %></th>
                <% end %>
              </tr>
            </thead>
          </table>
        </div>
      <% end %>
    </div>
  </div>
</div>