##// END OF EJS Templates
svn-support: Add a button to vcs-svn settings template to generate Apache config.
Martin Bornhold -
r1013:499b9d52 default
parent child Browse files
Show More
@@ -1,267 +1,270 b''
1 1 ## snippet for displaying vcs settings
2 2 ## usage:
3 3 ## <%namespace name="vcss" file="/base/vcssettings.html"/>
4 4 ## ${vcss.vcs_settings_fields()}
5 5
6 6 <%def name="vcs_settings_fields(suffix='', svn_branch_patterns=None, svn_tag_patterns=None, repo_type=None, display_globals=False, allow_repo_location_change=False, **kwargs)">
7 7 % if display_globals:
8 8 <div class="panel panel-default">
9 9 <div class="panel-heading" id="general">
10 10 <h3 class="panel-title">${_('General')}</h3>
11 11 </div>
12 12 <div class="panel-body">
13 13 <div class="field">
14 14 <div class="checkbox">
15 15 ${h.checkbox('web_push_ssl' + suffix, 'True')}
16 16 <label for="web_push_ssl${suffix}">${_('Require SSL for vcs operations')}</label>
17 17 </div>
18 18 <div class="label">
19 19 <span class="help-block">${_('Activate to set RhodeCode to require SSL for pushing or pulling. If SSL certificate is missing it will return a HTTP Error 406: Not Acceptable.')}</span>
20 20 </div>
21 21 </div>
22 22 </div>
23 23 </div>
24 24 % endif
25 25
26 26 % if display_globals:
27 27 <div class="panel panel-default">
28 28 <div class="panel-heading">
29 29 <h3 class="panel-title">${_('Main Storage Location')}</h3>
30 30 </div>
31 31 <div class="panel-body">
32 32 <div class="field">
33 33 <div class="inputx locked_input">
34 34 %if allow_repo_location_change:
35 35 ${h.text('paths_root_path',size=59,readonly="readonly", class_="disabled")}
36 36 <span id="path_unlock" class="tooltip"
37 37 title="${h.tooltip(_('Click to unlock. You must restart RhodeCode in order to make this setting take effect.'))}">
38 38 <div class="btn btn-default lock_input_button"><i id="path_unlock_icon" class="icon-lock"></i></div>
39 39 </span>
40 40 %else:
41 41 ${_('Repository location change is disabled. You can enable this by changing the `allow_repo_location_change` inside .ini file.')}
42 42 ## form still requires this but we cannot internally change it anyway
43 43 ${h.hidden('paths_root_path',size=30,readonly="readonly", class_="disabled")}
44 44 %endif
45 45 </div>
46 46 </div>
47 47 <div class="label">
48 48 <span class="help-block">${_('Filesystem location where repositories should be stored. After changing this value a restart and rescan of the repository folder are required.')}</span>
49 49 </div>
50 50 </div>
51 51 </div>
52 52 % endif
53 53
54 54 % if display_globals or repo_type in ['git', 'hg']:
55 55 <div class="panel panel-default">
56 56 <div class="panel-heading" id="general">
57 57 <h3 class="panel-title">${_('Internal Hooks')}</h3>
58 58 </div>
59 59 <div class="panel-body">
60 60 <div class="field">
61 61 <div class="checkbox">
62 62 ${h.checkbox('hooks_changegroup_repo_size' + suffix, 'True', **kwargs)}
63 63 <label for="hooks_changegroup_repo_size${suffix}">${_('Show repository size after push')}</label>
64 64 </div>
65 65
66 66 <div class="label">
67 67 <span class="help-block">${_('Trigger a hook that calculates repository size after each push.')}</span>
68 68 </div>
69 69 <div class="checkbox">
70 70 ${h.checkbox('hooks_changegroup_push_logger' + suffix, 'True', **kwargs)}
71 71 <label for="hooks_changegroup_push_logger${suffix}">${_('Execute pre/post push hooks')}</label>
72 72 </div>
73 73 <div class="label">
74 74 <span class="help-block">${_('Execute Built in pre/post push hooks. This also executes rcextensions hooks.')}</span>
75 75 </div>
76 76 <div class="checkbox">
77 77 ${h.checkbox('hooks_outgoing_pull_logger' + suffix, 'True', **kwargs)}
78 78 <label for="hooks_outgoing_pull_logger${suffix}">${_('Execute pre/post pull hooks')}</label>
79 79 </div>
80 80 <div class="label">
81 81 <span class="help-block">${_('Execute Built in pre/post pull hooks. This also executes rcextensions hooks.')}</span>
82 82 </div>
83 83 </div>
84 84 </div>
85 85 </div>
86 86 % endif
87 87
88 88 % if display_globals or repo_type in ['hg']:
89 89 <div class="panel panel-default">
90 90 <div class="panel-heading">
91 91 <h3 class="panel-title">${_('Mercurial Settings')}</h3>
92 92 </div>
93 93 <div class="panel-body">
94 94 <div class="checkbox">
95 95 ${h.checkbox('extensions_largefiles' + suffix, 'True', **kwargs)}
96 96 <label for="extensions_largefiles${suffix}">${_('Enable largefiles extension')}</label>
97 97 </div>
98 98 <div class="label">
99 99 <span class="help-block">${_('Enable Largefiles extensions for all repositories.')}</span>
100 100 </div>
101 101 <div class="checkbox">
102 102 ${h.checkbox('phases_publish' + suffix, 'True', **kwargs)}
103 103 <label for="phases_publish${suffix}">${_('Set repositories as publishing') if display_globals else _('Set repository as publishing')}</label>
104 104 </div>
105 105 <div class="label">
106 106 <span class="help-block">${_('When this is enabled all commits in the repository are seen as public commits by clients.')}</span>
107 107 </div>
108 108 % if display_globals:
109 109 <div class="checkbox">
110 110 ${h.checkbox('extensions_hgsubversion' + suffix,'True')}
111 111 <label for="extensions_hgsubversion${suffix}">${_('Enable hgsubversion extension')}</label>
112 112 </div>
113 113 <div class="label">
114 114 <span class="help-block">${_('Requires hgsubversion library to be installed. Allows cloning remote SVN repositories and migrates them to Mercurial type.')}</span>
115 115 </div>
116 116 % endif
117 117 </div>
118 118 </div>
119 119 ## LABS for HG
120 120 % if c.labs_active:
121 121 <div class="panel panel-danger">
122 122 <div class="panel-heading">
123 123 <h3 class="panel-title">${_('Mercurial Labs Settings')} (${_('These features are considered experimental and may not work as expected.')})</h3>
124 124 </div>
125 125 <div class="panel-body">
126 126
127 127 <div class="checkbox">
128 128 ${h.checkbox('rhodecode_hg_use_rebase_for_merging' + suffix, 'True', **kwargs)}
129 129 <label for="rhodecode_hg_use_rebase_for_merging{suffix}">${_('Use rebase as merge strategy')}</label>
130 130 </div>
131 131 <div class="label">
132 132 <span class="help-block">${_('Use rebase instead of creating a merge commit when merging via web interface.')}</span>
133 133 </div>
134 134
135 135 </div>
136 136 </div>
137 137 % endif
138 138
139 139 % endif
140 140
141 141 % if display_globals:
142 142 <div class="panel panel-default">
143 143 <div class="panel-heading">
144 144 <h3 class="panel-title">${_('Global Subversion Settings')}</h3>
145 145 </div>
146 146 <div class="panel-body">
147 147 <div class="field">
148 148 <div class="checkbox">
149 149 ${h.checkbox('vcs_svn_proxy_http_requests_enabled' + suffix, 'True', **kwargs)}
150 150 <label for="vcs_svn_proxy_http_requests_enabled{suffix}">${_('Proxy subversion HTTP requests')}</label>
151 151 </div>
152 152 <div class="label">
153 153 <span class="help-block">${_('Subversion HTTP Support. Enables communication with SVN over HTTP protocol.')}</span>
154 154 </div>
155 155 </div>
156 156 <div class="field">
157 157 <div class="label">
158 158 <label for="vcs_svn_proxy_http_server_url">${_('Subversion HTTP Server URL')}</label><br/>
159 159 </div>
160 160 <div class="input">
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 167 </div>
165 168 </div>
166 169 % endif
167 170
168 171 % if display_globals or repo_type in ['svn']:
169 172 <div class="panel panel-default">
170 173 <div class="panel-heading">
171 174 <h3 class="panel-title">${_('Subversion Settings')}</h3>
172 175 </div>
173 176 <div class="panel-body">
174 177 <div class="field">
175 178 <div class="content" >
176 179 <label>${_('Repository patterns')}</label><br/>
177 180 </div>
178 181 </div>
179 182 <div class="label">
180 183 <span class="help-block">${_('Patterns for identifying SVN branches and tags. For recursive search, use "*". Eg.: "/branches/*"')}</span>
181 184 </div>
182 185
183 186 <div class="field branch_patterns">
184 187 <div class="input" >
185 188 <label>${_('Branches')}:</label><br/>
186 189 </div>
187 190 % if svn_branch_patterns:
188 191 % for branch in svn_branch_patterns:
189 192 <div class="input adjacent" id="${'id%s' % branch.ui_id}">
190 193 ${h.hidden('branch_ui_key' + suffix, branch.ui_key)}
191 194 ${h.text('branch_value_%d' % branch.ui_id + suffix, branch.ui_value, size=59, readonly="readonly", class_='disabled')}
192 195 % if kwargs.get('disabled') != 'disabled':
193 196 <span class="btn btn-x" onclick="ajaxDeletePattern(${branch.ui_id},'${'id%s' % branch.ui_id}')">
194 197 ${_('Delete')}
195 198 </span>
196 199 % endif
197 200 </div>
198 201 % endfor
199 202 %endif
200 203 </div>
201 204 % if kwargs.get('disabled') != 'disabled':
202 205 <div class="field branch_patterns">
203 206 <div class="input" >
204 207 ${h.text('new_svn_branch',size=59,placeholder='New branch pattern')}
205 208 </div>
206 209 </div>
207 210 % endif
208 211 <div class="field tag_patterns">
209 212 <div class="input" >
210 213 <label>${_('Tags')}:</label><br/>
211 214 </div>
212 215 % if svn_tag_patterns:
213 216 % for tag in svn_tag_patterns:
214 217 <div class="input" id="${'id%s' % tag.ui_id + suffix}">
215 218 ${h.hidden('tag_ui_key' + suffix, tag.ui_key)}
216 219 ${h.text('tag_ui_value_new_%d' % tag.ui_id + suffix, tag.ui_value, size=59, readonly="readonly", class_='disabled tag_input')}
217 220 % if kwargs.get('disabled') != 'disabled':
218 221 <span class="btn btn-x" onclick="ajaxDeletePattern(${tag.ui_id},'${'id%s' % tag.ui_id}')">
219 222 ${_('Delete')}
220 223 </span>
221 224 %endif
222 225 </div>
223 226 % endfor
224 227 % endif
225 228 </div>
226 229 % if kwargs.get('disabled') != 'disabled':
227 230 <div class="field tag_patterns">
228 231 <div class="input" >
229 232 ${h.text('new_svn_tag' + suffix, size=59, placeholder='New tag pattern')}
230 233 </div>
231 234 </div>
232 235 %endif
233 236 </div>
234 237 </div>
235 238 % else:
236 239 ${h.hidden('new_svn_branch' + suffix, '')}
237 240 ${h.hidden('new_svn_tag' + suffix, '')}
238 241 % endif
239 242
240 243
241 244
242 245
243 246 % if display_globals or repo_type in ['hg', 'git']:
244 247 <div class="panel panel-default">
245 248 <div class="panel-heading">
246 249 <h3 class="panel-title">${_('Pull Request Settings')}</h3>
247 250 </div>
248 251 <div class="panel-body">
249 252 <div class="checkbox">
250 253 ${h.checkbox('rhodecode_pr_merge_enabled' + suffix, 'True', **kwargs)}
251 254 <label for="rhodecode_pr_merge_enabled${suffix}">${_('Enable server-side merge for pull requests')}</label>
252 255 </div>
253 256 <div class="label">
254 257 <span class="help-block">${_('Note: when this feature is enabled, it only runs hooks defined in the rcextension package. Custom hooks added on the Admin -> Settings -> Hooks page will not be run when pull requests are automatically merged from the web interface.')}</span>
255 258 </div>
256 259 <div class="checkbox">
257 260 ${h.checkbox('rhodecode_use_outdated_comments' + suffix, 'True', **kwargs)}
258 261 <label for="rhodecode_use_outdated_comments${suffix}">${_('Invalidate and relocate inline comments during update')}</label>
259 262 </div>
260 263 <div class="label">
261 264 <span class="help-block">${_('During the update of a pull request, the position of inline comments will be updated and outdated inline comments will be hidden.')}</span>
262 265 </div>
263 266 </div>
264 267 </div>
265 268 % endif
266 269
267 270 </%def>
General Comments 0
You need to be logged in to leave comments. Login now