From 01b38ce952cb2e657ab387295673fc892be3539a Mon Sep 17 00:00:00 2001 From: Marc Florisson Date: Mon, 27 May 2013 11:48:18 +0200 Subject: put geoportail api key in config --- README.textile | 4 ++++ app/maps/application_map.rb | 6 ++---- app/views/organisations/edit.html.erb | 1 - app/views/organisations/show.html.erb | 2 -- config/environments/development.rb | 3 +++ config/environments/production.rb | 3 +++ .../20130527074101_remove_geoportail_key_from_organisation.rb | 9 +++++++++ 7 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 db/migrate/20130527074101_remove_geoportail_key_from_organisation.rb 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 @@
- - <%= @organisation.geoportail_key ? t('.key_registered') : t('.key_not_registered') %>