Commit 6d12ca32 authored by jon richter's avatar jon richter

Merge branch '211-content-coherence-scriptum' into 'deployment'

Adaptating review to the Malmö conference structure

Closes #211 and #213

See merge request !15
parents a23457d0 9cbc3e08
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
......
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
......@@ -17,7 +17,7 @@ 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, :subcategory), params
else
result = search @prefiltered_events.includes(:track, :subcategory), params
end
......@@ -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, :subcategory, :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
......
......@@ -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
......
......@@ -93,19 +93,13 @@ 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
......@@ -232,7 +226,6 @@ 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
......
......@@ -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
......@@ -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
......
......@@ -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'
......@@ -10,18 +10,9 @@
= 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'
- if @event.event_type.in? ['Academic Special Session', 'Research in Action Special Session']
= f.input :coherence, collection: 1..5, include_blank: false, hint: 'Are the individual presentations in this session well tied to each other and well connected with the overall topic of the session?'
= f.input :coherence, collection: 1..5, include_blank: false, hint: 'Are the individual presentations in this session well tied to each other and well connected with the overall topic of the session?'
- if @event.event_type == 'Research in Action Special Session'
= f.input :balance, collection: 1..5, include_blank: false, hint: 'Does this special session contain a good balance of research and practice?'
= 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'
......@@ -7,7 +7,6 @@
- if @conference.ticket_server_enabled?
%th= sort_link @search, :ticket_id, 'Ticket', :term => params[:term]
%th= sort_link @search, :track_name, 'Theme', :term => params[:term]
%th= sort_link @search, :subcategory_name, 'Subcategory', :term => params[:term]
%th= sort_link @search, :event_type, 'Type', :term => params[:term]
- if can? :crud, Event
%th= sort_link @search, :state, 'State', :term => params[:term]
......@@ -17,7 +16,6 @@
- if @conference.ticket_server_enabled?
%th Ticket
%th Theme
%th Subcategory
%th Type
- if can? :crud, Event
%th State
......
......@@ -16,13 +16,6 @@
.blank-slate
%p
There are no Sessions for you to review.
- elsif current_user.subcategories_assigned_to_in(@conference).count <= 0
.row
.span16
.blank-slate
%p
You have not been assigned subcategories yet.
Please contact your administrator for subcategory assignment.
- else
= render 'shared/search_and_table', collection: @events, table_template: 'review_table'
- else
......@@ -37,4 +30,4 @@
papers, to allow others to submit events for
you to review.
- else
= render 'shared/search_and_table', collection: @events
\ No newline at end of file
= render 'shared/search_and_table', collection: @events
......@@ -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
#!/usr/bin/env bash
bundle exec rails server -p 5000 -e production
bundle exec rails server -b 0.0.0.0 -p 5000 -e production
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