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:
parent
4e742d170f
commit
9f3c0eff5d
43 changed files with 701 additions and 17 deletions
38
app/views/admin/surveys/index.html.haml
Normal file
38
app/views/admin/surveys/index.html.haml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
.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}?"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue