flectra/addons/website_blog/views/website_blog_views.xml

190 lines
8.9 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
2018-01-16 11:34:37 +01:00
<flectra>
<menuitem name="Blog"
id="menu_website_blog_root"
sequence="20"
parent="website.menu_website_configuration"
groups="website.group_website_designer"/>
<!-- Blog views -->
<record id="view_blog_blog_list" model="ir.ui.view">
<field name="name">blog.blog.list</field>
<field name="model">blog.blog</field>
<field name="arch" type="xml">
<tree string="Blogs">
<field name="name"/>
<field name="active" invisible="1"/>
</tree>
</field>
</record>
<record id="view_blog_blog_form" model="ir.ui.view">
<field name="name">blog.blog.form</field>
<field name="model">blog.blog</field>
<field name="arch" type="xml">
<form string="Blog">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" confirm="(Un)archiving a blog automatically (un)archives its posts. Do you want to proceed?" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
</div>
<group>
<field name="name"/>
<field name="subtitle"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
</div>
</form>
</field>
</record>
<!-- page list view -->
<record id="view_blog_post_list" model="ir.ui.view">
<field name="name">blog.post.list</field>
<field name="model">blog.post</field>
<field name="arch" type="xml">
<tree string="Blog Posts">
<field name="name"/>
<field name="active" invisible="1"/>
<field name="blog_id"/>
<field name="visits"/>
<field name="create_uid" invisible="1"/>
<field name="write_uid"/>
<field name="write_date"/>
</tree>
</field>
</record>
<!-- page form view -->
<record id="view_blog_post_form" model="ir.ui.view">
<field name="name">blog.post.form</field>
<field name="model">blog.post</field>
<field name="arch" type="xml">
<form string="Blog Post">
<sheet>
<div class="oe_button_box" name="button_box">
<button class="oe_stat_button" name="website_publish_button"
type="object" icon="fa-globe">
<field name="website_published" widget="website_button"/>
</button>
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options='{"terminology": "archive"}'/>
</button>
</div>
<group>
<field name="blog_id"/>
<field name="name" placeholder="Blog Post Title"/>
<field name="subtitle" placeholder="Blog Subtitle"/>
<field name="tag_ids" widget="many2many_tags"/>
</group>
<group string="Publishing Options">
<field name="author_id"/>
<field name="website_ids" widget="many2many_tags"/>
<field name="create_date" groups="base.group_no_one"/>
<field name="post_date"/>
<field name="write_uid"/>
<field name="write_date"/>
</group>
<group string="Technical" groups="base.group_no_one">
<field name="ranking" invisible="1"/>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
</div>
</form>
</field>
</record>
<!-- page search view -->
<record id="view_blog_post_search" model="ir.ui.view">
<field name="name">blog.post.search</field>
<field name="model">blog.post</field>
<field name="arch" type="xml">
<search string="Blog Post">
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
<field name="name" string="Content" filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]"/>
<field name="write_uid"/>
<field name="blog_id"/>
<group expand="0" string="Group By">
<filter string="Blog" domain="[]" context="{'group_by': 'blog_id'}"/>
<filter string="Author" domain="[]" context="{'group_by': 'create_uid'}"/>
<filter string="Last Contributor" domain="[]" context="{'group_by': 'write_uid'}"/>
</group>
</search>
</field>
</record>
<!-- page action -->
<record id="action_blog_post" model="ir.actions.act_window">
<field name="name">Blog Posts</field>
<field name="res_model">blog.post</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_blog_post_list"/>
<field name="search_view_id" ref="view_blog_post_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new blog post.
</p>
</field>
</record>
<menuitem id="menu_page" parent="menu_website_blog_root" name="Blog Posts" action="action_blog_post" sequence="10"/>
<record id="blog_blog_view_search" model="ir.ui.view">
<field name="name">blog.blog.search</field>
<field name="model">blog.blog</field>
<field name="arch" type="xml">
<search string="Blog">
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<record id="action_blog_blog" model="ir.actions.act_window">
<field name="name">Blogs</field>
<field name="res_model">blog.blog</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem id="menu_blog" parent="menu_website_blog_root" name="Blogs" action="action_blog_blog" sequence="20"/>
<record id="blog_tag_tree" model="ir.ui.view">
<field name="name">blog_tag_tree</field>
<field name="model">blog.tag</field>
<field name="arch" type="xml">
<tree string="Tag List" create="false">
<field name="name"/>
<field name="post_ids"/>
</tree>
</field>
</record>
<record id="blog_tag_form" model="ir.ui.view">
<field name="name">blog_tag_form</field>
<field name="model">blog.tag</field>
<field name="arch" type="xml">
<form string="Tag Form">
<sheet>
<group>
<field name="name"/>
</group>
<label for="post_ids" string="Used in: "/>
<field name="post_ids"/>
</sheet>
</form>
</field>
</record>
<record id="action_tags" model="ir.actions.act_window">
<field name="name">Blog Tags</field>
<field name="res_model">blog.tag</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="blog_tag_tree"/>
</record>
<menuitem id="menu_blog_tag" parent="menu_website_blog_root" name="Blog Tags" action="action_tags" sequence="40" />
2018-01-16 11:34:37 +01:00
</flectra>