diff options
| -rw-r--r-- | README.textile | 4 | ||||
| -rw-r--r-- | app/maps/application_map.rb | 6 | ||||
| -rw-r--r-- | app/views/organisations/edit.html.erb | 1 | ||||
| -rw-r--r-- | app/views/organisations/show.html.erb | 2 | ||||
| -rw-r--r-- | config/environments/development.rb | 3 | ||||
| -rw-r--r-- | config/environments/production.rb | 3 | ||||
| -rw-r--r-- | db/migrate/20130527074101_remove_geoportail_key_from_organisation.rb | 9 |
7 files changed, 21 insertions, 7 deletions
diff --git a/README.textile b/README.textile index 94a4d75c9..e0ade2d5e 100644 --- a/README.textile +++ b/README.textile @@ -34,6 +34,10 @@ The fact that you are presently reading this means that you have had knowledge o h2. Notes de version +h3. V2.1.a + +* Intégration des cartes du géoportail (IGN) + h3. V2.0.3 * Ajout des imports/export NeTex diff --git a/app/maps/application_map.rb b/app/maps/application_map.rb index e068a8950..d06a7e640 100644 --- a/app/maps/application_map.rb +++ b/app/maps/application_map.rb @@ -20,10 +20,8 @@ class ApplicationMap end def geoportail_key - if ( self.helpers && self.helpers.current_user && - self.helpers.current_user.organisation && - self.helpers.current_user.organisation.geoportail_key) - return self.helpers.current_user.organisation.geoportail_key + if ( ChouetteIhm::Application.config.respond_to? :geoportail_api_key) + return ChouetteIhm::Application.config.geoportail_api_key end return nil end diff --git a/app/views/organisations/edit.html.erb b/app/views/organisations/edit.html.erb index 0e55a1562..ef3cc1530 100644 --- a/app/views/organisations/edit.html.erb +++ b/app/views/organisations/edit.html.erb @@ -3,7 +3,6 @@ <%= semantic_form_for @organisation, :url => organisation_path do |form| %> <%= form.inputs do %> <%= form.input :name %> - <%= form.input :geoportail_key %> <% end %> <%= form.actions do %> diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 753efc2c3..263933bc1 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -2,8 +2,6 @@ <div class="summary"> <p> - <label><%= Organisation.human_attribute_name(:geoportail_key) %>: </label> - <%= @organisation.geoportail_key ? t('.key_registered') : t('.key_not_registered') %> </p> </div> diff --git a/config/environments/development.rb b/config/environments/development.rb index b619645d3..519ff1d24 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -43,6 +43,9 @@ ChouetteIhm::Application.configure do :domain => "dryade.priv" } + # api key to geoportail IGN (development key 3 month validity) + config.geoportail_api_key = "i2aqyge3x3iovnuhz7z06flp" + config.to_prepare do Devise::Mailer.layout "mailer" #ApplicationMap.ign_api_key = "i2aqyge3x3iovnuhz7z06flp" diff --git a/config/environments/production.rb b/config/environments/production.rb index a5c58b56d..ba7b4748e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -57,6 +57,9 @@ ChouetteIhm::Application.configure do # Disable delivery errors, bad email addresses will be ignored # config.action_mailer.raise_delivery_errors = false + # + # api key to geoportail IGN (production key link to "chouette.dryade.net" referer) + config.geoportail_api_key = "bt4z711qv8uw4zmk2bxl4d5l" # Enable threaded mode # NOTICE : With Rails 3.2, Delayed::JRubyWorker blocks the application without threaded mode diff --git a/db/migrate/20130527074101_remove_geoportail_key_from_organisation.rb b/db/migrate/20130527074101_remove_geoportail_key_from_organisation.rb new file mode 100644 index 000000000..616587f7a --- /dev/null +++ b/db/migrate/20130527074101_remove_geoportail_key_from_organisation.rb @@ -0,0 +1,9 @@ +class RemoveGeoportailKeyFromOrganisation < ActiveRecord::Migration + def up + remove_column :organisations, :geoportail_key + end + + def down + add_column :organisations, :geoportail_key, :string + end +end |
