<% content_for :head do %>
  <%= javascript_include_tag "stat_graphs", 'data-turbolinks-track' => true %>
<% end %>
<div class="stats row-full">
  <div class="row">
    <div class="small-12 column">
      <h1><%= t "admin.stats.show.stats_title" %></h1>

      <div class="row stats-numbers">
        <div class="small-12 medium-3 column">
          <p class="featured">
            <%= t "admin.stats.show.summary.visits" %><br>
            <span class="number"><%= number_with_delimiter(@visits) %></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.debates" %><br>
            <span class="number"><%= number_with_delimiter(@debates) %></span>
          </p>
          <p>
            <%= t "admin.stats.show.summary.proposals" %><br>
            <span class="number"><%= number_with_delimiter(@proposals) %></span>
          </p>
          <p>
            <%= t "admin.stats.show.summary.comments" %><br>
            <span class="number"><%= number_with_delimiter(@comments) %></span>
          </p>
        </div>

        <div class="small-12 medium-3 column">
          <p class="featured">
            <%= t "admin.stats.show.summary.proposal_votes" %><br>
            <span class="number"><%= number_with_delimiter(@proposal_votes) %><br></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.debate_votes" %><br>
            <span class="number"><%= number_with_delimiter(@debate_votes) %></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.comment_votes" %><br>
            <span class="number"><%= number_with_delimiter(@comment_votes) %></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.votes" %><br>
            <span class="number"><%= number_with_delimiter(@votes) %></span>
          </p>
        </div>

        <div class="small-12 medium-3 column">
          <p class="featured">
            <%= t "admin.stats.show.summary.verified_users" %><br>
            <span class="number"><%= number_with_delimiter(@verified_users) %></span>
          </p>

          <p class="featured">
            <%= t "admin.stats.show.summary.unverified_users" %><br>
            <span class="number"><%= number_with_delimiter(@unverified_users) %></span>
          </p>
        </div>

        <div class="small-12 medium-3 column">
          <p class="featured">
            <%= t "admin.stats.show.summary.users" %><br>
            <span class="number"><%= number_with_delimiter(@users) %></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.user_level_two" %><br>
            <span class="number"><%= number_with_delimiter(@user_level_two) %></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.user_level_three" %><br>
            <span class="number"><%= number_with_delimiter(@user_level_three) %></span>
          </p>

          <p>
            <%= t "admin.stats.show.summary.verified_users_who_didnt_vote_proposals" %><br>
            <span class="number">
              <%=number_with_delimiter(@user_ids_who_didnt_vote_proposals)%>
            </span>
          </p>
        </div>

        <div class="small-12 medium-3 column">
          <p class="featured">
            <%= t "admin.stats.show.summary.spending_proposals" %><br>
            <span class="number"><%= number_with_delimiter(@spending_proposals) %></span>
          </p>
        </div>
      </div>

      <div class="small-12 column">
        <h2><%= t "admin.stats.show.visits_title" %></h2>
        <%= visits_chart_tag id: "visits" %>
      </div>

      <div class="small-12 column">
        <% @event_types.each do |event, count| %>
          <h2><%= event.titleize %> (<%= count %>)</h2>
          <%= events_chart_tag event %>
        <% end %>
      </div>

      <div class="small-12 column">
        <h2><%= t "admin.stats.show.spending_proposals_title" %></h2>
        <%= spending_proposals_chart_tag id: "spending_proposals" %>
      </div>

    </div>
  </div>
</div>
