From 79e79d0fd05c3ce22e007eb187e69a28bc6db7ca Mon Sep 17 00:00:00 2001 From: Kevin Baptiste Date: Mon, 30 Mar 2020 13:58:35 +0000 Subject: [PATCH] [IMP] project: add new kanban examples Add new Kanban examples and improve the usability of the dialog. closes odoo/odoo#48620 Taskid: 2210279 Signed-off-by: Yannick Tivisse (yti) --- .../src/js/project_task_kanban_examples.js | 52 ++++++++++++++----- .../kanban/kanban_column_quick_create.js | 8 +-- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/addons/project/static/src/js/project_task_kanban_examples.js b/addons/project/static/src/js/project_task_kanban_examples.js index ff80738e2f6..72f09478df6 100644 --- a/addons/project/static/src/js/project_task_kanban_examples.js +++ b/addons/project/static/src/js/project_task_kanban_examples.js @@ -9,7 +9,13 @@ var _lt = core._lt; var greenBullet = ''; var redBullet = ''; var star = ''; +var clock = '' +var description_activities = escFormat(_lt('%s Use the %s icon to organize your daily activities.'), '
', clock); +var description = escFormat(_lt('Prioritize Tasks by using the %s icon.'+ + '%s Use the %s button to signalize to your colleagues that a task is ready for the next stage.'+ + '%s Use the %s to signalize a problem or a need for discussion on a task.'+ + '%s'), star, '
', greenBullet, '
', redBullet, description_activities); /** * Helper function to escape a text before formatting it. @@ -38,55 +44,75 @@ kanbanExamplesRegistry.add('project', { columns: [_lt('Backlog'), _lt('Specifications'), _lt('Development'), _lt('Tests'), _lt('Delivered')], description: escFormat(_lt('Prioritize Tasks by using the %s icon.'+ '%s Use the %s button to signalize to your colleagues that a task is ready for the next stage.'+ - '%s Use the %s to signalize a problem or a need for discussion on a task.'), star, '
', greenBullet, '
', redBullet), + '%s Use the %s to signalize a problem or a need for discussion on a task.'+ + '%s'), star, '
', greenBullet, '
', redBullet, description_activities), bullets: [greenBullet, redBullet, star], }, { - name: _lt('Agile'), - columns: [_lt('Backlog'), _lt('Analysis'), _lt('Development'), _lt('Testing'), _lt('Done')], - description: escFormat(_lt('Waiting for the next stage: use %s and %s bullets.'), greenBullet, redBullet), + name: _lt('Agile Scrum'), + columns: [_lt('Backlog'), _lt('Sprint Backlog'), _lt('Sprint in Progress'), _lt('Sprint Complete'), _lt('Old Completed Sprint')], + description: escFormat(_lt('Waiting for the next stage: use %s and %s bullets. %s'), greenBullet, redBullet, description_activities), bullets: [greenBullet, redBullet], }, { name: _lt('Digital Marketing'), columns: [_lt('Ideas'), _lt('Researching'), _lt('Writing'), _lt('Editing'), _lt('Done')], description: escFormat(_lt('Everyone can propose ideas, and the Editor marks the best ones ' + 'as %s. Attach all documents or links to the task directly, to have all information about ' + - 'a research centralized.'), greenBullet), + 'a research centralized. %s'), greenBullet, description_activities), bullets: [greenBullet, redBullet], }, { name: _lt('Customer Feedback'), columns: [_lt('New'), _lt('In development'), _lt('Done'), _lt('Refused')], description: escFormat(_lt('Customers propose feedbacks by email; Odoo creates tasks ' + 'automatically, and you can communicate on the task directly. Your managers decide which ' + - 'feedback is accepted %s and which feedback is moved to the "Refused" column.'), greenBullet), + 'feedback is accepted %s and which feedback is moved to the %s column. %s'), greenBullet, _lt('"Refused"'), description_activities), bullets: [greenBullet, redBullet], }, { name: _lt('Getting Things Done (GTD)'), columns: [_lt('Inbox'), _lt('Today'), _lt('This Week'), _lt('This Month'), _lt('Long Term')], - description: _lt('Fill your Inbox easily with the email gateway. Periodically review your ' + + description: escFormat(_lt('Fill your Inbox easily with the email gateway. Periodically review your ' + 'Inbox and schedule tasks by moving them to others columns. Every day, you review the ' + - '"This Week" column to move important tasks "Today". Every Monday, you review the "This ' + - 'Month" column.'), + '%s column to move important tasks %s. Every Monday, you review the %s column. %s'), _lt('"This Week"'), _lt('"Today"'), _lt('"This Month"'), description_activities), }, { name: _lt('Consulting'), columns: [_lt('New Projects'), _lt('Resources Allocation'), _lt('In Progress'), _lt('Done')], - description: escFormat(_lt('Manage the lifecycle of your project using the kanban view. Add newly acquired project, assign them and use the %s and %s to define if the project is ready for the next step.'), greenBullet, redBullet), + description: escFormat(_lt('Manage the lifecycle of your project using the kanban view. Add newly acquired project, assign them and use the %s and %s to define if the project is ready for the next step. %s'), greenBullet, redBullet, description_activities), bullets: [greenBullet, redBullet], }, { name: _lt('Research Project'), columns: [_lt('Brainstorm'), _lt('Research'), _lt('Draft'), _lt('Final Document')], - description: escFormat(_lt('Handle your idea gathering within Tasks of your new Project and discuss them in the chatter of the tasks. Use the %s and %s to signalize what is the current status of your Idea'), greenBullet, redBullet), + description: escFormat(_lt('Handle your idea gathering within Tasks of your new Project and discuss them in the chatter of the tasks. Use the %s and %s to signalize what is the current status of your Idea. %s'), greenBullet, redBullet, description_activities), bullets: [greenBullet, redBullet], }, { name: _lt('Website Redesign'), columns: [_lt('Page Ideas'), _lt('Copywriting'), _lt('Design'), _lt('Live')], - description: escFormat(_lt('Handle your idea gathering within Tasks of your new Project and discuss them in the chatter of the tasks. Use the %s and %s to signalize what is the current status of your Idea'), greenBullet, redBullet), + description: escFormat(_lt('Handle your idea gathering within Tasks of your new Project and discuss them in the chatter of the tasks. Use the %s and %s to signalize what is the current status of your Idea. %s'), greenBullet, redBullet, description_activities), }, { name: _lt('T-shirt Printing'), columns: [_lt('New Orders'), _lt('Logo Design'), _lt('To Print'), _lt('Done')], description: escFormat(_lt('Communicate with customers on the task using the email gateway. ' + 'Attach logo designs to the task, so that information flow from designers to the workers ' + - 'who print the t-shirt. Organize priorities amongst orders %s using the icon.'), star), + 'who print the t-shirt. Organize priorities amongst orders %s using the icon. %s'), star, description_activities), bullets: [star], + }, { + name: _lt('Design'), + columns: [_lt('New Request'), _lt('Design'), _lt('Client Review'), _lt('Handoff')], + description: description, + bullets: [greenBullet, redBullet, star, clock], + }, { + name: _lt('Publishing'), + columns: [_lt('Ideas'), _lt('Writing'), _lt('Editing'), _lt('Published')], + description: description, + bullets: [greenBullet, redBullet, star, clock], + }, { + name: _lt('Manufacturing'), + columns: [_lt('New Orders'), _lt('Material Sourcing'), _lt('Manufacturing'), _lt('Assembling'), _lt('Delivered')], + description: description, + bullets: [greenBullet, redBullet, star, clock], + }, { + name: _lt('Podcast and Video Production'), + columns: [_lt('Research'), _lt('Script'), _lt('Recording'), _lt('Mixing'), _lt('Publishing')], + description: description, + bullets: [greenBullet, redBullet, star, clock], }], }); diff --git a/addons/web/static/src/js/views/kanban/kanban_column_quick_create.js b/addons/web/static/src/js/views/kanban/kanban_column_quick_create.js index b3556e249d1..21824c22100 100644 --- a/addons/web/static/src/js/views/kanban/kanban_column_quick_create.js +++ b/addons/web/static/src/js/views/kanban/kanban_column_quick_create.js @@ -186,10 +186,6 @@ var ColumnQuickCreate = Widget.extend({ })), buttons: [{ classes: 'btn-primary float-right', - close: true, - text: _t('Got it'), - }, { - classes: 'btn-secondary float-right', text: _t('Use This For My Project'), close: true, click: function () { @@ -198,6 +194,10 @@ var ColumnQuickCreate = Widget.extend({ self.trigger_up('quick_create_add_column', {value: column.toString()}); }); } + }, { + classes: 'btn-secondary float-right', + close: true, + text: _t('Close'), }], size: "large", title: "Kanban Examples",