Move the trace upload form from the list to a create trace page
This commit is contained in:
parent
f30dcd1a62
commit
9f83acfb44
6 changed files with 45 additions and 48 deletions
|
@ -1,9 +0,0 @@
|
|||
<% form_for :trace, @trace, :url => { :action => "create" }, :html => { :multipart => true } do |f| %>
|
||||
<table>
|
||||
<tr><td align="right"><%= t'trace.trace_form.upload_gpx' %></td><td><%= f.file_field :gpx_file, :size => 50, :maxlength => 255 %></td></tr>
|
||||
<tr><td align="right"><%= t'trace.trace_form.description' %></td><td><%= f.text_field :description, :size => 50, :maxlength => 255 %></td></tr>
|
||||
<tr><td align="right"><%= t'trace.trace_form.tags' %></td><td><%= f.text_field :tagstring, :size => 50, :maxlength => 255 %> (<%= t'trace.trace_form.tags_help' %>)</td></tr>
|
||||
<tr><td align="right"><%= t'trace.trace_form.visibility' %></td><td><%= f.select :visibility, [[t('trace.visibility.private'),"private"],[t('trace.visibility.public'),"public"],[t('trace.visibility.trackable'),"trackable"],[t('trace.visibility.identifiable'),"identifiable"]] %> <span class="minorNote">(<a href="<%= t'trace.trace_form.visibility_help_url' %>"><%= t'trace.trace_form.visibility_help' %></a>)</span></td></tr>
|
||||
<tr><td></td><td><%= submit_tag t('trace.trace_form.upload_button') %> | <a href="<%= t'trace.trace_form.help_url' %>"><%= t'trace.trace_form.help' %></a></td></tr>
|
||||
</table>
|
||||
<% end %>
|
|
@ -1,20 +0,0 @@
|
|||
<h1><%= h(@title) %></h1>
|
||||
|
||||
<% content_for :head do %>
|
||||
<%= auto_discovery_link_tag :atom, :action => 'georss', :display_name => @display_name, :tag => @tag %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
|
||||
<% unless_user(@target_user, :span) do %>
|
||||
| <%= link_to t('trace.trace_header.see_just_your_traces'), :action => 'mine' %>
|
||||
<% end %>
|
||||
<% if @tag %>
|
||||
<% if @display_name %>
|
||||
| <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list' %>
|
||||
<% end %>
|
||||
<% if_user(@target_user, :span) do %>
|
||||
| <%= link_to t('trace.trace_header.see_your_traces'), :controller => 'trace', :action => 'mine' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
|
@ -1,13 +0,0 @@
|
|||
<%= render :partial => 'trace_paging_nav' %>
|
||||
|
||||
<table id="trace_list" cellpadding="3">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<%= render :partial => 'trace', :collection => @traces unless @traces.nil? %>
|
||||
</table>
|
||||
|
||||
<%= render :partial => 'trace_paging_nav' %>
|
||||
|
||||
<%= render :partial => 'trace_optionals' %>
|
|
@ -2,4 +2,12 @@
|
|||
|
||||
<%= error_messages_for 'trace' %>
|
||||
|
||||
<%= render :partial => 'trace_form' %>
|
||||
<% form_for :trace, @trace, :url => { :action => "create" }, :html => { :multipart => true } do |f| %>
|
||||
<table>
|
||||
<tr><td align="right"><%= t'trace.trace_form.upload_gpx' %></td><td><%= f.file_field :gpx_file, :size => 50, :maxlength => 255 %></td></tr>
|
||||
<tr><td align="right"><%= t'trace.trace_form.description' %></td><td><%= f.text_field :description, :size => 50, :maxlength => 255 %></td></tr>
|
||||
<tr><td align="right"><%= t'trace.trace_form.tags' %></td><td><%= f.text_field :tagstring, :size => 50, :maxlength => 255 %> (<%= t'trace.trace_form.tags_help' %>)</td></tr>
|
||||
<tr><td align="right"><%= t'trace.trace_form.visibility' %></td><td><%= f.select :visibility, [[t('trace.visibility.private'),"private"],[t('trace.visibility.public'),"public"],[t('trace.visibility.trackable'),"trackable"],[t('trace.visibility.identifiable'),"identifiable"]] %> <span class="minorNote">(<a href="<%= t'trace.trace_form.visibility_help_url' %>"><%= t'trace.trace_form.visibility_help' %></a>)</span></td></tr>
|
||||
<tr><td></td><td><%= submit_tag t('trace.trace_form.upload_button') %> | <a href="<%= t'trace.trace_form.help_url' %>"><%= t'trace.trace_form.help' %></a></td></tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
|
|
@ -1,5 +1,35 @@
|
|||
<%= render :partial => 'trace_header' %>
|
||||
<% if_user(@target_user) do %>
|
||||
<%= render :partial => 'trace_form' %>
|
||||
<h1><%= h(@title) %></h1>
|
||||
|
||||
<% content_for :head do %>
|
||||
<%= auto_discovery_link_tag :atom, :action => 'georss', :display_name => @display_name, :tag => @tag %>
|
||||
<% end %>
|
||||
<%= render :partial => 'trace_list' %>
|
||||
|
||||
<p>
|
||||
<%= rss_link_to :action => 'georss', :display_name => @display_name, :tag => @tag %>
|
||||
<% unless_user(@target_user, :span) do %>
|
||||
| <%= link_to t('trace.trace_header.your_traces'), :action => 'mine' %>
|
||||
<% end %>
|
||||
| <%= link_to t('trace.trace_header.upload_trace'), :action => 'create' %>
|
||||
<% if @tag %>
|
||||
<% if @display_name %>
|
||||
| <%= link_to t('trace.trace_header.see_all_traces'), :controller => 'trace', :action => 'list' %>
|
||||
<% end %>
|
||||
<% if_user(@target_user, :span) do %>
|
||||
| <%= link_to t('trace.trace_header.see_your_traces'), :controller => 'trace', :action => 'mine' %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<%= render :partial => 'trace_paging_nav' %>
|
||||
|
||||
<table id="trace_list" cellpadding="3">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<%= render :partial => 'trace', :collection => @traces unless @traces.nil? %>
|
||||
</table>
|
||||
|
||||
<%= render :partial => 'trace_paging_nav' %>
|
||||
|
||||
<%= render :partial => 'trace_optionals' %>
|
||||
|
|
|
@ -1351,7 +1351,8 @@ en:
|
|||
help: "Help"
|
||||
help_url: "http://wiki.openstreetmap.org/wiki/Upload"
|
||||
trace_header:
|
||||
see_just_your_traces: "See just your traces, or upload a trace"
|
||||
your_traces: "See just your traces"
|
||||
upload_trace: "Upload a trace"
|
||||
see_all_traces: "See all traces"
|
||||
see_your_traces: "See all your traces"
|
||||
traces_waiting: "You have {{count}} traces waiting for upload. Please consider waiting for these to finish before uploading any more, so as not to block the queue for other users."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue