diff --git a/kallithea/controllers/summary.py b/kallithea/controllers/summary.py --- a/kallithea/controllers/summary.py +++ b/kallithea/controllers/summary.py @@ -113,13 +113,16 @@ class SummaryController(BaseRepoControll c.cs_comments = c.db_repo.get_comments(page_revisions) c.cs_statuses = c.db_repo.statuses(page_revisions) + c.ssh_repo_url = None if request.authuser.is_default_user: username = None else: username = request.authuser.username + if c.ssh_enabled: + c.ssh_repo_url = c.db_repo.clone_url(clone_uri_tmpl=c.clone_ssh_tmpl) + c.clone_repo_url = c.db_repo.clone_url(clone_uri_tmpl=c.clone_uri_tmpl, with_id=False, username=username) c.clone_repo_url_id = c.db_repo.clone_url(clone_uri_tmpl=c.clone_uri_tmpl, with_id=True, username=username) - c.ssh_repo_url = c.db_repo.clone_url(clone_uri_tmpl=c.clone_ssh_tmpl) if c.db_repo.enable_statistics: c.show_stats = True diff --git a/kallithea/templates/summary/summary.html b/kallithea/templates/summary/summary.html --- a/kallithea/templates/summary/summary.html +++ b/kallithea/templates/summary/summary.html @@ -54,14 +54,14 @@ ${self.repo_context_bar('summary')}
@@ -69,11 +69,11 @@ ${self.repo_context_bar('summary')} ${self.repolabel(c.db_repo)} ${_('Use Name')} - %if c.ssh_enabled: + %if c.ssh_repo_url: ${_('Use SSH')} %endif
- %if c.ssh_enabled: + %if c.ssh_repo_url:
${self.repolabel(c.db_repo)}