diff --git a/erpnext/public/js/hub/components/detail_view.js b/erpnext/public/js/hub/components/detail_view.js deleted file mode 100644 index d80720c1da..0000000000 --- a/erpnext/public/js/hub/components/detail_view.js +++ /dev/null @@ -1,138 +0,0 @@ -import { get_rating_html } from './reviews'; - -function get_detail_view_html(item, allow_edit) { - const title = item.item_name || item.name; - const seller = item.company; - - const who = __('Posted By {0}', [seller]); - const when = comment_when(item.creation); - - const city = item.city ? item.city + ', ' : ''; - const country = item.country ? item.country : ''; - const where = `${city}${country}`; - - const dot_spacer = ''; - - const description = item.description || ''; - - let stats = __('No views yet'); - if(item.view_count) { - const views_message = __(`${item.view_count} Views`); - - const rating_html = get_rating_html(item.average_rating); - const rating_count = item.no_of_ratings > 0 ? `${item.no_of_ratings} reviews` : __('No reviews yet'); - - stats = `${views_message}${dot_spacer}${rating_html} (${rating_count})`; - } - - let favourite_button = '' - if (hub.settings.registered) { - favourite_button = !item.favourited - ? `` - : ``; - } - - const contact_seller_button = item.hub_seller !== hub.settings.company_email - ? `` - : ''; - - let menu_items = ''; - - if(allow_edit) { - menu_items = ` -
${where}${dot_spacer}${when}
-${stats}
-- ${description ? description : __('No details')} -
-