diff --git a/app/views/map/_peopleLeaflet.html.erb b/app/views/map/_peopleLeaflet.html.erb index 5ea062a98e1..9f339be1daf 100644 --- a/app/views/map/_peopleLeaflet.html.erb +++ b/app/views/map/_peopleLeaflet.html.erb @@ -2,7 +2,7 @@ <% unique_id = rand(1000) %>
diff --git a/app/views/users/list.html.erb b/app/views/users/list.html.erb index c8e5e4a3bf2..34ed7830297 100644 --- a/app/views/users/list.html.erb +++ b/app/views/users/list.html.erb @@ -1,56 +1,101 @@ - -
-
-
-

This page shows a list of all Public Lab contributors and is sorted by those who have posted most recently. Click the profile link to view their posting activity.

-
-
- <% if current_user && (current_user.role == "admin" || current_user.role == "moderator")%> -

<%= t('users.list.user_moderation') %>

-

<%= t('users.list.admins_ban_spam') %>

- <% end %> -
-
-

<%= raw t('users.list.members_last_activity') %>

- <%= render :partial => "map/peopleLeaflet" , locals: {people: true , lat:23 , lon: 4} %> - - - - - - - - - - <% if current_user && (current_user.role == "admin" || current_user.role == "moderator") %> - - <% end %> - +
+
+
+<% if current_user && (current_user.role == "admin" || current_user.role == "moderator")%> +

<%= t('users.list.user_moderation') %>

+

<%= t('users.list.admins_ban_spam') %>

+<% end %> +

<%= raw t('People') %>

+
<%= t('Recently active on Publiclab') =%>
+
<% @users.each do |user| %> -
- - - - - - <% if current_user && (current_user.role == "admin" || current_user.role == "moderator") %> - <% end %> - - <% end %> -
<%= t('users.list.username') %> <%= t('users.list.last_activity') %> <%= t('users.list.history') %> <%= t('users.list.joined') %> <%= t('users.list.moderation') %>
- - - <%= t = user.revisions.order(timestamp: :desc).first.try(:created_at);time_ago_in_words(t) if (t) %><%= user.nodes.count %> <%= t('users.list.notes_and_edits') %><%= distance_of_time_in_words(user.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %> - <% if user.status == 0 %> - <%= t('users.list.banned') %> - <% elsif user.status == 1 %> - <%= t('users.list.ban') %> - <% end %> -
+
<%= will_paginate @users, :renderer => BootstrapPagination::Rails unless @unpaginated %>
+
+<%= render :partial => "map/peopleLeaflet" , locals: {people: true , lat:23 , lon: 4} %> +
+
+<%= render :partial => "map/peopleLeaflet" , locals: {people: true , lat:23 , lon: 4} %> +
+ + + \ No newline at end of file diff --git a/test/integration/I18n_test.rb b/test/integration/I18n_test.rb index 682a7e664fc..7f56a52823a 100644 --- a/test/integration/I18n_test.rb +++ b/test/integration/I18n_test.rb @@ -242,16 +242,6 @@ class I18nTest < ActionDispatch::IntegrationTest end end - test 'should choose i18n for user/list' do - available_testing_locales.each do |lang| - get '/change_locale/' + lang.to_s - follow_redirect! - - get '/people' - assert_select 'th', I18n.t('users.list.username') - end - end - test 'should choose i18n for user/map' do available_testing_locales.each do |lang| get '/change_locale/' + lang.to_s diff --git a/test/integration/public_pages_test.rb b/test/integration/public_pages_test.rb index b91eb7a0887..8079248816a 100644 --- a/test/integration/public_pages_test.rb +++ b/test/integration/public_pages_test.rb @@ -96,4 +96,12 @@ def setup get '/assets' assert_response :success end + + test 'browse people page' do + get '/people' + assert_response :success + end + end + +