Show More
@@ -212,6 +212,7 b' auth_ret_code =' | |||||
212 | ## codes don't break the transactions while 4XX codes do |
|
212 | ## codes don't break the transactions while 4XX codes do | |
213 | lock_ret_code = 423 |
|
213 | lock_ret_code = 423 | |
214 |
|
214 | |||
|
215 | allow_repo_location_change = True | |||
215 |
|
216 | |||
216 | #################################### |
|
217 | #################################### | |
217 | ### CELERY CONFIG #### |
|
218 | ### CELERY CONFIG #### |
@@ -212,6 +212,7 b' auth_ret_code =' | |||||
212 | ## codes don't break the transactions while 4XX codes do |
|
212 | ## codes don't break the transactions while 4XX codes do | |
213 | lock_ret_code = 423 |
|
213 | lock_ret_code = 423 | |
214 |
|
214 | |||
|
215 | allow_repo_location_change = True | |||
215 |
|
216 | |||
216 | #################################### |
|
217 | #################################### | |
217 | ### CELERY CONFIG #### |
|
218 | ### CELERY CONFIG #### |
@@ -212,6 +212,7 b' auth_ret_code =' | |||||
212 | ## codes don't break the transactions while 4XX codes do |
|
212 | ## codes don't break the transactions while 4XX codes do | |
213 | lock_ret_code = 423 |
|
213 | lock_ret_code = 423 | |
214 |
|
214 | |||
|
215 | allow_repo_location_change = True | |||
215 |
|
216 | |||
216 | #################################### |
|
217 | #################################### | |
217 | ### CELERY CONFIG #### |
|
218 | ### CELERY CONFIG #### |
@@ -242,7 +242,7 b' class SettingsController(BaseController)' | |||||
242 | sett = RhodeCodeUi.get_by_key('push_ssl') |
|
242 | sett = RhodeCodeUi.get_by_key('push_ssl') | |
243 | sett.ui_value = form_result['web_push_ssl'] |
|
243 | sett.ui_value = form_result['web_push_ssl'] | |
244 | Session().add(sett) |
|
244 | Session().add(sett) | |
245 |
|
245 | if c.visual.allow_repo_location_change: | ||
246 | sett = RhodeCodeUi.get_by_key('/') |
|
246 | sett = RhodeCodeUi.get_by_key('/') | |
247 | sett.ui_value = form_result['paths_root_path'] |
|
247 | sett.ui_value = form_result['paths_root_path'] | |
248 | Session().add(sett) |
|
248 | Session().add(sett) |
@@ -277,6 +277,7 b' class BaseController(WSGIController):' | |||||
277 |
|
277 | |||
278 | ## INI stored |
|
278 | ## INI stored | |
279 | self.cut_off_limit = int(config.get('cut_off_limit')) |
|
279 | self.cut_off_limit = int(config.get('cut_off_limit')) | |
|
280 | c.visual.allow_repo_location_change = str2bool(config.get('allow_repo_location_change', True)) | |||
280 |
|
281 | |||
281 | c.repo_name = get_repo_slug(request) # can be empty |
|
282 | c.repo_name = get_repo_slug(request) # can be empty | |
282 | c.backends = BACKENDS.keys() |
|
283 | c.backends = BACKENDS.keys() |
@@ -268,20 +268,21 b'' | |||||
268 | ##<span class="help-block">${_('Requires hg-git library installed. Allows cloning from git remote locations')}</span> |
|
268 | ##<span class="help-block">${_('Requires hg-git library installed. Allows cloning from git remote locations')}</span> | |
269 | </div> |
|
269 | </div> | |
270 | </div> |
|
270 | </div> | |
|
271 | %if c.visual.allow_repo_location_change: | |||
271 | <div class="field"> |
|
272 | <div class="field"> | |
272 | <div class="label"> |
|
273 | <div class="label"> | |
273 | <label for="paths_root_path">${_('Repositories location')}:</label> |
|
274 | <label for="paths_root_path">${_('Repositories location')}:</label> | |
274 | </div> |
|
275 | </div> | |
275 | <div class="input"> |
|
276 | <div class="input"> | |
276 | ${h.text('paths_root_path',size=30,readonly="readonly")} |
|
277 | ${h.text('paths_root_path',size=30,readonly="readonly", class_="disabled")} | |
277 | <span id="path_unlock" class="tooltip" |
|
278 | <span id="path_unlock" class="tooltip" style="cursor: pointer" | |
278 |
title="${h.tooltip(_(' |
|
279 | title="${h.tooltip(_('Click to unlock. You must restart RhodeCode in order to make this setting take effect.'))}"> | |
279 | ${_('Unlock')} |
|
280 | ${_('Unlock')} | |
280 | </span> |
|
281 | </span> | |
281 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> |
|
282 | <span class="help-block">${_('Location where repositories are stored. After changing this value a restart, and rescan is required')}</span> | |
282 | </div> |
|
283 | </div> | |
283 | </div> |
|
284 | </div> | |
284 |
|
285 | %endif | ||
285 | <div class="buttons"> |
|
286 | <div class="buttons"> | |
286 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} |
|
287 | ${h.submit('save',_('Save settings'),class_="ui-btn large")} | |
287 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} |
|
288 | ${h.reset('reset',_('Reset'),class_="ui-btn large")} | |
@@ -292,8 +293,9 b'' | |||||
292 |
|
293 | |||
293 | <script type="text/javascript"> |
|
294 | <script type="text/javascript"> | |
294 | YAHOO.util.Event.onDOMReady(function(){ |
|
295 | YAHOO.util.Event.onDOMReady(function(){ | |
295 |
Y |
|
296 | YUE.on('path_unlock','click',function(){ | |
296 |
Y |
|
297 | YUD.get('paths_root_path').removeAttribute('readonly'); | |
|
298 | YUD.removeClass('paths_root_path', 'disabled') | |||
297 | }); |
|
299 | }); | |
298 | }); |
|
300 | }); | |
299 | </script> |
|
301 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now