Commit d77d0243 authored by jon richter's avatar jon richter

minor fixes for #240

parent 902a914d
......@@ -5,7 +5,7 @@ class Event < ActiveRecord::Base
before_create :generate_guid
SPECIAL_SESSION_TYPES = ['Academic Special Session']
TYPES = SPECIAL_SESSION_TYPES + ['Individual Paper', 'Poster Presentation', 'Participatory Session', 'Activist Session', 'Artistic Session', 'Keynote', 'Plenary Session', 'Highlights of Degrowth Research']
TYPES = SPECIAL_SESSION_TYPES + ['Individual Paper', 'Poster Presentation', 'Participatory Session', 'Activist Session', 'Artistic Session', 'Keynote', 'Plenary Session', 'Highlight of Degrowth Research']
has_one :ticket, dependent: :destroy
has_many :conflicts_as_conflicting, class_name: "Conflict", foreign_key: "conflicting_event_id", dependent: :destroy
......@@ -71,8 +71,11 @@ class Event < ActiveRecord::Base
scope :individual_papers, -> { where(event_type: 'Individual Paper') }
scope :poster_presentations, -> { where(event_type: 'Poster Presentation') }
scope :participatory_sessions, -> { where(event_type: 'Participatory Session') }
scope :activist_session, -> { where(event_type: 'Activist Session') }
scope :artistic_session, -> { where(event_type: 'Artistic Session') }
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 :keynotes, -> { where(event_type: 'Keynote') }
#
# 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', 'Highlights of Degrowth Research', 'Individual Paper', 'Keynote', 'Poster Presentation', 'Participatory Session', 'Plenary Session']
= f.input :event_type, collection: ['Activist Session', 'Artistic Session', 'Highlight of Degrowth Research', 'Individual Paper', 'Keynote', 'Poster Presentation', 'Participatory Session', 'Plenary Session']
- else
-# Should not be reached. Page not-accessible if both deadlines are in the past.
= f.association :track, label: 'Theme', collection: @conference.tracks
......
......@@ -214,19 +214,19 @@
%td= @conference.events.where(event_type: 'Keynote').count
%tr
%td
%strong Highlights of Degrowth Research
%td= @conference.events.where(event_type: 'Highlight', :state => :new).count
%td= @conference.events.where(event_type: 'Highlight', :state => :submission_finished).count
%td= @conference.events.where(event_type: 'Highlight', :state => :review).count
%td= @conference.events.undecided.where(event_type: 'Highlight').count
%td= @conference.events.where(event_type: 'Highlight', :state => :withdrawn).count
%td= @conference.events.accepted.where(event_type: 'Highlight').count
%td= @conference.events.where(event_type: 'Highlight', :state => :unconfirmed).count
%td= @conference.events.where(event_type: 'Highlight', :state => :confirmed).count
%td= @conference.events.where(event_type: 'Highlight', :state => :paid).count
%td= @conference.events.where(event_type: 'Highlight', :state => :canceled).count
%td= @conference.events.where(event_type: 'Highlight', :state => :rejected).count
%td= @conference.events.where(event_type: 'Highlight').count
%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
%tr
%td
%strong All
......
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