82 lines
1.7 KiB
Plaintext
82 lines
1.7 KiB
Plaintext
%h2
|
|
%em.fa.fa-signal
|
|
= title t '.title'
|
|
|
|
%dl
|
|
%dt=t '.all'
|
|
%dd.quantity= number_with_delimiter Event.count
|
|
|
|
%dt=t '.allModeration'
|
|
%dd.quantity= number_with_delimiter Event.unscoped.where(moderated: 0).count
|
|
|
|
%h3
|
|
%em.fa.fa-calendar
|
|
=t '.dates'
|
|
|
|
%table.list.dates
|
|
%thead
|
|
%tr
|
|
%th/
|
|
- @years.each do |year|
|
|
%th= year[0]
|
|
%th/
|
|
%tbody
|
|
- (1..12).each do |m|
|
|
%tr
|
|
%th.month= I18n.t('date.month_names')[m]
|
|
- @years.each do |year|
|
|
%td.quantity
|
|
- line = @months.find { |line| line[0][0] == year[0] && line[0][1].try(:to_i) == m }
|
|
= link_to root_path(start_date: "#{year[0]}-#{m}-01") do
|
|
= number_with_delimiter line[1] if line
|
|
%td.sparkline/
|
|
|
|
%tfoot
|
|
%tr
|
|
%th=t '.total'
|
|
- @years.each do |year|
|
|
%th.quantity= number_with_delimiter year[1]
|
|
|
|
%tr
|
|
%th/
|
|
%td.sparkline(colspan="#{@years.size}")/
|
|
|
|
%h3
|
|
%em.fa.fa-shield
|
|
=t '.regional'
|
|
|
|
%table.list.dates
|
|
%thead
|
|
%tr
|
|
%th/
|
|
- @years.each do |year|
|
|
%th= year[0]
|
|
%th=t '.total'
|
|
%th/
|
|
%tbody
|
|
- Region.all.each do |region|
|
|
%tr
|
|
%th.region= region
|
|
- total = 0
|
|
- @years.each do |year|
|
|
%td.quantity
|
|
- total += @regions[[region.id, year[0]]] || 0
|
|
= link_to root_path(year: "#{year[0]}", region: region.id) do
|
|
= number_with_delimiter @regions[[region.id, year[0]]]
|
|
%th.quantity.total= number_with_delimiter total
|
|
%td.sparkline/
|
|
|
|
%h3=t '.city'
|
|
|
|
%p=t '.city_conditions'
|
|
|
|
%dl
|
|
- @city_events.each do |city|
|
|
%dt.item= city[0]
|
|
%dd.quantity= number_with_delimiter city[1]
|
|
|
|
%h3=t '.web'
|
|
|
|
:markdown
|
|
#{t '.webalizer'}
|