diff options
| author | laa <laa@odoo.com> | 2019-09-25 14:14:57 +0000 |
|---|---|---|
| committer | laa <laa@odoo.com> | 2019-09-25 14:14:57 +0000 |
| commit | 69ea10d2b445d8482e487be89701663f4472e481 (patch) | |
| tree | 0a58c3b5984c40d6d57ae19052c4d36b27431cfa /addons/website_slides_forum | |
| parent | beb80c20bdd89f2dc430e7488be381b146ce6492 (diff) | |
[FIX] eLearning, forum : tab visibility
From Website (Frontend) --> From the Courses --> From a course (with settings course : Course type = "Documentation" & Forum mentioned):
The tab for the forum isn't there
From Website (Frontend) --> From the Courses --> From a course (with settings course : Course type = "Documentation" & "Allow rating on Course" disabled):
The tab for the review is always there
From Website (Frontend) --> From the Forum --> From a course (with settings course : Course type = "Documentation" & "Allow rating on Course" activivated):
Click the tab for the review, the returned view is the course tab and not the review tab
From Website (Frontend) --> From the Forum --> From a course (with settings course : "Allow rating on Course" disabled):
The tab for the review is always there
closes odoo/odoo#37436
Task-id: 2074030
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Diffstat (limited to 'addons/website_slides_forum')
| -rw-r--r-- | addons/website_slides_forum/views/website_slides_forum_templates.xml | 6 | ||||
| -rw-r--r-- | addons/website_slides_forum/views/website_slides_templates.xml | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/addons/website_slides_forum/views/website_slides_forum_templates.xml b/addons/website_slides_forum/views/website_slides_forum_templates.xml index 3b622ba42cd..7d370b55874 100644 --- a/addons/website_slides_forum/views/website_slides_forum_templates.xml +++ b/addons/website_slides_forum/views/website_slides_forum_templates.xml @@ -14,9 +14,11 @@ <li class="nav-item"> <a t-att-href="'/forum/%s' % (slug(forum))" t-att-class="'nav-link active o_wprofile_navlink'" style="border-left: 0px">Forum</a> </li> - <li class="nav-item"> + <li t-if="forum.slide_channel_id.allow_comment" class="nav-item"> <a t-att-href="'/slides/%s?active_tab=review' % (slug(forum.slide_channel_id))" - t-att-class="'nav-link o_wprofile_navlink'" style="border-left: 0px">Review</a> + t-att-class="'nav-link o_wprofile_navlink'" style="border-left: 0px"> + Review + </a> </li> </ul> </div> diff --git a/addons/website_slides_forum/views/website_slides_templates.xml b/addons/website_slides_forum/views/website_slides_templates.xml index 42601c7f012..93c5f9809a9 100644 --- a/addons/website_slides_forum/views/website_slides_templates.xml +++ b/addons/website_slides_forum/views/website_slides_templates.xml @@ -1,8 +1,15 @@ <?xml version="1.0" ?> <odoo><data> <template id='course_main' inherit_id="website_slides.course_main"> - <!-- Channel main template: add link to forum --> - <xpath expr="//li[hasclass('o_wslides_course_header_nav_home')]" position="after"> + <!-- Channel (training) main template: add link to forum --> + <xpath expr="//li[hasclass('o_wslides_course_header_nav_home_training')]" position="after"> + <li class="nav-item" t-if="channel.forum_id"> + <a t-att-href="'/forum/%s' % (slug(channel.forum_id))" + t-att-class="'nav-link'" target="new">Forum</a> + </li> + </xpath> + <!-- Channel (documentation) main template: add link to forum --> + <xpath expr="//li[hasclass('o_wslides_course_header_nav_home_documentation')]" position="after"> <li class="nav-item" t-if="channel.forum_id"> <a t-att-href="'/forum/%s' % (slug(channel.forum_id))" t-att-class="'nav-link'" target="new">Forum</a> |
