mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Applying new helper to order cycle name and timing partial
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user