Files
odoo_source/addons/website_forum/views/snippets/snippets.xml
T
qsm-odoo eed3f1bc59 [FIX] website, *: hide page options for non-designer users
*: website_blog, website_crm_partner_assign, website_customer,
   website_event, website_event_exhibitor, website_event_meet,
   website_event_track, website_forum, website_hr_recruitment,
   website_membership, website_sale, website_sale_loyalty,
   website_sale_slides, website_slides, website_slides_forum

With commit [1], the "customize_show" options were moved in edit mode.
They were wrongly displayed for non-designer users. Trying to use those
would throw a warning at the user.

[1]: https://github.com/odoo/odoo/commit/17a8a37e9bfc5b787d9666597d43e63f0064919f

closes odoo/odoo#103142

X-original-commit: f2ca62a4a9ccb6713a39c100fc87c112619eac41
Related: odoo/enterprise#32768
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-10-12 10:35:05 +02:00

43 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="forum_searchbar_input_snippet_options" inherit_id="website.searchbar_input_snippet_options" name="forum search bar snippet options">
<xpath expr="//div[@data-js='SearchBar']/we-select[@data-name='scope_opt']" position="inside">
<!-- Using /website/search/forums as result because the current forum search results page cannot be used across several forums -->
<we-button data-set-search-type="forums" data-select-data-attribute="forums" data-name="search_forums_opt" data-form-action="/website/search/forums">Forums</we-button>
</xpath>
<xpath expr="//div[@data-js='SearchBar']/we-select[@data-name='order_opt']" position="inside">
<we-button data-set-order-by="write_date asc" data-select-data-attribute="write_date asc" data-dependencies="search_forums_opt" data-name="date_asc_opt">Date (low to high)</we-button>
<we-button data-set-order-by="write_date desc" data-select-data-attribute="write_date desc" data-dependencies="search_forums_opt" data-name="date_desc_opt">Date (high to low)</we-button>
</xpath>
<xpath expr="//div[@data-js='SearchBar']/div[@data-dependencies='limit_opt']" position="inside">
<we-checkbox string="Description" data-dependencies="search_forums_opt" data-select-data-attribute="true" data-attribute-name="displayDescription"
data-apply-to=".search-query"/>
<we-checkbox string="Date" data-dependencies="search_forums_opt" data-select-data-attribute="true" data-attribute-name="displayDetail"
data-apply-to=".search-query"/>
</xpath>
</template>
<template id="snippet_options" inherit_id="website.snippet_options" name="Forum Snippet Options">
<xpath expr="." position="inside">
<div data-selector="main:has(#o_wforum_forums_index_list)" data-page-options="true" groups="website.group_website_designer" data-no-check="true" string="Forum Page">
<we-select string="Layout" data-no-preview="true" data-reload="/">
<we-button data-customize-website-views="">Grid</we-button>
<we-button data-customize-website-views="website_forum.opt_list_view">List</we-button>
</we-select>
<we-checkbox string="Post Count"
class="o_we_sublevel_1"
data-customize-website-views="website_forum.opt_post_count"
data-no-preview="true"
data-reload="/"/>
<we-checkbox string="Last Post"
class="o_we_sublevel_1"
data-customize-website-views="website_forum.opt_last_post"
data-no-preview="true"
data-reload="/"/>
</div>
</xpath>
</template>
</odoo>