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

64 lines
1.2 KiB
Plaintext
Raw Normal View History

2014-07-21 23:17:11 +02:00
%h2
%em.fa.fa-signal
= title t '.title'
2014-07-26 18:27:19 +02:00
%dl
%dt=t '.all'
%dd.quantity= number_with_delimiter Event.count()
2014-07-26 18:27:19 +02:00
%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
2014-10-19 16:47:30 +02:00
%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] == m }
= 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'
2014-07-26 18:27:19 +02:00
%dl
- @region_events.each do |region|
2014-07-26 18:27:19 +02:00
%dt.item= region[0]
%dd.quantity= number_with_delimiter region[1]
%h3=t '.city'
%p=t '.city_conditions'
2014-07-26 18:27:19 +02:00
%dl
- @city_events.each do |city|
2014-07-26 18:27:19 +02:00
%dt.item= city[0]
%dd.quantity= number_with_delimiter city[1]
%h3=t '.web'
:markdown
#{t '.webalizer'}