Put order cycle variants in a tooltip

This commit is contained in:
Rohan Mitchell
2013-11-22 10:03:49 +11:00
parent 5e170a843e
commit f75879bec1
2 changed files with 9 additions and 4 deletions

View File

@@ -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'

View File

@@ -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