diff --git a/app/assets/javascripts/extranet.js b/app/assets/javascripts/extranet.js index 3c9f58a03895bb50778a8ac9d5bc527d2eb3d50b..acfd1811ba7440b3a839c8868adee361bf550d1c 100644 --- a/app/assets/javascripts/extranet.js +++ b/app/assets/javascripts/extranet.js @@ -11,7 +11,6 @@ //= require simple_form_bs5_file_input //= require summernote/summernote-bs5 //= require gdpr/cookie_consent -//= require leaflet //= require autocomplete-rails //= require_tree ./application/plugins //= require_tree ./extranet diff --git a/app/assets/javascripts/map.js b/app/assets/javascripts/map.js new file mode 100644 index 0000000000000000000000000000000000000000..6ed1c2e64f40998b5b6f83dea5127b13e5a5bd26 --- /dev/null +++ b/app/assets/javascripts/map.js @@ -0,0 +1 @@ +//= require leaflet diff --git a/app/views/extranet/contacts/organizations/show.html.erb b/app/views/extranet/contacts/organizations/show.html.erb index 4998e9356fb1b41b0b242c03079ce8d37138f8d5..58b5deeec5fc624b61a4f64cdc744031abc1f185 100644 --- a/app/views/extranet/contacts/organizations/show.html.erb +++ b/app/views/extranet/contacts/organizations/show.html.erb @@ -64,6 +64,8 @@ </dd> <% end %> <% if @organization.geolocated? %> + <%# Include map.js before call Leaflet (map helper) %> + <%= javascript_include_tag 'map' %> <dt><%= University::Organization.human_attribute_name(:map) %></dt> <dl><%= map( center: {