Add email notifications for events registrations, add switch-checkboxes, create EventsRegistrations controller, separate page for events that require registration
This commit is contained in:
parent
139a8565e2
commit
77af75f319
38 changed files with 1313 additions and 403 deletions
|
|
@ -14,6 +14,9 @@
|
|||
%a{"aria-controls" => "notifications", "data-toggle" => "tab", :href => "#notifications", :role => "tab"} Update Notifications
|
||||
%li{:role => "presentation"}
|
||||
%a{"aria-controls" => "cfp", "data-toggle" => "tab", :href => "#cfp", :role => "tab"} Call for Papers
|
||||
%li{:role => "presentation"}
|
||||
%a{"aria-controls" => "events_registration", "data-toggle" => "tab", :href => "#events_registrations", :role => "tab"} Events Registrations
|
||||
|
||||
/ Tab panes
|
||||
.tab-content
|
||||
#onboarding.tab-pane.active{:role => "tabpanel"}
|
||||
|
|
@ -83,6 +86,32 @@
|
|||
"data-name"=>"email_settings_cfp_dates_updated_body"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_cfp_help"} Show Help
|
||||
= render partial: 'help', locals: {id: 'updated_cfp_help', show_event_variables: false}
|
||||
#events_registrations.tab-pane{:role => "tabpanel"}
|
||||
= f.input :send_on_updated_max_attendees_automatically, hint: "This will notify event users about automatic changes on max_attendees attribute. This refers to events marked with require_registration"
|
||||
= f.input :updated_max_attendees_automatically_subject
|
||||
= f.input :updated_max_attendees_automatically_body, input_html: { rows: 10, cols: 20 }
|
||||
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nThe maximum number of attendees that can attend your session {eventtitle} has been modified.\n That is usually due to scheduling your session in a room with less available seats.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
|
||||
"data-name"=>"email_settings_updated_max_attendees_automatically_body"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"updated_max_attendees_automatically_help"} Show Help
|
||||
= render partial: 'help', locals: { id: 'updated_max_attendees_automatically_help', show_event_variables: true }
|
||||
|
||||
= f.input :send_on_deleted_event_registration_automatically, hint: "This will notify all user that they have been unregistered from an event. This occurs when someone else, except for the user, deletes the registration (eg. event submitter, conference organizer)"
|
||||
= f.input :deleted_event_registration_automatically_subject
|
||||
= f.input :deleted_event_registration_automatically_body, input_html: { rows: 10, cols: 20 }
|
||||
|
||||
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nWe are sorry to inform you that you have been unregistered from the session {eventtitle}.\n That might have occured due to technical difficulties or room limitations. You can check online for any future changes.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
|
||||
"data-name"=>"email_settings_deleted_event_registration_automatically_body"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"deleted_event_registration_automatically_help"} Show Help
|
||||
= render partial: 'help', locals: { id: 'deleted_event_registration_automatically_help', show_event_variables: true }
|
||||
|
||||
= f.input :send_on_new_event_registration, hint: "This will notify every user that registers to an event that the registration was successful"
|
||||
= f.input :new_event_registration_subject
|
||||
= f.input :new_event_registration_body, input_html: { rows: 10, cols: 20 }
|
||||
|
||||
%a.btn.btn-link.control_label.load_template{"data-template"=>"Dear {name},\n\nYou have successfully registered to attend session {eventtitle}. This session requires all attendees to register in advance. This is usually due to limited resources needed during the session, or room limitations. If for any reason you cannot make it, please unregister yourself to free up your slot for other visitors that wish to attend.\n\nFeel free to contact us with any questions or concerns.\n\nWe look forward to seeing you there.\n\nBest wishes\n\n{conference} Team",
|
||||
"data-name"=>"email_settings_new_event_registration_body"} Load Template
|
||||
%a.btn.btn-link.control_label.template_help_link{"data-name"=>"new_event_registration_help"} Show Help
|
||||
= render partial: 'help', locals: { id: 'new_event_registration_help', show_event_variables: true }
|
||||
.row
|
||||
.col-md-12
|
||||
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
on_text: 'Yes',
|
||||
off_text: 'No' }
|
||||
- if @event.require_registration
|
||||
= registered_text(@event)
|
||||
Registered: #{registered_text(@event)}
|
||||
|
||||
-if @program.languages.present?
|
||||
%tr
|
||||
|
|
@ -105,7 +105,6 @@
|
|||
%b Language
|
||||
%td
|
||||
= @event.language
|
||||
|
||||
- if !@event.room.nil?
|
||||
%tr
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
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'
|
||||
= link_to "Registered: #{registered_text(event)}", admin_conference_program_event_events_registrations_path(@conference.short_title, event), class: 'btn btn-xs btn-default'
|
||||
|
||||
%td.text-center{'data-order' => "#{event.is_highlight}"}
|
||||
= check_box_tag @conference.short_title, event.id, event.is_highlight,
|
||||
|
|
|
|||
46
app/views/admin/events_registrations/show.html.haml
Normal file
46
app/views/admin/events_registrations/show.html.haml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
.unobtrusive-flash-container
|
||||
.container
|
||||
.row
|
||||
.col-md-10
|
||||
.page-header
|
||||
%h1
|
||||
Registrations (#{@event.registrations.length}/#{@event.max_attendees})
|
||||
.text-muted
|
||||
for
|
||||
= @event.title
|
||||
|
||||
.well
|
||||
%table.table.table-hover.table-borderd.table-striped.datatable#registrations
|
||||
%thead
|
||||
%th
|
||||
%th Registered
|
||||
%th Name
|
||||
%th Email
|
||||
%th Created At
|
||||
%th Attended
|
||||
%th Attended Conference
|
||||
%tbody
|
||||
- @event.registrations.each.with_index(1) do |registration, index|
|
||||
- event_registration = EventsRegistration.find_by(event_id: @event.id, registration_id: registration.id)
|
||||
%tr
|
||||
%td= index
|
||||
%td
|
||||
= check_box_tag "toggle-#{@conference.short_title}", registration.id, registration.events.include?(@event), method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{@event.id}/registrations/toggle?events_registrations[event_id]=#{@event.id}&&events_registrations[registration_id]=#{registration.id}&®istration_id=#{registration.id}&&state=", class: 'switch-checkbox', data: { size: 'small', off_color: 'warning', on_text: 'Yes', off_text: 'No' }
|
||||
|
||||
%td= event_registration.name
|
||||
%td= event_registration.email
|
||||
%td= event_registration.created_at
|
||||
%td
|
||||
//We don't send the ID of the events_registration in the url of the switch-checkbox because
|
||||
//the ID might have changed through the above switch-checkbox (which destroys or creates an events_registration).
|
||||
//In that case the ID here would be invalid, before we would reload the page (to grab the new ID)
|
||||
= check_box_tag "toggle_attendance-#{@conference.short_title}", @event.id, event_registration.attended, class: 'switch-checkbox', method: :patch, url: "/admin/conference/#{@conference.short_title}/program/events/#{@event.id}/registrations/toggle_attendance?registration_id=#{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-times.text-danger
|
||||
1
app/views/admin/events_registrations/toggle.js.erb
Normal file
1
app/views/admin/events_registrations/toggle.js.erb
Normal file
|
|
@ -0,0 +1 @@
|
|||
$('.unobtrusive-flash-container').html('');
|
||||
|
|
@ -0,0 +1 @@
|
|||
$('.unobtrusive-flash-container').html('');
|
||||
Loading…
Add table
Add a link
Reference in a new issue