From 15c192ce4053d77183538efa1740ba5bec71082e Mon Sep 17 00:00:00 2001 From: ThibG Date: Thu, 24 Oct 2019 22:49:26 +0200 Subject: [PATCH] Add link to search for users connected from the same IP address (#12157) * Add link to search for users connected from the same IP address Fixes #11949 * Fix missing cell in admin account view table --- app/views/admin/accounts/show.html.haml | 3 +++ config/locales/en.yml | 1 + 2 files changed, 4 insertions(+) diff --git a/app/views/admin/accounts/show.html.haml b/app/views/admin/accounts/show.html.haml index 40a936e8693..9f1e3816b6e 100644 --- a/app/views/admin/accounts/show.html.haml +++ b/app/views/admin/accounts/show.html.haml @@ -143,12 +143,15 @@ %th= t('admin.accounts.most_recent_ip') %td= @account.user_current_sign_in_ip %td + - if @account.user_current_sign_in_ip + = table_link_to 'search', t('admin.accounts.search_same_ip'), admin_accounts_path(ip: @account.user_current_sign_in_ip) %tr %th= t('admin.accounts.most_recent_activity') %td - if @account.user_current_sign_in_at %time.formatted{ datetime: @account.user_current_sign_in_at.iso8601, title: l(@account.user_current_sign_in_at) }= l @account.user_current_sign_in_at + %td - if @account.user&.invited? %tr diff --git a/config/locales/en.yml b/config/locales/en.yml index be66b6c6cf4..458524c3d3a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -175,6 +175,7 @@ en: user: User salmon_url: Salmon URL search: Search + search_same_ip: Other users with the same IP shared_inbox_url: Shared inbox URL show: created_reports: Made reports