From e6e21f95deb31d3d31aff04fd3cb2c50b2118c89 Mon Sep 17 00:00:00 2001 From: brchristian Date: Mon, 21 Sep 2020 11:35:59 -0700 Subject: [PATCH] Make order customer email links consistent Previously the order table would show user account links for users who had accounts, and mailto links for those who did not. This inconsistent link behavior is replaced with plaintext for users who do not have accounts. --- backend/app/views/spree/admin/orders/index.html.erb | 3 ++- core/config/locales/en.yml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/app/views/spree/admin/orders/index.html.erb b/backend/app/views/spree/admin/orders/index.html.erb index 7df21a7abfd..0f353f674a7 100644 --- a/backend/app/views/spree/admin/orders/index.html.erb +++ b/backend/app/views/spree/admin/orders/index.html.erb @@ -184,8 +184,9 @@ <% if order.user %> <%= link_to order.email, edit_admin_user_path(order.user) %> <% else %> - <%= mail_to order.email %> + <%= order.email %> <% end %> + <%= link_to_with_icon('email', t('spree.actions.send_email'), "mailto:#{order.email}", no_text: true) %> <%= order.display_total.to_html %> diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml index 202212bc978..45f08e76a5b 100644 --- a/core/config/locales/en.yml +++ b/core/config/locales/en.yml @@ -793,6 +793,7 @@ en: refund: Refund remove: Remove save: Save + send_email: Send Email ship: Ship split: Split update: Update