Commit 3033ebf3 authored by jon richter's avatar jon richter

updated and new session types, fixes #241

parent d7242278
class EventsController < ApplicationController
COLLECTION_ACTIONS = [:my, :my_coordinating, :my_reviewed, :with_review, :without_review, :undecided, :cards, :index, :feedbacks]
ALLOWED_EVENT_TYPE_SCOPES = %(all individual_papers special_sessions poster_presentations participatory_sessions activist_sessions artistic_sessions keynotes plenary_sessions highlights)
ALLOWED_EVENT_TYPE_SCOPES = %(all individual_papers special_sessions poster_presentations participatory_sessions activist_sessions artistic_sessions keynotes plenary_sessions special_issues fikas lunchs parties demonstrations)
before_action :authenticate_user!
before_action :not_submitter!
before_action :set_is_reviewer
......
......@@ -40,8 +40,16 @@ class ScheduleController < ApplicationController
@unscheduled_events = @unscheduled_events.keynotes
elsif params[:session_type] and params[:session_type] == "Plenary Session"
@unscheduled_events = @unscheduled_events.plenary_sessions
elsif params[:session_type] and params[:session_type] == "Highlights of Degrowth Research"
@unscheduled_events = @unscheduled_events.highlights
elsif params[:session_type] and params[:session_type] == "Book/Special Issue Presentation"
@unscheduled_events = @unscheduled_events.special_issues
elsif params[:session_type] and params[:session_type] == "Fika"
@unscheduled_events = @unscheduled_events.fikas
elsif params[:session_type] and params[:session_type] == "Lunch"
@unscheduled_events = @unscheduled_events.lunchs
elsif params[:session_type] and params[:session_type] == "Party"
@unscheduled_events = @unscheduled_events.parties
elsif params[:session_type] and params[:session_type] == "Demonstration"
@unscheduled_events = @unscheduled_events.demonstrations
end
render partial: "unscheduled_events"
end
......
......@@ -21,8 +21,16 @@ class StatisticsController < ApplicationController
result = @conference.events_by_state_and_type('Keynote')
when 'plenary_sessions'
result = @conference.events_by_state_and_type('Plenary Session')
when 'highlights'
result = @conference.events_by_state_and_type('Highlights of Degrowth Research')
when 'special_issues'
result = @conference.events_by_state_and_type('Book/Special Issue Presentation')
when 'fikas'
result = @conference.events_by_state_and_type('Fika')
when 'parties'
result = @conference.events_by_state_and_type('Party')
when 'lunchs'
result = @conference.events_by_state_and_type('Lunch')
when 'demonstrations'
result = @conference.events_by_state_and_type('Demonstration')
else
result = @conference.events_by_state
end
......
......@@ -74,8 +74,13 @@ class Event < ActiveRecord::Base
scope :activist_sessions, -> { where(event_type: 'Activist Session') }
scope :artistic_sessions, -> { where(event_type: 'Artistic Session') }
scope :plenary_sessions, -> { where(event_type: 'Plenary Session') }
scope :highlights, -> { where(event_type: 'Highlight of Degrowth Research') }
scope :special_issues, -> { where(event_type: 'Book/Special Issue Presentation') }
scope :keynotes, -> { where(event_type: 'Keynote') }
scope :parties, -> { where(event_type: 'Party') }
scope :demonstrations, -> { where(event_type: 'Demonstration') }
scope :lunchs, -> { where(event_type: 'Lunch') }
scope :fikas, -> { where(event_type: 'Fika') }
#
# Scopes by Person
......
......@@ -9,7 +9,7 @@
- elsif can? :submit_special_session, Event and not can? :submit_individual_paper, Event
= f.input :event_type, collection: ['Academic Special Session']
- elsif not can? :submit_special_session, Event and can? :submit_individual_paper, Event
= f.input :event_type, collection: ['Activist Session', 'Artistic Session', 'Highlight of Degrowth Research', 'Individual Paper', 'Keynote', 'Poster Presentation', 'Participatory Session', 'Plenary Session']
= f.input :event_type, collection: ['Activist Session', 'Artistic Session', 'Book/Special Issue Presentation', 'Individual Paper', 'Keynote', 'Poster Presentation', 'Participatory Session', 'Plenary Session', 'Party', 'Lunch', 'Fika', 'Demonstration']
- else
-# Should not be reached. Page not-accessible if both deadlines are in the past.
= f.association :track, label: 'Theme', collection: @conference.tracks
......
......@@ -60,11 +60,11 @@
|
= link_to "Participatory Sessions", "#", :id => "events_participatory_sessions_only"
|
= link_to "Highlights of Degrowth Research", "#", :id => "events_highlights_only"
= link_to "Book/Special Issue Presentation", "#", :id => "events_special_issues_only"
|
= link_to "Individual Papers", "#", :id => "events_individual_papers_only"
|
= link_to "Keynotes", "#", :id => "events_keynotes_only"
= link_to "Partys", "#", :id => "events_Partys_only"
|
= link_to "Poster Presentations", "#", :id => "events_poster_presentations_only"
|
......@@ -214,19 +214,79 @@
%td= @conference.events.where(event_type: 'Keynote').count
%tr
%td
%strong Highlight
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :new).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Highlight of Degrowth Research').count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Highlight of Degrowth Research').count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :paid).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :canceled).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research', :state => :rejected).count
%td= @conference.events.where(event_type: 'Highlight of Degrowth Research').count
%strong Special Presentation
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :new).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Book/Special Issue Presentation').count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Book/Special Issue Presentation').count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :paid).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :canceled).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation', :state => :rejected).count
%td= @conference.events.where(event_type: 'Book/Special Issue Presentation').count
%tr
%td
%strong Demonstration
%td= @conference.events.where(event_type: 'Demonstration', :state => :new).count
%td= @conference.events.where(event_type: 'Demonstration', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Demonstration', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Demonstration').count
%td= @conference.events.where(event_type: 'Demonstration', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Demonstration').count
%td= @conference.events.where(event_type: 'Demonstration', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Demonstration', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Demonstration', :state => :paid).count
%td= @conference.events.where(event_type: 'Demonstration', :state => :canceled).count
%td= @conference.events.where(event_type: 'Demonstration', :state => :rejected).count
%td= @conference.events.where(event_type: 'Demonstration').count
%tr
%td
%strong Fika
%td= @conference.events.where(event_type: 'Fika', :state => :new).count
%td= @conference.events.where(event_type: 'Fika', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Fika', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Fika').count
%td= @conference.events.where(event_type: 'Fika', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Fika').count
%td= @conference.events.where(event_type: 'Fika', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Fika', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Fika', :state => :paid).count
%td= @conference.events.where(event_type: 'Fika', :state => :canceled).count
%td= @conference.events.where(event_type: 'Fika', :state => :rejected).count
%td= @conference.events.where(event_type: 'Fika').count
%tr
%td
%strong Lunch
%td= @conference.events.where(event_type: 'Lunch', :state => :new).count
%td= @conference.events.where(event_type: 'Lunch', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Lunch', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Lunch').count
%td= @conference.events.where(event_type: 'Lunch', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Lunch').count
%td= @conference.events.where(event_type: 'Lunch', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Lunch', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Lunch', :state => :paid).count
%td= @conference.events.where(event_type: 'Lunch', :state => :canceled).count
%td= @conference.events.where(event_type: 'Lunch', :state => :rejected).count
%td= @conference.events.where(event_type: 'Lunch').count
%tr
%td
%strong Party
%td= @conference.events.where(event_type: 'Party', :state => :new).count
%td= @conference.events.where(event_type: 'Party', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Party', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Party').count
%td= @conference.events.where(event_type: 'Party', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Party').count
%td= @conference.events.where(event_type: 'Party', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Party', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Party', :state => :paid).count
%td= @conference.events.where(event_type: 'Party', :state => :canceled).count
%td= @conference.events.where(event_type: 'Party', :state => :rejected).count
%td= @conference.events.where(event_type: 'Party').count
%tr
%td
%strong All
......@@ -327,10 +387,16 @@
update_events_breakdown("artistic_sessions")
$("#events_plenary_sessions_only").click (event) ->
update_events_breakdown("plenary_sessions")
$("#events_highlights_only").click (event) ->
update_events_breakdown("highlights")
$("#events_keynotes_only").click (event) ->
update_events_breakdown("keynotes")
$("#events_special_issues_only").click (event) ->
update_events_breakdown("special_issues")
$("#events_parties_only").click (event) ->
update_events_breakdown("parties")
$("#events_lunchs_only").click (event) ->
update_events_breakdown("lunchs")
$("#events_fikas_only").click (event) ->
update_events_breakdown("fikas")
$("#events_demonstrations_only").click (event) ->
update_events_breakdown("demonstrations")
update_events_breakdown()
$("#languages_all_events").click (event) ->
......
......@@ -115,11 +115,11 @@
- else
= link_to 'Keynotes', set_events_scope_path('keynotes')
= surround '', ' | ' do
- if session[:events_filter] == 'highlights'
- if session[:events_filter] == 'special_issues'
%strong
= link_to 'Highlights of Degrowth Research', set_events_scope_path('highlights')
= link_to 'Book/Special Issue Presentation', set_events_scope_path('special_issues')
- else
= link_to 'Highlights of Degrowth Research', set_events_scope_path('highlights')
= link_to 'Book/Special Issue Presentation', set_events_scope_path('special_issues')
= surround '', ' | ' do
- if session[:events_filter] == 'individual_papers'
%strong
......@@ -132,6 +132,30 @@
= link_to 'Poster Presentations', set_events_scope_path('poster_presentations')
- else
= link_to 'Poster Presentations', set_events_scope_path('poster_presentations')
= surround '', ' | ' do
- if session[:events_filter] == 'parties'
%strong
= link_to 'Parties', set_events_scope_path('parties')
- else
= link_to 'Parties', set_events_scope_path('parties')
= surround '', ' | ' do
- if session[:events_filter] == 'demonstrations'
%strong
= link_to 'Demonstrations', set_events_scope_path('demonstrations')
- else
= link_to 'Demonstrations', set_events_scope_path('demonstrations')
= surround '', ' | ' do
- if session[:events_filter] == 'fikas'
%strong
= link_to 'Fikas', set_events_scope_path('fikas')
- else
= link_to 'Fikas', set_events_scope_path('fikas')
= surround '', ' | ' do
- if session[:events_filter] == 'lunchs'
%strong
= link_to 'Lunchs', set_events_scope_path('lunchs')
- else
= link_to 'Lunchs', set_events_scope_path('lunchs')
= 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