Mercurial > kallithea
changeset 7766:1a25c408d8a4
settings: always show permanent URL on repo settings page - the click-to-display functionality was confusing
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Wed, 31 Jul 2019 02:00:11 +0200 |
parents | d83f41634d06 |
children | b10427b07d4b |
files | kallithea/controllers/admin/repos.py kallithea/templates/admin/repos/repo_edit_settings.html |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/admin/repos.py Tue Jul 16 12:30:15 2019 +0200 +++ b/kallithea/controllers/admin/repos.py Wed Jul 31 02:00:11 2019 +0200 @@ -94,6 +94,7 @@ 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
--- a/kallithea/templates/admin/repos/repo_edit_settings.html Tue Jul 16 12:30:15 2019 +0200 +++ b/kallithea/templates/admin/repos/repo_edit_settings.html Wed Jul 31 02:00:11 2019 +0200 @@ -4,12 +4,17 @@ <label class="control-label" for="repo_name">${_('Name')}:</label> <div> ${h.text('repo_name',class_='form-control')} - <span class="help-block">${_('Permanent Repository ID')}: `_${c.repo_info.repo_id}` <span><a id="show_more_clone_id" href="#">${_('What is that?')}</a></span></span> - <span id="clone_id" class="help-block" style="display: none"> - ${_('URL by id')}: `${c.repo_info.clone_url(clone_uri_tmpl=c.clone_uri_tmpl, with_id=True)}`<br/> + </div> + </div> + <div class="form-group"> + <label class="control-label" for="permanent_url">${_('Permanent URL')}:</label> + <div> + ${h.text('permanent_url',class_='form-control', readonly='1')} + <span class="help-block"> ${_('''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.''')}</span> + This is useful for CI systems, or any other cases that you need to hardcode the URL into a 3rd party service.''')} + </span> </div> </div> <div class="form-group"> @@ -100,11 +105,6 @@ <script> $(document).ready(function(){ - $('#show_more_clone_id').on('click', function(e){ - $('#clone_id').show(); - e.preventDefault(); - }); - $('#repo_landing_rev').select2({ 'dropdownAutoWidth': true });