function get_item_card_html(item) { const item_name = item.item_name || item.name; const title = strip_html(item_name); const img_url = item.image; const company_name = item.company; // Subtitle let subtitle = [comment_when(item.creation)]; const rating = item.average_rating; if (rating > 0) { subtitle.push(rating + ``) } subtitle.push(company_name); let dot_spacer = ''; subtitle = subtitle.join(dot_spacer); // route if (!item.route) { item.route = `marketplace/item/${item.hub_item_code}` } const item_html = `
${title}
${subtitle}
`; return item_html; } function get_local_item_card_html(item) { const item_name = item.item_name || item.name; const title = strip_html(item_name); const img_url = item.image; const company_name = item.company; const is_active = item.publish_in_hub; const id = item.hub_item_code || item.item_code; // Subtitle let subtitle = [comment_when(item.creation)]; const rating = item.average_rating; if (rating > 0) { subtitle.push(rating + ``) } subtitle.push(company_name); let dot_spacer = ''; subtitle = subtitle.join(dot_spacer); const edit_item_button = `
`; const item_html = `
${title}
${subtitle}
${edit_item_button}
`; return item_html; } export { get_item_card_html, get_local_item_card_html }