Update paths to "noimage" images

This commit is contained in:
Matt-Yorkley
2020-06-29 20:07:08 +02:00
parent 5bec887f93
commit b441ac2644
9 changed files with 10 additions and 10 deletions

View File

@@ -34,7 +34,7 @@ Darkswarm.factory 'Products', (OrderCycleResource, OrderCycle, Shopfront, curren
product.price = Math.min.apply(null, prices)
product.hasVariants = product.variants?.length > 0
product.primaryImage = product.images[0]?.small_url if product.images
product.primaryImageOrMissing = product.primaryImage || "/assets/noimage/small.png"
product.primaryImageOrMissing = product.primaryImage || "/noimage/small.png"
product.largeImage = product.images[0]?.large_url if product.images
dereference: ->

View File

@@ -15,6 +15,6 @@
.columns.small-12.medium-6.large-6.product-img
%img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
%img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
%img.placeholder{ src: "/noimage/large.png", "ng-if" => "::!product.largeImage"}
%ng-include{src: "'partials/close.html'"}

View File

@@ -12,7 +12,7 @@ class Api::Admin::ProductSerializer < ActiveModel::Serializer
if object.images.present?
object.images.first.attachment.url(:product)
else
"/assets/noimage/product.png"
"/noimage/product.png"
end
end
@@ -20,7 +20,7 @@ class Api::Admin::ProductSerializer < ActiveModel::Serializer
if object.images.present?
object.images.first.attachment.url(:mini)
else
"/assets/noimage/mini.png"
"/noimage/mini.png"
end
end

View File

@@ -35,7 +35,7 @@ class Api::VariantSerializer < ActiveModel::Serializer
if object.product.images.present?
object.product.images.first.attachment.url(:mini)
else
"/assets/noimage/mini.png"
"/noimage/mini.png"
end
end
end

View File

@@ -22,7 +22,7 @@
- if @group.logo.present?
%img.group-logo{"src" => @group.logo}
- else
%img.group-logo{"src" => image_path('noimage/group.png') }
%img.group-logo{"src" => '/noimage/group.png' }
%h2.group-name= @group.name
%p= @group.description

View File

@@ -83,7 +83,7 @@
%fieldset.no-border-bottom{ id: "image" }
%legend{align: "center"}= t(".image")
.row
= image_tag "noimage/product.png", class: "four columns alpha"
= image_tag "/noimage/product.png", class: "four columns alpha"
.row
= f.fields_for 'images_attributes[]', f.object.images.build do |image_fields|
= image_fields.file_field :attachment

View File

@@ -4,7 +4,7 @@
{{#if variant.image }}
<img src='{{variant.image}}' />
{{ else }}
<img src='<%= image_path("noimage/mini.png") %>' />
<img src='/noimage/mini.png' />
{{/if}}
</figure>

View File

@@ -770,7 +770,7 @@ feature '
expect(page).to have_selector "td.image"
# Shows default image when no image set
expect(page).to have_css "img[src='/assets/noimage/mini.png']"
expect(page).to have_css "img[src='/noimage/mini.png']"
@old_thumb_src = page.find("a.image-modal img")['src']
# Click image

View File

@@ -107,7 +107,7 @@ describe 'Products service', ->
$httpBackend.expectGET(endpoint).respond([product])
$httpBackend.flush()
expect(Products.products[0].primaryImage).toBeUndefined()
expect(Products.products[0].primaryImageOrMissing).toEqual "/assets/noimage/small.png"
expect(Products.products[0].primaryImageOrMissing).toEqual "/noimage/small.png"
it "sets largeImage", ->
$httpBackend.expectGET(endpoint).respond([productWithImage])