<%# locals: user_count, plan_count, separators %>

<div class="row mt-15 mb-15">
  <div class="col-md-3">
    <div class="col-xs-6">
      <i class="fa fa-users f-large"></i>
      <p class="fontsize-h4"><%= user_count.to_i %> <%= _('Total users') %></p>
    </div>
    <div class="col-xs-6">
      <i class="fa fa-files-o f-large"></i>
      <p  class="fontsize-h4"><%= plan_count.to_i %> <%= _('Total plans') %></p>
    </div>
  </div>
  <% if @funder.present? %>
    <div class="col-md-3"></div>
  <% end %>
  <% unless current_user.can_super_admin? %>
    <div class="col-md-2"></div>
  <% end %>
  <div class="col-md-3">
    <form class="form-inline mt-10 mb-10">
      <label for="csv-field-sep">
        <%= _('csv download field separator') %>:
      </label>
      <%= select_tag "csv-field-sep", options_for_select(separators, separators[0]), {class: "single-char-select"} %>
    </form>
  </div>
  <% if current_user.can_super_admin? %>
    <div class="col-md-3">
      <%= link_to usage_global_statistics_path(sep: ","), class: "stat btn btn-default #{'pull-right' if @funder.present?}", role: 'button', target: '_blank' do %>
        <%= _('Download global usage') %> <i class="fa fa-download" aria-hidden="true"></i>
      <% end %>
    </div>
  <% end %>
  <% unless @funder.present? %>
    <div class="col-md-3">
      <%= link_to usage_org_statistics_path(sep: ","), class: 'stat btn btn-default pull-right', role: 'button', target: '_blank' do %>
        <%= _('Download Monthly Usage') %> <i class="fa fa-download" aria-hidden="true"></i>
      <% end %>
    </div>
  <% end %>
</div>
