Implement consistent admin interface
* Consistent route/model/controller/view layout * Get rid of unused photos, speakers, dietchoices, social_events controllers * Drop unused :public from Rooms and :description from CallForPapers
This commit is contained in:
parent
f6a87331be
commit
28063129c7
133 changed files with 1461 additions and 1461 deletions
|
|
@ -1,10 +1,9 @@
|
|||
%h2
|
||||
Questions for #{@conference.short_title}
|
||||
- if @questions_conference.count
|
||||
= "(#{@questions_conference.count})"
|
||||
%i The questions will appear in the registration page of the conference
|
||||
|
||||
%table.table
|
||||
%table.table.table-hover#questions
|
||||
%th Enabled
|
||||
%th Question
|
||||
%th Type
|
||||
%th Answers
|
||||
%th Actions
|
||||
- @questions.each do |q|
|
||||
%tr
|
||||
%td
|
||||
|
|
@ -12,15 +11,16 @@
|
|||
= check_box_tag "conference[question_ids][]", q.id,
|
||||
@conference.question_ids.include?(q.id), id: dom_id(q)
|
||||
%td
|
||||
= label_tag dom_id(q), q.title
|
||||
%br
|
||||
= label_tag dom_id(q), "Type: #{q.question_type.title}"
|
||||
= ','
|
||||
= label_tag dom_id(q), "Answers: #{q.answers.map {|a| a.title}.join(', ')}"
|
||||
= q.title
|
||||
%td
|
||||
= q.question_type.title
|
||||
%td
|
||||
= q.answers.map {|a| a.title}.join(', ')
|
||||
|
||||
%td= link_to 'Edit', edit_admin_conference_question_path(@conference.short_title, q),
|
||||
%td
|
||||
.btn-group
|
||||
= link_to 'Edit', edit_admin_conference_question_path(@conference.short_title, q),
|
||||
class: 'btn btn-primary', disabled: !(can? :update, q)
|
||||
|
||||
%td= link_to 'Delete', admin_conference_question_path(@conference.short_title, q),
|
||||
= link_to 'Delete', admin_conference_question_path(@conference.short_title, q),
|
||||
method: :delete, remote: true, class: 'btn btn-danger',
|
||||
confirm: "Delete question '#{q.title}'?", disabled: !(can? :destroy, q)
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
.row
|
||||
.col-md-8
|
||||
.pull-right
|
||||
- if can? :create, Question.new(conference_id: @conference.id)
|
||||
%b= link_to 'Create New Question','#', 'data-toggle' => 'modal',
|
||||
'data-target' => '#new-question', class: 'btn btn-success'
|
||||
%br
|
||||
%br
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
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
|
||||
- if @questions.count > 0
|
||||
= semantic_form_for(@conference, url: admin_conference_questions_update_conference_path(@conference.short_title)) do |f|
|
||||
= semantic_form_for(@conference, url: update_conference_admin_conference_questions_path(@conference.short_title)) do |f|
|
||||
.questions{id: 'myquestions'}
|
||||
= render partial: 'questions'
|
||||
- if can? :update, @conference
|
||||
= f.submit "Update Questions for #{@conference.short_title}", class: 'btn btn-primary',
|
||||
= f.submit "Save Questions", class: 'btn btn-primary pull-right',
|
||||
confirm: 'Are you sure you want to make these changes?'
|
||||
|
||||
.modal.fade{id: 'new-question', 'role' => 'dialog', 'aria-hidden' => 'true'}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue