Placeholder on dashboard when no images

master
Mark Moffat 2020-03-19 12:29:32 +10:30
parent 7252c309aa
commit 4b3867e47f
2 changed files with 5 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 306 B

View File

@ -56,7 +56,11 @@
{{#if dashboardData.topProducts}} {{#if dashboardData.topProducts}}
{{#each dashboardData.topProducts}} {{#each dashboardData.topProducts}}
<li class="media my-4 align-middle"> <li class="media my-4 align-middle">
<img src="{{this.productImage}}" class="col-2 mr-3 img-fluid" alt=""> {{#if this.productImage}}
<img src="{{this.productImage}}" class="col-2 mr-3 img-fluid" alt="image {{this.productTitle}}">
{{else}}
<img src="/images/placeholder.png" class="col-2 mr-3 img-fluid" alt="mage {{this.productTitle}}">
{{/if}}
<div class="media-body"> <div class="media-body">
<h5 class="mt-3 mb-1">{{this.title}}</h5> <h5 class="mt-3 mb-1">{{this.title}}</h5>
<h4 class="mt-4">Sold: <span class="text-danger">{{this.count}}</span></h4> <h4 class="mt-4">Sold: <span class="text-danger">{{this.count}}</span></h4>