Browse Source

Adds the changes from bikebike/bikebike for tracked files that weren't committed to git.

Former-commit-id: 23acad3a6d
master
Jonathan Rosenbaum 3 years ago
parent
commit
8029661917
  1. 31
      app/controllers/application_controller.rb
  2. 2
      app/mailers/user_mailer.rb
  3. 2
      app/views/layouts/application.html.haml
  4. 6
      config/locales/es.yml
  5. 158
      db/schema.rb

31
app/controllers/application_controller.rb

@ -232,20 +232,23 @@ class ApplicationController < BaseController
request_info['env'][key.to_s] = value.to_s request_info['env'][key.to_s] = value.to_s
end end
send_delayed_mail(:contact, if !(params[:subject] =~ /^\s*[a-z]{10}\s*$/i)
current_user || params[:email],
params[:subject], send_delayed_mail(:contact,
params[:message], current_user || params[:email],
email_list params[:subject],
) params[:message],
email_list
send_delayed_mail(:contact_details, )
current_user || params[:email],
params[:subject], send_delayed_mail(:contact_details,
params[:message], current_user || params[:email],
request_info, params[:subject],
params params[:message],
) request_info,
params
)
end
redirect_to contact_sent_path redirect_to contact_sent_path
end end

2
app/mailers/user_mailer.rb

@ -149,6 +149,7 @@ class UserMailer < ActionMailer::Base
end end
def contact(from, subject, message, email_list) def contact(from, subject, message, email_list)
return if subject =~ /^[a-z]{10}$/
@message = message @message = message
@from = from.is_a?(Integer) ? User.find(from) : from @from = from.is_a?(Integer) ? User.find(from) : from
@ -156,6 +157,7 @@ class UserMailer < ActionMailer::Base
end end
def contact_details(from, subject, message, request, params) def contact_details(from, subject, message, request, params)
return if subject =~ /^[a-z]{10}$/
@message = message @message = message
@from = from.is_a?(Integer) ? User.find(from) : from @from = from.is_a?(Integer) ? User.find(from) : from
@request = request @request = request

2
app/views/layouts/application.html.haml

@ -10,7 +10,7 @@
= stylesheets = stylesheets
%link{ href: asset_path(@favicon), rel: 'shortcut icon', type: 'image/x-icon' } %link{ href: asset_path(@favicon), rel: 'shortcut icon', type: 'image/x-icon' }
%link{ href: asset_path(@favicon), rel: 'icon', type: 'image/x-icon' } %link{ href: asset_path(@favicon), rel: 'icon', type: 'image/x-icon' }
- @alt_lang_urls.each do |locale, url| - (@alt_lang_urls || []).each do |locale, url|
%link{ rel: :alternate, hreflang: locale, href: url } %link{ rel: :alternate, hreflang: locale, href: url }
%link{ href: canonical_url, rel: :canonical } %link{ href: canonical_url, rel: :canonical }
- if content_for?(:og_image) - if content_for?(:og_image)

6
config/locales/es.yml

@ -1346,7 +1346,7 @@ es:
can_provide_housing: "¿Puedes proporcionar hospedaje a quienes visitan la can_provide_housing: "¿Puedes proporcionar hospedaje a quienes visitan la
ciudad?" ciudad?"
Verify_Account: Verifica tu cuenta Verify_Account: Verifica tu cuenta
policy: Normatividad policy: Normas
Contact_Info: Información de contacto Contact_Info: Información de contacto
contact_info: Información de contacto contact_info: Información de contacto
Administration: Administrar cuenta Administration: Administrar cuenta
@ -1733,7 +1733,7 @@ es:
org_select: Organización org_select: Organización
payment_form: Cantidad a pagar por registro payment_form: Cantidad a pagar por registro
payment_type: Método de pago para el registro payment_type: Método de pago para el registro
policy: Normatividad policy: Normas
housing_bike: Necesitas bici? housing_bike: Necesitas bici?
warning: warning:
companion_unregistered: Tu acompañante no se ha registrado. Por favor aseguráte companion_unregistered: Tu acompañante no se ha registrado. Por favor aseguráte
@ -2059,7 +2059,7 @@ es:
Locale_Not_Available: Locale no disponible Locale_Not_Available: Locale no disponible
'500': '500':
An_Error_Occurred: Ocurrió un error An_Error_Occurred: Ocurrió un error
Policy: Normatividad Policy: Normas
About: Acerca de About: Acerca de
Register: Regístrate Register: Regístrate
Pre_Register: Pre-Regístrate Pre_Register: Pre-Regístrate

158
db/schema.rb

@ -27,9 +27,9 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end 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", limit: 255, null: false
t.string "uid", null: false t.string "uid", limit: 255, null: false
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
@ -103,18 +103,18 @@ ActiveRecord::Schema.define(version: 20170817000540) do
create_table "conference_registrations", force: :cascade do |t| create_table "conference_registrations", force: :cascade do |t|
t.integer "conference_id" t.integer "conference_id"
t.integer "user_id" t.integer "user_id"
t.string "is_attending" t.string "is_attending", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.boolean "is_confirmed" t.boolean "is_confirmed"
t.boolean "is_participant" t.boolean "is_participant"
t.boolean "is_volunteer" t.boolean "is_volunteer"
t.string "confirmation_token" t.string "confirmation_token", limit: 255
t.string "email" t.string "email", limit: 255
t.boolean "complete" t.boolean "complete"
t.boolean "completed" t.boolean "completed"
t.string "payment_confirmation_token" t.string "payment_confirmation_token", limit: 255
t.string "payment_info" t.string "payment_info", limit: 255
t.integer "registration_fees_paid" t.integer "registration_fees_paid"
t.string "city" t.string "city"
t.datetime "arrival" t.datetime "arrival"
@ -135,21 +135,21 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "conference_types", force: :cascade do |t| create_table "conference_types", force: :cascade do |t|
t.string "title" t.string "title", limit: 255
t.string "info" t.string "info", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "slug" t.string "slug", limit: 255
end end
create_table "conferences", force: :cascade do |t| create_table "conferences", force: :cascade do |t|
t.string "title" t.string "title", limit: 255
t.string "slug" t.string "slug", limit: 255
t.date "start_date" t.date "start_date"
t.date "end_date" t.date "end_date"
t.text "info" t.text "info"
t.string "poster" t.string "poster", limit: 255
t.string "cover" t.string "cover", limit: 255
t.boolean "workshop_schedule_published" t.boolean "workshop_schedule_published"
t.boolean "registration_open" t.boolean "registration_open"
t.boolean "meals_provided" t.boolean "meals_provided"
@ -162,8 +162,8 @@ ActiveRecord::Schema.define(version: 20170817000540) do
t.text "registration_info" t.text "registration_info"
t.text "postregistration_info" t.text "postregistration_info"
t.integer "cover_attribution_id" t.integer "cover_attribution_id"
t.string "cover_attribution_name" t.string "cover_attribution_name", limit: 255
t.string "cover_attribution_src" t.string "cover_attribution_src", limit: 255
t.integer "cover_attribution_user_id" t.integer "cover_attribution_user_id"
t.string "locale" t.string "locale"
t.string "email_address" t.string "email_address"
@ -241,15 +241,15 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "event_types", force: :cascade do |t| create_table "event_types", force: :cascade do |t|
t.string "slug" t.string "slug", limit: 255
t.text "info" t.text "info"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "events", force: :cascade do |t| create_table "events", force: :cascade do |t|
t.string "title" t.string "title", limit: 255
t.string "slug" t.string "slug", limit: 255
t.integer "event_type_id" t.integer "event_type_id"
t.integer "conference_id" t.integer "conference_id"
t.text "info" t.text "info"
@ -272,16 +272,16 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "locations", force: :cascade do |t| create_table "locations", force: :cascade do |t|
t.string "title" t.string "title", limit: 255
t.float "latitude" t.float "latitude"
t.float "longitude" t.float "longitude"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "country" t.string "country", limit: 255
t.string "territory" t.string "territory", limit: 255
t.string "city" t.string "city", limit: 255
t.string "street" t.string "street", limit: 255
t.string "postal_code" t.string "postal_code", limit: 255
t.integer "city_id" t.integer "city_id"
end end
@ -295,33 +295,33 @@ ActiveRecord::Schema.define(version: 20170817000540) do
add_index "locations_organizations", ["organization_id", "location_id"], name: "loc_org_index", using: :btree add_index "locations_organizations", ["organization_id", "location_id"], name: "loc_org_index", using: :btree
create_table "organization_statuses", force: :cascade do |t| create_table "organization_statuses", force: :cascade do |t|
t.string "name" t.string "name", limit: 255
t.string "slug" t.string "slug", limit: 255
t.string "info" t.string "info", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "organizations", force: :cascade do |t| create_table "organizations", force: :cascade do |t|
t.string "name" t.string "name", limit: 255
t.string "slug" t.string "slug", limit: 255
t.string "email_address" t.string "email_address", limit: 255
t.string "url" t.string "url", limit: 255
t.integer "year_founded" t.integer "year_founded"
t.text "info" t.text "info"
t.string "logo" t.string "logo", limit: 255
t.string "avatar" t.string "avatar", limit: 255
t.boolean "requires_approval" t.boolean "requires_approval"
t.string "secret_question" t.string "secret_question", limit: 255
t.string "secret_answer" t.string "secret_answer", limit: 255
t.integer "user_organization_replationship_id" t.integer "user_organization_replationship_id"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "cover" t.string "cover", limit: 255
t.integer "cover_attribution_id" t.integer "cover_attribution_id"
t.string "cover_attribution_name" t.string "cover_attribution_name", limit: 255
t.string "cover_attribution_src" t.string "cover_attribution_src", limit: 255
t.string "phone" t.string "phone", limit: 255
t.integer "organization_status_id" t.integer "organization_status_id"
t.integer "cover_attribution_user_id" t.integer "cover_attribution_user_id"
t.string "status" t.string "status"
@ -352,11 +352,11 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "registration_form_fields", force: :cascade do |t| create_table "registration_form_fields", force: :cascade do |t|
t.string "title" t.string "title", limit: 255
t.text "help" t.text "help"
t.boolean "required" t.boolean "required"
t.string "field_type" t.string "field_type", limit: 255
t.string "options" t.string "options", limit: 255
t.boolean "is_retired" t.boolean "is_retired"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
@ -383,7 +383,7 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "sessions", force: :cascade do |t| create_table "sessions", force: :cascade do |t|
t.string "session_id", null: false t.string "session_id", limit: 255, null: false
t.text "data" t.text "data"
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
@ -417,11 +417,11 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "translations", force: :cascade do |t| create_table "translations", force: :cascade do |t|
t.string "locale" t.string "locale", limit: 255
t.string "key" t.string "key", limit: 255
t.text "value" t.text "value"
t.text "interpolations" t.text "interpolations"
t.boolean "is_proc", default: false t.boolean "is_proc", default: false
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
@ -429,34 +429,34 @@ ActiveRecord::Schema.define(version: 20170817000540) do
create_table "user_organization_relationships", force: :cascade do |t| create_table "user_organization_relationships", force: :cascade do |t|
t.integer "user_id" t.integer "user_id"
t.integer "organization_id" t.integer "organization_id"
t.string "relationship" t.string "relationship", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "users", force: :cascade do |t| create_table "users", force: :cascade do |t|
t.string "username" t.string "username"
t.string "email" t.string "email", limit: 255
t.string "crypted_password" t.string "crypted_password", limit: 255
t.string "salt" t.string "salt", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "remember_me_token" t.string "remember_me_token", limit: 255
t.datetime "remember_me_token_expires_at" t.datetime "remember_me_token_expires_at"
t.string "reset_password_token" t.string "reset_password_token", limit: 255
t.datetime "reset_password_token_expires_at" t.datetime "reset_password_token_expires_at"
t.datetime "reset_password_email_sent_at" t.datetime "reset_password_email_sent_at"
t.string "activation_state" t.string "activation_state", limit: 255
t.string "activation_token" t.string "activation_token", limit: 255
t.datetime "activation_token_expires_at" t.datetime "activation_token_expires_at"
t.integer "failed_logins_count", default: 0 t.integer "failed_logins_count", default: 0
t.datetime "lock_expires_at" t.datetime "lock_expires_at"
t.string "unlock_token" t.string "unlock_token", limit: 255
t.string "avatar" t.string "avatar", limit: 255
t.text "about_me" t.text "about_me"
t.string "role" t.string "role", limit: 255
t.string "firstname" t.string "firstname", limit: 255
t.string "lastname" t.string "lastname", limit: 255
t.boolean "is_translator" t.boolean "is_translator"
t.json "languages" t.json "languages"
t.string "locale" t.string "locale"
@ -473,19 +473,19 @@ ActiveRecord::Schema.define(version: 20170817000540) do
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", using: :btree add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", using: :btree
create_table "versions", force: :cascade do |t| create_table "versions", force: :cascade do |t|
t.string "item_type" t.string "item_type", limit: 255
t.integer "item_id" t.integer "item_id"
t.string "event" t.string "event", limit: 255
t.string "whodunnit" t.string "whodunnit", limit: 255
t.text "object" t.text "object"
t.datetime "created_at" t.datetime "created_at"
t.string "value" t.string "value", limit: 255
end end
create_table "workshop_facilitators", force: :cascade do |t| create_table "workshop_facilitators", force: :cascade do |t|
t.integer "user_id" t.integer "user_id"
t.integer "workshop_id" t.integer "workshop_id"
t.string "role" t.string "role", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
@ -498,9 +498,9 @@ ActiveRecord::Schema.define(version: 20170817000540) do
end end
create_table "workshop_presentation_styles", force: :cascade do |t| create_table "workshop_presentation_styles", force: :cascade do |t|
t.string "name" t.string "name", limit: 255
t.string "slug" t.string "slug", limit: 255
t.string "info" t.string "info", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "order" t.integer "order"
@ -509,31 +509,31 @@ ActiveRecord::Schema.define(version: 20170817000540) do
create_table "workshop_requested_resources", force: :cascade do |t| create_table "workshop_requested_resources", force: :cascade do |t|
t.integer "workshop_id" t.integer "workshop_id"
t.integer "workshop_resource_id" t.integer "workshop_resource_id"
t.string "status" t.string "status", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "workshop_resources", force: :cascade do |t| create_table "workshop_resources", force: :cascade do |t|
t.string "name" t.string "name", limit: 255
t.string "slug" t.string "slug", limit: 255
t.string "info" t.string "info", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "workshop_streams", force: :cascade do |t| create_table "workshop_streams", force: :cascade do |t|
t.string "name" t.string "name", limit: 255
t.string "slug" t.string "slug", limit: 255
t.string "info" t.string "info", limit: 255
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.integer "order" t.integer "order"
end end
create_table "workshops", force: :cascade do |t| create_table "workshops", force: :cascade do |t|
t.string "title" t.string "title", limit: 255
t.string "slug" t.string "slug", limit: 255
t.text "info" t.text "info"
t.integer "conference_id" t.integer "conference_id"
t.integer "workshop_stream_id" t.integer "workshop_stream_id"

Loading…
Cancel
Save