= haml "products/menu".to_sym %h1 Link Wizard - if @unlinked_count == 0 %h2 Nothing to do! Congratulations! %i.fa.fa-birthday-cake -else #{@unlinked_count}/#{settings.supplier.local_products.count} unlinked local products from #{settings.supplier.name} %h2 = product_link @local_product %center %table.pure-table %tr %td = haml "widgets/_link".to_sym, locals: {local_product: @local_product, redirect_to: "link_wizard"} -#%form.pure-form(action="/product/#{@local_product.id}/link" method="POST") -# %input(type="hidden" name="remote_product_id" id="remote_product_id") -# %input(type="hidden" name="redirect_to" value="link_wizard") -# %input#search-remote(placeholder="search ...") -# %button.pure-button -# Link! %td - if @local_product.link_suggestions.count > 0 Suggenstions: %br - @local_product.link_suggestions.each do |suggested_product| %form.pure-form(action="/product/#{@local_product.id}/link" method="POST") %input(type="hidden" name="remote_product_id" id="remote_product_id" value="#{suggested_product.id}") %input(type="hidden" name="redirect_to" value="link_wizard") %button.pure-button = suggested_product.name %br - else (no suggestions) %td %a.pure-button(href="/products/link_wizard/#{params[:idx].to_i + 1}") Skip %br %br = haml :"_hide_unhide_button", locals: {product: @local_product} %br %p#message %br