Provide default action text when change set and GPS traces are empty #36

Closed
wants to merge 6 commits into
from
@@ -1,9 +1,9 @@
<p>
<% if @page > 1 %>
-<%= link_to t('changeset.changeset_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
+ <%= link_to t('changeset.changeset_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
<% else %>
-<%= t('changeset.changeset_paging_nav.previous') %>
+ <%= t('changeset.changeset_paging_nav.previous') %>
<% end %>
| <%= t('changeset.changeset_paging_nav.showing_page', :page => @page) %> |
@@ -1,19 +1,30 @@
<h1><%= @heading %></h1>
<p><%= raw(@description) %></p>
-<%= render :partial => 'changeset_paging_nav' %>
+<% if @edits.size > 1 %>
+ <%= render :partial => 'changeset_paging_nav' %>
+<% else %>
+ <% if @user and @user.id %>
+ <%= raw t('changeset.list.empty_user') %>
+ <% else %>
+ <%= raw t('changeset.list.empty_anon') %>
+ <% end %>
+<% end %>
<div id="changeset_list_container">
<%= render :partial => 'map' %>
<%= render :partial => 'changesets', :locals => { :showusername => !params.has_key?(:display_name) } %>
</div>
-<%= render :partial => 'changeset_paging_nav' %>
+<% if @edits.size > 1 %>
+ <%= render :partial => 'changeset_paging_nav' %>
+<% end %>
<% unless params[:friends] or params[:nearby] -%>
<%= atom_link_to params.merge({ :page => nil, :action => :feed }) %>
<% content_for :head do -%>
<%= auto_discovery_link_tag :atom, params.merge({ :page => nil, :action => :feed }) %>
<% end -%>
+
<% end -%>
@@ -1,17 +1,15 @@
<p>
-
-<% if @page > 1 %>
-<%= link_to t('trace.trace_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
-<% else %>
-<%= t('trace.trace_paging_nav.previous') %>
-<% end %>
-
-| <%= t('trace.trace_paging_nav.showing_page', :page => @page) %> |
-
-<% if @traces.size < @page_size %>
-<%= t('trace.trace_paging_nav.next') %>
-<% else %>
-<%= link_to t('trace.trace_paging_nav.next'), params.merge({ :page => @page + 1 }) %>
-<% end %>
-
+ <% if @page > 1 %>
+ <%= link_to t('trace.trace_paging_nav.previous'), params.merge({ :page => @page - 1 }) %>
+ <% else %>
+ <%= t('trace.trace_paging_nav.previous') %>
+ <% end %>
+
+ | <%= t('trace.trace_paging_nav.showing_page', :page => @page) %> |
+
+ <% if @traces.size < @page_size %>
+ <%= t('trace.trace_paging_nav.next') %>
+ <% else %>
+ <%= link_to t('trace.trace_paging_nav.next'), params.merge({ :page => @page + 1 }) %>
+ <% end %>
</p>
@@ -20,7 +20,11 @@
<% 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'), :action => 'create' %> <%= 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' %>
View
@@ -321,6 +321,8 @@ en:
description_user_bbox: "Changesets by %{user} within %{bbox}"
description_friend: "Changesets by your friends"
description_nearby: "Changesets by nearby users"
+ empty_user: "It looks like edits haven't been made yet. To get started, check out the <a href='http://wiki.openstreetmap.org/wiki/Beginners_Guide_1.3'>Beginners Guide</a>."
+ empty_anon: "No edits made yet"
timeout:
sorry: "Sorry, the list of changesets you requested took too long to retrieve."
diary_entry:
@@ -1465,6 +1467,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: