mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
18 lines
549 B
Plaintext
18 lines
549 B
Plaintext
<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>
|