From c7157ce7bdf04c8491a27fa7b42f4b366a0bcb9b Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 9 Apr 2015 11:11:06 +1000 Subject: [PATCH] Applying new helper to order cycle name and timing partial --- .../admin/order_cycles/_name_and_timing_form.html.haml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 }}