diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/application/_user_info.html.erb | 4 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 6 | ||||
-rw-r--r-- | app/views/resources/_resource.html.erb | 1 | ||||
-rw-r--r-- | app/views/welcome/index.html.erb | 32 |
4 files changed, 15 insertions, 28 deletions
diff --git a/app/views/application/_user_info.html.erb b/app/views/application/_user_info.html.erb index be3b6c5..048e6fb 100644 --- a/app/views/application/_user_info.html.erb +++ b/app/views/application/_user_info.html.erb @@ -3,10 +3,6 @@ <% if current_user.present? %> <a href="/my/dashboard"><%= image_tag current_user.avatar_url, alt: current_user.username %></a> <ul> - <%#= tag.li(link_to(new_agent_switch_url, method: :get, remote: true, title: "Changer d'Agent") do - "Agent: %s" % current_agent - end, id: 'current_agent_name') %> - <%= tag.li agent_selector_form %> <%= tag.li link_to("Ajouter un point", new_agent_resource_url(agent_id: current_agent)) %> <%= tag.li link_to("Terminer la session", logout_url) %> </ul> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 02c8553..210ace8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,9 @@ <!DOCTYPE html> <html> - <head> - <title>Carte IN COMMON</title> + <head> + <meta charset="UTF-8"> + <title>Carte IN COMMON</title> + <meta name="viewport" content="initial-width: device-width initial-scale=1.0 viewport-fit=cover"> <%= csrf_meta_tags %> <%= csp_meta_tag %> diff --git a/app/views/resources/_resource.html.erb b/app/views/resources/_resource.html.erb index 2debec2..37c0d66 100644 --- a/app/views/resources/_resource.html.erb +++ b/app/views/resources/_resource.html.erb @@ -8,7 +8,6 @@ <%= m resource.description %> <hr> <code><pre><%= h JSON.pretty_generate(resource.feature.as_json) %></pre></code> - <p>... <%= session[:current_agent] %>...</p> <nav> <ul> <li><%= link_to('show', resource_url(resource)) %></li> diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 1b6ab77..eac1eff 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -9,7 +9,17 @@ <h1>Bienvenue à l'atelier carto d'IN COMMON</h1> -<%= tag.div(id: 'map') %> +<%= map_container %> + +<% content_for :aside do %> + <div data-controller="taxonomy" data-taxonomy-id="2519915f-d19c-4281-b758-f5ddb889d7fa"> + <div class="leaflet-bar leaftlet-control" id="taxonomy-toggle"> + <button data-action="taxonomy#toggle"></button> + </div> + <nav data-target="taxonomy.filter"> + </nav> + </div> +<% end %> <% content_for :debug do %> <% if current_user.present? %> @@ -19,23 +29,3 @@ <p><%= res.feature["geometry"]["coordinates"] %></p> <% end %><%# ensure it does not break when we don't have a record... %> <% end %> - -<% content_for :body_end do %> -<script> - var mymap = L.map('map').setView([50.8503396, 4.3517103],13); - - L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', { - attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery <a href="https://www.mapbox.com/">Mapbox</a>', - maxZoom: 18, - id: 'mapbox/streets-v11', - tileSize: 512, - zoomOffset: -1, - accessToken: 'pk.eyJ1IjoibmVtYWVsIiwiYSI6ImNrZzBrYjBudTB3bnMyenFmNWtrN3h3bmMifQ.Rkeyhm-9iIQOV7NAMA5LaA' - }).addTo(mymap); - var marker = L.marker([50.850, 4.351]).addTo(mymap); - //CONTINUER AVEC LES WHILE ET CONDITIONS, @resources ne contient que 25 elements (lié au nombre d'élément par page?) -- oui - //OU PLUTOT UTILISER POSTGRES POUR FAIRE DES REQUESTES SUR @resources - var count = 0 - console.log(count) -</script> -<% end %> |