Changeset - a86ebf58c720
[Not reviewed]
default
0 3 0
Mads Kiilerich - 8 years ago 2018-04-23 00:44:13
mads@kiilerich.com
templates: drop unused get_repos_as_dict super_user parameter

It was perhaps at some point used to show a content menu.
3 files changed with 4 insertions and 6 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/repos.py
Show inline comments
 
@@ -98,15 +98,13 @@ class ReposController(BaseRepoController
 
        return defaults
 

	
 
    def index(self, format='html'):
 
        _list = Repository.query(sorted=True).all()
 

	
 
        c.repos_list = RepoList(_list, perm_level='admin')
 
        repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list,
 
                                                   admin=True,
 
                                                   super_user_actions=True)
 
        repos_data = RepoModel().get_repos_as_dict(repos_list=c.repos_list, admin=True)
 
        # data used to render the grid
 
        c.data = repos_data
 

	
 
        return render('admin/repos/repos.html')
 

	
 
    @NotAnonymous()
kallithea/model/repo.py
Show inline comments
 
@@ -148,13 +148,13 @@ class RepoModel(object):
 
        tmpl = template.get_def(tmpl)
 
        kwargs.update(dict(_=_, h=h, c=c, request=request))
 
        return tmpl.render(*args, **kwargs)
 

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

	
 
        def repo_lnk(name, rtype, rstate, private, fork_of):
 
            return _render('repo_name', name, rtype, rstate, private, fork_of,
 
                           short_name=short_name)
 
@@ -177,13 +177,13 @@ class RepoModel(object):
 
            return h.urlify_text(desc, truncate=80, stylize=c.visual.stylify_metalabels)
 

	
 
        def state(repo_state):
 
            return _render("repo_state", repo_state)
 

	
 
        def repo_actions(repo_name):
 
            return _render('repo_actions', repo_name, super_user_actions)
 
            return _render('repo_actions', repo_name)
 

	
 
        def owner_actions(owner_id, username):
 
            return _render('user_name', owner_id, username)
 

	
 
        repos_data = []
 

	
kallithea/templates/data_table/_dt_elements.html
Show inline comments
 
@@ -58,13 +58,13 @@
 
    <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name,api_key=request.authuser.api_key)}"><i class="icon-rss-squared"></i></a>
 
  %else:
 
    <a title="${_('Subscribe to %s atom feed')% name}" href="${h.url('atom_feed_home',repo_name=name)}"><i class="icon-rss-squared"></i></a>
 
  %endif
 
</%def>
 

	
 
<%def name="repo_actions(repo_name, super_user=True)">
 
<%def name="repo_actions(repo_name)">
 
  <div>
 
    <div class="pull-left">
 
      <a href="${h.url('edit_repo',repo_name=repo_name)}" title="${_('Edit')}" class="btn btn-default btn-xs">
 
        <i class="icon-pencil"></i>${_('Edit')}
 
      </a>
 
    </div>
0 comments (0 inline, 0 general)