From: Tristen Brown Date: Sat, 17 Mar 2012 21:08:36 +0000 (-0400) Subject: Show a helpful message when there are no changesets to display X-Git-Tag: live~6081 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/51079ecafb73021c66c7e92d93fab723cf2bf05f Show a helpful message when there are no changesets to display --- diff --git a/app/views/changeset/list.html.erb b/app/views/changeset/list.html.erb index bf8adbe20..14bbeae1a 100644 --- a/app/views/changeset/list.html.erb +++ b/app/views/changeset/list.html.erb @@ -1,14 +1,22 @@

<%= @heading %>

<%= raw(@description) %>

-<%= render :partial => 'changeset_paging_nav' %> +<% if @edits.size > 1 %> + <%= render :partial => 'changeset_paging_nav' %> +<% elsif @user and @user.display_name == params[:display_name] %> + <%= raw t('changeset.list.empty_user') %> +<% else %> + <%= raw t('changeset.list.empty_anon') %> +<% end %>
<%= render :partial => 'map' %> <%= render :partial => 'changesets', :locals => { :showusername => !params.has_key?(:display_name) } %>
-<%= 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 }) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 78f9831c1..c3d31f5f3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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 you haven't made any edits yet. To get started, check out the Beginners Guide." + empty_anon: "No edits made yet" timeout: sorry: "Sorry, the list of changesets you requested took too long to retrieve." diary_entry: