From: Tristen Brown
Date: Sat, 17 Mar 2012 21:07:53 +0000 (-0400)
Subject: Show a helpful message when there are no traces to display
X-Git-Tag: live~6207
X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0b81013437cf39471a3e1b46a1579ea46ced0192
Show a helpful message when there are no traces to display
---
diff --git a/app/views/trace/list.html.erb b/app/views/trace/list.html.erb
index 2475b5ad2..06c6fb9f1 100644
--- a/app/views/trace/list.html.erb
+++ b/app/views/trace/list.html.erb
@@ -20,7 +20,11 @@
<% end %>
-<%= render :partial => 'trace_paging_nav' %>
+<% if @traces.size > 1 %>
+ <%= render :partial => 'trace_paging_nav' %>
+<% else %>
+ <%= t('trace.list.empty') %> <%= link_to t('trace.list.upload_new'), :controller => 'trace', :action => 'list', :display_name => nil, :tag => nil, :page => nil %> <%= raw t('trace.list.learn_more') %>
+<% end %>
@@ -30,6 +34,8 @@
<%= render :partial => 'trace', :collection => @traces unless @traces.nil? %>
-<%= render :partial => 'trace_paging_nav' %>
+<% if @traces.size > 1 %>
+ <%= render :partial => 'trace_paging_nav' %>
+<% end %>
<%= render :partial => 'trace_optionals' %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 56fca5405..78f9831c1 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1511,6 +1511,9 @@ en:
your_traces: "Your GPS traces"
public_traces_from: "Public GPS traces from %{user}"
tagged_with: " tagged with %{tags}"
+ empty: "Nothing here yet."
+ upload_new: "Upload a new trace"
+ learn_more: "Or learn more about GPS tracing on the wiki page."
delete:
scheduled_for_deletion: "Trace scheduled for deletion"
make_public: