Moved to GMail and fixed administration errors
This commit is contained in:
parent
8b9a11575c
commit
888f186a34
13
Gemfile
13
Gemfile
@ -5,6 +5,9 @@ gem 'pg'
|
|||||||
gem 'rake', '11.1.2'
|
gem 'rake', '11.1.2'
|
||||||
gem 'ruby_dep', '1.3.1' # Lock at 1.3.1 since 1.4 requires ruby 2.5. We should unlock once we upgrade the ruby version on our server
|
gem 'ruby_dep', '1.3.1' # Lock at 1.3.1 since 1.4 requires ruby 2.5. We should unlock once we upgrade the ruby version on our server
|
||||||
|
|
||||||
|
# gem 'bcrypt-ruby', '3.0.0', require: 'bcrypt'
|
||||||
|
# gem 'bcrypt', '3.1.9'
|
||||||
|
# gem 'bcrypt', require: :ruby
|
||||||
gem 'rack-mini-profiler'
|
gem 'rack-mini-profiler'
|
||||||
|
|
||||||
gem 'haml'
|
gem 'haml'
|
||||||
@ -85,14 +88,14 @@ group :test do
|
|||||||
gem 'mocha'
|
gem 'mocha'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :staging, :production, :preview do
|
|
||||||
gem 'rails_12factor'
|
|
||||||
end
|
|
||||||
|
|
||||||
group :production, :preview do
|
group :production, :preview do
|
||||||
gem 'unicorn'
|
gem 'rails_12factor'
|
||||||
gem 'daemon-spawn'
|
gem 'daemon-spawn'
|
||||||
gem 'daemons'
|
gem 'daemons'
|
||||||
|
|
||||||
|
platforms :ruby do
|
||||||
|
gem 'unicorn'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
platforms 'mswin', 'mingw' do
|
platforms 'mswin', 'mingw' do
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
"chrome": ["51"]
|
"chrome": ["51"]
|
||||||
},
|
},
|
||||||
"development": {
|
"development": {
|
||||||
"and_chr": ["55"],
|
"and_chr": ["56"],
|
||||||
"chrome": ["55"],
|
"chrome": ["56"],
|
||||||
"edge": ["13"],
|
"edge": ["13"],
|
||||||
"firefox": ["50"],
|
"firefox": ["50"],
|
||||||
"ie": ["11"],
|
"ie": ["11"],
|
||||||
|
@ -78,13 +78,17 @@ class ApplicationController < LinguaFrancaApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def home
|
def home
|
||||||
@workshops = Workshop.where(:conference_id => @conference.id)
|
@workshops = []
|
||||||
|
|
||||||
|
if @conference.present?
|
||||||
|
@workshops = Workshop.where(conference_id: @conference.id)
|
||||||
|
|
||||||
if @conference.workshop_schedule_published
|
if @conference.workshop_schedule_published
|
||||||
@event_dlg = true
|
@event_dlg = true
|
||||||
get_scheule_data(false)
|
get_scheule_data(false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def policy
|
def policy
|
||||||
@is_policy_page = true
|
@is_policy_page = true
|
||||||
|
@ -62,7 +62,10 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
set_flash_messages
|
set_flash_messages
|
||||||
|
|
||||||
# redirect to the step unless the method handled redirection itself
|
# redirect to the step unless the method handled redirection itself
|
||||||
unless self.send(method_name)
|
case self.send(method_name)
|
||||||
|
when true
|
||||||
|
administration_step(@admin_step)
|
||||||
|
when false
|
||||||
redirect_to administration_step_path(@this_conference.slug, @admin_step)
|
redirect_to administration_step_path(@this_conference.slug, @admin_step)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -100,6 +103,9 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def administrate_broadcast
|
def administrate_broadcast
|
||||||
|
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
|
||||||
|
@warning_message = :no_date_warning
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def administrate_broadcast_sent
|
def administrate_broadcast_sent
|
||||||
@ -120,6 +126,9 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def administrate_registration_status
|
def administrate_registration_status
|
||||||
|
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
|
||||||
|
@warning_message = :no_date_warning
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def administrate_organizations
|
def administrate_organizations
|
||||||
@ -165,6 +174,11 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def administrate_registrations
|
def administrate_registrations
|
||||||
|
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
|
||||||
|
@warning_message = :no_date_warning
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
get_stats(!request.format.xlsx?)
|
get_stats(!request.format.xlsx?)
|
||||||
|
|
||||||
if request.format.xlsx?
|
if request.format.xlsx?
|
||||||
@ -200,6 +214,11 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def administrate_stats
|
def administrate_stats
|
||||||
|
if @this_conference.start_date.blank? || @this_conference.end_date.blank?
|
||||||
|
@warning_message = :no_date_warning
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
get_stats(!request.format.xlsx?)
|
get_stats(!request.format.xlsx?)
|
||||||
|
|
||||||
if request.format.xlsx?
|
if request.format.xlsx?
|
||||||
@ -736,7 +755,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
do_404
|
do_404
|
||||||
return true
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
@ -945,7 +964,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
do_404
|
do_404
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_housing
|
def admin_update_housing
|
||||||
@ -985,7 +1004,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
do_404
|
do_404
|
||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_broadcast
|
def admin_update_broadcast
|
||||||
@ -1007,7 +1026,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to administration_step_path(@this_conference.slug, :broadcast_sent)
|
redirect_to administration_step_path(@this_conference.slug, :broadcast_sent)
|
||||||
return true
|
return nil
|
||||||
elsif params[:button] == 'preview'
|
elsif params[:button] == 'preview'
|
||||||
@send_to_count = view_context.broadcast_to(@send_to).size
|
@send_to_count = view_context.broadcast_to(@send_to).size
|
||||||
@broadcast_step = :preview
|
@broadcast_step = :preview
|
||||||
@ -1024,7 +1043,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
@send_to_count = view_context.broadcast_to(@send_to).size
|
@send_to_count = view_context.broadcast_to(@send_to).size
|
||||||
end
|
end
|
||||||
return false
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_locations
|
def admin_update_locations
|
||||||
@ -1087,14 +1106,14 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
do_404
|
do_404
|
||||||
return true
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_events
|
def admin_update_events
|
||||||
case params[:button]
|
case params[:button]
|
||||||
when 'edit'
|
when 'edit'
|
||||||
redirect_to edit_event_path(@this_conference.slug, params[:id])
|
redirect_to edit_event_path(@this_conference.slug, params[:id])
|
||||||
return true
|
return nil
|
||||||
when 'save'
|
when 'save'
|
||||||
if params[:id].present?
|
if params[:id].present?
|
||||||
event = Event.find_by!(conference_id: @this_conference.id, id: params[:id])
|
event = Event.find_by!(conference_id: @this_conference.id, id: params[:id])
|
||||||
@ -1124,7 +1143,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
do_404
|
do_404
|
||||||
return true
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_workshop_times
|
def admin_update_workshop_times
|
||||||
@ -1141,7 +1160,7 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
do_404
|
do_404
|
||||||
return true
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_schedule
|
def admin_update_schedule
|
||||||
@ -1155,7 +1174,6 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
@entire_page = false
|
@entire_page = false
|
||||||
get_scheule_data
|
get_scheule_data
|
||||||
render partial: 'schedule'
|
render partial: 'schedule'
|
||||||
return true
|
|
||||||
when 'get-workshop-list'
|
when 'get-workshop-list'
|
||||||
get_scheule_data(true)
|
get_scheule_data(true)
|
||||||
|
|
||||||
@ -1171,7 +1189,6 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
end
|
end
|
||||||
|
|
||||||
render partial: 'select_workshop_table'
|
render partial: 'select_workshop_table'
|
||||||
return true
|
|
||||||
when 'set-workshop'
|
when 'set-workshop'
|
||||||
workshop = Workshop.find_by!(conference_id: @this_conference.id, id: params[:workshop].to_i)
|
workshop = Workshop.find_by!(conference_id: @this_conference.id, id: params[:workshop].to_i)
|
||||||
workshop.event_location_id = params[:location]
|
workshop.event_location_id = params[:location]
|
||||||
@ -1183,11 +1200,11 @@ class ConferenceAdministrationController < ApplicationController
|
|||||||
get_scheule_data
|
get_scheule_data
|
||||||
|
|
||||||
render partial: 'schedule'
|
render partial: 'schedule'
|
||||||
return true
|
else
|
||||||
|
do_404
|
||||||
end
|
end
|
||||||
|
|
||||||
do_404
|
return nil
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin_update_schedule
|
def admin_update_schedule
|
||||||
|
@ -991,7 +991,8 @@ module ApplicationHelper
|
|||||||
def administration_sub_steps
|
def administration_sub_steps
|
||||||
{
|
{
|
||||||
location_edit: :locations,
|
location_edit: :locations,
|
||||||
event_edit: :events
|
event_edit: :events,
|
||||||
|
broadcast_sent: :broadcast
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -11,8 +11,7 @@ class EventLocation < ActiveRecord::Base
|
|||||||
after_validation :geocode, if: ->(obj){ obj.address_changed? }
|
after_validation :geocode, if: ->(obj){ obj.address_changed? }
|
||||||
|
|
||||||
def full_address
|
def full_address
|
||||||
l = conference.location
|
[address, conference.city.city, conference.city.territory, conference.city.country].join(', ')
|
||||||
[address, l.city, l.territory, l.country].join(', ')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.all_spaces
|
def self.all_spaces
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
- content_for :og_image do
|
- content_for :og_image do
|
||||||
= @conference.poster.full.url || image_path('default_poster.jpg')
|
= (@conference.present? ? @conference.poster.full.url : nil) || image_path('default_poster.jpg')
|
||||||
- if @conferences
|
- if @conferences.present?
|
||||||
- @conferences.each do | conference |
|
- @conferences.each do | conference |
|
||||||
= render 'conferences/conference', conference: conference, links: [ :read_more, :register ]
|
= render 'conferences/conference', conference: conference, links: [ :read_more, :register ]
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
= columns(medium: 12) do
|
- if @warning_message
|
||||||
|
= columns(medium: 12) do
|
||||||
|
.warning-info=_"articles.admin.registrations.#{@warning_message}"
|
||||||
|
- else
|
||||||
|
= columns(medium: 12) do
|
||||||
= admin_update_form do
|
= admin_update_form do
|
||||||
- if @broadcast_step == :preview || @broadcast_step == :test
|
- if @broadcast_step == :preview || @broadcast_step == :test
|
||||||
= hidden_field_tag :subject, @subject
|
= hidden_field_tag :subject, @subject
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
= columns(medium: 12) do
|
- if @warning_message
|
||||||
|
= columns(medium: 12) do
|
||||||
|
.warning-info=_"articles.admin.registrations.#{@warning_message}"
|
||||||
|
- else
|
||||||
|
= columns(medium: 12) do
|
||||||
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
= form_tag administration_update_path(@this_conference.slug, @admin_step) do
|
||||||
= selectfield :registration_status, @this_conference.registration_status || 'closed', registration_status_options_list, inline_label: true
|
= selectfield :registration_status, @this_conference.registration_status || 'closed', registration_status_options_list, inline_label: true
|
||||||
.actions.left
|
.actions.left
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
- add_inline_script :registrations
|
- if @warning_message
|
||||||
= columns(medium: 12) do
|
= columns(medium: 12) do
|
||||||
|
.warning-info=_"articles.admin.registrations.#{@warning_message}"
|
||||||
|
- else
|
||||||
|
- add_inline_script :registrations
|
||||||
|
= columns(medium: 12) do
|
||||||
.goes-fullscreen#registrations-table
|
.goes-fullscreen#registrations-table
|
||||||
.flex-column
|
.flex-column
|
||||||
= searchfield :search, nil, big: true, stretch: true
|
= searchfield :search, nil, big: true, stretch: true
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
= columns(medium: 12) do
|
- if @warning_message
|
||||||
|
= columns(medium: 12) do
|
||||||
|
.warning-info=_"articles.admin.registrations.#{@warning_message}"
|
||||||
|
- else
|
||||||
|
= columns(medium: 12) do
|
||||||
.details
|
.details
|
||||||
= data_set(:h3, 'articles.admin.stats.headings.completed_registrations') do
|
= data_set(:h3, 'articles.admin.stats.headings.completed_registrations') do
|
||||||
= (@completed_registrations || 0).to_s
|
= (@completed_registrations || 0).to_s
|
||||||
|
@ -35,4 +35,4 @@
|
|||||||
= columns(medium: 12) do
|
= columns(medium: 12) do
|
||||||
%p=((_"articles.admin.#{@admin_group}.descriptions.#{@admin_step}", :s)) unless @hide_description === true
|
%p=((_"articles.admin.#{@admin_group}.descriptions.#{@admin_step}", :s)) unless @hide_description === true
|
||||||
= row do
|
= row do
|
||||||
= render @admin_step
|
= render @admin_step.to_s
|
||||||
|
@ -87,14 +87,13 @@ BikeBike::Application.configure do
|
|||||||
|
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
:address => 'mail.bikebike.org',
|
:address => 'smtp.gmail.com',
|
||||||
:domain => 'preview.bikebike.org',
|
:domain => 'localhost:3000',
|
||||||
:port => 587,
|
:port => 587,
|
||||||
:authentication => :plain,
|
:authentication => :plain,
|
||||||
:enable_starttls_auto => true,
|
:enable_starttls_auto => true,
|
||||||
:openssl_verify_mode => 'none',
|
:user_name => ENV['MAILER_USER'],
|
||||||
:user_name => 'info@preview.bikebike.org',
|
:password => ENV['MAILER_PASSWORD']
|
||||||
:password => 'test'
|
|
||||||
}
|
}
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.action_mailer.raise_delivery_errors = true
|
||||||
config.action_mailer.perform_deliveries = true
|
config.action_mailer.perform_deliveries = true
|
||||||
|
@ -88,14 +88,13 @@ BikeBike::Application.configure do
|
|||||||
|
|
||||||
config.action_mailer.delivery_method = :smtp
|
config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
:address => 'mail.bikebike.org',
|
:address => 'smtp.gmail.com',
|
||||||
:domain => 'preview.bikebike.org',
|
:domain => 'localhost:3000',
|
||||||
:port => 587,
|
:port => 587,
|
||||||
:authentication => :plain,
|
:authentication => :plain,
|
||||||
:enable_starttls_auto => true,
|
:enable_starttls_auto => true,
|
||||||
:openssl_verify_mode => 'none',
|
:user_name => ENV['MAILER_USER'],
|
||||||
:user_name => 'info@preview.bikebike.org',
|
:password => ENV['MAILER_PASSWORD']
|
||||||
:password => 'test'
|
|
||||||
}
|
}
|
||||||
config.action_mailer.raise_delivery_errors = true
|
config.action_mailer.raise_delivery_errors = true
|
||||||
config.action_mailer.perform_deliveries = true
|
config.action_mailer.perform_deliveries = true
|
||||||
|
@ -961,6 +961,8 @@ en:
|
|||||||
completed_registrations: Number of registrations
|
completed_registrations: Number of registrations
|
||||||
incomplete_registrations: Incomplete registrations
|
incomplete_registrations: Incomplete registrations
|
||||||
Registrations: Registrations
|
Registrations: Registrations
|
||||||
|
registrations:
|
||||||
|
no_date_warning: Before users can register, you must first set your conference start and end dates.
|
||||||
meals:
|
meals:
|
||||||
description: On this page you can schedule the meals that you will be serving.
|
description: On this page you can schedule the meals that you will be serving.
|
||||||
no_locations_warning: Before you can add meals, you must first add locations.
|
no_locations_warning: Before you can add meals, you must first add locations.
|
||||||
@ -1054,12 +1056,14 @@ en:
|
|||||||
stats: Statistics
|
stats: Statistics
|
||||||
registrations: Modify Registrations
|
registrations: Modify Registrations
|
||||||
broadcast: Contact Users
|
broadcast: Contact Users
|
||||||
|
broadcast_sent: You email has been dispatched
|
||||||
description: Open or close registration, view registration statistics, modify information subbmitted by registratnts and contact users.
|
description: Open or close registration, view registration statistics, modify information subbmitted by registratnts and contact users.
|
||||||
descriptions:
|
descriptions:
|
||||||
registration_status: Open or close registration to your conference.
|
registration_status: Open or close registration to your conference.
|
||||||
stats: View a breakdown of statictics, how many users have registered, how much money have been collected, etc.
|
stats: View a breakdown of statictics, how many users have registered, how much money have been collected, etc.
|
||||||
registrations: View and edit all data collected through the registration process.
|
registrations: View and edit all data collected through the registration process.
|
||||||
broadcast: Send emails to targeted subsets of users.
|
broadcast: Send emails to targeted subsets of users.
|
||||||
|
broadcast_sent: Your email has been queued to send, depending on the number of users you have sent to, it may take several hours to send to everyone.
|
||||||
broadcast:
|
broadcast:
|
||||||
heading: Broadcast
|
heading: Broadcast
|
||||||
description: The broadcast tool is used to contact users through email. You can send messages en masse to select groups of users.
|
description: The broadcast tool is used to contact users through email. You can send messages en masse to select groups of users.
|
||||||
|
@ -16,15 +16,6 @@ ActiveRecord::Schema.define(version: 20170111172147) do
|
|||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
create_table "applications", force: :cascade do |t|
|
|
||||||
t.string "slug"
|
|
||||||
t.string "name"
|
|
||||||
t.string "path"
|
|
||||||
t.string "url"
|
|
||||||
t.datetime "created_at", null: false
|
|
||||||
t.datetime "updated_at", null: false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "authentications", force: :cascade do |t|
|
create_table "authentications", force: :cascade do |t|
|
||||||
t.integer "user_id", null: false
|
t.integer "user_id", null: false
|
||||||
t.string "provider", null: false
|
t.string "provider", null: false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user