Skip to content
Commits on Source (111)
BUNDLE_WITHOUT=development:test:mysql:sqlite3
CUSTOM_RUBY_VERSION=2.2.3
SECRET_KEY_BASE=qurq894c214h6oochiucai0e28y381uhei2ao4neec1daiyohp4Leekeeyi2ini
RACK_ENV=production
RAILS_ENV=production
RAILS_SERVE_STATIC_FILES=true
FRAB_HOST=frab-test.apps.ecobytes.net
FRAB_PROTOCOL=https
FROM_EMAIL=call@budapest.degrowth.org
SMTP_ADDRESS=mail.ecobytes.net
SMTP_PORT=587
SMTP_USER_NAME=dg-budapest-frab
SMTP_PASSWORD=casckij8
.env.development
\ No newline at end of file
FRAB_HOST=localhost
FRAB_PROTOCOL=http
FROM_EMAIL=frab@localhost
BUNDLE_WITHOUT=sqlite3
CUSTOM_RUBY_VERSION=2.2.3
SECRET_KEY_BASE=qurq894c214h6oochiucai0e28y381uhei2ao4neec1daiyohp4Leekeeyi2ini
RACK_ENV=development
RAILS_ENV=development
RAILS_SERVE_STATIC_FILES=true
FRAB_HOST=scriptum.apps.ecobytes.net
FRAB_PROTOCOL=https
FROM_EMAIL=call@budapest.degrowth.org
SMTP_ADDRESS=mail.ecobytes.net
SMTP_PORT=587
SMTP_USER_NAME=dg-budapest-frab
SMTP_PASSWORD=casckij8
......@@ -4,7 +4,7 @@ SECRET_KEY_BASE=qurq894c214h6oochiucai0e28y381uhei2ao4neec1daiyohp4Leekeeyi2ini
RACK_ENV=production
RAILS_ENV=production
RAILS_SERVE_STATIC_FILES=true
FRAB_HOST=frab-stage.apps.ecobytes.net
FRAB_HOST=frab-test.apps.ecobytes.net
FRAB_PROTOCOL=https
FROM_EMAIL=call@budapest.degrowth.org
SMTP_ADDRESS=mail.ecobytes.net
......
FROM ruby:2.2.3-onbuild
RUN apt-get update && apt-get install nodejs -y
EXPOSE 5000
CMD ["/usr/src/app/docker-entrypoint.sh"]
VOLUME ["/usr/src/app/public/assets","/usr/src/app/public/system"]
web: bundle exec rails server -p $PORT -e $RACK_ENV
web: bundle exec rails server -b 0.0.0.0 -p $PORT -e $RACK_ENV
......@@ -32,7 +32,7 @@ ul.nav li.active a {
}
.topbar-inner, .topbar .fill {
background-color: #ed1e24;
background-color: #30b14a;
background-image: none;
}
......@@ -40,4 +40,4 @@ ul.nav li.active a {
h1, h2, h3, h4, h5, h6 {
font-weight: bold;
color: #30b14a;
}
\ No newline at end of file
}
......@@ -94,12 +94,22 @@ div.event {
div.event.fatal {
background: #EE3333;
overflow: hidden;
}
div.event.fatal > p.small {
display: none;
}
div.event.warning {
background: #EEEE00;
}
div#event-pane {
float: left;
width: 100%;
}
div.unscheduled-event {
background: #F9F9F9;
border: 1px solid #EEEEEE;
......
......@@ -21,7 +21,7 @@ class Cfp::EventsController < ApplicationController
authorize! :see_reviewable_events, Event
subcategories = @current_user.person.subcategories_submitted_in(@conference)
@events = @conference.events.where(event_type: 'Individual Paper', state: %w(submission_finished review), subcategory: subcategories).to_a
@events = @conference.events.where(state: %w(submission_finished review), subcategory: subcategories).to_a
@events = @events.select { |event| can? :reserve_for_peer_review, event }
respond_to do |format|
......@@ -221,8 +221,7 @@ class Cfp::EventsController < ApplicationController
def event_params
params.require(:event).permit(
:title, :subtitle, :event_type, :time_slots, :language, :abstract, :description, :logo, :track_id, :submission_note, :is_special_session, :subcategory_id,
event_attachments_attributes: %i(id title attachment public _destroy),
:title, :subtitle, :event_type, :time_slots, :language, :abstract, :description, :logo, :track_id, :submission_note, :is_special_session, event_attachments_attributes: %i(id title attachment public _destroy),
links_attributes: %i(id title url _destroy)
)
end
......
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)
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
......@@ -17,9 +17,9 @@ class EventsController < ApplicationController
result = nil
if @current_user_is_reviewer
result = search @prefiltered_events.includes(:track, :subcategory).where(subcategory: current_user.subcategories_assigned_to_in(@conference)), params
result = search @prefiltered_events.includes(:track), params
else
result = search @prefiltered_events.includes(:track, :subcategory), params
result = search @prefiltered_events.includes(:track), params
end
@events = result.to_a.uniq
......@@ -53,7 +53,7 @@ class EventsController < ApplicationController
result = nil
if @current_user_is_reviewer
result = search @prefiltered_events.includes(:event_ratings, :subcategory, :review_reservations).where(subcategory: current_user.subcategories_assigned_to_in(@conference)), params
result = search @prefiltered_events.includes(:event_ratings, :review_reservations), params
else
result = search @prefiltered_events.includes(:event_ratings).where(event_ratings: {person: @current_user.person, event_rating_type: 'expert_review'}), params
end
......@@ -342,6 +342,28 @@ class EventsController < ApplicationController
@prefiltered_events = @conference.events.special_sessions
when 'individual_papers'
@prefiltered_events = @conference.events.individual_papers
when 'poster_presentations'
@prefiltered_events = @conference.events.poster_presentations
when 'participatory_sessions'
@prefiltered_events = @conference.events.participatory_sessions
when 'activist_sessions'
@prefiltered_events = @conference.events.activist_sessions
when 'artistic_sessions'
@prefiltered_events = @conference.events.artistic_sessions
when 'keynotes'
@prefiltered_events = @conference.events.keynotes
when 'plenary_sessions'
@prefiltered_events = @conference.events.plenary_sessions
when 'special_sessions'
@prefiltered_events = @conference.events.special_sessions
when 'lunchs'
@prefiltered_events = @conference.events.lunchs
when 'parties'
@prefiltered_events = @conference.events.parties
when 'demonstrations'
@prefiltered_events = @conference.events.demonstrations
when 'fikas'
@prefiltered_events = @conference.events.fikas
else
@prefiltered_events = @conference.events
end
......@@ -384,7 +406,7 @@ class EventsController < ApplicationController
def event_params
params.require(:event).permit(
:id, :title, :subtitle, :event_type, :time_slots, :state, :start_time, :public, :language, :abstract, :description, :logo, :track_id, :room_id, :subcategory_id, :note, :submission_note, :do_not_record, :recording_license, :is_special_session,
:id, :title, :subtitle, :event_type, :time_slots, :state, :start_time, :public, :language, :abstract, :description, :logo, :track_id, :room_id, :note, :submission_note, :do_not_record, :recording_license, :is_special_session,
event_attachments_attributes: %i(id title attachment public _destroy),
ticket_attributes: %i(id remote_ticket_id),
links_attributes: %i(id title url _destroy),
......
......@@ -20,7 +20,7 @@ class ScheduleController < ApplicationController
@unscheduled_events = @conference.events.accepted.unscheduled
end
if params[:session_type] and params[:session_type] == 'Individual Paper'
if params[:session_type] and params[:session_type] == "Individual Paper"
@unscheduled_events = @unscheduled_events.individual_papers
elsif params[:session_type] and params[:session_type] == "Special Session"
@unscheduled_events = @unscheduled_events.special_sessions
......@@ -28,6 +28,28 @@ class ScheduleController < ApplicationController
@unscheduled_events = @unscheduled_events.research_in_action_special_sessions
elsif params[:session_type] and params[:session_type] == "Academic Special Session"
@unscheduled_events = @unscheduled_events.academic_special_sessions
elsif params[:session_type] and params[:session_type] == "Poster Presentation"
@unscheduled_events = @unscheduled_events.poster_presentations
elsif params[:session_type] and params[:session_type] == "Participatory Session"
@unscheduled_events = @unscheduled_events.participatory_sessions
elsif params[:session_type] and params[:session_type] == "Activist Session"
@unscheduled_events = @unscheduled_events.activist_sessions
elsif params[:session_type] and params[:session_type] == "Artistic Session"
@unscheduled_events = @unscheduled_events.artistic_sessions
elsif params[:session_type] and params[:session_type] == "Keynote"
@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] == "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
......
......@@ -9,6 +9,28 @@ 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')
when 'activist_sessions'
result = @conference.events_by_state_and_type('Activist Session')
when 'artistic_sessions'
result = @conference.events_by_state_and_type('Artistic Session')
when 'keynotes'
result = @conference.events_by_state_and_type('Keynote')
when 'plenary_sessions'
result = @conference.events_by_state_and_type('Plenary Session')
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
......
......@@ -93,26 +93,20 @@ class Ability
# Submitters can read events they are involved in
# Can read events of the subcategory that they have submitted an individual paper in
can :read, Event do |event|
@user.person.in?(event.people) or
if @user.person.submitted_individual_paper_in?(@conference)
event.subcategory.in?(@user.person.subcategories_submitted_in(@conference))
else
false
end
@user.person.in?(event.people)
end
can :reserve_for_peer_review, Event do |event|
@user.person.submitted_individual_paper_in?(@conference) and # has submitted individual paper in the conference
event.event_type == 'Individual Paper' and # Is Individual Paper
event.conference == @conference and # Is in the correct conference
event.subcategory.in?(@user.person.subcategories_submitted_in(@conference)) and # Is of the right subcategory
not event.review_reservations.where(person: @user.person).any? and # Has not already been reserved by user
not event.event_ratings.where(person: @user.person).any? and # Has not already reviewed
(event.ratings_by_submitters + event.peer_review_reservations_count) < 2 and # has neither 2 reviews by peers, nor 2 reservations, nor 1 review 1 reservation
(event.ratings_by_submitters + event.peer_review_reservations_count) < 5 and # Has less than 5 reviews + reservations by peers
not event.people.where(id: @user.person.id).any? and # Submitter is not part of
event.current_state.in?([:submission_finished, :review]) and # submission has the correct state
@conference.ip_peer_review_deadline > DateTime.now and # Deadline did not end
(@user.person.review_reservations.peer_reservations.count + @user.person.event_ratings.peer_reviews.count) < 2 # does not have 2 reviews, 2 reservations or one review + 1 reservation
(@user.person.review_reservations.peer_reservations.count + @user.person.event_ratings.peer_reviews.count) < 5 # Has less than 5 reviews + reservations
end
# Can free an event from reservation if it was reserved as a peer by the user
......@@ -141,6 +135,10 @@ class Ability
event.event_ratings.peer_reviews.where(person: @user.person).any?
end
can :buy_tickets, Conference do |conference|
@user.person.events.accepted_but_not_paid.where(conference_id: conference.id).any?
end
# Submitters can either edit themselves
can :crud, Person, id: @user.person.id
......@@ -232,13 +230,12 @@ class Ability
event.current_state.in?([:submission_finished, :review]) and # Submission as been finished
not event.review_reservations.where(person: @user.person).any? and # Did not already reserve
not event.event_ratings.where(person: @user.person).any? and # Did not already review
event.subcategory.in? @user.subcategories_assigned_to_in(@conference) and # Is of the right subcategory
if event.is_special_session?
not event.conference.ss_review_deadline.past? and # Special Session Review Deadline not over
(event.expert_review_reservations_count + event.ratings_by_reviewers) < 2 # Event does not have either 2 Reservations or 2 Reviews or 1 Reservation and 1 Review
(event.expert_review_reservations_count + event.ratings_by_reviewers) < 5 # Event does not have either 5 Reservations + Reviews
else
not event.conference.ip_expert_review_deadline.past? and # Individual Paper Review Deadline not over
(event.expert_review_reservations_count + event.ratings_by_reviewers) < 1 # Event is neither reserved nor reviewed by an expert
(event.expert_review_reservations_count + event.ratings_by_reviewers) < 5 # Event is neither reserved nor reviewed by an expert
end
end
......
......@@ -4,11 +4,6 @@ class ConferenceUser < ActiveRecord::Base
belongs_to :conference
belongs_to :user
has_many :conference_user_subcategories
has_many :subcategories, through: :conference_user_subcategories
accepts_nested_attributes_for :conference_user_subcategories, allow_destroy: true
validates :conference, :user, :role, presence: true
validate :user_role_is_crew
validate :role_is_valid
......
class ConferenceUserSubcategory < ActiveRecord::Base
belongs_to :conference_user
belongs_to :subcategory
validates :subcategory_id, uniqueness: { scope: :conference_user_id, message: 'A subcategory cannot be assigned more than once!' }
validate :conferences_match
validate :is_reviewer
validate :not_more_than_four
private
def conferences_match
unless conference_user.conference == subcategory.conference
errors.add(:base, 'The assigned subcategory needs to be in the same conference as the user is reviewer in!')
end
end
def is_reviewer
unless conference_user.role == 'reviewer'
errors.add(:base, 'The user needs to have the role of \'reviewer\' to have a subcategory assigned to him/her!')
......@@ -27,4 +19,4 @@ class ConferenceUserSubcategory < ActiveRecord::Base
errors.add(:base, 'There can be at most 4 subcategories per conference added to a user')
end
end
end
\ No newline at end of file
end
......@@ -4,8 +4,8 @@ class Event < ActiveRecord::Base
before_create :generate_guid
SPECIAL_SESSION_TYPES = ['Academic Special Session', 'Research in Action Special Session']
TYPES = SPECIAL_SESSION_TYPES + ['Individual Paper', 'Keynote/Plenary']
SPECIAL_SESSION_TYPES = ['Academic Special Session']
TYPES = SPECIAL_SESSION_TYPES + ['Individual Paper', 'Poster Presentation', 'Participatory Session', 'Activist Session', 'Artistic Session', 'Keynote', 'Plenary Session', 'Book/Special Issue Presentation', 'Demonstration', 'Lunch', 'Fika', 'Party']
has_one :ticket, dependent: :destroy
has_many :conflicts_as_conflicting, class_name: "Conflict", foreign_key: "conflicting_event_id", dependent: :destroy
......@@ -36,8 +36,7 @@ class Event < ActiveRecord::Base
validates_attachment_content_type :logo, content_type: [/jpg/, /jpeg/, /png/, /gif/]
validates_presence_of :title
validates_length_of :abstract, maximum: 2000
validates :subcategory, presence: true
validates_length_of :abstract, maximum: 12000
validates :track, presence: true
validates :event_type, presence: true
......@@ -70,6 +69,18 @@ class Event < ActiveRecord::Base
scope :academic_special_sessions, -> { where(event_type: 'Academic Special Session') }
scope :research_in_action_special_sessions, -> { where(event_type: 'Research in Action Special Session') }
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_sessions, -> { where(event_type: 'Activist Session') }
scope :artistic_sessions, -> { where(event_type: 'Artistic Session') }
scope :plenary_sessions, -> { where(event_type: 'Plenary Session') }
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
......
......@@ -73,11 +73,6 @@ class User < ActiveRecord::Base
'reviewer'.in? self.roles_in(conference)
end
def subcategories_assigned_to_in(conference)
Subcategory.joins(:conference_user_subcategories => :conference_user).where('conference_users.user_id' => self.id, 'conference_users.conference_id' => conference.id)
#self.conference_users.includes(:conference_user_subcategories).where('conference_users.conference_id' => conference.id)
end
def self.check_pentabarf_credentials(email, password)
user = User.find_by_email(email)
return unless user and user.pentabarf_password and user.pentabarf_salt
......
......@@ -8,7 +8,7 @@
= pf.input :parent_id, as: :hidden, input_html: { value: current_user.person.id }
%fieldset.inputs
- if @event_person.event_role == 'session_contributor'
= f.input :contribution_abstract, :input_html => {:rows => 16}, hint: 'Please add the contribution Abstract here. Limited to 1700 characters (with spaces).'
= f.input :contribution_abstract, :input_html => {:rows => 16}, hint: 'Please add the contribution Abstract here. Limited to 10000 characters (with spaces).'
= f.input :event_role, as: :hidden, input_html: { value: 'session_contributor' }
= f.input :event_id, as: :hidden, input_html: { value: @event.id }
.actions
......
......@@ -7,13 +7,13 @@
- if can? :submit_special_session, Event and can? :submit_individual_paper, Event
= f.input :event_type, collection: translated_options(Event::TYPES)
- elsif can? :submit_special_session, Event and not can? :submit_individual_paper, Event
= f.input :event_type, collection: ['Academic Special Session', 'Research in Action Special Session']
- elsif not can? :submit_sepcial_session, Event and can? :submit_individual_paper, Event
= f.input :event_type, as: :hidden, input_html: { value: 'Individual Paper' }
= 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', '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
= f.association :subcategory, collection: @conference.subcategories
= f.input :submission_note, :input_html => {:rows => 2}, :hint => "Please add any additional information. If you selected 'other', please describe your proposed theme here."
.actions
= f.button :submit, 'Continue', class: 'primary'
= link_to 'Cancel', cfp_root_path, class: 'btn'
......@@ -5,19 +5,11 @@
category is not satisfied by this proposal, please leave the box unchecked.
= simple_form_for @rating, url: create_peer_review_cfp_event_path(@event), method: :post do |f|
%fieldset.inputs
= f.input :relevance, collection: 1..5, include_blank: false, hint: 'Please assess on scale 1-5 how relevant the proposal is to the conference theme (1-12) under which it is submitted.', label: 'Thematic relevance'
= f.input :quality, collection: 1..5, include_blank: false, hint: 'Please asses the scientific quality of the presentation in relation to the quality you expect from the International degrowth conference?'
= f.input :relevance, collection: 1..5, include_blank: false, hint: 'Please assess on scale 1-5 how relevant the proposal is to the conference themes under which it is submitted.', label: 'Thematic relevance'
= f.input :quality, collection: 1..5, include_blank: false, hint: 'Please assess the scientific quality of the presentation in relation to the quality you expect from the International degrowth conference?'
= f.input :clarity, collection: 1..5, include_blank: false, hint: 'Is the abstract well structured? Is the argument clear? Please rate on a scale below.', label: 'Clarity of Presentation'
= f.input :originality, collection: 1..5, include_blank: false, hint: 'Are the methods or the approach innovative for the degrowth discussions? Do they promise new relevant results? Does this abstract show something of novelty? Please rate on scale below.'
= f.input :confluence, collection: 1..5, include_blank: false, hint: 'Does this proposal link different research disciplines or different stakeholders in a unique path towards degrowth? Please rate on a scale below.', label: 'Disciplinary Confluence'
= f.input :regionality, as: :boolean, hint: 'Does this proposal refer to degrowth perspectives from the context of European eastern and southern semiperiphery*?', label: 'Regional contextualisation'
= f.input :comment, :input_html => {:rows => 3}
%p
*There are almost as many definitions of Eastern Europe as there are scholars of the region. Southern Europe
and Mediterranean fare no better. That is why we use the term semiperiphery. For the purposes of this
conference you may consider this region to include geographical, geopolitical and socioeconomic regions of
Baltic European states, former Warsaw pact countries, Russian Federation, Central and Eastern
European members of the EU, Eastern Mediterranean including Turkey, Greece, Israel and Palestine.
The Balkans, Italy and Iberian Peninsula may also be included.
.actions
= f.button :submit, class: 'primary'
\ No newline at end of file
= f.button :submit, class: 'primary'