From: Tom Hughes Date: Wed, 18 Jun 2014 21:48:23 +0000 (+0100) Subject: Style trace edit form to match trace creation form X-Git-Tag: live~4396 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/44d5335e47a9557785e20d93627af9aec37fe07d?ds=sidebyside Style trace edit form to match trace creation form --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index adad49d2a..5b0889455 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1333,6 +1333,22 @@ header .search_form { } } +/* Rules for the edit trace form */ + +.edit_trace { + .form-row p { + margin-bottom: 0px; + } + + input[type=text] { + width: 50%; + width: -moz-calc(100% - 150px); + width: -webkit-calc(100% - 150px); + width: calc(100% - 150px); + max-width: 500px; + } +} + /* Rules for the user profile page */ #userinformation { diff --git a/app/views/trace/edit.html.erb b/app/views/trace/edit.html.erb index 200f6aa26..da273b0eb 100644 --- a/app/views/trace/edit.html.erb +++ b/app/views/trace/edit.html.erb @@ -9,49 +9,41 @@
- +

<%= @trace.name %> (<%= link_to t('trace.edit.download'), :controller => 'trace', :action => 'data', :id => @trace.id %>)

- +

<%= l @trace.timestamp, :format => :friendly %>

-
- <% if @trace.inserted? %> - -
- +

<%= @trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>

- +
<%= @trace.latitude %>; <%= @trace.longitude %>
(<%=link_to t('trace.edit.map'), :controller => 'site', :action => 'index', :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %> / <%=link_to t('trace.edit.edit'), :controller => 'site', :action => 'edit', :gpx=> @trace.id, :anchor => "map=14/#{@trace.latitude}/#{@trace.longitude}" %>) -
- <% end %> - -
- +

<%= link_to h(@trace.user.display_name), {:controller => 'user', :action => 'view', :display_name => @trace.user.display_name} %>

- + <%= f.text_field :description %>
- + <%= f.text_field :tagstring %> (<%= t'trace.edit.tags_help' %>)
- + <%= f.select :visibility, [[t('trace.visibility.private'),"private"],[t('trace.visibility.public'),"public"],[t('trace.visibility.trackable'),"trackable"],[t('trace.visibility.identifiable'),"identifiable"]] %> (<%= t'trace.edit.visibility_help' %>)