From 10f09066893be24fe874fa5aa14720c748853bca Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Mon, 28 Oct 2019 13:21:28 +0000 Subject: [PATCH] Remove obsolete view, this code is now in app/assets/javascripts/templates/admin/panels/exchange_supplied_products.html.haml --- ..._exchange_supplied_products_form.html.haml | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml diff --git a/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml b/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml deleted file mode 100644 index 22b563e107..0000000000 --- a/app/views/admin/order_cycles/_exchange_supplied_products_form.html.haml +++ /dev/null @@ -1,32 +0,0 @@ -/ TODO: Unify this with exchange_distributed_products_form -%td{:colspan => 4} - .exchange-select-all-variants - %label - = check_box_tag 'order_cycle_incoming_exchange_{{ $parent.$index }}_select_all_variants', 1, 1, 'ng-model' => 'exchange.select_all_variants', 'ng-change' => 'setExchangeVariants(exchange, suppliedVariants(exchange.enterprise_id), exchange.select_all_variants)', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$index }}_select_all_variants' - = t('admin.select_all') - - .exchange-products - -# No need to scope product list based on permissions, because if an incoming exchange is visible, - -# then all of the variants within it should be visible. May change in the future? - .exchange-product{'ng-repeat' => 'product in enterprises[exchange.enterprise_id].supplied_products'} - - .exchange-product-details - %label - = check_box_tag 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 1, 1, 'ng-hide' => 'product.variants.length > 0', 'ng-model' => 'exchange.variants[product.master_id]', 'ofn-sync-distributions' => '{{ product.master_id }}', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', - 'ng-disabled' => 'product.variants.length > 0 || !order_cycle.editable_variants_for_incoming_exchanges.hasOwnProperty(exchange.enterprise_id) || order_cycle.editable_variants_for_incoming_exchanges[exchange.enterprise_id].indexOf(product.master_id) < 0' - %img{'ng-src' => '{{ product.image_url }}'} - {{ product.name }} - - -# When the master variant is in the order cycle but the product has variants, we want to - -# be able to remove the master variant, since it serves no purpose. Display a checkbox to do so. - .exchange-product-variant{'ng-show' => 'exchange.variants[product.master_id] && product.variants.length > 0'} - %label - = check_box_tag 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 1, 1, 'ng-model' => 'exchange.variants[product.master_id]', 'ofn-sync-distributions' => '{{ product.master_id }}', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', - 'ng-disabled' => '!order_cycle.editable_variants_for_incoming_exchanges.hasOwnProperty(exchange.enterprise_id) || order_cycle.editable_variants_for_incoming_exchanges[exchange.enterprise_id].indexOf(product.master_id) < 0' - = t('admin.obsolete_master') - - .exchange-product-variant{'ng-repeat' => 'variant in product.variants'} - %label - = check_box_tag 'order_cycle_incoming_exchange_{{ $parent.$parent.$index }}_variants_{{ variant.id }}', 1, 1, 'ng-model' => 'exchange.variants[variant.id]', 'ofn-sync-distributions' => '{{ variant.id }}', 'id' => 'order_cycle_incoming_exchange_{{ $parent.$parent.$index }}_variants_{{ variant.id }}', - 'ng-disabled' => '!order_cycle.editable_variants_for_incoming_exchanges.hasOwnProperty(exchange.enterprise_id) || order_cycle.editable_variants_for_incoming_exchanges[exchange.enterprise_id].indexOf(variant.id) < 0' - {{ variant.label }}