mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
NotFound page for marketplace
This commit is contained in:
@@ -166,8 +166,10 @@ erpnext.hub.Marketplace = class Marketplace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Object.keys(this.subpages).includes(route[1])) {
|
if (!Object.keys(this.subpages).includes(route[1])) {
|
||||||
frappe.show_not_found();
|
if (!this.subpages.not_found) {
|
||||||
return;
|
this.subpages.not_found = new erpnext.hub.NotFound(this.$body);
|
||||||
|
}
|
||||||
|
route[1] = 'not_found';
|
||||||
}
|
}
|
||||||
|
|
||||||
this.update_sidebar();
|
this.update_sidebar();
|
||||||
@@ -783,10 +785,20 @@ erpnext.hub.Publish = class Publish extends SubPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_empty_state(message) {
|
erpnext.hub.NotFound = class NotFound extends SubPage {
|
||||||
return `<div class="empty-state flex">
|
refresh() {
|
||||||
|
this.$wrapper.html(get_empty_state(
|
||||||
|
__('Sorry! I could not find what you were looking for.'),
|
||||||
|
`<button class="btn btn-default btn-xs" data-route="marketplace/home">${__('Back to home')}</button>`
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_empty_state(message, action) {
|
||||||
|
return `<div class="empty-state flex align-center flex-column justify-center">
|
||||||
<p class="text-muted">${message}</p>
|
<p class="text-muted">${message}</p>
|
||||||
</div>`
|
${action ? `<p>${action}</p>`: ''}
|
||||||
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_item_card_container_html(items, title='') {
|
function get_item_card_container_html(items, title='') {
|
||||||
|
|||||||
@@ -157,8 +157,7 @@ body[data-route^="marketplace/"] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
justify-content: center;
|
height: 500px;
|
||||||
padding-top: 159px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-container {
|
.form-container {
|
||||||
|
|||||||
Reference in New Issue
Block a user