From 20bd7303537e7bf3f8fe4941e457818f21535c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Thu, 1 Feb 2018 13:21:01 +0100 Subject: [IMP] web: display no content helper in grouped kanban view Before this commit, it was not possible to display a help message in a kanban view, if it is grouped. This is an issue, from an onboarding point of view. Imagine a new user, creating a project. After it creates a few columns, it is not clear what to do. With this commit, we display the nocontent help message in a grouped kanban view, if the user is not currently creating a new column. This allows the user to focus on its work, by working in phases: first, he is prompted to create project column, then when he decides that he is done, the user interface shows the nocontent help message, which guides her/him to the process of creating a task. --- addons/web/static/src/js/views/basic/basic_renderer.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js') diff --git a/addons/web/static/src/js/views/basic/basic_renderer.js b/addons/web/static/src/js/views/basic/basic_renderer.js index 83d2da5169a..d9c0f1a570b 100644 --- a/addons/web/static/src/js/views/basic/basic_renderer.js +++ b/addons/web/static/src/js/views/basic/basic_renderer.js @@ -559,12 +559,14 @@ var BasicRenderer = AbstractRenderer.extend({ * message when no content is available. * * @private + * @returns {jQueryElement} */ _renderNoContentHelper: function () { - var $msg = $('
') + var $noContent = + $('
').html(this.noContentHelp).addClass('o_nocontent_help'); + return $('
') .addClass('o_view_nocontent') - .html(this.noContentHelp); - this.$el.html($msg); + .append($noContent); }, /** * Actual rendering. Supposed to be overridden by concrete renderers. -- cgit v1.2.3