Registration form more-or-less working, workshop scaffold is up
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
.columns.medium-8
|
||||
= field :is_attending, :select_tag, ConferenceRegistration::AttendingOptions, label: 'Are you attending?'
|
||||
= field :is_attending, :select_tag, ConferenceRegistration::AttendingOptions, label: 'Are you attending?', value: @conference_registration.try(:is_attending)
|
||||
%ol
|
||||
- @conference.registration_form_fields.each do |ff|
|
||||
%li
|
||||
= form_field ff
|
||||
- response = @conference_registration ? ConferenceRegistrationResponse.find_by(conference_registration_id: @conference_registration.id, registration_form_field_id: ff.id) : nil
|
||||
= form_field ff, response
|
||||
= actions :register
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
= form_for @workshop do |f|
|
||||
- if @workshop.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@workshop.errors.count, "error")} prohibited this workshop from being saved:"
|
||||
%ul
|
||||
- @workshop.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
|
||||
.field
|
||||
= f.label :title
|
||||
= f.text_field :title
|
||||
.field
|
||||
= f.label :slug
|
||||
= f.text_field :slug
|
||||
.field
|
||||
= f.label :info
|
||||
= f.text_area :info
|
||||
.field
|
||||
= f.label :conference_id
|
||||
= f.number_field :conference_id
|
||||
.field
|
||||
= f.label :workshop_stream_id
|
||||
= f.number_field :workshop_stream_id
|
||||
.field
|
||||
= f.label :workshop_presentation_style
|
||||
= f.number_field :workshop_presentation_style
|
||||
.field
|
||||
= f.label :min_facilitators
|
||||
= f.number_field :min_facilitators
|
||||
.field
|
||||
= f.label :location_id
|
||||
= f.number_field :location_id
|
||||
.field
|
||||
= f.label :start_time
|
||||
= f.datetime_select :start_time
|
||||
.field
|
||||
= f.label :end_time
|
||||
= f.datetime_select :end_time
|
||||
.actions
|
||||
= f.submit 'Save'
|
||||
@@ -0,0 +1,7 @@
|
||||
%h1 Editing workshop
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Show', @workshop
|
||||
\|
|
||||
= link_to 'Back', workshops_path
|
||||
@@ -0,0 +1,37 @@
|
||||
%h1 Listing workshops
|
||||
|
||||
%table
|
||||
%tr
|
||||
%th Title
|
||||
%th Slug
|
||||
%th Info
|
||||
%th Conference
|
||||
%th Workshop stream
|
||||
%th Workshop presentation style
|
||||
%th Min facilitators
|
||||
%th Location
|
||||
%th Start time
|
||||
%th End time
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
|
||||
- @workshops.each do |workshop|
|
||||
%tr
|
||||
%td= workshop.title
|
||||
%td= workshop.slug
|
||||
%td= workshop.info
|
||||
%td= workshop.conference_id
|
||||
%td= workshop.workshop_stream_id
|
||||
%td= workshop.workshop_presentation_style
|
||||
%td= workshop.min_facilitators
|
||||
%td= workshop.location_id
|
||||
%td= workshop.start_time
|
||||
%td= workshop.end_time
|
||||
%td= link_to 'Show', workshop
|
||||
%td= link_to 'Edit', edit_workshop_path(workshop)
|
||||
%td= link_to 'Destroy', workshop, :method => :delete, :data => { :confirm => 'Are you sure?' }
|
||||
|
||||
%br
|
||||
|
||||
= link_to 'New Workshop', new_workshop_path
|
||||
@@ -0,0 +1,5 @@
|
||||
%h1 New workshop
|
||||
|
||||
= render 'form'
|
||||
|
||||
= link_to 'Back', workshops_path
|
||||
@@ -0,0 +1,36 @@
|
||||
%p#notice= notice
|
||||
|
||||
%p
|
||||
%b Title:
|
||||
= @workshop.title
|
||||
%p
|
||||
%b Slug:
|
||||
= @workshop.slug
|
||||
%p
|
||||
%b Info:
|
||||
= @workshop.info
|
||||
%p
|
||||
%b Conference:
|
||||
= @workshop.conference_id
|
||||
%p
|
||||
%b Workshop stream:
|
||||
= @workshop.workshop_stream_id
|
||||
%p
|
||||
%b Workshop presentation style:
|
||||
= @workshop.workshop_presentation_style
|
||||
%p
|
||||
%b Min facilitators:
|
||||
= @workshop.min_facilitators
|
||||
%p
|
||||
%b Location:
|
||||
= @workshop.location_id
|
||||
%p
|
||||
%b Start time:
|
||||
= @workshop.start_time
|
||||
%p
|
||||
%b End time:
|
||||
= @workshop.end_time
|
||||
|
||||
= link_to 'Edit', edit_workshop_path(@workshop)
|
||||
\|
|
||||
= link_to 'Back', workshops_path
|
||||
Reference in New Issue
Block a user