2014-03-17 16:36:32 +01:00
|
|
|
.row
|
2014-11-25 10:47:18 +01:00
|
|
|
.col-md-12
|
|
|
|
|
.page-header
|
2014-11-30 14:47:46 +02:00
|
|
|
%h1
|
2014-11-25 10:47:18 +01:00
|
|
|
Questions
|
|
|
|
|
- if can? :create, Question.new(conference_id: @conference.id)
|
|
|
|
|
= link_to 'Create New Question','#', 'data-toggle' => 'modal',
|
|
|
|
|
'data-target' => '#new-question', class: 'btn btn-success pull-right'
|
|
|
|
|
%p.text-muted
|
|
|
|
|
People will have to answer your questions during registration to your conference
|
|
|
|
|
.row
|
|
|
|
|
.col-md-12
|
2014-03-17 16:36:32 +01:00
|
|
|
- if @questions.count > 0
|
2022-02-23 17:52:16 +01:00
|
|
|
= form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
|
2014-07-14 21:13:32 +03:00
|
|
|
.questions{id: 'myquestions'}
|
|
|
|
|
= render partial: 'questions'
|
2014-11-30 14:47:46 +02:00
|
|
|
- if can? :update, Question.new(conference_id: @conference.id)
|
2014-11-25 10:47:18 +01:00
|
|
|
= f.submit "Save Questions", class: 'btn btn-primary pull-right',
|
2014-08-13 22:46:41 +03:00
|
|
|
confirm: 'Are you sure you want to make these changes?'
|
2014-02-09 18:05:57 +02:00
|
|
|
|
2014-07-14 21:13:32 +03:00
|
|
|
.modal.fade{id: 'new-question', 'role' => 'dialog', 'aria-hidden' => 'true'}
|
2014-03-17 16:36:32 +01:00
|
|
|
.modal-dialog
|
|
|
|
|
.modal-content
|
|
|
|
|
.modal-header
|
2014-07-14 21:13:32 +03:00
|
|
|
%h3{id: 'new-question-header'}
|
2014-03-17 16:36:32 +01:00
|
|
|
Add new question
|
|
|
|
|
.modal-body
|
2022-02-23 17:52:16 +01:00
|
|
|
= form_for(@new_question, url: admin_conference_questions_path(@conference.short_title), method: :post) do |f|
|
2014-07-14 21:13:32 +03:00
|
|
|
= render partial: 'form', locals: {f: f}
|
|
|
|
|
%button{class: 'btn btn-primary'}
|
2014-03-17 16:36:32 +01:00
|
|
|
Save
|
|
|
|
|
.pull-right
|
2014-07-14 21:13:32 +03:00
|
|
|
%button{class: 'btn btn-danger', 'data-dismiss'=> 'modal', 'aria-hidden'=>'true'}
|
2014-03-17 16:36:32 +01:00
|
|
|
Cancel
|