26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
- content_for :head do
|
|
// Force a full page reload, see https://github.com/turbolinks/turbolinks/issues/326.
|
|
Otherwise, the global variable `vis` might be uninitialized in the assets (race condition)
|
|
meta name='turbolinks-visit-control' content='reload'
|
|
- append_javascript_pack_tag('vis')
|
|
- append_stylesheet_pack_tag('vis')
|
|
|
|
.group
|
|
.title
|
|
h1 = t("statistics.graphs.#{resource}_activity")
|
|
.spinner
|
|
.graph id="#{resource}-activity-history"
|
|
form
|
|
.mb-3
|
|
label for='from-date' = t('.from')
|
|
input.form-control#from-date type='date' name='from' value=params[:from] || DateTime.new(2016).to_date
|
|
.mb-3
|
|
label for='to-date' = t('.to')
|
|
input.form-control#to-date type='date' name='to' value=params[:to] || DateTime.now.to_date
|
|
.mb-3
|
|
label for='interval' = t('.interval')
|
|
select.form-control#interval name='interval'
|
|
= %i[year quarter month day hour minute second].each do |key|
|
|
option selected=(key.to_s == params[:interval]) = key
|
|
button.btn.btn-primary type='submit' = t('.update')
|