]> git.openstreetmap.org Git - rails.git/blob - app/views/profiles/locations/show.html.erb
Merge pull request #6665 from openstreetmap/dependabot/bundler/dependencies-98a26080d9
[rails.git] / app / views / profiles / locations / show.html.erb
1 <% content_for :head do %>
2   <%= javascript_include_tag "user" %>
3 <% end %>
4
5 <% content_for :heading_class, "pb-0" %>
6
7 <% content_for :heading do %>
8   <h1><%= t ".title" %></h1>
9   <%= render :partial => "navigation" %>
10 <% end %>
11
12 <%= render :partial => "layouts/control_icons", :locals => { :icons => %w[zoomin zoomout geolocate] } %>
13 <%= render :partial => "layouts/markers", :locals => { :types => %w[dot] } %>
14
15 <%= bootstrap_form_for current_user, :url => { :action => :update } do |f| %>
16   <p id="home_message" class="text-body-secondary m-0<% if current_user.home_location? %> invisible<% end %>"><%= t ".no home location" %></p>
17   <div class="row">
18     <%= f.text_field :home_lat, :wrapper_class => "col-sm-4 d-flex flex-column", :class => "mt-auto", :id => "home_lat" %>
19     <%= f.text_field :home_lon, :wrapper_class => "col-sm-4 d-flex flex-column", :class => "mt-auto", :id => "home_lon" %>
20     <div class="col-sm-4 pt-2 align-self-end">
21       <button type="button" id="home_show" class="btn btn-outline-primary"<% unless current_user.home_location? %> hidden<% end %> disabled><%= t ".show" %></button>
22       <button type="button" id="home_delete" class="btn btn-outline-primary"<% unless current_user.home_location? %> hidden<% end %>><%= t ".delete" %></button>
23       <button type="button" id="home_undelete" class="btn btn-outline-primary" hidden><%= t ".undelete" %></button>
24     </div>
25   </div>
26   <%= f.text_field :home_location_name, :wrapper_class => "my-2 col-sm-4 pe-3", :class => "mt-auto", :id => "home_location_name" %>
27   <div class="form-check">
28     <input class="form-check-input" type="checkbox" name="updatehome" value="1" <% unless current_user.home_location? %> checked <% end %> id="updatehome" />
29     <label class="form-check-label" for="updatehome"><%= t ".update home location on click" %></label>
30   </div>
31   <%= tag.div "", :id => "map", :class => "content_map border border-secondary-subtle rounded z-0" %>
32
33   <%= f.primary t(".save") %>
34   <%= link_to t(".cancel"), current_user, :class => "btn btn-link" %>
35 <% end %>