From 75fe8a615a2d28f77c78a9558debe32f364e262d Mon Sep 17 00:00:00 2001
From: Rushabh Mehta
Date: Wed, 11 Nov 2020 16:31:47 +0530
Subject: [PATCH] feat(app): move /desk to /app
---
cypress/integration/api.js | 2 +-
cypress/integration/awesome_bar.js | 4 ++--
cypress/integration/control_barcode.js | 2 +-
cypress/integration/control_duration.js | 2 +-
cypress/integration/control_link.js | 6 +++---
cypress/integration/control_rating.js | 2 +-
cypress/integration/datetime.js | 2 +-
cypress/integration/depends_on.js | 2 +-
cypress/integration/file_uploader.js | 2 +-
cypress/integration/form.js | 16 +++++++--------
cypress/integration/grid_pagination.js | 12 +++++------
cypress/integration/list_view.js | 2 +-
cypress/integration/list_view_settings.js | 6 +++---
cypress/integration/login.js | 2 +-
cypress/integration/query_report.js | 4 ++--
cypress/integration/recorder.js | 16 +++++++--------
cypress/integration/relative_time_filters.js | 6 +++---
cypress/integration/report_view.js | 4 ++--
cypress/support/commands.js | 4 ++--
frappe/__init__.py | 2 +-
frappe/auth.py | 2 +-
.../doctype/auto_repeat/auto_repeat.js | 2 +-
.../deleted_document/deleted_document_list.js | 2 +-
frappe/core/doctype/doctype/doctype.js | 4 ++--
.../core/doctype/log_settings/log_settings.py | 2 +-
frappe/core/doctype/user/user.py | 2 +-
.../permission_manager/permission_manager.js | 2 +-
.../permission_manager_help.html | 8 ++++----
.../customize_form/test_customize_form.py | 2 +-
frappe/desk/doctype/dashboard/dashboard.py | 2 +-
frappe/desk/moduleview.py | 8 ++++----
frappe/desk/page/leaderboard/leaderboard.js | 2 +-
frappe/desk/page/setup_wizard/setup_wizard.js | 2 +-
frappe/desk/report/todo/todo.py | 2 +-
.../doctype/notification/notification.js | 2 +-
.../google_calendar/google_calendar.js | 2 +-
.../google_calendar/google_calendar.py | 2 +-
.../google_contacts/google_contacts.js | 2 +-
.../google_contacts/google_contacts.py | 2 +-
.../doctype/google_drive/google_drive.js | 2 +-
.../doctype/google_drive/google_drive.py | 2 +-
frappe/model/delete_doc.py | 4 ++--
frappe/model/document.py | 4 ++--
frappe/public/js/frappe/form/form.js | 2 +-
frappe/public/js/frappe/form/formatters.js | 2 +-
frappe/public/js/frappe/form/linked_with.js | 2 +-
.../js/frappe/form/multi_select_dialog.js | 2 +-
.../frappe/form/templates/address_list.html | 2 +-
.../frappe/form/templates/contact_list.html | 2 +-
.../frappe/form/templates/print_layout.html | 2 +-
frappe/public/js/frappe/list/list_factory.js | 8 ++++----
frappe/public/js/frappe/list/list_view.js | 2 +-
frappe/public/js/frappe/recorder/recorder.js | 4 ++--
frappe/public/js/frappe/router.js | 20 ++++++++++++++-----
.../frappe/ui/notifications/notifications.js | 8 ++++----
.../js/frappe/utils/energy_point_utils.js | 2 +-
frappe/public/js/frappe/utils/utils.js | 2 +-
frappe/public/js/frappe/views/breadcrumbs.js | 4 ++--
.../public/js/frappe/views/file/file_view.js | 6 +++---
.../views/image/image_view_item_row.html | 2 +-
.../js/frappe/views/kanban/kanban_view.js | 2 +-
frappe/public/js/frappe/views/pageview.js | 16 ---------------
.../js/frappe/views/reports/query_report.js | 8 ++++----
.../js/frappe/views/workspace/workspace.js | 2 +-
.../js/frappe/widgets/onboarding_widget.js | 2 +-
frappe/public/js/frappe/widgets/utils.js | 1 -
.../energy_point_log/energy_point_log.js | 2 +-
.../templates/includes/comments/comments.py | 2 +-
.../includes/navbar/navbar_login.html | 2 +-
.../pages/integrations/gcalendar-success.html | 2 +-
frappe/utils/bot.py | 6 +++---
frappe/utils/csvutils.py | 2 +-
frappe/utils/data.py | 6 +++---
frappe/utils/oauth.py | 2 +-
.../website_settings/google_indexing.py | 2 +-
frappe/website/render.py | 5 ++---
.../workflow_action/workflow_action_list.js | 2 +-
frappe/www/{desk.html => app.html} | 1 -
frappe/www/{desk.py => app.py} | 3 +--
frappe/www/login.py | 2 +-
80 files changed, 147 insertions(+), 157 deletions(-)
rename frappe/www/{desk.html => app.html} (98%)
rename frappe/www/{desk.py => app.py} (96%)
diff --git a/cypress/integration/api.js b/cypress/integration/api.js
index 2279dc399d..cd91c8fae4 100644
--- a/cypress/integration/api.js
+++ b/cypress/integration/api.js
@@ -2,7 +2,7 @@ context('API Resources', () => {
before(() => {
cy.visit('/login');
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
it('Creates two Comments', () => {
diff --git a/cypress/integration/awesome_bar.js b/cypress/integration/awesome_bar.js
index 15e85976fc..dd56ca33f7 100644
--- a/cypress/integration/awesome_bar.js
+++ b/cypress/integration/awesome_bar.js
@@ -2,7 +2,7 @@ context('Awesome Bar', () => {
before(() => {
cy.visit('/login');
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
beforeEach(() => {
@@ -16,7 +16,7 @@ context('Awesome Bar', () => {
cy.get('h1').should('contain', 'To Do');
- cy.location('hash').should('eq', '#List/ToDo/List');
+ cy.location('hash').should('eq', '/app/List/ToDo/List');
});
it('find text in doctype list', () => {
diff --git a/cypress/integration/control_barcode.js b/cypress/integration/control_barcode.js
index 4e05d864e6..ea26f446f4 100644
--- a/cypress/integration/control_barcode.js
+++ b/cypress/integration/control_barcode.js
@@ -1,7 +1,7 @@
context('Control Barcode', () => {
beforeEach(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
function get_dialog_with_barcode() {
diff --git a/cypress/integration/control_duration.js b/cypress/integration/control_duration.js
index edad759216..fae207890f 100644
--- a/cypress/integration/control_duration.js
+++ b/cypress/integration/control_duration.js
@@ -1,7 +1,7 @@
context('Control Duration', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
function get_dialog_with_duration(hide_days=0, hide_seconds=0) {
diff --git a/cypress/integration/control_link.js b/cypress/integration/control_link.js
index 0dc7d5b88e..248271453b 100644
--- a/cypress/integration/control_link.js
+++ b/cypress/integration/control_link.js
@@ -1,11 +1,11 @@
context('Control Link', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
beforeEach(() => {
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
cy.create_records({
doctype: 'ToDo',
description: 'this is a test todo for link'
@@ -77,7 +77,7 @@ context('Control Link', () => {
cy.get('.frappe-control[data-fieldname=link] .link-btn')
.should('be.visible')
.click();
- cy.location('hash').should('eq', `#Form/ToDo/${todos[0]}`);
+ cy.location('hash').should('eq', `/app/Form/ToDo/${todos[0]}`);
});
});
});
diff --git a/cypress/integration/control_rating.js b/cypress/integration/control_rating.js
index e89ab2d3be..c1e308860e 100644
--- a/cypress/integration/control_rating.js
+++ b/cypress/integration/control_rating.js
@@ -1,7 +1,7 @@
context('Control Rating', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
function get_dialog_with_rating() {
diff --git a/cypress/integration/datetime.js b/cypress/integration/datetime.js
index 9bf01632bf..7a9f51fb0d 100644
--- a/cypress/integration/datetime.js
+++ b/cypress/integration/datetime.js
@@ -4,7 +4,7 @@ const doctype_name = datetime_doctype.name;
context('Control Date, Time and DateTime', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
return cy.insert_doc('DocType', datetime_doctype, true);
});
diff --git a/cypress/integration/depends_on.js b/cypress/integration/depends_on.js
index 93417014c5..919323dcc3 100644
--- a/cypress/integration/depends_on.js
+++ b/cypress/integration/depends_on.js
@@ -1,7 +1,7 @@
context('Depends On', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
return cy.window().its('frappe').then(frappe => {
return frappe.call('frappe.tests.ui_test_helpers.create_doctype', {
name: 'Test Depends On',
diff --git a/cypress/integration/file_uploader.js b/cypress/integration/file_uploader.js
index f9f44675db..4186141870 100644
--- a/cypress/integration/file_uploader.js
+++ b/cypress/integration/file_uploader.js
@@ -1,7 +1,7 @@
context('FileUploader', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
function open_upload_dialog() {
diff --git a/cypress/integration/form.js b/cypress/integration/form.js
index ef89a18e7d..d804ec8d99 100644
--- a/cypress/integration/form.js
+++ b/cypress/integration/form.js
@@ -1,13 +1,13 @@
context('Form', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
return cy.window().its('frappe').then(frappe => {
return frappe.call("frappe.tests.ui_test_helpers.create_contact_records");
});
});
it('create a new form', () => {
- cy.visit('/desk#Form/ToDo/New ToDo 1');
+ cy.visit('/app/Form/ToDo/New ToDo 1');
cy.fill_field('description', 'this is a test todo', 'Text Editor').blur();
cy.wait(300);
cy.get('.page-title').should('contain', 'Not Saved');
@@ -18,20 +18,20 @@ context('Form', () => {
}).as('form_save');
cy.get('.primary-action').click();
cy.wait('@form_save').its('status').should('eq', 200);
- cy.visit('/desk#List/ToDo');
- cy.location('hash').should('eq', '#List/ToDo/List');
+ cy.visit('/app/List/ToDo');
+ cy.location('hash').should('eq', '/app/List/ToDo/List');
cy.get('h1').should('be.visible').and('contain', 'To Do');
cy.get('.list-row').should('contain', 'this is a test todo');
});
it('navigates between documents with child table list filters applied', () => {
- cy.visit('/desk#List/Contact');
- cy.location('hash').should('eq', '#List/Contact/List');
+ cy.visit('/app/List/Contact');
+ cy.location('hash').should('eq', '/app/List/Contact/List');
cy.get('.tag-filters-area .btn:contains("Add Filter")').click();
cy.get('.fieldname-select-area').should('exist');
cy.get('.fieldname-select-area input').type('Number{enter}', { force: true });
cy.get('.filter-field .input-with-feedback.form-control').type('123', { force: true });
cy.get('.filter-box .btn:contains("Apply")').click({ force: true });
- cy.visit('/desk#Form/Contact/Test Form Contact 3');
+ cy.visit('/app/Form/Contact/Test Form Contact 3');
cy.get('.prev-doc').should('be.visible').click();
cy.get('.msgprint-dialog .modal-body').contains('No further records').should('be.visible');
cy.get('.btn-modal-close:visible').click();
@@ -50,7 +50,7 @@ context('Form', () => {
let website_input = 'website.in';
let expectBackgroundColor = 'rgb(255, 220, 220)';
- cy.visit('/desk#Form/Contact/New Contact 1');
+ cy.visit('/app/Form/Contact/New Contact 1');
cy.get('.frappe-control[data-fieldname="email_ids"]').as('table');
cy.get('@table').find('button.grid-add-row').click();
cy.get('.grid-body .rows [data-fieldname="email_id"]').click();
diff --git a/cypress/integration/grid_pagination.js b/cypress/integration/grid_pagination.js
index b383f30bb8..7142dce131 100644
--- a/cypress/integration/grid_pagination.js
+++ b/cypress/integration/grid_pagination.js
@@ -1,24 +1,24 @@
context('Grid Pagination', () => {
beforeEach(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
return cy.window().its('frappe').then(frappe => {
return frappe.call("frappe.tests.ui_test_helpers.create_contact_phone_nos_records");
});
});
it('creates pages for child table', () => {
- cy.visit('/desk#Form/Contact/Test Contact');
+ cy.visit('/app/Form/Contact/Test Contact');
cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table');
cy.get('@table').find('.current-page-number').should('contain', '1');
cy.get('@table').find('.total-page-number').should('contain', '20');
cy.get('@table').find('.grid-body .grid-row').should('have.length', 50);
});
it('goes to the next and previous page', () => {
- cy.visit('/desk#Form/Contact/Test Contact');
+ cy.visit('/app/Form/Contact/Test Contact');
cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table');
cy.get('@table').find('.next-page').click();
cy.get('@table').find('.current-page-number').should('contain', '2');
@@ -28,7 +28,7 @@ context('Grid Pagination', () => {
cy.get('@table').find('.grid-body .grid-row').first().should('have.attr', 'data-idx', '1');
});
it('adds and deletes rows and changes page', ()=> {
- cy.visit('/desk#Form/Contact/Test Contact');
+ cy.visit('/app/Form/Contact/Test Contact');
cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table');
cy.get('@table').find('button.grid-add-row').click();
cy.get('@table').find('.grid-body .row-index').should('contain', 1001);
@@ -41,7 +41,7 @@ context('Grid Pagination', () => {
cy.get('@table').find('.total-page-number').should('contain', '20');
});
// it('deletes all rows', ()=> {
- // cy.visit('/desk#Form/Contact/Test Contact');
+ // cy.visit('/app/Form/Contact/Test Contact');
// cy.get('.frappe-control[data-fieldname="phone_nos"]').as('table');
// cy.get('@table').find('.grid-heading-row .grid-row-check').click({force: true});
// cy.get('@table').find('button.grid-remove-all-rows').click();
diff --git a/cypress/integration/list_view.js b/cypress/integration/list_view.js
index 0d26ca90a2..bb93d320bb 100644
--- a/cypress/integration/list_view.js
+++ b/cypress/integration/list_view.js
@@ -1,7 +1,7 @@
context('List View', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
return cy.window().its('frappe').then(frappe => {
return frappe.xcall("frappe.tests.ui_test_helpers.setup_workflow");
});
diff --git a/cypress/integration/list_view_settings.js b/cypress/integration/list_view_settings.js
index 47f8efe94b..5979185dcf 100644
--- a/cypress/integration/list_view_settings.js
+++ b/cypress/integration/list_view_settings.js
@@ -1,16 +1,16 @@
context('List View Settings', () => {
beforeEach(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
it('Default settings', () => {
- cy.visit('/desk#List/DocType/List');
+ cy.visit('/app/List/DocType/List');
cy.get('.list-count').should('contain', "20 of");
cy.get('.sidebar-stat').should('contain', "Tags");
});
it('disable count and sidebar stats then verify', () => {
cy.wait(300);
- cy.visit('/desk#List/DocType/List');
+ cy.visit('/app/List/DocType/List');
cy.wait(300);
cy.get('.list-count').should('contain', "20 of");
cy.get('button').contains('Menu').click();
diff --git a/cypress/integration/login.js b/cypress/integration/login.js
index 861377444c..e8964768b0 100644
--- a/cypress/integration/login.js
+++ b/cypress/integration/login.js
@@ -35,7 +35,7 @@ context('Login', () => {
cy.get('#login_password').type(Cypress.config('adminPassword'));
cy.get('.btn-login').click();
- cy.location('pathname').should('eq', '/desk');
+ cy.location('pathname').should('eq', '/app');
cy.window().its('frappe.session.user').should('eq', 'Administrator');
});
diff --git a/cypress/integration/query_report.js b/cypress/integration/query_report.js
index 5581a20edc..b06295495a 100644
--- a/cypress/integration/query_report.js
+++ b/cypress/integration/query_report.js
@@ -1,11 +1,11 @@
context('Query Report', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
});
it('add custom column in report', () => {
- cy.visit('/desk#query-report/Permitted Documents For User');
+ cy.visit('/app#query-report/Permitted Documents For User');
cy.get('div[class="page-form flex"]', {timeout: 60000}).should('have.length', 1).then(()=>{
cy.get('#page-query-report input[data-fieldname="user"]').as('input');
diff --git a/cypress/integration/recorder.js b/cypress/integration/recorder.js
index a0f8cc3621..e89621d936 100644
--- a/cypress/integration/recorder.js
+++ b/cypress/integration/recorder.js
@@ -4,14 +4,14 @@ context('Recorder', () => {
});
it('Navigate to Recorder', () => {
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
cy.awesomebar('recorder');
cy.get('h1').should('contain', 'Recorder');
cy.location('hash').should('eq', '#recorder');
});
it('Recorder Empty State', () => {
- cy.visit('/desk#recorder');
+ cy.visit('/app#recorder');
cy.get('.title-text').should('contain', 'Recorder');
cy.get('.indicator').should('contain', 'Inactive').should('have.class', 'red');
@@ -24,21 +24,21 @@ context('Recorder', () => {
});
it('Recorder Start', () => {
- cy.visit('/desk#recorder');
+ cy.visit('/app#recorder');
cy.get('.primary-action').should('contain', 'Start').click();
cy.get('.indicator').should('contain', 'Active').should('have.class', 'green');
cy.get('.msg-box').should('contain', 'No Requests');
cy.server();
- cy.visit('/desk#List/DocType/List');
+ cy.visit('/app/List/DocType/List');
cy.route('POST', '/api/method/frappe.desk.reportview.get').as('list_refresh');
cy.wait('@list_refresh');
cy.get('.title-text').should('contain', 'DocType');
cy.get('.list-count').should('contain', '20 of ');
- cy.visit('/desk#recorder');
+ cy.visit('/app#recorder');
cy.get('.title-text').should('contain', 'Recorder');
cy.get('.result-list').should('contain', '/api/method/frappe.desk.reportview.get');
@@ -48,11 +48,11 @@ context('Recorder', () => {
});
it('Recorder View Request', () => {
- cy.visit('/desk#recorder');
+ cy.visit('/app#recorder');
cy.get('.primary-action').should('contain', 'Start').click();
cy.server();
- cy.visit('/desk#List/DocType/List');
+ cy.visit('/app/List/DocType/List');
cy.route('POST', '/api/method/frappe.desk.reportview.get').as('list_refresh');
cy.wait('@list_refresh');
@@ -62,7 +62,7 @@ context('Recorder', () => {
// temporarily commenting out theses tests as they seem to be
// randomly failing maybe due a backround event
- // cy.visit('/desk#recorder');
+ // cy.visit('/app#recorder');
// cy.get('.list-row-container span').contains('/api/method/frappe').click();
diff --git a/cypress/integration/relative_time_filters.js b/cypress/integration/relative_time_filters.js
index ac70c44345..c13c2bbb5e 100644
--- a/cypress/integration/relative_time_filters.js
+++ b/cypress/integration/relative_time_filters.js
@@ -4,13 +4,13 @@ context('Relative Timeframe', () => {
});
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
cy.window().its('frappe').then(frappe => {
frappe.call("frappe.tests.ui_test_helpers.create_todo_records");
});
});
it('sets relative timespan filter for last week and filters list', () => {
- cy.visit('/desk#List/ToDo/List');
+ cy.visit('/app/List/ToDo/List');
cy.get('.list-row:contains("this is fourth todo")').should('exist');
cy.get('.tag-filters-area .btn:contains("Add Filter")').click();
cy.get('.fieldname-select-area').should('exist');
@@ -29,7 +29,7 @@ context('Relative Timeframe', () => {
cy.wait('@save_user_settings');
});
it('sets relative timespan filter for next week and filters list', () => {
- cy.visit('/desk#List/ToDo/List');
+ cy.visit('/app/List/ToDo/List');
cy.get('.list-row:contains("this is fourth todo")').should('exist');
cy.get('.tag-filters-area .btn:contains("Add Filter")').click();
cy.get('.fieldname-select-area input').type("Due Date{enter}", { delay: 100 });
diff --git a/cypress/integration/report_view.js b/cypress/integration/report_view.js
index deeef6bdd5..af84c44cdc 100644
--- a/cypress/integration/report_view.js
+++ b/cypress/integration/report_view.js
@@ -4,7 +4,7 @@ const doctype_name = custom_submittable_doctype.name;
context('Report View', () => {
before(() => {
cy.login();
- cy.visit('/desk#workspace/Website');
+ cy.visit('/app#workspace/Website');
cy.insert_doc('DocType', custom_submittable_doctype, true);
cy.clear_cache();
cy.insert_doc(doctype_name, {
@@ -18,7 +18,7 @@ context('Report View', () => {
it('Field with enabled allow_on_submit should be editable.', () => {
cy.server();
cy.route('POST', 'api/method/frappe.client.set_value').as('value-update');
- cy.visit(`/desk#List/${doctype_name}/Report`);
+ cy.visit(`/app/List/${doctype_name}/Report`);
// check status column added from docstatus
cy.get('.dt-row-0 > .dt-cell--col-3').should('contain', 'Submitted');
let cell = cy.get('.dt-row-0 > .dt-cell--col-4');
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 7816d5526f..c3f2deed20 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -210,13 +210,13 @@ Cypress.Commands.add('awesomebar', text => {
Cypress.Commands.add('new_form', doctype => {
let route = `Form/${doctype}/New ${doctype} 1`;
- cy.visit(`/desk#${route}`);
+ cy.visit(`/app#${route}`);
cy.get('body').should('have.attr', 'data-route', route);
cy.get('body').should('have.attr', 'data-ajax-state', 'complete');
});
Cypress.Commands.add('go_to_list', doctype => {
- cy.visit(`/desk#List/${doctype}/List`);
+ cy.visit(`/app/List/${doctype}/List`);
});
Cypress.Commands.add('clear_cache', () => {
diff --git a/frappe/__init__.py b/frappe/__init__.py
index fac0927428..52869be3dc 100644
--- a/frappe/__init__.py
+++ b/frappe/__init__.py
@@ -1611,7 +1611,7 @@ def log_error(message=None, title=_("Error")):
method=title)).insert(ignore_permissions=True)
def get_desk_link(doctype, name):
- html = '{doctype_local} {name}'
+ html = '{doctype_local} {name}'
return html.format(
doctype=doctype,
name=name,
diff --git a/frappe/auth.py b/frappe/auth.py
index 3b18c8adb9..3f2e12b416 100644
--- a/frappe/auth.py
+++ b/frappe/auth.py
@@ -167,7 +167,7 @@ class LoginManager:
frappe.local.cookie_manager.set_cookie("system_user", "yes")
if not resume:
frappe.local.response['message'] = 'Logged In'
- frappe.local.response["home_page"] = "/desk"
+ frappe.local.response["home_page"] = "/app"
if not resume:
frappe.response["full_name"] = self.full_name
diff --git a/frappe/automation/doctype/auto_repeat/auto_repeat.js b/frappe/automation/doctype/auto_repeat/auto_repeat.js
index 456061ee0b..7d6bf69e3d 100644
--- a/frappe/automation/doctype/auto_repeat/auto_repeat.js
+++ b/frappe/automation/doctype/auto_repeat/auto_repeat.js
@@ -30,7 +30,7 @@ frappe.ui.form.on('Auto Repeat', {
refresh: function(frm) {
// auto repeat message
if (frm.is_new()) {
- let customize_form_link = `${__('Customize Form')}`;
+ let customize_form_link = `${__('Customize Form')}`;
frm.dashboard.set_headline(__('To configure Auto Repeat, enable "Allow Auto Repeat" from {0}.', [customize_form_link]));
}
diff --git a/frappe/core/doctype/deleted_document/deleted_document_list.js b/frappe/core/doctype/deleted_document/deleted_document_list.js
index f5e1147dfb..81a8992a19 100644
--- a/frappe/core/doctype/deleted_document/deleted_document_list.js
+++ b/frappe/core/doctype/deleted_document/deleted_document_list.js
@@ -11,7 +11,7 @@ frappe.listview_settings["Deleted Document"] = {
if (r.message) {
function body(docnames) {
const html = docnames.map(docname => {
- return `${docname}`;
+ return `${docname}`;
});
return "
" + html.join("");
}
diff --git a/frappe/core/doctype/doctype/doctype.js b/frappe/core/doctype/doctype/doctype.js
index e236464b95..d4fe53aea3 100644
--- a/frappe/core/doctype/doctype/doctype.js
+++ b/frappe/core/doctype/doctype/doctype.js
@@ -24,12 +24,12 @@ frappe.ui.form.on('DocType', {
if (!frm.is_new() && !frm.doc.istable) {
if (frm.doc.issingle) {
frm.add_custom_button(__('Go to {0}', [frm.doc.name]), () => {
- window.open(`/desk#Form/${frm.doc.name}`);
+ window.open(`/app/Form/${frm.doc.name}`);
// frappe.set_route('Form', frm.doc.name);
});
} else {
frm.add_custom_button(__('Go to {0} List', [frm.doc.name]), () => {
- window.open(`/desk#List/${frm.doc.name}/List`);
+ window.open(`/app/List/${frm.doc.name}/List`);
});
}
}
diff --git a/frappe/core/doctype/log_settings/log_settings.py b/frappe/core/doctype/log_settings/log_settings.py
index 6d59cdeb29..08e61d3289 100644
--- a/frappe/core/doctype/log_settings/log_settings.py
+++ b/frappe/core/doctype/log_settings/log_settings.py
@@ -36,7 +36,7 @@ def has_unseen_error_log(user):
def _get_response(show_alert=True):
return {
'show_alert': True,
- 'message': _("You have unseen {0}").format(' Error Logs ')
+ 'message': _("You have unseen {0}").format(' Error Logs ')
}
if frappe.db.sql_list("select name from `tabError Log` where seen = 0 limit 1"):
diff --git a/frappe/core/doctype/user/user.py b/frappe/core/doctype/user/user.py
index 9fc6658f29..d27107213b 100644
--- a/frappe/core/doctype/user/user.py
+++ b/frappe/core/doctype/user/user.py
@@ -577,7 +577,7 @@ def update_password(new_password, logout_all_sessions=0, key=None, old_password=
frappe.db.set_value("User", user, "reset_password_key", "")
if user_doc.user_type == "System User":
- return "/desk"
+ return "/app"
else:
return redirect_url if redirect_url else "/"
diff --git a/frappe/core/page/permission_manager/permission_manager.js b/frappe/core/page/permission_manager/permission_manager.js
index 0038975162..8d00952e8d 100644
--- a/frappe/core/page/permission_manager/permission_manager.js
+++ b/frappe/core/page/permission_manager/permission_manager.js
@@ -311,7 +311,7 @@ frappe.PermissionEngine = class PermissionEngine {
},
callback: function (r) {
r.message = $.map(r.message, function (p) {
- return $.format('{1}', [p, p]);
+ return $.format('{1}', [p, p]);
});
frappe.msgprint(__("Users with role {0}:", [__(role)])
+ "
" + r.message.join("
"));
diff --git a/frappe/core/page/permission_manager/permission_manager_help.html b/frappe/core/page/permission_manager/permission_manager_help.html
index 30ccbed92f..0613713e81 100644
--- a/frappe/core/page/permission_manager/permission_manager_help.html
+++ b/frappe/core/page/permission_manager/permission_manager_help.html
@@ -5,8 +5,8 @@
- {%= __("Permissions are set on Roles and Document Types (called DocTypes) by setting rights like Read, Write, Create, Delete, Submit, Cancel, Amend, Report, Import, Export, Print, Email and Set User Permissions.") %}
- {%= __("Permissions get applied on Users based on what Roles they are assigned.") %}
- {%= __("Roles can be set for users from their User page.") %}
- {%= __("Setup > User") %}
- - {%= __("The system provides many pre-defined roles. You can add new roles to set finer permissions.") %} {%= __("Add a New Role") %}
+ {%= __("Setup > User") %}
+ - {%= __("The system provides many pre-defined roles. You can add new roles to set finer permissions.") %} {%= __("Add a New Role") %}
- {%= __("Permissions are automatically applied to Standard Reports and searches.") %}
- {%= __("As a best practice, do not assign the same set of permission rule to different Roles. Instead, set multiple Roles to the same User.") %}
@@ -24,13 +24,13 @@
- {%= __("Permissions at level 0 are Document Level permissions, i.e. they are primary for access to the document.") %}
- {%= __("If a Role does not have access at Level 0, then higher levels are meaningless.") %}
- {%= __("Permissions at higher levels are Field Level permissions. All Fields have a Permission Level set against them and the rules defined at that permissions apply to the field. This is useful in case you want to hide or make certain field read-only for certain Roles.") %}
- - {%= __("You can use Customize Form to set levels on fields.") %} {%= __("Setup > Customize Form") %}
+ - {%= __("You can use Customize Form to set levels on fields.") %} {%= __("Setup > Customize Form") %}
{%= __("User Permissions") %}:
- {%= __("User Permissions are used to limit users to specific records.") %}
- {%= __("Setup > User Permissions") %}
+ {%= __("Setup > User Permissions") %}
- {%= __("Select Document Types to set which User Permissions are used to limit access.") %}
- {%= __("Once you have set this, the users will only be able access documents (eg. Blog Post) where the link exists (eg. Blogger).") %}
- {%= __("Apart from System Manager, roles with Set User Permissions right can set permissions for other users for that Document Type.") %}
diff --git a/frappe/custom/doctype/customize_form/test_customize_form.py b/frappe/custom/doctype/customize_form/test_customize_form.py
index 46a2f2f9df..f5e0371c1f 100644
--- a/frappe/custom/doctype/customize_form/test_customize_form.py
+++ b/frappe/custom/doctype/customize_form/test_customize_form.py
@@ -234,7 +234,7 @@ class TestCustomizeForm(unittest.TestCase):
testdt1.delete()
def test_custom_action(self):
- test_route = '#List/DocType'
+ test_route = '/app/List/DocType'
# create a dummy action (route)
d = self.get_customize_form("Event")
diff --git a/frappe/desk/doctype/dashboard/dashboard.py b/frappe/desk/doctype/dashboard/dashboard.py
index b12bcfe27d..54bbc61e25 100644
--- a/frappe/desk/doctype/dashboard/dashboard.py
+++ b/frappe/desk/doctype/dashboard/dashboard.py
@@ -80,7 +80,7 @@ def get_non_standard_warning_message(non_standard_docs_map):
def get_html(docs, doctype):
html = '{}
'.format(frappe.bold(doctype))
for doc in docs:
- html += ''.format(doctype=doctype, doc=doc)
+ html += ''.format(doctype=doctype, doc=doc)
html += '
'
return html
diff --git a/frappe/desk/moduleview.py b/frappe/desk/moduleview.py
index ad696520f8..94882d86b5 100644
--- a/frappe/desk/moduleview.py
+++ b/frappe/desk/moduleview.py
@@ -12,7 +12,7 @@ from frappe.cache_manager import build_domain_restriced_doctype_cache, build_dom
@frappe.whitelist()
def get(module):
"""Returns data (sections, list of reports, counts) to render module view in desk:
- `/desk/#Module/[name]`."""
+ `/app/#Module/[name]`."""
data = get_data(module)
out = {
@@ -90,7 +90,7 @@ def get_data(module, build=True):
return data
def build_config_from_file(module):
- """Build module info from `app/config/desktop.py` files."""
+ """Build module info from `app/config/apptop.py` files."""
data = []
module = frappe.scrub(module)
@@ -150,7 +150,7 @@ def add_section(data, label, icon, items):
def add_custom_doctypes(data, doctype_info):
- """Adds Custom DocTypes to modules setup via `config/desktop.py`."""
+ """Adds Custom DocTypes to modules setup via `config/apptop.py`."""
add_section(data, _("Documents"), "fa fa-star",
[d for d in doctype_info if (d.custom and d.document_type in ("Document", "Transaction"))])
@@ -258,7 +258,7 @@ def config_exists(app, module):
return False
def add_setup_section(config, app, module, label, icon):
- """Add common sections to `/desk#Module/Setup`"""
+ """Add common sections to `/app#Module/Setup`"""
try:
setup_section = get_setup_section(app, module, label, icon)
if setup_section:
diff --git a/frappe/desk/page/leaderboard/leaderboard.js b/frappe/desk/page/leaderboard/leaderboard.js
index f49078401a..5209dc0fab 100644
--- a/frappe/desk/page/leaderboard/leaderboard.js
+++ b/frappe/desk/page/leaderboard/leaderboard.js
@@ -348,7 +348,7 @@ class Leaderboard {
return fieldname === this.options.selected_filter_item;
}));
- const link = `#Form/${this.options.selected_doctype}/${item.name}`;
+ const link = `/app/Form/${this.options.selected_doctype}/${item.name}`;
const name_html = item.formatted_name ?
`${item.formatted_name}`
: ` ${item.name} `;
diff --git a/frappe/desk/page/setup_wizard/setup_wizard.js b/frappe/desk/page/setup_wizard/setup_wizard.js
index eca21e8cab..9bdeecb51d 100644
--- a/frappe/desk/page/setup_wizard/setup_wizard.js
+++ b/frappe/desk/page/setup_wizard/setup_wizard.js
@@ -212,7 +212,7 @@ frappe.setup.SetupWizard = class SetupWizard extends frappe.ui.Slides {
}
setTimeout(function () {
// Reload
- window.location.href = '/desk';
+ window.location.href = '/app';
}, 2000);
}
diff --git a/frappe/desk/report/todo/todo.py b/frappe/desk/report/todo/todo.py
index a51d44fe08..f4fe2dc805 100644
--- a/frappe/desk/report/todo/todo.py
+++ b/frappe/desk/report/todo/todo.py
@@ -24,7 +24,7 @@ def execute(filters=None):
for todo in todo_list:
if todo.owner==frappe.session.user or todo.assigned_by==frappe.session.user:
if todo.reference_type:
- todo.reference = """%s: %s""" % (todo.reference_type,
+ todo.reference = """%s: %s""" % (todo.reference_type,
todo.reference_name, todo.reference_type, todo.reference_name)
else:
todo.reference = None
diff --git a/frappe/email/doctype/notification/notification.js b/frappe/email/doctype/notification/notification.js
index 2cc027acd6..e5346da755 100644
--- a/frappe/email/doctype/notification/notification.js
+++ b/frappe/email/doctype/notification/notification.js
@@ -203,7 +203,7 @@ frappe.ui.form.on('Notification', {
frappe.notification.setup_example_message(frm);
if (frm.doc.channel === 'SMS' && frm.doc.__islocal) {
frm.set_df_property('channel',
- 'description', `To use SMS Channel, initialize SMS Settings.`);
+ 'description', `To use SMS Channel, initialize SMS Settings.`);
} else {
frm.set_df_property('channel', 'description', ` `);
}
diff --git a/frappe/integrations/doctype/google_calendar/google_calendar.js b/frappe/integrations/doctype/google_calendar/google_calendar.js
index f941cf0575..198c8e2706 100644
--- a/frappe/integrations/doctype/google_calendar/google_calendar.js
+++ b/frappe/integrations/doctype/google_calendar/google_calendar.js
@@ -4,7 +4,7 @@
frappe.ui.form.on("Google Calendar", {
refresh: function(frm) {
if (frm.is_new()) {
- frm.dashboard.set_headline(__("To use Google Calendar, enable {0}.", [`${__('Google Settings')}`]));
+ frm.dashboard.set_headline(__("To use Google Calendar, enable {0}.", [`${__('Google Settings')}`]));
}
frappe.realtime.on("import_google_calendar", (data) => {
diff --git a/frappe/integrations/doctype/google_calendar/google_calendar.py b/frappe/integrations/doctype/google_calendar/google_calendar.py
index 4a9acd9e84..fbedd75029 100644
--- a/frappe/integrations/doctype/google_calendar/google_calendar.py
+++ b/frappe/integrations/doctype/google_calendar/google_calendar.py
@@ -120,7 +120,7 @@ def authorize_access(g_calendar, reauthorize=None):
frappe.db.commit()
frappe.local.response["type"] = "redirect"
- frappe.local.response["location"] = "/desk#Form/{0}/{1}".format(quote("Google Calendar"), quote(google_calendar.name))
+ frappe.local.response["location"] = "/app/Form/{0}/{1}".format(quote("Google Calendar"), quote(google_calendar.name))
frappe.msgprint(_("Google Calendar has been configured."))
except Exception as e:
diff --git a/frappe/integrations/doctype/google_contacts/google_contacts.js b/frappe/integrations/doctype/google_contacts/google_contacts.js
index af194d4978..029821b3bb 100644
--- a/frappe/integrations/doctype/google_contacts/google_contacts.js
+++ b/frappe/integrations/doctype/google_contacts/google_contacts.js
@@ -4,7 +4,7 @@
frappe.ui.form.on('Google Contacts', {
refresh: function(frm) {
if (!frm.doc.enable) {
- frm.dashboard.set_headline(__("To use Google Contacts, enable {0}.", [`${__('Google Settings')}`]));
+ frm.dashboard.set_headline(__("To use Google Contacts, enable {0}.", [`${__('Google Settings')}`]));
}
frappe.realtime.on('import_google_contacts', (data) => {
diff --git a/frappe/integrations/doctype/google_contacts/google_contacts.py b/frappe/integrations/doctype/google_contacts/google_contacts.py
index 6455623281..4c8c3b67f6 100644
--- a/frappe/integrations/doctype/google_contacts/google_contacts.py
+++ b/frappe/integrations/doctype/google_contacts/google_contacts.py
@@ -79,7 +79,7 @@ def authorize_access(g_contact, reauthorize=None):
frappe.db.commit()
frappe.local.response["type"] = "redirect"
- frappe.local.response["location"] = "/desk#Form/Google%20Contacts/{}".format(google_contact.name)
+ frappe.local.response["location"] = "/app/Form/Google%20Contacts/{}".format(google_contact.name)
frappe.msgprint(_("Google Contacts has been configured."))
except Exception as e:
diff --git a/frappe/integrations/doctype/google_drive/google_drive.js b/frappe/integrations/doctype/google_drive/google_drive.js
index f184c6d75c..1463f8725d 100644
--- a/frappe/integrations/doctype/google_drive/google_drive.js
+++ b/frappe/integrations/doctype/google_drive/google_drive.js
@@ -4,7 +4,7 @@
frappe.ui.form.on('Google Drive', {
refresh: function(frm) {
if (!frm.doc.enable) {
- frm.dashboard.set_headline(__("To use Google Drive, enable {0}.", [`${__('Google Settings')}`]));
+ frm.dashboard.set_headline(__("To use Google Drive, enable {0}.", [`${__('Google Settings')}`]));
}
frappe.realtime.on("upload_to_google_drive", (data) => {
diff --git a/frappe/integrations/doctype/google_drive/google_drive.py b/frappe/integrations/doctype/google_drive/google_drive.py
index c1c73d7726..859c769018 100644
--- a/frappe/integrations/doctype/google_drive/google_drive.py
+++ b/frappe/integrations/doctype/google_drive/google_drive.py
@@ -88,7 +88,7 @@ def authorize_access(reauthorize=None):
frappe.db.commit()
frappe.local.response["type"] = "redirect"
- frappe.local.response["location"] = "/desk#Form/{0}".format(quote("Google Drive"))
+ frappe.local.response["location"] = "/app/Form/{0}".format(quote("Google Drive"))
frappe.msgprint(_("Google Drive has been configured."))
except Exception as e:
diff --git a/frappe/model/delete_doc.py b/frappe/model/delete_doc.py
index a38470e3f5..688ecbe40f 100644
--- a/frappe/model/delete_doc.py
+++ b/frappe/model/delete_doc.py
@@ -287,8 +287,8 @@ def check_if_doc_is_dynamically_linked(doc, method="Delete"):
raise_link_exists_exception(doc, reference_doctype, reference_docname, at_position)
def raise_link_exists_exception(doc, reference_doctype, reference_docname, row=''):
- doc_link = '{1}'.format(doc.doctype, doc.name)
- reference_link = '{1}'.format(reference_doctype, reference_docname)
+ doc_link = '{1}'.format(doc.doctype, doc.name)
+ reference_link = '{1}'.format(reference_doctype, reference_docname)
#hack to display Single doctype only once in message
if reference_doctype == reference_docname:
diff --git a/frappe/model/document.py b/frappe/model/document.py
index 3789e20b19..d17025538b 100644
--- a/frappe/model/document.py
+++ b/frappe/model/document.py
@@ -1188,8 +1188,8 @@ class Document(BaseDocument):
doc.set(fieldname, flt(doc.get(fieldname), self.precision(fieldname, doc.parentfield)))
def get_url(self):
- """Returns Desk URL for this document. `/desk#Form/{doctype}/{name}`"""
- return "/desk#Form/{doctype}/{name}".format(doctype=self.doctype, name=self.name)
+ """Returns Desk URL for this document. `/app/Form/{doctype}/{name}`"""
+ return "/app/Form/{doctype}/{name}".format(doctype=self.doctype, name=self.name)
def add_comment(self, comment_type='Comment', text=None, comment_email=None, link_doctype=None, link_name=None, comment_by=None):
"""Add a comment to this document.
diff --git a/frappe/public/js/frappe/form/form.js b/frappe/public/js/frappe/form/form.js
index 837fa09b1f..26dee5c831 100644
--- a/frappe/public/js/frappe/form/form.js
+++ b/frappe/public/js/frappe/form/form.js
@@ -1522,7 +1522,7 @@ frappe.ui.form.Form = class FrappeForm {
const escaped_name = encodeURIComponent(value);
- return repl('%(label)s', {
+ return repl('%(label)s', {
color: get_color(doc || {}),
doctype: df.options,
escaped_name: escaped_name,
diff --git a/frappe/public/js/frappe/form/formatters.js b/frappe/public/js/frappe/form/formatters.js
index bebe4e4065..49df313679 100644
--- a/frappe/public/js/frappe/form/formatters.js
+++ b/frappe/public/js/frappe/form/formatters.js
@@ -121,7 +121,7 @@ frappe.form.formatters = {
{onclick: docfield.link_onclick.replace(/"/g, '"'), value:value});
} else if(docfield && doctype) {
return `
${__(options && options.label || value)}`
diff --git a/frappe/public/js/frappe/form/linked_with.js b/frappe/public/js/frappe/form/linked_with.js
index d8e07f8303..c5ed00add4 100644
--- a/frappe/public/js/frappe/form/linked_with.js
+++ b/frappe/public/js/frappe/form/linked_with.js
@@ -157,7 +157,7 @@ frappe.ui.form.LinkedWith = class LinkedWith {
return ``;
diff --git a/frappe/public/js/frappe/form/multi_select_dialog.js b/frappe/public/js/frappe/form/multi_select_dialog.js
index a0bb927563..a9e8c2b0d2 100644
--- a/frappe/public/js/frappe/form/multi_select_dialog.js
+++ b/frappe/public/js/frappe/form/multi_select_dialog.js
@@ -236,7 +236,7 @@ frappe.ui.form.MultiSelectDialog = class MultiSelectDialog {
${
head ? `${__(frappe.model.unscrub(column))}`
: (column !== "name" ? `${__(result[column] || '')}`
- : `
+ : `
${__(result[column] || '')}`)}
`;
});
diff --git a/frappe/public/js/frappe/form/templates/address_list.html b/frappe/public/js/frappe/form/templates/address_list.html
index 0f967b67a0..a6b8bf1377 100644
--- a/frappe/public/js/frappe/form/templates/address_list.html
+++ b/frappe/public/js/frappe/form/templates/address_list.html
@@ -9,7 +9,7 @@
{% if(addr_list[i].is_shipping_address) { %}
({%= __("Shipping") %}){% } %}
-
{%= __("Edit") %}
diff --git a/frappe/public/js/frappe/form/templates/contact_list.html b/frappe/public/js/frappe/form/templates/contact_list.html
index a967498d0f..e5fdc3f88e 100644
--- a/frappe/public/js/frappe/form/templates/contact_list.html
+++ b/frappe/public/js/frappe/form/templates/contact_list.html
@@ -9,7 +9,7 @@
{% if(contact_list[i].designation){ %}
– {%= contact_list[i].designation %}
{% } %}
-
{%= __("Edit") %}
diff --git a/frappe/public/js/frappe/form/templates/print_layout.html b/frappe/public/js/frappe/form/templates/print_layout.html
index 5ee9f572f3..366a771218 100644
--- a/frappe/public/js/frappe/form/templates/print_layout.html
+++ b/frappe/public/js/frappe/form/templates/print_layout.html
@@ -31,7 +31,7 @@