mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Put order cycle variants in a tooltip
This commit is contained in:
@@ -43,9 +43,14 @@
|
||||
- order_cycle.distributors.each do |d|
|
||||
= d.name
|
||||
%br/
|
||||
|
||||
%td.products
|
||||
- order_cycle.variants.each do |v|
|
||||
= image_tag(v.images.first.attachment.url(:mini)) if v.images.present?
|
||||
- variant_images = capture do
|
||||
- order_cycle.variants.each do |v|
|
||||
= image_tag(v.images.first.attachment.url(:mini)) if v.images.present?
|
||||
%br/
|
||||
%span.with-tip{'data-powertip' => variant_images}= "#{order_cycle.variants.count} variants"
|
||||
|
||||
%td.actions
|
||||
= link_to '', main_app.clone_admin_order_cycle_path(order_cycle), class: 'clone-order-cycle icon-copy no-text'
|
||||
= f.submit 'Update'
|
||||
|
||||
@@ -36,8 +36,8 @@ feature %q{
|
||||
oc.suppliers.each { |s| page.should have_content s.name }
|
||||
oc.distributors.each { |d| page.should have_content d.name }
|
||||
|
||||
# And I should see a thumbnail image for each product
|
||||
all('td.products img').count.should == 2
|
||||
# And I should see the number of variants
|
||||
page.should have_selector 'td.products', text: '2 variants'
|
||||
end
|
||||
|
||||
scenario "creating an order cycle", js: true do
|
||||
|
||||
Reference in New Issue
Block a user