From 9e884fa034a5aaa9035485644d04b740107725ee Mon Sep 17 00:00:00 2001 From: Nemael <100dragons@gmail.com> Date: Thu, 8 Oct 2020 15:07:17 +0200 Subject: Added leaflet gem and changed a bit the Edit Ressource page to be able to edit categories --- Gemfile | 4 ++++ app/views/resources/edit.html.erb | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 8a44eed..5cc080e 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,10 @@ gem 'kaminari' # Enforce stable UUIDs for models gem 'uuid_parameter', '~> 0.2.5' +#Enable use of leaflet +gem 'leaflet-rails' + + # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.2', require: false diff --git a/app/views/resources/edit.html.erb b/app/views/resources/edit.html.erb index fa61a0a..6d9f1c2 100644 --- a/app/views/resources/edit.html.erb +++ b/app/views/resources/edit.html.erb @@ -1,15 +1,17 @@ <%= form_with model: @resource, local: true do |f| %> + <%= tag.legend "" %> <%= f.label :name %> <%= f.text_field :name, value: @resource.name %> + + <%= tag.legend "" %> + <%= f.label :categories %> + <%= f.text_field :categories, value: @resource.categories %> - - <%= tag.legend "Geographic Position" %> + <%= tag.legend "Coordonées géographiques" %> <%= f.label :longitude %> <%= f.text_field :longitude, value: @resource.lon %> <%= f.label :latitude %> <%= f.text_field :latitude, value: @resource.lat %> - - <%= f.submit 'Save' %> <% end %> -- cgit v1.2.3