Mercurial > kallithea
comparison rhodecode/controllers/admin/repos_groups.py @ 3167:87258a137018 beta
fixed issue with displaying repos in groups view (without lightweight dashboard), added tests for this case
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 18 Jan 2013 01:01:22 +0100 |
parents | 0226b6d6b2b5 |
children | b4daef4cc26d |
comparison
equal
deleted
inserted
replaced
3166:abd49f6f5805 | 3167:87258a137018 |
---|---|
293 groups = RepoGroup.query().order_by(RepoGroup.group_name)\ | 293 groups = RepoGroup.query().order_by(RepoGroup.group_name)\ |
294 .filter(RepoGroup.group_parent_id == id).all() | 294 .filter(RepoGroup.group_parent_id == id).all() |
295 c.groups = self.scm_model.get_repos_groups(groups) | 295 c.groups = self.scm_model.get_repos_groups(groups) |
296 | 296 |
297 if c.visual.lightweight_dashboard is False: | 297 if c.visual.lightweight_dashboard is False: |
298 c.repo_list = self.scm_model.get_repos(all_repos=gr_filter) | 298 c.repos_list = self.scm_model.get_repos(all_repos=gr_filter) |
299 ## lightweight version of dashboard | 299 ## lightweight version of dashboard |
300 else: | 300 else: |
301 c.repos_list = Repository.query()\ | 301 c.repos_list = Repository.query()\ |
302 .filter(Repository.group_id == id)\ | 302 .filter(Repository.group_id == id)\ |
303 .order_by(func.lower(Repository.repo_name))\ | 303 .order_by(func.lower(Repository.repo_name))\ |
304 .all() | 304 .all() |
305 | 305 |
306 repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list, | 306 repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list, |
307 admin=False) | 307 admin=False) |
308 #json used to render the grid | 308 #json used to render the grid |
309 c.data = json.dumps(repos_data) | 309 c.data = json.dumps(repos_data) |
310 | 310 |
311 return render('admin/repos_groups/repos_groups.html') | 311 return render('admin/repos_groups/repos_groups.html') |
312 | 312 |
313 @HasPermissionAnyDecorator('hg.admin') | 313 @HasPermissionAnyDecorator('hg.admin') |
314 def edit(self, id, format='html'): | 314 def edit(self, id, format='html'): |