summaryrefslogtreecommitdiff
path: root/addons/website_slides_forum
diff options
context:
space:
mode:
authorOkan SUMER (osu) <osu@odoo.com>2020-03-19 09:42:59 +0000
committerJeremy Kersten <jke@odoo.com>2020-05-14 18:27:00 +0000
commit645056554ee38b5b96aeb53b6ed59cdb8e41b74c (patch)
treefd3da254310ab1051a54d0376b5773b78bca3b85 /addons/website_slides_forum
parentb86902040169c612544cd710c6b0025c8b43ddbe (diff)
[IMP] website_forum: frontend improvements and corrections
This commit adds new features and corrects some others in the frontend of website_forum app. - In the "about" section of a forum, use the s_accordion instead of a custom one for the first 3 elements, the last one is on a new page accessible from a link below the accordion - Cut the description after a specific amount of characters in the page where all forum are listed - In that same view, create options that show the number of post and the last post a forum has. Create an option to render forums in list view - Allow the user to cancel his vote (down or up) - Hide the answer box in the post view. Make it appear when the user click on the "answer" button - Use a JS public widget to validate a Post form (new, save, comment) - Enable the modification of a forum's image from the frontend - Hide Solved/Unsolved categories in "Discussion" forums - Disable the possibility to add snippets to an answer - Corrections of tours that broke after these modifications Part of https://github.com/odoo/odoo/pull/46634 task-2201708
Diffstat (limited to 'addons/website_slides_forum')
-rw-r--r--addons/website_slides_forum/views/website_slides_forum_templates.xml8
1 files changed, 4 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 0275835ab2a..9589a39f075 100644
--- a/addons/website_slides_forum/views/website_slides_forum_templates.xml
+++ b/addons/website_slides_forum/views/website_slides_forum_templates.xml
@@ -40,9 +40,9 @@
<div class="row align-items-start">
<div class="col-12 col-sm-4">
<a t-attf-href="/forum/#{slug(forum)}">
- <div class="oe_img_bg rounded shadow-sm py-4 px-5 o_wforum_forum_card_bg flex-shrink-0"
- t-attf-style="#{forum.image_256 and ('background-image: url(%s);' % website.image_url(forum, 'image_256'))} background-position: center;">
- <div class="p-5"/>
+ <div t-attf-class="h-100 w-100 o_editable #{not forum.image_1920 and 'rounded o_wforum_forum_card_bg shadow-sm flex-shrink-0'}">
+ <div t-if="forum.image_1920 or editable" t-attf-class="h-100"
+ t-field="forum.image_1920" t-options="{'widget': 'image', 'preview_image': 'image_256', 'class': 'w-100 h-100 o_object_fit_cover rounded'}" />
</div>
</a>
</div>
@@ -52,7 +52,7 @@
</a>
<p t-attf-class="m-0 lead #{not forum.description and 'css_non_editable_mode_hidden'}"
placeholder="Description"
- t-field="forum.description"/>
+ t-field="forum.teaser"/>
</div>
</div>
</div>