diff options
| author | Michel Etienne | 2014-11-05 11:51:10 +0100 |
|---|---|---|
| committer | Michel Etienne | 2014-11-05 11:51:10 +0100 |
| commit | 0906ff71269c2bcec1a6445a6fb53900be66be9b (patch) | |
| tree | 873ecea902e1ace619ce872ba90f2c876e3251d4 /config | |
| parent | c828656898b1bc728e6fa89c4d527fd009dc7777 (diff) | |
| parent | 2b86d2428d5da8be4499fc1fec2976f6c70fa34e (diff) | |
| download | chouette-core-0906ff71269c2bcec1a6445a6fb53900be66be9b.tar.bz2 | |
Merge branch 'sismo' into gtfs_v2
Diffstat (limited to 'config')
| -rw-r--r-- | config/environments/development.rb | 14 | ||||
| -rw-r--r-- | config/environments/production.rb | 18 | ||||
| -rw-r--r-- | config/initializers/devise.rb | 22 | ||||
| -rw-r--r-- | config/locales/companies.yml | 4 | ||||
| -rw-r--r-- | config/locales/devise.en.yml | 1 | ||||
| -rw-r--r-- | config/locales/devise.fr.yml | 1 | ||||
| -rw-r--r-- | config/locales/exports.yml | 4 | ||||
| -rw-r--r-- | config/routes.rb | 27 |
8 files changed, 55 insertions, 36 deletions
diff --git a/config/environments/development.rb b/config/environments/development.rb index d3ea21f5f..0d33ac03c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -47,10 +47,18 @@ ChouetteIhm::Application.configure do # api key to geoportail IGN (production key link to application url root referer) #config.geoportail_api_key = "aaaaaaaaaaaaaa" - # Specific for each company - config.company_name = "afimb" - config.company_theme = "#61970b" + # Specific theme for each company + # AFIMB + config.company_name = "afimb" + config.company_theme = "#61970b" # AFIMB color config.company_contact = "http://www.chouette.mobi/contact-support/" + config.accept_user_creation = true + + # CITYWAY + # config.company_name = "cityway" + # config.company_theme = "#32adb0" + # config.company_contact = "http://www.cityway.fr/contact/?rub_code=14" + # config.accept_user_creation = false # file to data for demo config.demo_data = "tmp/demo.zip" diff --git a/config/environments/production.rb b/config/environments/production.rb index 6494b4c60..de408f29f 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -126,16 +126,22 @@ ChouetteIhm::Application.configure do end # api key to geoportail IGN (production key link to application url root referer) - if ENV['CHOUETTE_GEOPORTAIL_KEY'].nil? - config.geoportail_api_key = "aaaaaaaaaaaaaa" - else + if !ENV['CHOUETTE_GEOPORTAIL_KEY'].nil? config.geoportail_api_key = ENV['CHOUETTE_GEOPORTAIL_KEY'] end - # Specific for each company - config.company_name = "afimb" - config.company_theme = "#61970b" + # Specific theme for each company + # AFIMB + config.company_name = "afimb" + config.company_theme = "#61970b" # AFIMB color config.company_contact = "http://www.chouette.mobi/contact-support/" + config.accept_user_creation = true + + # CITYWAY + # config.company_name = "cityway" + # config.company_theme = "#32adb0" + # config.company_contact = "http://www.cityway.fr/contact/?rub_code=14" + # config.accept_user_creation = false # file to data for demo config.demo_data = ENV['CHOUETTE_DEMO_DATA'].nil? ? "/path/to/demo.zip" : ENV['CHOUETTE_DEMO_DATA'] diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index ef5c89fbf..4aa6ef80d 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -242,25 +242,3 @@ Devise.setup do |config| # manager.default_strategies(:scope => :user).unshift :some_external_strategy # end end - -# class Devise::FailureApp -# def return_to_root_path? -# root_path == session["#{scope}_return_to"] -# end -# def redirect -# store_location! -# if flash[:timedout] && flash[:alert] -# flash.keep(:timedout) -# flash.keep(:alert) -# else -# Rails.logger.debug "A" * 30 -# Rails.logger.debug i18n_message -# Rails.logger.debug redirect_url -# Rails.logger.debug scope -# Rails.logger.debug root_path -# Rails.logger.debug session["#{scope}_return_to"] -# flash[:alert] = i18n_message unless return_to_root_path? -# end -# redirect_to redirect_url -# end -# end diff --git a/config/locales/companies.yml b/config/locales/companies.yml index 09b010cc9..aad451fc8 100644 --- a/config/locales/companies.yml +++ b/config/locales/companies.yml @@ -28,7 +28,7 @@ en: short_name: "Short name" organizational_unit: "Unit" operating_department_name: "Department" - code: "Postcode" + code: "Code" phone: "Phone number" fax: "Fax number" email: "Email" @@ -72,7 +72,7 @@ fr: short_name: "Nom court" organizational_unit: "Nom d'unité dans la société" operating_department_name: "Nom du département dans la société" - code: "Code postal" + code: "Code" phone: "Numéro de téléphone" fax: "Numéro de fax" email: "Email" diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml index 4fb3980f1..0a42a021d 100644 --- a/config/locales/devise.en.yml +++ b/config/locales/devise.en.yml @@ -36,6 +36,7 @@ en: helpers: label: user: + organisation_name: "Organisation name" name: Full name password: Password password_confirmation: Password confirmation diff --git a/config/locales/devise.fr.yml b/config/locales/devise.fr.yml index b1a9a743a..d3a60d9a0 100644 --- a/config/locales/devise.fr.yml +++ b/config/locales/devise.fr.yml @@ -40,6 +40,7 @@ fr: helpers: label: user: + organisation_name: "Nom de l'organisation" name: Nom complet password: Mot de passe password_confirmation: Confirmation du mot de passe diff --git a/config/locales/exports.yml b/config/locales/exports.yml index 041bde2c8..7b1531314 100644 --- a/config/locales/exports.yml +++ b/config/locales/exports.yml @@ -33,6 +33,8 @@ en: overflow: "Can't export more than %{count} %{data} in a single KML export operation. You should proceed with some exports, each one based on less selected lines." LINE_COUNT: "Exported line count : %{0}" GROUP_OF_LINES_COUNT: "Exported group of lines count : %{0}" + COMMUNE_COUNT: "City count : %{0}" + TRANSPORT_MODE_COUNT: "Transport Mode count : %{0}" ROUTE_COUNT: "Route count : %{0}" JOURNEY_PATTERN_COUNT: "Journey pattern count : %{0}" QUAY_AND_BOARDING_POSITION_COUNT: "Quays and Boarding positions count : %{0}" @@ -154,6 +156,8 @@ fr: overflow: "Impossible d'exporter plus de %{count} %{data} en un seul export. Veuillez procéder par exports successifs en sélectionnant une moindre quantité de lignes." LINE_COUNT: "Nombre de lignes exportées : %{0}" GROUP_OF_LINES_COUNT: "Nombre de groupe de lignes exportés : %{0}" + COMMUNE_COUNT: "Nombre de communes : %{0}" + TRANSPORT_MODE_COUNT: "Nombre de modes de transport : %{0}" ROUTE_COUNT: "Nombre de séquences d'arrêts exportées : %{0}" QUAY_AND_BOARDING_POSITION_COUNT: "Nombre d'arrêts physiques exportés : %{0}" COMMERCIAL_COUNT: "Nombre d'arrêts commerciaux exportés : %{0}" diff --git a/config/routes.rb b/config/routes.rb index 827ee97a1..f629a963f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,9 +1,31 @@ ChouetteIhm::Application.routes.draw do devise_scope :users do - match "/users/sign_up" => "subscriptions#new" + #match "/users/sign_up" => "subscriptions#new", end - devise_for :users + devise_for :users, :controllers => { :registrations => "registrations" } + + devise_scope :user do + authenticated :user do + root :to => 'referentials#index' + end + + unauthenticated do + root :to => 'devise/sessions#new' + end + end + + # Rails 4 syntax + # devise_for :users + # devise_scope :user do + # authenticated :user do + # root :to => 'referentials#index', as: :authenticated_root + # end + # unauthenticated :user do + # root :to => 'devise/registrations#new', as: :unauthenticated_root + # end + # end + namespace :api do namespace :v1 do @@ -188,5 +210,4 @@ ChouetteIhm::Application.routes.draw do match '/422', :to => 'errors#server_error' match '/500', :to => 'errors#server_error' - root :to => 'referentials#index' end |
