Add surveys; custom generated by admins

Available during registration or after conference

Co-authored-by: Shyukri <shshyukriev@suse.com>
Co-authored-by: Henne <hvogel@opensuse.org>
Co-authored-by: Moises <mdeniz@suse.com>
This commit is contained in:
Stella Rouzi 2016-06-28 18:16:06 +03:00
parent 4e742d170f
commit 9f3c0eff5d
43 changed files with 701 additions and 17 deletions

View file

@ -0,0 +1,24 @@
.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
.row
.col-md-12
= semantic_form_for @survey_submission, url: reply_conference_survey_path(@conference.short_title, @survey) do |f|
- @survey.survey_questions.each.with_index(1) do |survey_question, question_index|
.row
.col-md-10.col-md-offset-1
- survey_reply = survey_question.survey_replies.find_by(user: current_user) || SurveyReply.new(survey_question_id: survey_question.id, user_id: current_user.id)
= render partial: 'admin/surveys/survey_question', locals: { survey_question: survey_question, question_index: question_index, survey_reply: survey_reply }
.row
.col-md-10.col-md-offset-1
= f.submit 'Submit', class: 'btn btn-primary pull-right'