##// END OF EJS Templates
svn: moving svn http support out of labs settings.
lisaq -
r748:0147d45d default
parent child Browse files
Show More
@@ -789,18 +789,5 b' LabSetting = collections.namedtuple('
789 789 # This list has to be kept in sync with the form
790 790 # rhodecode.model.forms.LabsSettingsForm.
791 791 _LAB_SETTINGS = [
792 LabSetting(
793 key='rhodecode_proxy_subversion_http_requests',
794 type='bool',
795 group=lazy_ugettext('Subversion HTTP Support'),
796 label=lazy_ugettext('Proxy subversion HTTP requests'),
797 help='' # Do not translate the empty string!
798 ),
799 LabSetting(
800 key='rhodecode_subversion_http_server_url',
801 type='str',
802 group=lazy_ugettext('Subversion HTTP Server URL'),
803 label='', # Do not translate the empty string!
804 help=lazy_ugettext('e.g. http://localhost:8080/')
805 ),
792
806 793 ]
@@ -389,6 +389,9 b' class _BaseVcsSettingsForm(formencode.Sc'
389 389 rhodecode_use_outdated_comments = v.StringBoolean(if_missing=False)
390 390 rhodecode_hg_use_rebase_for_merging = v.StringBoolean(if_missing=False)
391 391
392 rhodecode_proxy_subversion_http_requests = v.StringBoolean(if_missing=False)
393 rhodecode_subversion_http_server_url = v.UnicodeString(
394 strip=True, if_missing=None)
392 395
393 396 def ApplicationUiSettingsForm():
394 397 class _ApplicationUiSettingsForm(_BaseVcsSettingsForm):
@@ -421,11 +424,6 b' def LabsSettingsForm():'
421 424 allow_extra_fields = True
422 425 filter_extra_fields = False
423 426
424 rhodecode_proxy_subversion_http_requests = v.StringBoolean(
425 if_missing=False)
426 rhodecode_subversion_http_server_url = v.UnicodeString(
427 strip=True, if_missing=None)
428
429 427 return _LabSettingsForm
430 428
431 429
@@ -411,6 +411,9 b' class VcsSettingsModel(object):'
411 411 HG_SETTINGS = (
412 412 ('extensions', 'largefiles'), ('phases', 'publish'))
413 413 GLOBAL_HG_SETTINGS = HG_SETTINGS + (('extensions', 'hgsubversion'), )
414 GLOBAL_SVN_SETTINGS = (
415 'rhodecode_proxy_subversion_http_requests',
416 'rhodecode_subversion_http_server_url')
414 417 SVN_BRANCH_SECTION = 'vcs_svn_branch'
415 418 SVN_TAG_SECTION = 'vcs_svn_tag'
416 419 SSL_SETTING = ('web', 'push_ssl')
@@ -546,6 +549,21 b' class VcsSettingsModel(object):'
546 549 self._create_or_update_ui(
547 550 self.global_settings, *subversion, active=data[subversion_key])
548 551
552 def create_or_update_global_svn_settings(self, data):
553 rhodecode_proxy_subversion_http_requests,
554 rhodecode_subversion_http_server_url = self.GLOBAL_SVN_SETTINGS
555 rhodecode_proxy_subversion_http_requests_key,
556 rhodecode_subversion_http_server_url_key = self._get_svn_settings(
557 self.GLOBAL_SVN_SETTINGS, data)
558 self._create_or_update_ui(
559 self.global_settings,
560 *rhodecode_proxy_subversion_http_requests,
561 value=safe_str(data[rhodecode_proxy_subversion_http_requests_key]))
562 self._create_or_update_ui(
563 self.global_settings,
564 *rhodecode_subversion_http_server_url,
565 active=data[rhodecode_subversion_http_server_url_key])
566
549 567 def update_global_ssl_setting(self, value):
550 568 self._create_or_update_ui(
551 569 self.global_settings, *self.SSL_SETTING, value=value)
@@ -126,6 +126,28 b''
126 126 <div class="panel-body">
127 127 <div class="field">
128 128 <div class="content" >
129 <label>${_('Subversion HTTP Support')}</label><br/>
130 </div>
131 <div class="checkbox">
132 ${h.checkbox('rhodecode_proxy_subversion_http_requests' + suffix, 'True', **kwargs)}
133 <label for="rhodecode_proxy_subversion_http_requests${suffix}">${_('Proxy subversion HTTP requests')}</label>
134 </div>
135 </div>
136 <div class="field">
137 <div class="label">
138 <label for="rhodecode_subversion_http_server_url">${_('Subversion HTTP Server URL')}</label><br/>
139 </div>
140 <div class="input">
141 ${h.text('rhodecode_subversion_http_server_url',size=59)}
142 </div>
143 </div>
144 <div class="field">
145 <div class="label">
146 <span class="help-block">${_('e.g. http://localhost:8080/')}</span>
147 </div>
148 </div>
149 <div class="field">
150 <div class="content" >
129 151 <label>${_('Repository patterns')}</label><br/>
130 152 </div>
131 153 </div>
General Comments 0
You need to be logged in to leave comments. Login now