##// END OF EJS Templates
repository: cleanup and alignment of repository editing templates...
Mads Kiilerich -
r3600:72711920 beta
parent child Browse files
Show More
@@ -1,374 +1,382 b''
1 1 ## -*- coding: utf-8 -*-
2 ##
3 ## See also repo_settings.html
4 ##
2 5 <%inherit file="/base/base.html"/>
3 6
4 7 <%def name="title()">
5 8 ${_('Edit repository')} ${c.repo_info.repo_name} &middot; ${c.rhodecode_name}
6 9 </%def>
7 10
8 11 <%def name="breadcrumbs_links()">
9 12 ${h.link_to(_(u'Home'),h.url('/'))}
10 13 &raquo;
11 14 ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))}
12 15 &raquo;
13 16 ${_('Settings')}
14 17 </%def>
15 18
16 19 <%def name="page_nav()">
17 20 ${self.menu('options')}
18 21 </%def>
19 22
20 23 <%def name="main()">
21 24 ${self.context_bar('options')}
22 25 <div class="box box-left">
23 26 <!-- box / title -->
24 27 <div class="title">
25 28 ${self.breadcrumbs()}
26 29 </div>
27 30 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='put')}
28 31 <div class="form">
29 32 <!-- fields -->
30 33 <div class="fields">
31 34 <div class="field">
32 35 <div class="label">
33 36 <label for="repo_name">${_('Name')}:</label>
34 37 </div>
35 38 <div class="input">
36 39 ${h.text('repo_name',class_="medium")}
37 40 </div>
38 41 </div>
39 42 <div class="field">
40 43 <div class="label">
41 44 <label for="clone_uri">${_('Clone uri')}:</label>
42 45 </div>
43 46 <div class="input">
44 47 ${h.text('clone_uri',class_="medium")}
45 48 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
46 49 </div>
47 50 </div>
48 51 <div class="field">
49 52 <div class="label">
50 53 <label for="repo_group">${_('Repository group')}:</label>
51 54 </div>
52 55 <div class="input">
53 56 ${h.select('repo_group','',c.repo_groups,class_="medium")}
54 57 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
55 58 </div>
56 59 </div>
57 60 <div class="field">
58 61 <div class="label">
59 62 <label for="repo_type">${_('Type')}:</label>
60 63 </div>
61 64 <div class="input">
62 65 ${h.select('repo_type','hg',c.backends,class_="medium")}
63 66 </div>
64 67 </div>
65 68 <div class="field">
66 69 <div class="label">
67 70 <label for="repo_landing_rev">${_('Landing revision')}:</label>
68 71 </div>
69 72 <div class="input">
70 73 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
71 74 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
72 75 </div>
73 76 </div>
74 77 <div class="field">
75 78 <div class="label label-textarea">
76 79 <label for="repo_description">${_('Description')}:</label>
77 80 </div>
78 81 <div class="textarea text-area editor">
79 82 ${h.textarea('repo_description')}
80 83 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
81 84 </div>
82 85 </div>
83 86
84 87 <div class="field">
85 88 <div class="label label-checkbox">
86 89 <label for="repo_private">${_('Private repository')}:</label>
87 90 </div>
88 91 <div class="checkboxes">
89 92 ${h.checkbox('repo_private',value="True")}
90 93 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
91 94 </div>
92 95 </div>
93 96 <div class="field">
94 97 <div class="label label-checkbox">
95 98 <label for="repo_enable_statistics">${_('Enable statistics')}:</label>
96 99 </div>
97 100 <div class="checkboxes">
98 101 ${h.checkbox('repo_enable_statistics',value="True")}
99 102 <span class="help-block">${_('Enable statistics window on summary page.')}</span>
100 103 </div>
101 104 </div>
102 105 <div class="field">
103 106 <div class="label label-checkbox">
104 107 <label for="repo_enable_downloads">${_('Enable downloads')}:</label>
105 108 </div>
106 109 <div class="checkboxes">
107 110 ${h.checkbox('repo_enable_downloads',value="True")}
108 111 <span class="help-block">${_('Enable download menu on summary page.')}</span>
109 112 </div>
110 113 </div>
111 114 <div class="field">
112 115 <div class="label label-checkbox">
113 116 <label for="repo_enable_locking">${_('Enable locking')}:</label>
114 117 </div>
115 118 <div class="checkboxes">
116 119 ${h.checkbox('repo_enable_locking',value="True")}
117 120 <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
118 121 </div>
119 122 </div>
120 123 <div class="field">
121 124 <div class="label">
122 125 <label for="user">${_('Owner')}:</label>
123 126 </div>
124 127 <div class="input input-medium ac">
125 128 <div class="perm_ac">
126 129 ${h.text('user',class_='yui-ac-input')}
127 130 <span class="help-block">${_('Change owner of this repository.')}</span>
128 131 <div id="owner_container"></div>
129 132 </div>
130 133 </div>
131 134 </div>
132 135 %if c.visual.repository_fields:
133 136 ## EXTRA FIELDS
134 137 %for field in c.repo_fields:
135 138 <div class="field">
136 139 <div class="label">
137 140 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
138 141 </div>
139 142 <div class="input input-medium">
140 143 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
141 144 %if field.field_desc:
142 145 <span class="help-block">${field.field_desc}</span>
143 146 %endif
144 147 </div>
145 148 </div>
146 149 %endfor
147 150 %endif
148 151 <div class="field">
149 152 <div class="label">
150 153 <label for="input">${_('Permissions')}:</label>
151 154 </div>
152 155 <div class="input">
153 156 <%include file="repo_edit_perms.html"/>
154 157 </div>
158 </div>
155 159
156 160 <div class="buttons">
157 161 ${h.submit('save',_('Save'),class_="ui-btn large")}
158 162 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
159 163 </div>
160 164 </div>
161 165 </div>
162 </div>
163 166 ${h.end_form()}
164 167 </div>
165 168
166 169 <div class="box box-right">
167 170 <div class="title">
168 171 <h5>${_('Advanced settings')}</h5>
169 172 </div>
170 173
171 174 <h3>${_('Statistics')}</h3>
172 175 ${h.form(url('repo_stats', repo_name=c.repo_info.repo_name),method='delete')}
173 176 <div class="form">
174 177 <div class="fields">
175 178 ${h.submit('reset_stats_%s' % c.repo_info.repo_name,_('Reset current statistics'),class_="ui-btn",onclick="return confirm('"+_('Confirm to remove current statistics')+"');")}
176 179 <div class="field" style="border:none;color:#888">
177 180 <ul>
178 181 <li>${_('Fetched to rev')}: ${c.stats_revision}/${c.repo_last_rev}</li>
179 182 <li>${_('Stats gathered')}: ${c.stats_percentage}%</li>
180 183 </ul>
181 184 </div>
182 185 </div>
183 186 </div>
184 187 ${h.end_form()}
185 188
186 189 %if c.repo_info.clone_uri:
187 190 <h3>${_('Remote')}</h3>
188 191 ${h.form(url('repo_pull', repo_name=c.repo_info.repo_name),method='put')}
189 192 <div class="form">
190 193 <div class="fields">
191 194 ${h.submit('remote_pull_%s' % c.repo_info.repo_name,_('Pull changes from remote location'),class_="ui-btn",onclick="return confirm('"+_('Confirm to pull changes from remote side')+"');")}
192 195 <div class="field" style="border:none">
193 196 <ul>
194 197 <li><a href="${c.repo_info.clone_uri}">${c.repo_info.clone_uri}</a></li>
195 198 </ul>
196 199 </div>
197 200 </div>
198 201 </div>
199 202 ${h.end_form()}
200 203 %endif
201 204
202 205 <h3>${_('Cache')}</h3>
203 206 ${h.form(url('repo_cache', repo_name=c.repo_info.repo_name),method='delete')}
204 207 <div class="form">
205 208 <div class="fields">
206 209 ${h.submit('reset_cache_%s' % c.repo_info.repo_name,_('Invalidate repository cache'),class_="ui-btn",onclick="return confirm('"+_('Confirm to invalidate repository cache')+"');")}
207 210 <div class="field" style="border:none;color:#888">
208 211 <ul>
209 212 <li>${_('Manually invalidate cache for this repository. On first access repository will be cached again')}
210 213 </li>
211 214 </ul>
212 215 </div>
213 216 <div class="field" style="border:none;">
214 217 ${_('List of cached values')}
215 218 <table>
216 219 <tr>
217 220 <th>${_('Prefix')}</th>
218 221 <th>${_('Key')}</th>
219 222 <th>${_('Active')}</th>
220 223 </tr>
221 224 %for cache in c.repo_info.cache_keys:
222 225 <tr>
223 226 <td>${cache.prefix or '-'}</td>
224 227 <td>${cache.cache_key}</td>
225 228 <td>${h.bool2icon(cache.cache_active)}</td>
226 229 </tr>
227 230 %endfor
228 231 </table>
229 232 </div>
230 233 </div>
231 234 </div>
232 235 ${h.end_form()}
233 236
234 237 <h3>${_('Public journal')}</h3>
235 238 ${h.form(url('repo_public_journal', repo_name=c.repo_info.repo_name),method='put')}
236 239 <div class="form">
237 240 ${h.hidden('auth_token',str(h.get_token()))}
238 241 <div class="field">
239 242 %if c.in_public_journal:
240 243 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Remove from public journal'),class_="ui-btn")}
241 244 %else:
242 245 ${h.submit('set_public_%s' % c.repo_info.repo_name,_('Add to public journal'),class_="ui-btn")}
243 246 %endif
244 247 </div>
245 248 <div class="field" style="border:none;color:#888">
246 249 <ul>
247 250 <li>${_('All actions made on this repository will be accessible to everyone in public journal')}
248 251 </li>
249 252 </ul>
250 253 </div>
251 254 </div>
252 255 ${h.end_form()}
253 256
254 257 <h3>${_('Locking')}</h3>
255 258 ${h.form(url('repo_locking', repo_name=c.repo_info.repo_name),method='put')}
256 259 <div class="form">
257 260 <div class="fields">
258 261 %if c.repo_info.locked[0]:
259 262 ${h.submit('set_unlock' ,_('Unlock locked repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to unlock repository')+"');")}
260 263 ${'Locked by %s on %s' % (h.person_by_id(c.repo_info.locked[0]),h.fmt_date(h.time_to_datetime(c.repo_info.locked[1])))}
261 264 %else:
262 265 ${h.submit('set_lock',_('lock repo'),class_="ui-btn",onclick="return confirm('"+_('Confirm to lock repository')+"');")}
263 266 ${_('Repository is not locked')}
264 267 %endif
265 268 </div>
266 269 <div class="field" style="border:none;color:#888">
267 270 <ul>
268 271 <li>${_('Force locking on repository. Works only when anonymous access is disabled')}
269 272 </li>
270 273 </ul>
271 274 </div>
272 275 </div>
273 276 ${h.end_form()}
274 277
275 278 <h3>${_('Set as fork of')}</h3>
276 279 ${h.form(url('repo_as_fork', repo_name=c.repo_info.repo_name),method='put')}
277 280 <div class="form">
278 281 <div class="fields">
279 282 ${h.select('id_fork_of','',c.repos_list,class_="medium")}
280 283 ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('set'),class_="ui-btn",)}
281 284 </div>
282 285 <div class="field" style="border:none;color:#888">
283 286 <ul>
284 287 <li>${_('''Manually set this repository as a fork of another from the list''')}</li>
285 288 </ul>
286 289 </div>
287 290 </div>
288 291 ${h.end_form()}
289 292
290 293 <h3>${_('Delete')}</h3>
291 294 ${h.form(url('repo', repo_name=c.repo_info.repo_name),method='delete')}
292 295 <div class="form">
293 296 <div class="fields">
297 <div class="field" style="border:none;color:#888">
298 ## <div class="label">
299 ## <label for="">${_('Remove repository')}:</label>
300 ## </div>
301 <div class="checkboxes">
294 302 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
295 303 %if c.repo_info.forks.count():
296 304 - ${ungettext('this repository has %s fork', 'this repository has %s forks', c.repo_info.forks.count()) % c.repo_info.forks.count()}
297 305 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
298 306 <input type="radio" name="forks" value="delete_forks" /> <label for="forks">${_('Delete forks')}</label>
299 307 %endif
300 </div>
301 <div class="field" style="border:none;color:#888">
302 308 <ul>
303 309 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
304 310 </ul>
305 311 </div>
306 312 </div>
313 </div>
314 </div>
307 315 ${h.end_form()}
308 316 </div>
309 317
310 318 ##TODO: this should be controlled by the VISUAL setting
311 319 %if c.visual.repository_fields:
312 320 <div class="box box-left" style="clear:left">
313 321 <!-- box / title -->
314 322 <div class="title">
315 323 <h5>${_('Extra fields')}</h5>
316 324 </div>
317 325
318 326 <div class="emails_wrap">
319 327 <table class="noborder">
320 328 %for field in c.repo_fields:
321 329 <tr>
322 330 <td>${field.field_label} (${field.field_key})</td>
323 331 <td>${field.field_type}</td>
324 332 <td>
325 333 ${h.form(url('delete_repo_fields', repo_name=c.repo_info.repo_name, field_id=field.repo_field_id),method='delete')}
326 334 ${h.submit('remove_%s' % field.repo_field_id, _('delete'), id="remove_field_%s" % field.repo_field_id,
327 335 class_="delete_icon action_button", onclick="return confirm('"+_('Confirm to delete this field: %s') % field.field_key+"');")}
328 336 ${h.end_form()}
329 337 </td>
330 338 </tr>
331 339 %endfor
332 340 </table>
333 341 </div>
334 342
335 343 ${h.form(url('create_repo_fields', repo_name=c.repo_info.repo_name),method='put')}
336 344 <div class="form">
337 345 <!-- fields -->
338 346 <div class="fields">
339 347 <div class="field">
340 348 <div class="label">
341 349 <label for="new_field_key">${_('New field key')}:</label>
342 350 </div>
343 351 <div class="input">
344 352 ${h.text('new_field_key', class_='small')}
345 353 </div>
346 354 </div>
347 355 <div class="field">
348 356 <div class="label">
349 357 <label for="new_field_label">${_('New field label')}:</label>
350 358 </div>
351 359 <div class="input">
352 360 ${h.text('new_field_label', class_='small', placeholder=_('Enter short label'))}
353 361 </div>
354 362 </div>
355 363
356 364 <div class="field">
357 365 <div class="label">
358 366 <label for="new_field_desc">${_('New field description')}:</label>
359 367 </div>
360 368 <div class="input">
361 369 ${h.text('new_field_desc', class_='small', placeholder=_('Enter description of a field'))}
362 370 </div>
363 371 </div>
364 372
365 373 <div class="buttons">
366 374 ${h.submit('save',_('Add'),class_="ui-btn large")}
367 375 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
368 376 </div>
369 377 </div>
370 378 </div>
371 379 ${h.end_form()}
372 380 </div>
373 381 %endif
374 382 </%def>
@@ -1,146 +1,140 b''
1 1 ## -*- coding: utf-8 -*-
2 ##
3 ## See also repo_edit.html
4 ##
2 5 <%inherit file="/base/base.html"/>
3 6
4 7 <%def name="title()">
5 8 ${_('%s Settings') % c.repo_name} &middot; ${c.rhodecode_name}
6 9 </%def>
7 10
8 11 <%def name="breadcrumbs_links()">
9 12 ${h.link_to(_(u'Home'),h.url('/'))}
10 13 &raquo;
11 14 ${h.link_to(c.repo_info.repo_name,h.url('summary_home',repo_name=c.repo_info.repo_name))}
12 15 &raquo;
13 16 ${_('Settings')}
14 17 </%def>
15 18
16 19 <%def name="page_nav()">
17 20 ${self.menu('settings')}
18 21 </%def>
19 22 <%def name="main()">
20 23 <div class="box">
21 24 <!-- box / title -->
22 25 <div class="title">
23 26 ${self.breadcrumbs()}
24 27 </div>
25 28 ${h.form(url('repo_settings_update', repo_name=c.repo_info.repo_name),method='put')}
26 29 <div class="form">
27 30 <!-- fields -->
28 31 <div class="fields">
29 32 <div class="field">
30 33 <div class="label">
31 34 <label for="repo_name">${_('Name')}:</label>
32 35 </div>
33 <div class="input input-medium">
34 ${h.text('repo_name',class_="small")}
36 <div class="input">
37 ${h.text('repo_name',class_="medium")}
35 38 </div>
36 39 </div>
37 40 <div class="field">
38 41 <div class="label">
39 42 <label for="clone_uri">${_('Clone uri')}:</label>
40 43 </div>
41 44 <div class="input">
42 45 ${h.text('clone_uri',class_="medium")}
43 46 <span class="help-block">${_('Optional http[s] url from which repository should be cloned.')}</span>
44 47 </div>
45 48 </div>
46 49 <div class="field">
47 50 <div class="label">
48 51 <label for="repo_group">${_('Repository group')}:</label>
49 52 </div>
50 53 <div class="input">
51 54 ${h.select('repo_group','',c.repo_groups,class_="medium")}
52 55 <span class="help-block">${_('Optional select a group to put this repository into.')}</span>
53 56 </div>
54 57 </div>
55 58 <div class="field">
56 59 <div class="label">
57 60 <label for="landing_rev">${_('Landing revision')}:</label>
58 61 </div>
59 62 <div class="input">
60 63 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
61 64 <span class="help-block">${_('Default revision for files page, downloads, whoosh and readme')}</span>
62 65 </div>
63 66 </div>
64 67 <div class="field">
65 68 <div class="label label-textarea">
66 69 <label for="repo_description">${_('Description')}:</label>
67 70 </div>
68 71 <div class="textarea text-area editor">
69 72 ${h.textarea('repo_description')}
70 73 <span class="help-block">${_('Keep it short and to the point. Use a README file for longer descriptions.')}</span>
71 74 </div>
72 75 </div>
73 76
74 77 <div class="field">
75 78 <div class="label label-checkbox">
76 79 <label for="repo_private">${_('Private repository')}:</label>
77 80 </div>
78 81 <div class="checkboxes">
79 82 ${h.checkbox('repo_private',value="True")}
80 83 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
81 84 </div>
82 85 </div>
83 86 %if c.visual.repository_fields:
84 87 ## EXTRA FIELDS
85 88 %for field in c.repo_fields:
86 89 <div class="field">
87 90 <div class="label">
88 91 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
89 92 </div>
90 93 <div class="input input-medium">
91 94 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
92 95 %if field.field_desc:
93 96 <span class="help-block">${field.field_desc}</span>
94 97 %endif
95 98 </div>
96 99 </div>
97 100 %endfor
98 101 %endif
99
100 102 <div class="field">
101 103 <div class="label">
102 <label for="">${_('Permissions')}:</label>
104 <label for="input">${_('Permissions')}:</label>
103 105 </div>
104 106 <div class="input">
105 107 <%include file="../admin/repos/repo_edit_perms.html"/>
106 108 </div>
107 109 </div>
108 110
109 111 <div class="buttons">
110 112 ${h.submit('save',_('Save'),class_="ui-btn large")}
111 113 ${h.reset('reset',_('Reset'),class_="ui-btn large")}
112 114 </div>
113 115
114 116 </div>
117 </div>
115 118 ${h.end_form()}
116 </div>
117 119
118 <h3>${_('Delete repository')}</h3>
120 <h3>${_('Delete')}</h3>
121 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
119 122 <div class="form">
120 <!-- fields -->
121 123 <div class="fields">
122
123 <div class="field">
124 <div class="field" style="border:none;color:#888">
124 125 <div class="label">
125 <label for="">${_('Remove repo')}:</label>
126 <label for="">${_('Remove repository')}:</label>
126 127 </div>
127 128 <div class="checkboxes">
128 ${h.form(url('repo_settings_delete', repo_name=c.repo_info.repo_name),method='delete')}
129 <div class="">
130 <div class="fields">
131 129 ${h.submit('remove_%s' % c.repo_info.repo_name,_('Remove this repository'),class_="ui-btn red",onclick="return confirm('"+_('Confirm to delete this repository')+"');")}
132 </div>
133 <div class="field" style="border:none;color:#888">
134 130 <ul>
135 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need fully delete it from file system please do it manually')}</li>
131 <li>${_('This repository will be renamed in a special way in order to be unaccesible for RhodeCode and VCS systems. If you need to fully delete it from file system please do it manually')}</li>
136 132 </ul>
137 133 </div>
138 134 </div>
139 ${h.end_form()}
140 </div>
141 </div>
142 135 </div>
143 136 </div>
137 ${h.end_form()}
144 138
145 139 </div>
146 140 </%def>
General Comments 0
You need to be logged in to leave comments. Login now