diff --git a/assets/controllers/elements/part_livesearch_controller.js b/assets/controllers/elements/part_livesearch_controller.js index 5ded2df2..d5facbea 100644 --- a/assets/controllers/elements/part_livesearch_controller.js +++ b/assets/controllers/elements/part_livesearch_controller.js @@ -27,7 +27,8 @@ import {marked} from "marked"; import { trans, SEARCH_PLACEHOLDER, - SEARCH_SUBMIT + SEARCH_SUBMIT, + STATISTICS_PARTS } from '../../translator'; export default class extends Controller { @@ -42,6 +43,9 @@ export default class extends Controller { // The URL template for the part detail pages const part_detail_uri_template = this.element.dataset.detailUrl; + //The URL of the placeholder picture + const placeholder_image = this.element.dataset.placeholderImage; + const that = this; const recentSearchesPlugin = createLocalStorageRecentSearchesPlugin({ @@ -106,25 +110,28 @@ export default class extends Controller { }, templates: { header({ html }) { - return html`Parts + return html`${trans(STATISTICS_PARTS)}
`; }, item({item, components, html}) { const details_url = part_detail_uri_template.replace('__ID__', item.id); - return html`${item.category}
` : ""} + ${item.footprint ? html`${item.footprint}
` : ""}