diff --git a/app/assets/javascripts/supplier/app/templates/_list_content.emblem b/app/assets/javascripts/supplier/app/templates/_list_content.emblem index bc1eb998..dfeedb6f 100644 --- a/app/assets/javascripts/supplier/app/templates/_list_content.emblem +++ b/app/assets/javascripts/supplier/app/templates/_list_content.emblem @@ -15,11 +15,11 @@ if list.closed_at = button-mark-list-helped content=list = button-close-list content=list .user-info-container - each user in list.users - =user.avatar_tag + each list.users as |user| + = user.avatar_tag if list.sorted_orders .list-orders-container - each order in list.sorted_orders + each list.sorted_orders as |order| .list-order-container class=order.state = order.display span.currency= currency order.total diff --git a/app/assets/javascripts/supplier/app/templates/active_list.emblem b/app/assets/javascripts/supplier/app/templates/active_list.emblem index fb28c412..d5f2ffec 100644 --- a/app/assets/javascripts/supplier/app/templates/active_list.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_list.emblem @@ -1,5 +1,5 @@ td.user-info.show-for-large-up - each user in view.content.users + each view.content.users as |user| = user.avatar_tag td.status-icons if view.content.needs_help diff --git a/app/assets/javascripts/supplier/app/templates/active_order.emblem b/app/assets/javascripts/supplier/app/templates/active_order.emblem index 37e5855f..8b69ff51 100644 --- a/app/assets/javascripts/supplier/app/templates/active_order.emblem +++ b/app/assets/javascripts/supplier/app/templates/active_order.emblem @@ -1,5 +1,5 @@ td.user-info.show-for-large-up - each user in view.content.list.users + each view.content.list.users as |user| = user.avatar_tag td.status-icons if view.content.active diff --git a/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem b/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem index 6fba9d5c..4f1d947f 100644 --- a/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem +++ b/app/assets/javascripts/supplier/app/templates/components/language-switcher.emblem @@ -1,2 +1,2 @@ -each locale in locales +each locales as |locale| view "language-switcher-button" locale=locale diff --git a/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem b/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem index 1a09fe1b..52c512f6 100644 --- a/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem +++ b/app/assets/javascripts/supplier/app/templates/components/menu-product.emblem @@ -21,7 +21,7 @@ if editMode .small-12.medium-6.columns = view "upload-file" name="image" accept="image/*" file=product.image img src=product.image_src - each product_variant in product.product_variants + each product.product_variants as |product_variant| .row .small-1.columns   .small-8.medium-5.large-4.columns= input value=product_variant.name diff --git a/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem b/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem index cc06eb21..80b66495 100644 --- a/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem +++ b/app/assets/javascripts/supplier/app/templates/components/sections-header.emblem @@ -1,7 +1,7 @@ dl.sections-header-container.sub-nav dd data-section="all": a.section-header-title{action "setSection"} href="" = t 'sections_header.all_sections' - each s in sections - dd data-section=s.id - a.section-header-title{action "setSection" s} href="#" = s.title - /= link-to "section" s.id class="section-jumper" + each sections as |section| + dd data-section=section.id + a.section-header-title{action "setSection" section} href="#" = section.title + /= link-to "section" section.id class="section-jumper" span.fa.fa-chevron-circle-right diff --git a/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem b/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem index f03b38b6..1ed85fdd 100644 --- a/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem +++ b/app/assets/javascripts/supplier/app/templates/components/suppliers-switcher.emblem @@ -1,4 +1,4 @@ if other_suppliers ul.button-group.stack-for-small.round - each supplier in other_suppliers + each other_suppliers as |supplier| li: a.warning.button{action "switchTo" supplier}= t 'suppliers_switcher.switch_to_button' supplier diff --git a/app/assets/javascripts/supplier/app/templates/employees/index.emblem b/app/assets/javascripts/supplier/app/templates/employees/index.emblem index 7ceb1903..4aaeb358 100644 --- a/app/assets/javascripts/supplier/app/templates/employees/index.emblem +++ b/app/assets/javascripts/supplier/app/templates/employees/index.emblem @@ -11,7 +11,7 @@ th.colorbox= t 'attributes.employee.color' th.actions=t 'helpers.actions.title' tbody - each employee in employees + each employees as |employee| tr td: link-to 'employee' employee: span= employee.name td.email diff --git a/app/assets/javascripts/supplier/app/templates/index.emblem b/app/assets/javascripts/supplier/app/templates/index.emblem index 65b5bdb7..8f9b0450 100644 --- a/app/assets/javascripts/supplier/app/templates/index.emblem +++ b/app/assets/javascripts/supplier/app/templates/index.emblem @@ -31,8 +31,8 @@ th.currency=t 'active_lists.price' th.actions tbody - each list in active_lists - = view "active-list" contentBinding="list" + each active_lists as |list| + = view "active-list" content=list .page-header if active_orders.length h3.dashboard-orders-header{action "toggleDashboardOrders"} @@ -57,5 +57,5 @@ th.time th.actions tbody - each order in active_orders - = view "active-order" contentBinding="order" + each active_orders as |order| + = view "active-order" content=order diff --git a/app/assets/javascripts/supplier/app/templates/lists/index.emblem b/app/assets/javascripts/supplier/app/templates/lists/index.emblem index d0536dce..48662bca 100644 --- a/app/assets/javascripts/supplier/app/templates/lists/index.emblem +++ b/app/assets/javascripts/supplier/app/templates/lists/index.emblem @@ -13,7 +13,7 @@ th.currentcy=t 'attributes.list.price' th.timestamp=t 'attributes.list.created_at' tbody - each list in sorted_lists + each sorted_lists as |list| tr td.state link-to 'list' list.id diff --git a/app/assets/javascripts/supplier/app/templates/menu.emblem b/app/assets/javascripts/supplier/app/templates/menu.emblem index e368a56f..d5e9f793 100644 --- a/app/assets/javascripts/supplier/app/templates/menu.emblem +++ b/app/assets/javascripts/supplier/app/templates/menu.emblem @@ -3,7 +3,7 @@ .products-menu-filters-container = input value=product_code_filter type="search" placeholder=product_code_filter_placeholder h2 Menu -each product_category in sorted_product_categories +each sorted_product_categories as |product_category| .row.product_category-container: .small-12.columns .product_category-header can "manage" "menu" @@ -13,7 +13,7 @@ each product_category in sorted_product_categories can "manage" "menu" a.edit-product-category-button{action "editProductCategory" product_category} href="#": span a.add-product-product_category-button{action "addProduct" product_category} href="#": span - each product in product_category.sorted_products + each product_category.sorted_products as |product| = menu-product product=product code_filter=product_code_filter can "manage" "menu" .row diff --git a/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem b/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem index ab7a8ac3..00cc6356 100644 --- a/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem +++ b/app/assets/javascripts/supplier/app/templates/modals/add_section_element.emblem @@ -2,7 +2,7 @@ if svg_element.isLoading span.fa.fa-2x.fa-spinner.fa-spin else ul.add-section-element-list - each svg_element in svg_elements + each svg_elements as |svg_element| li: a{action "addSectionElement" svg_element}= svg svg_element.svg width=svg_element.box_width height=svg_element.box_height hr button.modal-close{action "close"}=t 'section.add_section.modal.close_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem b/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem index 0c936f8a..10456596 100644 --- a/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem +++ b/app/assets/javascripts/supplier/app/templates/modals/employee_edit.emblem @@ -21,7 +21,7 @@ if isNotSelf .form-label= t 'attributes.employee.color' .form-field.full span.current-color= colorbox model.color - each color in colors + each colors as |color| a{action "setColor" color}= colorbox color hr button.modal-close{action "close"}=t 'employee.modal.close_button' diff --git a/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem b/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem index 29715213..b918e3e2 100644 --- a/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem +++ b/app/assets/javascripts/supplier/app/templates/modals/product_category_move.emblem @@ -3,7 +3,7 @@ p=t 'product_category.modal.move.body_header' .small-11.small-offset-1.columns a{action "moveBelow"} href="#" = t 'product_category.modal.move.move_to_top' h4=t 'product_category.modal.move.move_below_label' -each product_category in product_categories +each product_categories as |product_category| .row.product_category-move-row .small-11.small-offset-1.columns a{action "moveBelow" product_category} href="#" @@ -14,7 +14,7 @@ if model.products h4=t 'product_category.modal.move.products.title' hr ul.sortable - each product in model.sorted_products + each model.sorted_products as |product| li.sortable-item-container data-sortable-id=product.id span.handle span= product.name diff --git a/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem b/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem index 495f9565..63e3d274 100644 --- a/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem +++ b/app/assets/javascripts/supplier/app/templates/modals/select_employee.emblem @@ -1,6 +1,6 @@ p= modal_options.header ul.select-employees - each employee in employees + each employees as |employee| li.select-employee = employee.name a.employee-selector{action "selectEmployee" employee}: span diff --git a/app/assets/javascripts/supplier/app/templates/orders_display.emblem b/app/assets/javascripts/supplier/app/templates/orders_display.emblem index 9d08a10d..4e984cfe 100644 --- a/app/assets/javascripts/supplier/app/templates/orders_display.emblem +++ b/app/assets/javascripts/supplier/app/templates/orders_display.emblem @@ -10,10 +10,10 @@ table.table th.currency=t 'active_orders.price' th.time tbody - each order in orders + each orders as |order| tr td - each user in order.list.users + each order.list.users as |user| = user.avatar_tag td.status-icons if order.active diff --git a/app/assets/javascripts/supplier/app/templates/section.emblem b/app/assets/javascripts/supplier/app/templates/section.emblem index 5b5569f6..7f459399 100644 --- a/app/assets/javascripts/supplier/app/templates/section.emblem +++ b/app/assets/javascripts/supplier/app/templates/section.emblem @@ -1,6 +1,6 @@ .section-tabs-container = link-to 'sections' class="goto-sections-index-tab-header": span - each section in sections + each sections as |section| = view "section-tab-header" context=section can "manage" "sections" a.add-section{action "addSection"}: span diff --git a/app/assets/javascripts/supplier/app/templates/section/table.emblem b/app/assets/javascripts/supplier/app/templates/section/table.emblem index a5359aeb..fb3a77fc 100644 --- a/app/assets/javascripts/supplier/app/templates/section/table.emblem +++ b/app/assets/javascripts/supplier/app/templates/section/table.emblem @@ -13,12 +13,12 @@ if view.content.active_list = button-mark-list-helped content=view.content.active_list /= view "close-list-button" view.contentBinding="table.active_list" = button-close-list content=view.content.active_list - each order in view.content.active_list.active_orders + each view.content.active_list.active_orders as |order| .table-action-row= order.display_tag .table-action-row.total = link-to "list" view.content.active_list =currency view.content.active_list.total /.table-action-row a{action "editTable" table}: span.fa.fa-lg.fa-wrench - each user in view.content.active_list.users + each view.content.active_list.users as |user| = user.avatar_tag diff --git a/app/assets/javascripts/supplier/app/templates/section/tables.emblem b/app/assets/javascripts/supplier/app/templates/section/tables.emblem index d38221ea..899b8bd6 100644 --- a/app/assets/javascripts/supplier/app/templates/section/tables.emblem +++ b/app/assets/javascripts/supplier/app/templates/section/tables.emblem @@ -1,6 +1,6 @@ -each section_element in model.section_elements +each model.section_elements as |section_element| view "section-element" content=section_element tablesContext=view -each section_area in model.section_areas +each model.section_areas as |section_area| = section-area section_area=section_area tablesContext=view -each table in model.tables +each model.tables as |table| = view "section-table" content=table tablesContext=view diff --git a/app/assets/javascripts/supplier/app/templates/sections/index.emblem b/app/assets/javascripts/supplier/app/templates/sections/index.emblem index d51acc67..0d2658da 100644 --- a/app/assets/javascripts/supplier/app/templates/sections/index.emblem +++ b/app/assets/javascripts/supplier/app/templates/sections/index.emblem @@ -16,7 +16,7 @@ /th.timestamp=t 'attributes.list.created_at' th.actions=t 'helpers.actions.title' tbody - each section in sections + each sections as |section| tr td a{ action "goToSection" section}= section.title diff --git a/app/assets/javascripts/supplier/app/templates/tables/index.emblem b/app/assets/javascripts/supplier/app/templates/tables/index.emblem index 1f64bea0..00de37db 100644 --- a/app/assets/javascripts/supplier/app/templates/tables/index.emblem +++ b/app/assets/javascripts/supplier/app/templates/tables/index.emblem @@ -9,7 +9,7 @@ /th.timestamp= t 'attributes.table.created_at' th.actions=t 'helpers.actions.title' tbody - each table in tables + each tables as |table| tr td: link-to 'table' table: span= table.number td.link