agenda-libre-ruby/app/views/regions/stats.html.haml

67 lines
1.4 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/
- @year_events.each do |year|
%th= year[0]
%tbody
- (1..12).each do |m|
%tr
%th.month= I18n.t('date.month_names')[m]
- @year_events.each do |year|
%td.quantity
- line = @month_events.find { |line| line[0][0] == year[0] && line[0][1].try(:to_i) == m }
= link_to root_url(start_date: "#{year[0]}-#{m}-01") do
= number_with_delimiter line[1] if line
%td.sparkline/
%tfoot
%tr
%th=t '.total'
- @year_events.each do |year|
%th.quantity= number_with_delimiter year[1]
%tr
%th/
%td.sparkline(colspan="#{@year_events.size}")/
%h3
%em.fa.fa-shield
=t '.regional'
%dl
- @region_events.each do |region|
%dt.item
= link_to root_url region: Region.find_by_name(region[0]).id do
= region[0]
%dd.quantity= number_with_delimiter region[1]
%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'}