<div class="row">
  <div class="col s12">
    <h1>Attributes</h1>
  </div>
</div>

<div class="row">
  <div class="col s4">
    <h2>Attributes per user</h1>
    <%= column_chart User.joins(:attribute_fields).group(:user_id).count().group_by { |n| n.last }.each_with_object({}) { |(content_count, ids), h| h[content_count] = ids.count } %>
  </div>
  <%# TODO: attributes per each content type %>
  <div class="col s4">
    <h2>Attribute privacy</h1>
    <%= pie_chart AttributeField.where.not(privacy: "").group(:privacy).count() %>
  </div>
</div>
