Improving surveys system: showing surveys in admin UI as they will be for the user

This commit is contained in:
mdeniz 2016-06-29 17:23:01 +02:00
parent 335608e6c4
commit 03168b4efe
15 changed files with 213 additions and 46 deletions

View file

@ -1,6 +1,18 @@
%p#notice= notice
= link_to 'Edit', edit_admin_survey_path(@admin_survey)
\|
= link_to 'Back', admin_surveys_path
.row
.col-md-12
.page-header
%h1
Survey #{@survey.title}
= link_to 'Edit Survey', edit_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
- @survey.survey_questions.each.with_index(1) do |survey_question, index|
.row
.col-md-12
= render partial: 'survey_question', locals: { survey_question: survey_question, index: index }
= link_to 'Add Question', new_admin_conference_survey_survey_question_path(@conference.short_title, @survey), class: 'btn btn-success pull-right'