Added post-conference survey
This commit is contained in:
@@ -10,8 +10,12 @@
|
||||
- if conference.start_date.present? && conference.end_date.present?
|
||||
.secondary
|
||||
= date_span(conference.start_date.to_date, conference.end_date.to_date)
|
||||
- if conference.poster.present? && links.include?(:register) && conference.can_register?
|
||||
- if conference.poster.present? && links.include?(:register) && conference.can_register?(current_user)
|
||||
.register-link
|
||||
- unless logged_in?
|
||||
.access-registration
|
||||
= _'actions.conference.already_registered'
|
||||
= link_to (_'actions.conference.access_registration'), register_path(conference.slug)
|
||||
= (link_to _(is_registered ? 'actions.conference.edit_registration' : 'forms.actions.generic.register'), register_path(conference.slug), class: [:button, :register])
|
||||
- if conference.poster.present?
|
||||
%figure
|
||||
@@ -23,7 +27,7 @@
|
||||
= richtext conference.info
|
||||
|
||||
.links
|
||||
= (link_to (_(is_registered ? 'actions.conference.edit_registration' : 'forms.actions.generic.register')), register_path(conference.slug), class: [:button, :register]) if links.include?(:register) && conference.can_register?
|
||||
= (link_to (_(is_registered ? 'actions.conference.edit_registration' : 'forms.actions.generic.register')), register_path(conference.slug), class: [:button, :register]) if links.include?(:register) && conference.can_register?(current_user)
|
||||
= (link_to (_'articles.workshops.info.read_more'), conference_path(conference.slug), class: :button) if links.include?(:read_more)
|
||||
= (link_to (_'forms.actions.generic.administrate'), administrate_conference_path(conference.slug), class: [:button]) if links.include?(:administrate)
|
||||
= (link_to (_'forms.actions.generic.edit'), edit_conference_path(conference.slug), class: [:button, :subdued]) if links.include?(:edit)
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
= render partial: 'conferences/page_header', locals: {page_key: 'Conference_Survey'}
|
||||
- if @warnings.present?
|
||||
= row class: 'warnings', tag: :ul do
|
||||
- @warnings.each do |warning|
|
||||
= columns tag: :li, class: 'warning-info' do
|
||||
= warning
|
||||
%article
|
||||
- if !@registration.checked_in?
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_"articles.conference_survey.headings.post_conference", :t
|
||||
%p=_"articles.conference_survey.paragraphs.post_conference_not_checked_in", :p
|
||||
- elsif @registration.survey_taken
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_"articles.conference_survey.headings.post_conference", :t
|
||||
%p=_"articles.conference_survey.paragraphs.post_conference_taken", :p
|
||||
- else
|
||||
= form_tag conference_survey_save_path(@this_conference.slug) do
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%h2=_"articles.conference_survey.headings.post_conference", :t
|
||||
%p=_"articles.conference_survey.paragraphs.post_conference", :p
|
||||
= textfield :email, nil, required: true, big: true unless logged_in?
|
||||
%ol.survey
|
||||
- @this_conference.post_conference_survey_questions.each do |name, question|
|
||||
%li
|
||||
%header
|
||||
%p= _"articles.conference_survey.paragraphs.#{name}", :p
|
||||
.question-details
|
||||
- case question[:type]
|
||||
- when :open_ended
|
||||
.open-ended= textarea name, nil, plain: true, short: true, label: false, class: question[:comment_size]
|
||||
- when :multi_likert
|
||||
- options = question[:options].to_a
|
||||
- options << question[:waive_option] if question[:waive_option].present?
|
||||
.table.responsive-table.likert
|
||||
.table-thead.medium-up
|
||||
.table-tr
|
||||
.table-th.corner
|
||||
- options.each do |option|
|
||||
.table-th{id: "#{name}-option-#{option}"}=_("articles.conference_survey.likert.#{option}")
|
||||
.table-tbody
|
||||
- question[:questions].each do |q|
|
||||
.table-tr
|
||||
.table-th{id: "#{name}-question-#{q}"}=_("articles.conference_survey.questions.#{q}")
|
||||
- options.each do |option|
|
||||
.table-td
|
||||
=label_tag do
|
||||
=radio_button_tag "#{name}_#{q}", option, aria: { labelledby: "#{name}-question-#{q} #{name}-option-#{option}" }
|
||||
%span.small-only=_("articles.conference_survey.likert.#{option}")
|
||||
- when :likert
|
||||
- options = question[:options].to_a
|
||||
- options << question[:waive_option] if question[:waive_option].present?
|
||||
- is_numerical = question[:options].is_a?(Range)
|
||||
%fieldset.likert
|
||||
- options.each do |option|
|
||||
= label_tag do
|
||||
= radio_button_tag name, option
|
||||
= _("articles.conference_survey.likert.#{option}")
|
||||
- if question[:comment].present?
|
||||
.comment
|
||||
= textarea "#{name}_comment", nil, label: "articles.conference_survey.comment.#{question[:comment] == true ? 'default' : question[:comment]}", plain: true, short: true
|
||||
|
||||
|
||||
= row do
|
||||
= columns(medium: 12) do
|
||||
%p=_"articles.conference_survey.paragraphs.post_conference_submit", :p
|
||||
.actions.center
|
||||
= button :submit
|
||||
Reference in New Issue
Block a user