mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-03 22:06:07 +00:00
Replace spree_order_url with order_url so we can use scope in the routes file
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
- separator = messages.values.any? ? ": " : ", "
|
||||
- orders.each_with_index do |order, i|
|
||||
%a{ href: spree_order_url(order) }>= order.number
|
||||
%a{ href: order_url(order) }>= order.number
|
||||
= separator if messages.values.any? || i < orders.count - 1
|
||||
- if messages.values.any?
|
||||
= messages[order.id] || t(".no_message_provided")
|
||||
@@ -17,5 +17,5 @@
|
||||
%h4= t(".other.title", count: orders.count)
|
||||
%p= t(".other.explainer")
|
||||
- orders.each_with_index do |order, i|
|
||||
%a{ href: spree_order_url(order) }>= order.number
|
||||
%a{ href: order_url(order) }>= order.number
|
||||
= ", " if i < orders.count - 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
- if @order.user.present?
|
||||
= t("email_so_edit_false_html",
|
||||
orders_close_at: l(@order.order_cycle.orders_close_at, format: mail_long_datetime_format),
|
||||
order_url: spree_order_url(@order))
|
||||
order_url: order_url(@order))
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
|
||||
%p
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
- if @order.user.present?
|
||||
= t("email_so_edit_false_html",
|
||||
orders_close_at: l(@order.order_cycle.orders_close_at, format: mail_long_datetime_format),
|
||||
order_url: spree_order_url(@order))
|
||||
order_url: order_url(@order))
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
|
||||
- if @order.errors.any?
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
- allow_changes = !!@order.distributor.allow_order_changes?
|
||||
= t("email_so_edit_#{allow_changes}_html",
|
||||
orders_close_at: l(@order.order_cycle.orders_close_at, format: mail_long_datetime_format),
|
||||
order_url: spree_order_url(@order))
|
||||
order_url: order_url(@order))
|
||||
= t("email_so_contact_distributor_html", distributor: @order.distributor.name, email: @order.distributor.contact.email)
|
||||
- else
|
||||
= t("email_so_contact_distributor_to_change_order_html",
|
||||
|
||||
@@ -47,7 +47,7 @@ describe SubscriptionMailer, type: :mailer do
|
||||
end
|
||||
|
||||
describe "linking to order page" do
|
||||
let(:order_link_href) { "href=\"#{spree_order_url(order)}\"" }
|
||||
let(:order_link_href) { "href=\"#{order_url(order)}\"" }
|
||||
let(:order_link_style) { "style='[^']+'" }
|
||||
|
||||
let(:shop) { create(:enterprise, allow_order_changes: true) }
|
||||
@@ -113,7 +113,7 @@ describe SubscriptionMailer, type: :mailer do
|
||||
end
|
||||
|
||||
describe "linking to order page" do
|
||||
let(:order_link_href) { "href=\"#{spree_order_url(order)}\"" }
|
||||
let(:order_link_href) { "href=\"#{order_url(order)}\"" }
|
||||
|
||||
let(:email) { SubscriptionMailer.deliveries.last }
|
||||
let(:body) { email.body.encoded }
|
||||
@@ -179,7 +179,7 @@ describe SubscriptionMailer, type: :mailer do
|
||||
end
|
||||
|
||||
describe "linking to order page" do
|
||||
let(:order_link_href) { "href=\"#{spree_order_url(order)}\"" }
|
||||
let(:order_link_href) { "href=\"#{order_url(order)}\"" }
|
||||
|
||||
let(:email) { SubscriptionMailer.deliveries.last }
|
||||
let(:body) { email.body.encoded }
|
||||
|
||||
Reference in New Issue
Block a user