Display Committee Review on #show and #edit.
Also show submission_text on the #show page for authors.
This commit is contained in:
parent
0e74c2e296
commit
9786843eac
3 changed files with 33 additions and 7 deletions
|
|
@ -169,11 +169,11 @@ class ProposalsController < ApplicationController
|
|||
private
|
||||
|
||||
def event_params
|
||||
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: []
|
||||
)
|
||||
# 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,
|
||||
:committee_review, speaker_ids: [], volunteer_ids: [])
|
||||
end
|
||||
|
||||
def user_params
|
||||
|
|
|
|||
|
|
@ -28,11 +28,18 @@
|
|||
= render 'proposals/submission_type_content_form', f: f, program: @program
|
||||
|
||||
-# TODO-SNAPCON: Extract this to be a `conference_committee_role?`
|
||||
- read_only = !current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
|
||||
- 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' }, readonly: read_only },
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue