Applying new helper to order cycle name and timing partial

This commit is contained in:
Rob Harrington
2015-04-09 11:11:06 +10:00
parent 133f7e4ec7
commit c7157ce7bd

View File

@@ -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 }}