Sha256: 282e14c2a59f64655d2bc40e26222814c12e3103d803dce013ce3f05d5ba4251

Contents?: true

Size: 1.37 KB

Versions: 5

Compression:

Stored size: 1.37 KB

Contents

%table.pure-table.pure-table-striped
  %thead
    %tr
      %th Product Name
      %th Product ID
      %th Supplier
      %th Action
  %tbody
    -# find_each does not work on link_suggestions array
    - products.each do |product|
      %tr
        %td= product.name
        %td= product.product_id
        %td= product.supplier.try(:name)
        %td
          %form.pure-form.pure-form-aligned(action="" method="post")
            %input(type="hidden" name="remote_product_id" value="#{product.id}")
            - if @product.remote_product.nil?
              - if product.local_product
                Currently linked to #{product.local_product.name}
                %button.pure-button.pure-button-primary(type="submit")
                  = link_icon
                  Set link
              - else
                %button.pure-button.pure-button-primary(type="submit")
                  = link_icon
                  Create link
            - else
              -#Currently linked to #{product_link @prod
              - if product.local_product
                Currently already linked to #{product.local_product.name}
                %button.pure-button.pure-button-error(type="submit")
                  = link_icon
                  Set Link
              - else
                %button.pure-button.pure-button-error(type="submit")
                  = link_icon
                  Set Link

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rawbotz-0.2.0 lib/rawbotz/views/products/_link_table.haml
rawbotz-0.1.5 lib/rawbotz/views/products/_link_table.haml
rawbotz-0.1.4 lib/rawbotz/views/products/_link_table.haml
rawbotz-0.1.3 lib/rawbotz/views/products/_link_table.haml
rawbotz-0.1.2 lib/rawbotz/views/products/_link_table.haml