Merge pull request #129 from snap-cloud/submission-reviewer-comments
Support Committee Review
This commit is contained in:
commit
0d8a06184b
11 changed files with 76 additions and 22 deletions
2
.github/workflows/spec.yml
vendored
2
.github/workflows/spec.yml
vendored
|
|
@ -46,7 +46,7 @@ jobs:
|
|||
- name: spec/${{ matrix.suite }}
|
||||
run: bundle exec rake spec:${{ matrix.suite }}
|
||||
- name: coverage upload ${{ matrix.suite }}
|
||||
uses: codacy/codacy-coverage-reporter-action@master
|
||||
uses: codacy/codacy-coverage-reporter-action@v1
|
||||
if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||
|
|
|
|||
|
|
@ -169,11 +169,11 @@ class ProposalsController < ApplicationController
|
|||
private
|
||||
|
||||
def event_params
|
||||
# TODO-SNAPCON: Restrict committee review to admins.
|
||||
params.require(:event).permit(:event_type_id, :track_id, :difficulty_level_id,
|
||||
:title, :subtitle, :abstract, :submission_text, :description,
|
||||
:require_registration, :max_attendees, :language,
|
||||
speaker_ids: [], volunteer_ids: []
|
||||
)
|
||||
:committee_review, speaker_ids: [], volunteer_ids: [])
|
||||
end
|
||||
|
||||
def user_params
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ class EmailSettings < ApplicationRecord
|
|||
h['eventtitle'] = event.title
|
||||
h['proposalslink'] = Rails.application.routes.url_helpers.conference_program_proposals_url(
|
||||
conference.short_title, host: (ENV['OSEM_HOSTNAME'] || 'localhost:3000'))
|
||||
h['committee_review'] = event.committee_review
|
||||
h['committee_review_html'] = ApplicationController.helpers.markdown(event.committee_review)
|
||||
end
|
||||
|
||||
if booth
|
||||
|
|
|
|||
|
|
@ -17,6 +17,12 @@
|
|||
%tr
|
||||
%td {eventtitle}
|
||||
%td The title of an accepted or rejected proposal
|
||||
%tr
|
||||
%td {committee_review}
|
||||
%td The raw text in the committee review for the proposal
|
||||
%tr
|
||||
%td {committee_review_html}
|
||||
%td The committee review markdown rendered as HTML.
|
||||
%tr
|
||||
%td {conference_start_date}
|
||||
%td The start date of the conference
|
||||
|
|
@ -56,9 +62,6 @@
|
|||
%td {conference_splash_link}
|
||||
%td The link to conference splash page
|
||||
- if @conference.booths
|
||||
%tr
|
||||
%td {submitter_name}
|
||||
%td Submitter's name
|
||||
%tr
|
||||
%td {booth_title}
|
||||
%td Booth's title
|
||||
|
|
|
|||
|
|
@ -73,9 +73,7 @@
|
|||
%td
|
||||
= link_to @event.submitter.name, admin_user_path(@event.submitter)
|
||||
- if @event.submitter.email_public
|
||||
(
|
||||
= link_to @event.submitter.email, "mailto: #{@event.submitter.email}"
|
||||
)
|
||||
(#{mail_to(@event.submitter.email)})
|
||||
%tr
|
||||
%td
|
||||
%b Speakers
|
||||
|
|
@ -84,9 +82,7 @@
|
|||
%div
|
||||
= link_to speaker.name, admin_user_path(speaker)
|
||||
- if speaker.email_public
|
||||
(
|
||||
= link_to speaker.email, "mailto: #{speaker.email}"
|
||||
)
|
||||
(#{mail_to(speaker.email)})
|
||||
%tr
|
||||
%td
|
||||
%b Volunteers
|
||||
|
|
@ -117,11 +113,17 @@
|
|||
%td
|
||||
%b Submission Description
|
||||
%td= markdown(@event.submission_text)
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Requirements
|
||||
%td= simple_format(@event.description)
|
||||
|
||||
%tr
|
||||
%td
|
||||
%b Committee Review
|
||||
%td= markdown(@event.committee_review)
|
||||
|
||||
- if @conference.program.rating_enabled?
|
||||
= render 'voting',
|
||||
event: @event,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<%= render partial: "layouts/mailbot_header" %>
|
||||
<div id="content">
|
||||
<span style="white-space: pre-line">
|
||||
<%= @email_body %>
|
||||
<%= @email_body.html_safe %>
|
||||
</span>
|
||||
</div>
|
||||
<%= render partial: "layouts/mailbot_footer" %>
|
||||
|
|
@ -27,6 +27,20 @@
|
|||
|
||||
= render 'proposals/submission_type_content_form', f: f, program: @program
|
||||
|
||||
-# TODO-SNAPCON: Extract this to be a `conference_committee_role?`
|
||||
- if current_user.has_any_role?(:admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference })
|
||||
%br
|
||||
= f.input :committee_review,
|
||||
input_html: { rows: 5, data: { provide: 'markdown' } },
|
||||
hint: markdown_hint('This field is shared with the submission authors.')
|
||||
- elsif @event.committee_review.present?
|
||||
%br
|
||||
%strong.control-label Committee Review
|
||||
%small
|
||||
Use this feedback to improve your submission.
|
||||
.well
|
||||
= markdown(@event.committee_review)
|
||||
|
||||
- if @program.cfp&.enable_registrations?
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
|
|
|
|||
|
|
@ -138,3 +138,22 @@
|
|||
- if @surveys_after_event.any? && @event.ended?
|
||||
.page-header
|
||||
= render partial: 'surveys/list', locals: { surveys: @surveys_after_event, conference: @conference }
|
||||
|
||||
- if @event.committee_review.present? || @event.submission_text.present? && can?(:edit, @event)
|
||||
%hr
|
||||
%p Information for event authors only:
|
||||
.panel.panel-info
|
||||
.panel-heading
|
||||
Committee Review
|
||||
%button.btn.btn-primary.btn-xs{ type: "button", 'data-toggle': "collapse", 'data-target': "#committee-panel", 'aria-expanded': "false", 'aria-controls': "committee-panel" }
|
||||
Toggle
|
||||
.panel-body.collapse#committee-panel
|
||||
= markdown(@event.committee_review)
|
||||
|
||||
.panel.panel-info
|
||||
.panel-heading
|
||||
Submission Details
|
||||
%button.btn.btn-primary.btn-xs{ type: "button", 'data-toggle': "collapse", 'data-target': "#submission-panel", 'aria-expanded': "false", 'aria-controls': "submission-panel" }
|
||||
Toggle
|
||||
.panel-body.collapse#submission-panel
|
||||
= markdown(@event.submission_text)
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ Osem::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
resource :program, only: [] do
|
||||
get 'event/:id', to: 'proposals#show', as: :conference_program_event
|
||||
get 'proposal/:id', to: 'proposals#show' # For backward compatibility
|
||||
resources :proposals, except: :destroy do
|
||||
get 'commercials/render_commercial' => 'commercials#render_commercial'
|
||||
|
|
@ -220,9 +221,11 @@ Osem::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
|
||||
get '/admin' => redirect('/admin/conferences')
|
||||
|
||||
get '/calendar' => 'conferences#calendar'
|
||||
# Handle conferences on custom domains.
|
||||
# This *must* come before any other root definition.
|
||||
constraints DomainConstraint do
|
||||
root to: 'conferences#show'
|
||||
end
|
||||
|
||||
unless ENV['OSEM_ROOT_CONFERENCE'].blank?
|
||||
root to: redirect("/conferences/#{ENV['OSEM_ROOT_CONFERENCE']}")
|
||||
|
|
@ -230,9 +233,10 @@ Osem::Application.routes.draw do
|
|||
root to: 'conferences#index', via: [:get, :options]
|
||||
end
|
||||
|
||||
constraints DomainConstraint do
|
||||
root to: 'conferences#show'
|
||||
end
|
||||
|
||||
get '/admin' => redirect('/admin/conferences')
|
||||
get '/calendar' => 'conferences#calendar'
|
||||
get '/.well-known/apple-developer-merchantid-domain-association', to: 'application#apple_pay'
|
||||
|
||||
# A Short Fallback Route
|
||||
get '/:id', to: 'conferences#show'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
class AddCommitteeReviewToEvents < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :events, :committee_review, :text
|
||||
end
|
||||
end
|
||||
|
|
@ -134,7 +134,12 @@ describe EmailSettings do
|
|||
|
||||
context 'conference has event' do
|
||||
before do
|
||||
event_hash = { 'eventtitle' => 'Talk about talks', 'proposalslink' => 'http://localhost:3000/conferences/goto/program/proposals' }
|
||||
event_hash = {
|
||||
'eventtitle' => 'Talk about talks',
|
||||
'proposalslink' => 'http://localhost:3000/conferences/goto/program/proposals',
|
||||
'committee_review' => nil,
|
||||
'committee_review_html' => ''
|
||||
}
|
||||
expected_hash.merge!(event_hash)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue