##// END OF EJS Templates
svn-support: Only show 'generate config' button if config generation is enabled.
Martin Bornhold -
r1022:79b4d791 default
parent child Browse files
Show More
@@ -34,6 +34,7 b' import packaging.version'
34 34 from pylons import request, tmpl_context as c, url, config
35 35 from pylons.controllers.util import redirect
36 36 from pylons.i18n.translation import _, lazy_ugettext
37 from pyramid.threadlocal import get_current_registry
37 38 from webob.exc import HTTPBadRequest
38 39
39 40 import rhodecode
@@ -63,6 +64,7 b' from rhodecode.model.settings import ('
63 64 SettingsModel)
64 65
65 66 from rhodecode.model.supervisor import SupervisorModel, SUPERVISOR_MASTER
67 from rhodecode.svn_support.config_keys import generate_config
66 68
67 69
68 70 log = logging.getLogger(__name__)
@@ -186,6 +188,10 b' class SettingsController(BaseController)'
186 188 c.svn_branch_patterns = model.get_global_svn_branch_patterns()
187 189 c.svn_tag_patterns = model.get_global_svn_tag_patterns()
188 190
191 # TODO: Replace with request.registry after migrating to pyramid.
192 pyramid_settings = get_current_registry().settings
193 c.svn_proxy_generate_config = pyramid_settings[generate_config]
194
189 195 return htmlfill.render(
190 196 render('admin/settings/settings.html'),
191 197 defaults=self._form_defaults(),
@@ -161,9 +161,11 b''
161 161 ${h.text('vcs_svn_proxy_http_server_url',size=59)}
162 162 </div>
163 163 </div>
164 <div class="buttons">
165 <button class="btn btn-primary" id="vcs_svn_generate_cfg">${_('Generate Apache Config')}</button>
166 </div>
164 % if c.svn_proxy_generate_config:
165 <div class="buttons">
166 <button class="btn btn-primary" id="vcs_svn_generate_cfg">${_('Generate Apache Config')}</button>
167 </div>
168 % endif
167 169 </div>
168 170 </div>
169 171 % endif
General Comments 0
You need to be logged in to leave comments. Login now