Changeset - 73e44865f204
[Not reviewed]
default
0 3 0
Mads Kiilerich - 9 years ago 2016-05-23 18:02:33
madski@unity3d.com
repos: show full repo name for my watched repos - don't overload the admin flag
3 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/repo_groups.py
Show inline comments
 
@@ -336,13 +336,13 @@ class RepoGroupsController(BaseControlle
 
        c.repos_list = Repository.query() \
 
                        .filter(Repository.group_id == c.group.group_id) \
 
                        .order_by(func.lower(Repository.repo_name)) \
 
                        .all()
 

	
 
        repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list,
 
                                                   admin=False)
 
                                                   admin=False, short_name=True)
 
        #json used to render the grid
 
        c.data = json.dumps(repos_data)
 

	
 
        return render('admin/repo_groups/repo_group_show.html')
 

	
 
    @HasRepoGroupPermissionAnyDecorator('group.admin')
kallithea/controllers/home.py
Show inline comments
 
@@ -60,13 +60,13 @@ class HomeController(BaseController):
 
        c.repos_list = Repository.query() \
 
                        .filter(Repository.group_id == None) \
 
                        .order_by(func.lower(Repository.repo_name)) \
 
                        .all()
 

	
 
        repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list,
 
                                                   admin=False)
 
                                                   admin=False, short_name=True)
 
        #json used to render the grid
 
        c.data = json.dumps(repos_data)
 

	
 
        return render('/index.html')
 

	
 
    @LoginRequired()
kallithea/model/repo.py
Show inline comments
 
@@ -182,22 +182,22 @@ class RepoModel(BaseModel):
 
        if repositories is None:
 
            repositories = Repository.getAll()
 
        for repo in repositories:
 
            repo.update_changeset_cache()
 

	
 
    def get_repos_as_dict(self, repos_list=None, admin=False, perm_check=True,
 
                          super_user_actions=False):
 
                          super_user_actions=False, short_name=False):
 
        _render = self._render_datatable
 
        from pylons import tmpl_context as c
 

	
 
        def quick_menu(repo_name):
 
            return _render('quick_menu', repo_name)
 

	
 
        def repo_lnk(name, rtype, rstate, private, fork_of):
 
            return _render('repo_name', name, rtype, rstate, private, fork_of,
 
                           short_name=not admin, admin=False)
 
                           short_name=short_name, admin=False)
 

	
 
        def last_change(last_change):
 
            return _render("last_change", last_change)
 

	
 
        def rss_lnk(repo_name):
 
            return _render("rss", repo_name)
0 comments (0 inline, 0 general)