summaryrefslogtreecommitdiff
path: root/addons/web/static/src/xml
diff options
context:
space:
mode:
authorRomain Estievenart <res@odoo.com>2019-02-19 10:42:37 +0000
committerPierre Paridans <pierre@paridans.org>2019-11-25 09:29:39 +0000
commit715c136cd20c9e9969eeb45db993917defb8c0b2 (patch)
tree1a7c101ca67c0fd4c7ba6103a74d909731d7dc54 /addons/web/static/src/xml
parent40e8834b00d07f62f25b427214c0c71bd37d40af (diff)
[IMP] web: add column creation support for kanban view on mobile
On mobile, there was no way to create a new column in the kanban view. This was specifically annoying in the Project app (the user was able to create the project but couldn't set its stages). This commit enables this feature by adding a `+` icon at the end of the tabs. This button opens a quick-create column widget. If there is no existing column (for example in a newly created project), this quick-create column widget is opened by default. Finally, this commit improves the processing needed for the swipe animation between the columns. Task ID: 1893137 closes odoo/odoo#40722 Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com> Co-authored-by: Ankit Sathvara <asa@odoo.com> Co-authored-by: Mohammed Shekha <msh@openerp.com> Co-authored-by: Romain Estievenart <res@odoo.com>
Diffstat (limited to 'addons/web/static/src/xml')
-rw-r--r--addons/web/static/src/xml/kanban.xml19
1 files changed, 12 insertions, 7 deletions
diff --git a/addons/web/static/src/xml/kanban.xml b/addons/web/static/src/xml/kanban.xml
index 77d2d319d70..9d998677dc4 100644
--- a/addons/web/static/src/xml/kanban.xml
+++ b/addons/web/static/src/xml/kanban.xml
@@ -56,8 +56,8 @@
<button class="btn btn-primary o_kanban_add" type="button">Add</button>
</span>
</div>
- <span class="o_discard_msg text-muted float-right">Esc to discard</span>
- <t t-if="widget.examples">
+ <span t-if="!widget.isMobile" class="o_discard_msg text-muted float-right">Esc to discard</span>
+ <t t-if="widget.examples &amp;&amp; !widget.isMobile">
<button type="button" class="btn btn-link o_kanban_examples">See examples</button>
</t>
</div>
@@ -319,12 +319,17 @@
<!-- Mobile templates -->
<t t-name="KanbanView.MobileTabs">
- <div class="o_kanban_mobile_tabs">
- <t t-foreach="data" t-as="group">
- <div class="o_kanban_mobile_tab" t-att-data-id="group.res_id or group.id">
- <span class="o_column_title"><t t-esc="group.value"/></span>
+ <div class="o_kanban_mobile_tabs_container">
+ <div class="o_kanban_mobile_tabs">
+ <t t-foreach="data" t-as="group">
+ <div class="o_kanban_mobile_tab" t-att-data-id="group.res_id or group.id">
+ <span class="o_column_title"><t t-esc="group.value"/></span>
+ </div>
+ </t>
+ <div class="o_kanban_mobile_add_column" t-if="quickCreateEnabled">
+ <i class="fa fa-plus " role="img" aria-label="Add column" title="Add column"/>
</div>
- </t>
+ </div>
</div>
</t>
</template>