diff options
| author | jvm-odoo <jvm@odoo.com> | 2020-02-17 10:14:43 +0000 |
|---|---|---|
| committer | jvm-odoo <jvm@odoo.com> | 2020-02-27 13:51:53 +0000 |
| commit | 12fa83bb444069e43b23b0f4b8a84b8333d5949b (patch) | |
| tree | 86bf935ff995fc2f8a26c5f00862862edf14e44a /addons/website_forum/controllers | |
| parent | 4df7594d58f62ed76c3227413b2f335e83198c0b (diff) | |
[IMP] website_forum: improving forum header UX
Issue
- Install Forums
- Have at least 2 forums
- Go in one of them
- Go in a topic
- Click the button "All Forums" to go back
- You go back to the forum's app homepage
This is bad for UX, I should have been redirected
to the forum's topic list.
Cause
This behavior is not handled by Odoo.
Solution
Move All Forums in the navbar
Creating a smart "back" button based on browser history.
OPW-2198011
closes odoo/odoo#46454
X-original-commit: 307e6cd5b44b8f619a35056557f72aae241943b3
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Diffstat (limited to 'addons/website_forum/controllers')
| -rw-r--r-- | addons/website_forum/controllers/main.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index f8b268d902b..6ad0af1f2f1 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -235,6 +235,8 @@ class WebsiteForum(WebsiteProfile): 'filters': filters, 'reversed': reversed, }) + if (request.httprequest.referrer or "").startswith(request.httprequest.url_root): + values['back_button_url'] = request.httprequest.referrer return request.render("website_forum.post_description_full", values) @http.route('/forum/<model("forum.forum"):forum>/question/<model("forum.post"):question>/toggle_favourite', type='json', auth="user", methods=['POST'], website=True) |
