Commit da8c78ef authored by Gualter's avatar Gualter

Fix statistics to Malmö session types (#211)

parent 90468fbf
......@@ -9,6 +9,10 @@ class StatisticsController < ApplicationController
result = @conference.events_by_state_and_type(Event::SPECIAL_SESSION_TYPES)
when 'individual_papers'
result = @conference.events_by_state_and_type('Individual Paper')
when 'participatory_sessions'
result = @conference.events_by_state_and_type('Participatory Session')
when 'poster_presentations'
result = @conference.events_by_state_and_type('Poster Presentation')
else
result = @conference.events_by_state
end
......
......@@ -6,6 +6,6 @@
- if @events.empty?
%p
All Sessions already have reviews.
All Sessions have already been reviewed.
- else
= render 'shared/search_and_table', collection: @events, table_template: 'review_table'
\ No newline at end of file
= render 'shared/search_and_table', collection: @events, table_template: 'review_table'
......@@ -56,9 +56,14 @@
%p
= link_to "All", "#", :id => "events_all_types"
|
= link_to "Special Sessions only", "#", :id => "events_special_sessions_only"
= link_to "Special Sessions", "#", :id => "events_special_sessions_only"
|
= link_to "Individual Papers only", "#", :id => "events_individual_papers_only"
= link_to "Participatory Sessions", "#", :id => "events_participatory_sessions_only"
|
= link_to "Individual Papers", "#", :id => "events_individual_papers_only"
|
= link_to "Poster Presentations", "#", :id => "events_poster_presentations_only"
#event_state_graph(style="width:600px;height:300px;")
%table.zebra-stripe
%thead
......@@ -79,7 +84,7 @@
%tbody
%tr
%td
%strong Academic SS
%strong Special
%td= @conference.events.where(event_type: 'Academic Special Session', :state => :new).count
%td= @conference.events.where(event_type: 'Academic Special Session', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Academic Special Session', :state => :review).count
......@@ -94,37 +99,22 @@
%td= @conference.events.where(event_type: 'Academic Special Session').count
%tr
%td
%strong RiA SS
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :new).count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Research in Action Special Session').count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Research in Action Special Session').count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :paid).count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :canceled).count
%td= @conference.events.where(event_type: 'Research in Action Special Session', :state => :rejected).count
%td= @conference.events.where(event_type: 'Research in Action Special Session').count
%strong Participatory
%td= @conference.events.where(event_type: 'Participatory Session', :state => :new).count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Participatory Session').count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Participatory Session').count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :paid).count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :canceled).count
%td= @conference.events.where(event_type: 'Participatory Session', :state => :rejected).count
%td= @conference.events.where(event_type: 'Participatory Session').count
%tr
%td
%strong All SS
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :new).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :submission_finished).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :review).count
%td= @conference.events.undecided.where(event_type: Event::SPECIAL_SESSION_TYPES).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: Event::SPECIAL_SESSION_TYPES).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :unconfirmed).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :confirmed).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :paid).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :canceled).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES, :state => :rejected).count
%td= @conference.events.where(event_type: Event::SPECIAL_SESSION_TYPES).count
%tr
%td
%strong Individual P
%strong Paper
%td= @conference.events.where(event_type: 'Individual Paper', :state => :new).count
%td= @conference.events.where(event_type: 'Individual Paper', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Individual Paper', :state => :review).count
......@@ -137,6 +127,21 @@
%td= @conference.events.where(event_type: 'Individual Paper', :state => :canceled).count
%td= @conference.events.where(event_type: 'Individual Paper', :state => :rejected).count
%td= @conference.events.where(event_type: 'Individual Paper').count
%tr
%td
%strong Poster
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :new).count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Poster Presentation').count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Poster Presentation').count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :paid).count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :canceled).count
%td= @conference.events.where(event_type: 'Poster Presentation', :state => :rejected).count
%td= @conference.events.where(event_type: 'Poster Presentation').count
%tr
%td
%strong All
......@@ -225,8 +230,12 @@
update_events_breakdown()
$("#events_special_sessions_only").click (event) ->
update_events_breakdown("special_sessions")
$("#events_participatory_sessions_only").click (event) ->
update_events_breakdown("participatory_sessions")
$("#events_individual_papers_only").click (event) ->
update_events_breakdown("individual_papers")
$("#events_poster_presentations_only").click (event) ->
update_events_breakdown("poster_presentations")
update_events_breakdown()
$("#languages_all_events").click (event) ->
......
......@@ -79,18 +79,26 @@
- else
= link_to 'All Sessions', set_events_scope_path('all')
= surround '', ' | ' do
- if session[:events_filter] == 'special_sessions'
%strong
= link_to 'Special Sessions', set_events_scope_path('special_sessions')
- else
= link_to 'Special Sessions', set_events_scope_path('special_sessions')
- if session[:events_filter] == 'participatory_sessions'
%strong
= link_to 'Participatory Sessions', set_events_scope_path('participatory_sessions')
- else
= link_to 'Participatory Sessions', set_events_scope_path('participatory_sessions')
- if session[:events_filter] == 'individual_papers'
%strong
= link_to 'Individual Papers', set_events_scope_path('individual_papers')
- else
= link_to 'Individual Papers', set_events_scope_path('individual_papers')
- if session[:events_filter] == 'special_sessions'
%strong
= link_to 'Special Sessions', set_events_scope_path('special_sessions')
- else
= link_to 'Special Sessions', set_events_scope_path('special_sessions')
- if session[:events_filter] == 'poster_presentations'
%strong
= link_to 'Poster Presentations', set_events_scope_path('poster_presentations')
- else
= link_to 'Poster Presentations', set_events_scope_path('poster_presentations')
= yield
%footer.footer
.container
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment