[openstreetmap/openstreetmap-website] Add last edited date to user profile (Issue #3437)

mmd notifications at github.com
Tue Feb 1 17:32:40 UTC 2022


Quick&dirty attempt below... Default "-" is shown in case there are no previous edits. Does this make sense?

```ruby
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 95878402b..1e89a0ab5 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -121,6 +121,8 @@
           <dl class="dl-inline">
             <dt><%= t ".mapper since" %></dt>
             <dd><%= l @user.created_at.to_date, :format => :long %></dd>
+            <dt><%= t ".last map edit" %></dt>
+            <dd><%= l @user.changesets.first&.created_at&.to_date, :format => :long, default: '-' %></dd>
             <% unless @user.terms_agreed %>
               <dt><%= t ".ct status" %></dt>
               <dd>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 3055905ca..0d95e1938 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -2562,6 +2562,7 @@ en:
       remove as friend: Unfriend
       add as friend: Add Friend
       mapper since: "Mapper since:"
+      last map edit: "Last map edit:"
       ct status: "Contributor terms:"
       ct undecided: Undecided
       ct declined: Declined



-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3437#issuecomment-1027105282
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3437/1027105282 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220201/f865ac51/attachment.htm>


More information about the rails-dev mailing list