diff --git a/app/controllers/usage_controller.rb b/app/controllers/usage_controller.rb index 2615a13..bf89412 100644 --- a/app/controllers/usage_controller.rb +++ b/app/controllers/usage_controller.rb @@ -8,7 +8,13 @@ (current_user.can_org_admin? || current_user.can_super_admin?) raise Pundit::NotAuthorizedError end - render("index", locals: { orgs: Org.all }) + render("index", + locals: { + orgs: Org.all, + total_org_users: current_user.org.users.size, + total_org_plans: current_user.org.plans.size + } + ) end end diff --git a/app/views/usage/index.html.erb b/app/views/usage/index.html.erb index 14e3460..de3db23 100644 --- a/app/views/usage/index.html.erb +++ b/app/views/usage/index.html.erb @@ -1,8 +1,24 @@ <% title _('Usage statistics') %>
-
+

Usage statistics

+
+
+
+
+
+ +

<%= total_org_users %> Total users

+
+
+ +

<%= total_org_plans %> Total plans

+
+
+
+
+

<%= _('Use the filters to generate organisational usage statistics for a custom date range. The graphs display new users and plans for your organisation over the past year. You can download a CSV report for each graph.') %>

diff --git a/lib/assets/stylesheets/overrides.scss b/lib/assets/stylesheets/overrides.scss index c287282..49d972c 100644 --- a/lib/assets/stylesheets/overrides.scss +++ b/lib/assets/stylesheets/overrides.scss @@ -658,4 +658,18 @@ } fieldset.field_with_errors { border: 1px solid $red; - } \ No newline at end of file + } + + /* Use with care to force font size to 5em */ + .f-large { + font-size: 5em !important; + } + + .mb-15 { + margin-bottom: 15px; + } + + .mt-15 { + margin-top: 15px; + } + \ No newline at end of file