diff options
| author | David Beguin <dbe@odoo.com> | 2019-02-15 12:18:17 +0000 |
|---|---|---|
| committer | David Beguin <dbe@odoo.com> | 2019-02-18 15:15:06 +0000 |
| commit | 2c01452d4b0a2b3907fc703b7bca9acc54e73fcd (patch) | |
| tree | 0cb71eb86bd9f72851d330bf855a563c09551c24 /addons/website_forum/controllers/main.py | |
| parent | 5125eecce507e6575bed43590af5b4025c0f064c (diff) | |
[IMP] website(_profile,_forum,_survey) : redesign website all_users page
As the eLearning (website_slides) is also using website_profile users,
the All Users page is moved from website_forum to website_profile, to be
useable in both forum and eLearning.
This page displays also the number of karma point, badges and certificates
of each user.
The users are sorted by their karma points and the first 3 users are
promoted on a podium.
Use span instead of b tag in profile page
Task ID : 1922159
PR #31109
Diffstat (limited to 'addons/website_forum/controllers/main.py')
| -rw-r--r-- | addons/website_forum/controllers/main.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/addons/website_forum/controllers/main.py b/addons/website_forum/controllers/main.py index c4c1be80ff7..f31b59e430f 100644 --- a/addons/website_forum/controllers/main.py +++ b/addons/website_forum/controllers/main.py @@ -540,31 +540,6 @@ class WebsiteForum(WebsiteProfile): # User # -------------------------------------------------- - @http.route(['''/forum/<model("forum.forum", "[('website_id', 'in', (False, current_website_id))]"):forum>/users''', - '''/forum/<model("forum.forum"):forum>/users/page/<int:page>'''], - type='http', auth="public", website=True) - def users(self, forum, page=1, **searches): - User = request.env['res.users'] - step = 30 - dom = [('karma', '>', 1), ('website_published', '=', True)] - tag_count = User.sudo().search_count(dom) - pager = request.website.pager(url="/forum/%s/users" % slug(forum), total=tag_count, page=page, step=step, scope=30) - - if searches.get('user'): - dom += [('name', 'ilike', searches.get('user'))] - - users = User.sudo().search(dom, limit=step, offset=pager['offset'], order='karma DESC') - - searches['users'] = 'True' - values = self._prepare_user_values(forum=forum, searches=searches) - values .update({ - 'users': users, - 'main_object': forum, - 'pager': pager, - }) - - return request.render("website_forum.users", values) - @http.route(['/forum/<model("forum.forum"):forum>/partner/<int:partner_id>'], type='http', auth="public", website=True) def open_partner(self, forum, partner_id=0, **post): if partner_id: |
