-
<%= _('Run your own filter') %>
+
<%= _('Run your own filter') %>
<%= form_for :usage, url: usage_filter_path, remote: true do |f| %>
diff --git a/app/views/usage/_template_statistics.html.erb b/app/views/usage/_template_statistics.html.erb
new file mode 100644
index 0000000..5d0288f
--- /dev/null
+++ b/app/views/usage/_template_statistics.html.erb
@@ -0,0 +1,43 @@
+<%# locals: expanded %>
+
+
diff --git a/app/views/usage/_user_statistics.html.erb b/app/views/usage/_user_statistics.html.erb
new file mode 100644
index 0000000..424b688
--- /dev/null
+++ b/app/views/usage/_user_statistics.html.erb
@@ -0,0 +1,127 @@
+<%# locals: expanded %>
+
+
+
+
+
+
+ <%= _('Statistics on your Users') %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%= _('The graphs display new users and plans for your organisation over the past year. You can download a CSV report for each graph.')%>
+
+
+
+
+
+
+
+
* <%= _('Move the mouse pointer over the bars of a chart to see numbers.') %>
+
+
+
+
+
+
+
<%= _('No. users joined during last year') %>
+
+
+ <%= link_to usage_yearly_users_path(sep: ","), class: 'stat btn btn-default', role: 'button', target: '_blank' do %>
+ <%= _('Download') %>
+ <% end %>
+
+
+
+ <%= render partial: 'usage/users_joined_chart',
+ locals: { data: @users_per_month } %>
+
+
+
+
+
<%= _('No. plans during last year') %>
+
+
+ <%= link_to usage_yearly_plans_path(sep: ","), class: 'stat btn btn-default', role: 'button', target: '_blank' do %>
+ <%= _('Download') %>
+ <% end %>
+
+
+
+ <%= render partial: 'usage/plans_created_chart',
+ locals: { data: @plans_per_month } %>
+
+
+
+
+
+
+
+
+
<%= _('No. plans by template') %>
+
+
+
+
+
+
+ -
+ <%= form_for :usage, url: usage_plans_by_template_path, remote: true do |f| %>
+
+ <% end %>
+
+ -
+
+ <%= link_to usage_all_plans_by_template_path(sep: ","), class: 'btn btn-default stat', role: 'button', target: '_blank' do %>
+ <%= _('Download all') %>
+ <% end %>
+
+
+
+
+
+
+
+
+
+
+ <%# pp @plans_per_month %>
+ <%= render partial: 'usage/plans_by_template_chart',
+ locals: { data: @plans_per_month } %>
+
+
+
+
+
+
+
+
diff --git a/app/views/usage/index.html.erb b/app/views/usage/index.html.erb
index fef4942..239acf5 100644
--- a/app/views/usage/index.html.erb
+++ b/app/views/usage/index.html.erb
@@ -6,124 +6,16 @@
-<% if @funder.present? %>
- <%# usage-dashboard section for funders %>
-
-
-
Statistics on your Templates
-
-
-
-
-
-
- <%# pp @plans_per_month %>
- <%= render partial: 'usage/plans_by_template_chart',
- locals: { data: @plans_per_month, subset: "using_template"} %>
-
-
-
-
-
-
-
Statistics on your Users
-
-
-<% end %>
-
<%= render partial: 'usage/total_usage',
- locals: { user_count: @total_org_users, plan_count: @total_org_plans, separators: @separators } %>
+ locals: { user_count: @total_org_users,
+ plan_count: @total_org_plans,
+ separators: @separators } %>
+
+
+
+ <%= render partial: 'usage/template_statistics', locals: {expanded: @funder.present?} %>
+ <%= render partial: 'usage/user_statistics', locals: {expanded: !@funder.present?} %>
+
+
<%= render partial: 'usage/filter' %>
-
-
-
-
-
* <%= _('Move the mouse pointer over the bars of a chart to see numbers.') %>
-
-
-
-
-
-
-
<%= _('No. users joined during last year') %>
-
-
- <%= link_to usage_yearly_users_path(sep: ","), class: 'stat btn btn-default', role: 'button', target: '_blank' do %>
- <%= _('Download') %>
- <% end %>
-
-
-
- <%= render partial: 'usage/users_joined_chart',
- locals: { data: @users_per_month } %>
-
-
-
-
-
<%= _('No. plans during last year') %>
-
-
- <%= link_to usage_yearly_plans_path(sep: ","), class: 'stat btn btn-default', role: 'button', target: '_blank' do %>
- <%= _('Download') %>
- <% end %>
-
-
-
- <%= render partial: 'usage/plans_created_chart',
- locals: { data: @plans_per_month } %>
-
-
-
-
-
-
-
-
-
<%= _('No. plans by template') %>
-
-
-
-
-
-
- -
- <%= form_for :usage, url: usage_plans_by_template_path, remote: true do |f| %>
-
- <% end %>
-
- -
-
- <%= link_to usage_all_plans_by_template_path(sep: ","), class: 'btn btn-default stat', role: 'button', target: '_blank' do %>
- <%= _('Download all') %>
- <% end %>
-
-
-
-
-
-
-
-
-
-
- <%# pp @plans_per_month %>
- <%= render partial: 'usage/plans_by_template_chart',
- locals: { data: @plans_per_month } %>
-
-
-