Skip to content

Commit

Permalink
Make order customer email links consistent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brchristian committed Sep 27, 2020
1 parent 0c7020f commit e6e21f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/app/views/spree/admin/orders/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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) %>
</td>
<td class="align-right"><%= order.display_total.to_html %></td>
<td class='actions align-center' data-hook="admin_orders_index_row_actions">
Expand Down
1 change: 1 addition & 0 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ en:
refund: Refund
remove: Remove
save: Save
send_email: Send Email
ship: Ship
split: Split
update: Update
Expand Down

0 comments on commit e6e21f9

Please sign in to comment.