osem-fcy/app/views/admin/surveys/index.html.haml
Stella Rouzi 9f3c0eff5d 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>
2018-07-03 08:46:15 +03:00

38 lines
1.3 KiB
Text

.row
.col-md-12
.page-header
%h1
Surveys
= link_to 'New', new_admin_conference_survey_path(@conference.short_title, survey: { surveyable_type: 'Conference', surveyable_id: @conference.id }), class: 'btn btn-success pull-right'
%p.text-muted
Available surveys for this conference
- if @surveys.any?
.row
.col-md-12
%table.table.table-hover.datatable#surveys
%thead
%th Title
%th When
%th Start Date
%th End Date
%th Actions
%tbody
- @surveys.each_with_index do |survey, index|
%tr
%td
= link_to survey.title, admin_conference_survey_path(@conference.short_title, survey)
%td
= survey.target
%td
= survey.start_date
%td
= survey.end_date
%td
.btn-group
= link_to 'Edit', edit_admin_conference_survey_path(@conference.short_title, survey),
class: 'btn btn-primary'
= link_to 'Delete', admin_conference_survey_path(@conference.short_title, survey),
method: :delete, class: 'btn btn-danger',
data: { confirm: "Do you really want to delete #{survey.title}?"}