- content_for :page_title do = t :edit_order_cycle = admin_inject_order_cycle_instance = form_for [main_app, :admin, @order_cycle], :url => '', :html => {:class => 'ng order_cycle', 'ng-app' => 'admin.orderCycles', 'ng-controller' => 'AdminOrderCycleOutgoingCtrl', name: 'order_cycle_form'} do |f| = render 'wizard_progress' %save-bar{ dirty: "order_cycle_form.$dirty", persist: "true" } %input.red{ type: "button", value: t('.save'), ng: { click: "submit($event, null)", disabled: "!order_cycle_form.$dirty || order_cycle_form.$invalid" } } %input.red{ type: "button", value: t('.save_and_back_to_list'), ng: { click: "submit($event, '#{main_app.admin_order_cycles_path}')", disabled: "!order_cycle_form.$dirty || order_cycle_form.$invalid" } } %input{ type: "button", ng: { value: "order_cycle_form.$dirty ? '#{t('.cancel')}' : '#{t('.back_to_list')}'", click: "cancel('#{main_app.admin_order_cycles_path}')" } } %fieldset.no-border-bottom %legend{ align: 'center'}= t('.outgoing') %table.exchanges %thead %tr %th= t('.distributor') %th = t('.products') = surround '(', ')' do %a{href: '#', 'ng-click' => "OrderCycle.toggleAllProducts('outgoing')"} %span{'ng-show' => "OrderCycle.showProducts['outgoing']"}= t(:collapse_all) %span{'ng-hide' => "OrderCycle.showProducts['outgoing']"}= t(:expand_all) %th{ ng: { if: 'enterprises[exchange.enterprise_id].managed || order_cycle.viewing_as_coordinator' } } = t('.tags') %th= t('.delivery_details') %th= t('.fees') %th.actions %tbody.panel-ctrl{ object: 'exchange', 'ng-repeat' => 'exchange in order_cycle.outgoing_exchanges'} = render 'exchange_form', f: f, type: 'distributor' - if Enterprise.managed_by(spree_current_user).include? @order_cycle.coordinator = render 'add_exchange_form', f: f, type: 'distributor' .actions %span{'ng-hide' => 'loaded()'}= t(:loading)