# HG changeset patch # User Mads Kiilerich # Date 2019-07-31 02:00:11 # Node ID 1a25c408d8a4e28a0bcd950c7a15bdbfdf0f932d # Parent d83f41634d0660ae744680906450d88fce5f3f71 settings: always show permanent URL on repo settings page - the click-to-display functionality was confusing diff --git a/kallithea/controllers/admin/repos.py b/kallithea/controllers/admin/repos.py --- a/kallithea/controllers/admin/repos.py +++ b/kallithea/controllers/admin/repos.py @@ -94,6 +94,7 @@ class ReposController(BaseRepoController defaults = RepoModel()._get_defaults(c.repo_name) defaults['clone_uri'] = c.repo_info.clone_uri_hidden # don't show password + defaults['permanent_url'] = c.repo_info.clone_url(clone_uri_tmpl=c.clone_uri_tmpl, with_id=True) return defaults diff --git a/kallithea/templates/admin/repos/repo_edit_settings.html b/kallithea/templates/admin/repos/repo_edit_settings.html --- a/kallithea/templates/admin/repos/repo_edit_settings.html +++ b/kallithea/templates/admin/repos/repo_edit_settings.html @@ -4,12 +4,17 @@ ${h.form(url('update_repo', repo_name=c.
${h.text('repo_name',class_='form-control')} - ${_('Permanent Repository ID')}: `_${c.repo_info.repo_id}` ${_('What is that?')} -
+ +
+ +
+ ${h.text('permanent_url',class_='form-control', readonly='1')} + ${_('''In case this repository is renamed or moved into another group the repository URL changes. Using the above permanent URL guarantees that this repository always will be accessible on that URL. - This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')} + This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')} +
@@ -100,11 +105,6 @@ ${h.form(url('update_repo', repo_name=c.