2016-06-28 18:16:06 +03:00
|
|
|
.row
|
|
|
|
|
.col-md-10.col-md-offset-1
|
|
|
|
|
.page-header
|
|
|
|
|
%h1
|
|
|
|
|
Survey #{@survey.title}
|
|
|
|
|
- if can? :edit, @survey
|
|
|
|
|
= link_to 'Edit Survey', admin_conference_survey_path(@conference.short_title, @survey), class: 'btn btn-primary pull-right'
|
|
|
|
|
%p.text-muted
|
|
|
|
|
From:
|
|
|
|
|
= @survey.start_date
|
|
|
|
|
to
|
|
|
|
|
= @survey.end_date
|
2018-02-09 19:07:10 +02:00
|
|
|
- unless @survey.active?
|
|
|
|
|
%label
|
2022-05-18 06:31:12 +02:00
|
|
|
%i.fa-solid.fa-circle-exclamation
|
2018-02-09 19:07:10 +02:00
|
|
|
This survey does not accept replies at this monent.
|
2016-06-28 18:16:06 +03:00
|
|
|
.row
|
|
|
|
|
.col-md-12
|
2022-02-23 17:52:16 +01:00
|
|
|
= form_for(@survey_submission, url: reply_conference_survey_path(@conference.short_title, @survey)) do |f|
|
2016-06-28 18:16:06 +03:00
|
|
|
- @survey.survey_questions.each.with_index(1) do |survey_question, question_index|
|
|
|
|
|
.row
|
|
|
|
|
.col-md-10.col-md-offset-1
|
2018-02-09 19:07:10 +02:00
|
|
|
- survey_reply = survey_question.survey_replies.find_by(user: current_user) || SurveyReply.new(survey_question_id: survey_question.id, user: current_user)
|
2016-06-28 18:16:06 +03:00
|
|
|
= render partial: 'admin/surveys/survey_question', locals: { survey_question: survey_question, question_index: question_index, survey_reply: survey_reply }
|
2018-02-09 19:07:10 +02:00
|
|
|
|
2016-06-28 18:16:06 +03:00
|
|
|
.row
|
|
|
|
|
.col-md-10.col-md-offset-1
|
2018-02-09 19:07:10 +02:00
|
|
|
= f.submit 'Submit', class: 'btn btn-primary pull-right', disabled: !(can? :reply, @survey)
|