-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Number link to Tracking URL page #2829
Conversation
@@ -50,7 +50,12 @@ | |||
<tr class="show-tracking total"> | |||
<td colspan="5"> | |||
<% if carton.tracking.present? %> | |||
<strong><%= Spree::Carton.human_attribute_name(:tracking) %>:</strong> <%= carton.tracking %> | |||
<strong><%= Spree::Carton.human_attribute_name(:tracking) %>:</strong> | |||
<% if carton.tracking_url.nil? %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably just write this as
<% if carton.tracking_url %>
<%= link_to carton.tracking, carton.tracking_url, target: "_blank" %>
<% else %>
<%= carton.tracking %>
<% end %>
but either way this seems fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, Thank you 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Build errors unrelated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
LGTM! Thanks for this, I'm rebasing on to master to get the build green.
😄 Thanks |
This change allows showing the tracking URL in the admin panel instead of only the tracking number.