mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Stop using inexistent en.order_state translations keys and use existing en.spree.order_state in haml code and new js.admin.orders.order_state in JS code
This commit is contained in:
@@ -19,4 +19,4 @@ angular.module("admin.subscriptions").controller "OrdersPanelController", ($scop
|
||||
text = if closes_at > moment() then t('js.subscriptions.closes') else t('js.subscriptions.closed')
|
||||
"#{text} #{closes_at.fromNow()}"
|
||||
|
||||
$scope.stateText = (state) -> t("spree.order_state.#{state}")
|
||||
$scope.stateText = (state) -> t("js.admin.orders.order_state.#{state}")
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
.field
|
||||
= label_tag nil, t(:status)
|
||||
= select_tag("q[state_eq]",
|
||||
options_for_select(Spree::Order.state_machines[:state].states.collect {|s| [t("order_state.#{s.name}"), s.value]}),
|
||||
options_for_select(Spree::Order.state_machines[:state].states.collect {|s| [t("spree.order_state.#{s.name}"), s.value]}),
|
||||
{include_blank: true, class: 'select2', 'ng-model' => 'q.state_eq'})
|
||||
.four.columns
|
||||
.field
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
%a{'ng-click' => "sortOptions.toggle('#{column_name}')"}
|
||||
= t(column_name.to_s, scope: 'activerecord.attributes.spree/order')
|
||||
= t(".#{column_name.to_s}")
|
||||
%span{'ng-show' => "sorting == '#{column_name} asc'"}= "▲".html_safe
|
||||
%span{'ng-show' => "sorting == '#{column_name} desc'"}= "▼".html_safe
|
||||
@@ -59,14 +59,14 @@
|
||||
= t('.note')
|
||||
%td.align-center
|
||||
%span.state{'ng-class' => 'order.state'}
|
||||
{{'order_state.' + order.state | t}}
|
||||
{{'js.admin.orders.order_state.' + order.state | t}}
|
||||
%td.align-center
|
||||
%span.state{'ng-class' => 'order.payment_state', 'ng-if' => 'order.payment_state'}
|
||||
%a{'ng-href' => '{{order.payments_path}}' }
|
||||
{{'payment_states.' + order.payment_state | t}}
|
||||
{{'js.admin.orders.payment_states.' + order.payment_state | t}}
|
||||
%td.align-center
|
||||
%span.state{'ng-class' => 'order.shipment_state', 'ng-if' => 'order.shipment_state'}
|
||||
{{'shipment_states.' + order.shipment_state | t}}
|
||||
{{'js.admin.orders.shipment_states.' + order.shipment_state | t}}
|
||||
%td
|
||||
= mail_to "{{order.email}}"
|
||||
%td.align-center
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
%dd
|
||||
- order_state_classes = "state #{@order.state}"
|
||||
%span{ class: order_state_classes }
|
||||
= t(@order.state, scope: :order_state)
|
||||
= t(@order.state, scope: "spree.order_state")
|
||||
%dt
|
||||
= t(:total)
|
||||
\:
|
||||
|
||||
Reference in New Issue
Block a user