- The dropdown structure was simplified, allowing to get rid of the 3-levels structure induced by <ul/> elements and dropdowns can now contain anything. The class 'dropdown-item' is now mandatory for each dropdown clickable element. The class 'dropdown-item-text' can be used to add same padding and style but without making the element have a clickable look. - Dividers now use the class 'dropdown-divider' - The way dropdowns are opened and hidden also changed (before the 'open' class was added on the `.dropdown-menu` parent, now the 'show' class is added on both the `.dropdown-menu` parent and the `.dropdown-menu` itself). - JS-wise, no click event handlers can be put on `.dropdown-toggle` elements anymore (instead, use handlers for dropdown events). - Carets are automatically put on `.dropdown-toggle` elements, so this commit replaces the `.caret` elements with this. This feature was possible to disable but would prevent us from adding a caret with scss. Also, this simplifies the DOM. The 'o-no-caret' class was also introduced to allow using the 'dropdown-toggle' class on non-caret elements. - Also adapt the scss to use $caret-width instead of $caret-width-base
103 lines
5.3 KiB
XML
103 lines
5.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- DOCUMENTATION TOC VIEWS -->
|
|
<record id="view_documentation_toc_list" model="ir.ui.view">
|
|
<field name="name">forum.documentation.toc.list</field>
|
|
<field name="model">forum.documentation.toc</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Documentation TOC" editable="bottom">
|
|
<field name="sequence" widget="handle"/>
|
|
<field name="name"/>
|
|
<field name="forum_id"/>
|
|
<field name="parent_id"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<record id="action_documentation_toc" model="ir.actions.act_window">
|
|
<field name="name">Documentation</field>
|
|
<field name="res_model">forum.documentation.toc</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">tree</field>
|
|
</record>
|
|
<menuitem id="menu_documentation"
|
|
parent="website_forum.menu_website_forum" groups="base.group_user"
|
|
name="Documentation ToC" action="action_documentation_toc" sequence="20"/>
|
|
|
|
|
|
<!-- Project Task Kanban View -->
|
|
<record id="view_forum_post_kanban" model="ir.ui.view">
|
|
<field name="name">forum.post.kanban</field>
|
|
<field name="model">forum.post</field>
|
|
<field name="arch" type="xml">
|
|
<kanban default_group_by="documentation_stage_id" >
|
|
<field name="documentation_stage_id"/>
|
|
<field name="create_uid"/>
|
|
<field name="color"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
|
<div class="o_dropdown_kanban dropdown" groups="base.group_user">
|
|
<a role="button" class="dropdown-toggle o-no-caret btn" data-toggle="dropdown" href="#" aria-label="Dropdown menu" title="Dropdown menu">
|
|
<span class="fa fa-ellipsis-v"/>
|
|
</a>
|
|
<div class="dropdown-menu" role="menu">
|
|
<a role="menuitem" type="edit" class="dropdown-item" t-if="widget.editable">Edit Post</a>
|
|
<a role="menuitem" type="delete" class="dropdown-item" t-if="widget.deletable">Delete</a>
|
|
<ul class="oe_kanban_colorpicker" data-field="color"/>
|
|
</div>
|
|
</div>
|
|
<div class="o_kanban_record_top">
|
|
<b class="o_kanban_record_title"><field name="name"/></b>
|
|
</div>
|
|
<div class="o_kanban_record_bottom">
|
|
<div class="oe_kanban_bottom_left"/>
|
|
<div class="oe_kanban_bottom_right">
|
|
<img t-att-src="kanban_image('res.users', 'image_small', record.create_uid.raw_value)" t-att-title="record.create_uid.value" t-att-alt="record.create_uid.value" width="24" height="24" class="oe_kanban_avatar"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="action_forum_doc_post" model="ir.actions.act_window">
|
|
<field name="name">Documentation Posts</field>
|
|
<field name="res_model">forum.post</field>
|
|
<field name="view_type">form</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="domain">[('documentation_toc_id','!=', False)]</field>
|
|
</record>
|
|
<menuitem id="menu_forum_doc_posts"
|
|
parent="website_forum.menu_website_forum" name="Documentation Posts"
|
|
action="action_forum_doc_post" sequence="25"/>
|
|
|
|
<record id="view_forum_post_doc_form" model="ir.ui.view">
|
|
<field name="name">forum.post.form.doc</field>
|
|
<field name="model">forum.post</field>
|
|
<field name="inherit_id" ref="website_forum.view_forum_post_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='parent_id']" position="after">
|
|
<field name="documentation_toc_id"/>
|
|
</xpath>
|
|
<xpath expr="//sheet" position="before">
|
|
<header>
|
|
<field name="documentation_stage_id" widget="statusbar"/>
|
|
</header>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="view_forum_post_doc_list" model="ir.ui.view">
|
|
<field name="name">forum.post.list.doc</field>
|
|
<field name="model">forum.post</field>
|
|
<field name="inherit_id" ref="website_forum.view_forum_post_list"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='forum_id']" position="after">
|
|
<field name="documentation_toc_id"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|