From 64555d55fcdf8157ef2a822e2fea1ba5363f516e Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Tue, 24 Apr 2018 14:46:35 +0200 Subject: [PATCH] Allow filtering via UI --- .../statistics/rfc_activity_history.html.slim | 21 +++++++++++++++++++ config/locales/de.yml | 5 +++++ config/locales/en.yml | 5 +++++ 3 files changed, 31 insertions(+) diff --git a/app/views/statistics/rfc_activity_history.html.slim b/app/views/statistics/rfc_activity_history.html.slim index 8b137891..914e605b 100644 --- a/app/views/statistics/rfc_activity_history.html.slim +++ b/app/views/statistics/rfc_activity_history.html.slim @@ -1 +1,22 @@ +- content_for :head do + = javascript_include_tag(asset_path('vis.min.js', type: :javascript)) + = stylesheet_link_tag(asset_path('vis.min.css', type: :stylesheet)) +.group + .title + h1 = t('statistics.graphs.rfc_activity') + .spinner + .graph#rfc-activity + form + .form-group + label for="from-date" = t('.from') + input type="date" class="form-control" id="from-date" name="from" value=DateTime.new(2016).to_date + .form-group + label for="to-date" = t('.to') + input type="date" class="form-control" id="to-date" name="to" value=DateTime.now.to_date + .form-group + label for="range" = t('.interval') + select class="form-control" id="range" name="range" + = [:decade, :year, :month, :day, :hour, :minute, :second].each do | key | + option selected=(key==:year) = key + button type="submit" class="btn btn-primary" = t('.update') diff --git a/config/locales/de.yml b/config/locales/de.yml index dd962e72..3a257967 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -763,3 +763,8 @@ de: user_activity: "Nutzeraktivität" rfc_activity: "Kommentaranfragenaktivität" history: "Historie" + rfc_activity_history: + from: "Von" + to: "Bis" + interval: "Intervall" + update: "Aktualisieren" diff --git a/config/locales/en.yml b/config/locales/en.yml index 5a5f6e08..779bfa5d 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -763,3 +763,8 @@ en: user_activity: "User Activity" rfc_activity: "RfC Activity" history: "History" + rfc_activity_history: + from: "From" + to: "To" + interval: "Interval" + update: "Update"