diff --git a/app/views/admin/order_cycles/_name_and_timing_form.html.haml b/app/views/admin/order_cycles/_name_and_timing_form.html.haml index 1bb60e784e..502d12ca3a 100644 --- a/app/views/admin/order_cycles/_name_and_timing_form.html.haml +++ b/app/views/admin/order_cycles/_name_and_timing_form.html.haml @@ -1,16 +1,15 @@ -- as_coordinator = Enterprise.managed_by(spree_current_user).include? @order_cycle.coordinator .row .alpha.two.columns = f.label :name .six.columns.omega - - if as_coordinator + - if viewing_as_coordinator_of?(order_cycle) = f.text_field :name, 'ng-model' => 'order_cycle.name', 'required' => true - else {{ order_cycle.name }} .two.columns = f.label :orders_open_at, 'Orders open' .omega.six.columns - - if as_coordinator + - if viewing_as_coordinator_of?(order_cycle) = f.text_field :orders_open_at, 'datetimepicker' => 'order_cycle.orders_open_at', 'ng-model' => 'order_cycle.orders_open_at' - else {{ order_cycle.orders_open_at }} @@ -23,7 +22,7 @@ .two.columns = f.label :orders_close_at, 'Orders close' .six.columns.omega - - if as_coordinator + - if viewing_as_coordinator_of?(order_cycle) = f.text_field :orders_close_at, 'datetimepicker' => 'order_cycle.orders_close_at', 'ng-model' => 'order_cycle.orders_close_at' - else {{ order_cycle.orders_close_at }}