Registration for Events
This commit is contained in:
parent
f188fd5575
commit
01ec43e53a
35 changed files with 522 additions and 46 deletions
|
|
@ -5,7 +5,9 @@
|
|||
%br
|
||||
%small
|
||||
= @event.subtitle
|
||||
= link_to 'Edit', edit_admin_conference_program_event_path(@conference.short_title, @event), class: 'btn btn-mini btn-primary pull-right'
|
||||
.btn-group.pull-right
|
||||
= link_to 'Registrations', registrations_admin_conference_program_event_path(@conference.short_title, @event), class: 'btn btn-success'
|
||||
= link_to 'Edit', edit_admin_conference_program_event_path(@conference.short_title, @event), class: 'btn btn-mini btn-primary'
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
@ -94,7 +96,8 @@
|
|||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
|
||||
- if @event.require_registration
|
||||
= registered_text(@event)
|
||||
- if !@event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
%th
|
||||
%b Speaker
|
||||
%th
|
||||
%b Pre-registration
|
||||
%b Requires Registration
|
||||
%th
|
||||
%b Highlight
|
||||
%th
|
||||
|
|
@ -83,15 +83,18 @@
|
|||
- else
|
||||
Unknown speaker
|
||||
|
||||
%td{'data-order' => "#{event.require_registration}"}
|
||||
%td.text-center{'data-order' => "#{event.require_registration}"}
|
||||
= check_box_tag @conference.short_title, event.id, event.require_registration,
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{event.id}?event[require_registration]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
off_color: 'warning',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
- if event.require_registration
|
||||
%br
|
||||
= link_to registered_text(event), registrations_admin_conference_program_event_path(@conference.short_title, event), class: 'btn btn-xs btn-default'
|
||||
|
||||
%td{'data-order' => "#{event.is_highlight}"}
|
||||
%td.text-center{'data-order' => "#{event.is_highlight}"}
|
||||
= check_box_tag @conference.short_title, event.id, event.is_highlight,
|
||||
method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{event.id}?event[is_highlight]=",
|
||||
class: 'switch-checkbox', data: { size: 'small',
|
||||
|
|
|
|||
40
app/views/admin/events/registrations.html.haml
Normal file
40
app/views/admin/events/registrations.html.haml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1
|
||||
Registrations (#{@event_registrations.length}/#{@event.max_attendees})
|
||||
.text-muted
|
||||
for
|
||||
= @event.title
|
||||
|
||||
- if @event.room && (@event_registrations.length > @event.room.size)
|
||||
%b Attention:
|
||||
You have more registrations than the capacity of the room!
|
||||
|
||||
.well
|
||||
%table.table.table-hover.table-borderd.table-striped.datatable#registrations
|
||||
%thead
|
||||
%th
|
||||
%th Name
|
||||
%th Email
|
||||
%th Created At
|
||||
%th Attended
|
||||
%th Attended Conference
|
||||
%tbody
|
||||
- @event_registrations.each.with_index(1) do |event_registration, index|
|
||||
%tr
|
||||
%td= index
|
||||
%td= event_registration.name
|
||||
%td= event_registration.email
|
||||
%td= event_registration.created_at
|
||||
%td
|
||||
= check_box_tag @conference.short_title, @event.id, event_registration.attended, class: 'switch-checkbox', method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{@event.id}/toggle_attendance?events_registration_id=#{event_registration.id}&&event_registration[attended]=",
|
||||
data: { size: 'small',
|
||||
off_color: 'danger',
|
||||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
%td
|
||||
- if event_registration.registration.attended
|
||||
%i.fa.fa-check.text-success
|
||||
-else
|
||||
%i.fa.fa-close.text-danger
|
||||
25
app/views/admin/users/_event_registrations.html.haml
Normal file
25
app/views/admin/users/_event_registrations.html.haml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
.row
|
||||
.col-md-12.page-header
|
||||
%h2
|
||||
Registrations to Events
|
||||
|
||||
.col-md-12
|
||||
.well
|
||||
%table.table.table-bordered.table-striped.table-hover.datatable#event_registrations
|
||||
%thead
|
||||
%th ID
|
||||
%th Conference
|
||||
%th Title
|
||||
%th Attended
|
||||
%tbody
|
||||
- @user.events_registrations.each do |event_registration|
|
||||
- event = event_registration.event
|
||||
%tr
|
||||
%td= event.id
|
||||
%td= link_to event.program.conference.short_title, admin_conference_path(event.program.conference.short_title)
|
||||
%td= link_to event.title, admin_conference_program_event_path(event.program.conference.short_title, event)
|
||||
%td
|
||||
- if @user.attended_event?(event)
|
||||
%i.fa.fa-check.text-success
|
||||
- else
|
||||
%i.fa.fa-times.text-danger
|
||||
|
|
@ -7,6 +7,8 @@
|
|||
- unless @user.events.blank?
|
||||
%li{class: "#{'active' if params[:tab] == 'submissions-content'}"}
|
||||
= link_to 'Submissions', '#submissions-content', 'data-toggle'=>'tab'
|
||||
%li{class: "#{'active' if params[:tab] == 'event_registrations-content'}"}
|
||||
= link_to 'Event Registrations', '#event_registrations', 'data-toggle'=>'tab'
|
||||
.tab-content
|
||||
#user-info-content.tab-pane{class: "#{'active' unless params[:tab] == 'submissions-content'}"}
|
||||
- if can? :edit, @user
|
||||
|
|
@ -31,3 +33,5 @@
|
|||
%td= @user.send(attr)
|
||||
#submissions-content.tab-pane{class: "#{'active' if params[:tab] == 'submissions-content'}"}
|
||||
= render 'submissions'
|
||||
#event_registrations.tab-pane{class: "#{'active' if params[:tab] == 'event_registrations'}"}
|
||||
= render 'event_registrations'
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
Registration for
|
||||
= @conference.title
|
||||
.row
|
||||
.col-md-6
|
||||
.col-md-8
|
||||
- if !current_user
|
||||
%legend
|
||||
%span
|
||||
|
|
|
|||
|
|
@ -1,8 +1,21 @@
|
|||
- if @conference.questions.any?
|
||||
= render partial: 'conference_registrations/questions', locals: { f: f }
|
||||
- if @conference.program.events.workshops.any?
|
||||
=f.inputs 'Pre-registration required for the following:' do
|
||||
= f.input :events, as: :check_boxes, label: false, collection: @conference.program.events.workshops
|
||||
- if @conference.program.events.with_registration_open.any? || @registration.events.any?
|
||||
= f.inputs 'Pre-registration required for the following:' do
|
||||
|
||||
- @registration.events_ordered.each do |event|
|
||||
%label
|
||||
= hidden_field_tag "registration[event_ids][]", nil
|
||||
= check_box_tag "registration[event_ids][]", event.id, event.registrations.include?(@registration)
|
||||
= event.title
|
||||
.text-muted
|
||||
= registered_text(event)
|
||||
- if event.scheduled?
|
||||
(Scheduled on: #{event.start_time.to_date})
|
||||
%br
|
||||
|
||||
|
||||
|
||||
= f.inputs 'Your Travel Info' do
|
||||
= f.input :arrival, as: :string, label: 'Your arrival time', input_html: { value: (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), id: 'registration-arrival-datepicker',start_date: @conference.start_date,end_date: @conference.end_date,readonly: 'readonly' }
|
||||
= f.input :departure, as: :string, label: 'Your departure time', input_html: { value: (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), id: 'registration-departure-datepicker', readonly: 'readonly' }
|
||||
|
|
|
|||
|
|
@ -54,18 +54,34 @@
|
|||
= qa.answer.title
|
||||
- else
|
||||
You haven't answered
|
||||
- if @workshops.any?
|
||||
- if @registration.events.any?
|
||||
.row
|
||||
.col-md-12
|
||||
%h4
|
||||
%span.fa-stack
|
||||
%i.fa.fa-square-o.fa-stack-2x
|
||||
%i.fa.fa-check.fa-stack-1x
|
||||
Event Registrations
|
||||
Registered to the following event(s)
|
||||
%ul
|
||||
- @workshops.each do |workshop|
|
||||
- @registration.events.each do |event|
|
||||
%li
|
||||
= link_to workshop.title, conference_program_proposal_path(@conference.short_title, workshop.id)
|
||||
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
||||
= '(' + registered_text(event) + ')'
|
||||
|
||||
- if @registration.conference.program.events.remaining_for_registration(@registration).any?
|
||||
.row
|
||||
.col-md-12
|
||||
%h4
|
||||
%span.fa-stack
|
||||
%i.fa.fa-square-o.fa-stack-2x
|
||||
%i.fa.fa-question.fa-stack-1x
|
||||
Events that require registration
|
||||
%ul
|
||||
- @registration.conference.program.events.remaining_for_registration(@registration).each do |event|
|
||||
%li
|
||||
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
|
||||
= '(' + registered_text(event) + ')'
|
||||
|
||||
- if @conference.tickets.any?
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
|||
|
|
@ -42,7 +42,10 @@
|
|||
250
|
||||
words.
|
||||
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
= f.inputs 'Enable pre-registration' do
|
||||
= f.input :require_registration, label: 'Require participants to register to your event'
|
||||
- message = @event.room ? "Value must be between 1 and #{@event.room.size}" : 'Check room capacity after scheduling.'
|
||||
= f.input :max_attendees, hint: 'The maximum number of participants. ' + message
|
||||
|
||||
- if current_user.has_any_role? :admin, { name: :organizer, resource: @conference }, { name: :cfp, resource: @conference }
|
||||
= f.input :is_highlight
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
.row
|
||||
.col-md-12.page-header
|
||||
%h1
|
||||
Proposals for
|
||||
Proposals for
|
||||
%span.notranslate
|
||||
= @conference.title
|
||||
|
||||
|
|
@ -68,9 +68,9 @@
|
|||
= event.event_type.title
|
||||
= "(#{event.event_type.length} min)"
|
||||
= "in #{event.track.name}" if event.track
|
||||
- if event.state == 'confirmed' && event.require_registration == true
|
||||
,
|
||||
Pre-registered: #{pre_registered(event).count}
|
||||
- if event.require_registration
|
||||
%br
|
||||
= link_to registered_text(event), registrations_conference_program_proposal_path(@conference.short_title, event), class: 'btn btn-xs btn-danger'
|
||||
|
||||
%td.col-md-2{style: "padding:20px 8px 20px 8px;"}
|
||||
= link_to 'Complete your proposal', 'javascript: void(0)', "type"=>"button", "data-trigger"=>"focus", "data-toggle"=>"popover", "title"=>"Your todo list", "data-content"=>"#{render partial: 'tooltip', locals: { event: event} }"
|
||||
|
|
|
|||
36
app/views/proposal/registrations.html.haml
Normal file
36
app/views/proposal/registrations.html.haml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
.container
|
||||
.row
|
||||
.col-md-10.col-md-offset-1
|
||||
.page-header
|
||||
%h1
|
||||
Registrations (#{@event.events_registrations.length}/#{@event.max_attendees})
|
||||
.text-muted
|
||||
for
|
||||
= @event.title
|
||||
|
||||
.well
|
||||
%table.table.table-hover.table-borderd.table-striped.datatable#registrations
|
||||
%thead
|
||||
%th
|
||||
%th Name
|
||||
%th Email
|
||||
%th Created AT
|
||||
%th Attended
|
||||
%th Attended Conference
|
||||
%tbody
|
||||
- @event.events_registrations.each.with_index(1) do |event_registration, index|
|
||||
%tr
|
||||
%td= index
|
||||
%td= event_registration.name
|
||||
%td= event_registration.email
|
||||
%td= event_registration.created_at
|
||||
%td.text-center
|
||||
- if event_registration.attended
|
||||
%i.fa.fa-check.text-success
|
||||
- else
|
||||
%i.fa.fa-times.text-danger
|
||||
%td
|
||||
- if event_registration.registration.attended
|
||||
%i.fa.fa-check.text-success
|
||||
-else
|
||||
%i.fa.fa-times.text-danger
|
||||
|
|
@ -7,10 +7,13 @@
|
|||
%br
|
||||
%small
|
||||
= @event.subtitle
|
||||
- if can? :schedule, @conference
|
||||
= link_to "Schedule", schedule_conference_path(@conference.short_title), :class =>"btn btn-success pull-right"
|
||||
- if can? :edit, @event
|
||||
= link_to "Edit", edit_conference_program_proposal_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary pull-right"
|
||||
.btn-group.pull-right
|
||||
- if can? :update, @event
|
||||
= link_to 'Registrations', registrations_conference_program_proposal_path(@conference.short_title, @event), class: 'btn btn-mini btn-success'
|
||||
- if can? :edit, @event
|
||||
= link_to "Edit", edit_conference_program_proposal_path(@conference.short_title, @event), :class => "btn btn-mini btn-primary"
|
||||
- if can? :schedule, @conference
|
||||
= link_to "Schedule", schedule_conference_path(@conference.short_title), :class =>"btn btn-success"
|
||||
.row
|
||||
.col-md-3
|
||||
.speakerinfo
|
||||
|
|
@ -28,7 +31,6 @@
|
|||
= @speaker.affiliation
|
||||
-if @speaker.biography?
|
||||
= simple_format(@speaker.biography)
|
||||
|
||||
.col-md-9
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
@ -76,5 +78,9 @@
|
|||
- if @event.difficulty_level_id
|
||||
%span.label{:style =>"background-color: #{@event.difficulty_level.color};"}
|
||||
= @event.difficulty_level.title
|
||||
- if @event.require_registration
|
||||
= link_to "Registration required!", new_conference_conference_registrations_path(@conference.short_title), :class => "btn btn-xs btn-warning"
|
||||
|
||||
- if @event.require_registration
|
||||
.col-md-12
|
||||
%dt Requires Registration:
|
||||
%dd
|
||||
= link_to "Yes (#{registered_text(@event)})", new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-xs btn-danger', disabled: !@event.registration_possible?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue