]> git.openstreetmap.org Git - rails.git/commitdiff
Show a helpful message when there are no traces to display
authorTristen Brown <tristen@tristen.ca>
Sat, 17 Mar 2012 21:07:53 +0000 (17:07 -0400)
committerTom Hughes <tom@compton.nu>
Tue, 31 Jul 2012 20:28:52 +0000 (21:28 +0100)
app/views/trace/list.html.erb
config/locales/en.yml

index 2475b5ad2ef1a0786cd55d1d9317cd7fd9d43506..06c6fb9f1c194f3b692288bc3e8d19b07f756dcc 100644 (file)
   <% end %>
 </p>
 
-<%= 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 %>
 
 <table id="trace_list" cellpadding="3">
   <tr>
@@ -30,6 +34,8 @@
   <%= render :partial => 'trace', :collection => @traces unless @traces.nil? %>
 </table>
 
-<%= render :partial => 'trace_paging_nav' %>
+<% if @traces.size > 1 %>
+  <%= render :partial => 'trace_paging_nav' %>
+<% end %>
 
 <%= render :partial => 'trace_optionals' %>
index 56fca54058fb5787a28e9b6ca1f021c6a032140d..78f9831c1aad65741a3e21ac0edc2c281bd2e136 100644 (file)
@@ -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 <a href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.2'>wiki page</a>."
     delete:
       scheduled_for_deletion: "Trace scheduled for deletion"
     make_public: