##// END OF EJS Templates
ui: fixed some missed icons during redesign phase
dan -
r3798:1f828f9a stable
parent child Browse files
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,444 +1,444 b''
1
1
2
2
3 //BUTTONS
3 //BUTTONS
4 button,
4 button,
5 .btn,
5 .btn,
6 input[type="button"] {
6 input[type="button"] {
7 -webkit-appearance: none;
7 -webkit-appearance: none;
8 display: inline-block;
8 display: inline-block;
9 margin: 0 @padding/3 0 0;
9 margin: 0 @padding/3 0 0;
10 padding: @button-padding;
10 padding: @button-padding;
11 text-align: center;
11 text-align: center;
12 font-size: @basefontsize;
12 font-size: @basefontsize;
13 line-height: 1em;
13 line-height: 1em;
14 font-family: @text-light;
14 font-family: @text-light;
15 text-decoration: none;
15 text-decoration: none;
16 text-shadow: none;
16 text-shadow: none;
17 color: @grey2;
17 color: @grey2;
18 background-color: white;
18 background-color: white;
19 background-image: none;
19 background-image: none;
20 border: none;
20 border: none;
21 .border ( @border-thickness-buttons, @grey5 );
21 .border ( @border-thickness-buttons, @grey5 );
22 .border-radius (@border-radius);
22 .border-radius (@border-radius);
23 cursor: pointer;
23 cursor: pointer;
24 white-space: nowrap;
24 white-space: nowrap;
25 -webkit-transition: background .3s,color .3s;
25 -webkit-transition: background .3s,color .3s;
26 -moz-transition: background .3s,color .3s;
26 -moz-transition: background .3s,color .3s;
27 -o-transition: background .3s,color .3s;
27 -o-transition: background .3s,color .3s;
28 transition: background .3s,color .3s;
28 transition: background .3s,color .3s;
29 box-shadow: @button-shadow;
29 box-shadow: @button-shadow;
30 -webkit-box-shadow: @button-shadow;
30 -webkit-box-shadow: @button-shadow;
31
31
32
32
33
33
34 a {
34 a {
35 display: block;
35 display: block;
36 margin: 0;
36 margin: 0;
37 padding: 0;
37 padding: 0;
38 color: inherit;
38 color: inherit;
39 text-decoration: none;
39 text-decoration: none;
40
40
41 &:hover {
41 &:hover {
42 text-decoration: none;
42 text-decoration: none;
43 }
43 }
44 }
44 }
45
45
46 &:focus,
46 &:focus,
47 &:active {
47 &:active {
48 outline:none;
48 outline:none;
49 }
49 }
50 &:hover {
50 &:hover {
51 color: @rcdarkblue;
51 color: @rcdarkblue;
52 background-color: @white;
52 background-color: @white;
53 .border ( @border-thickness, @grey4 );
53 .border ( @border-thickness, @grey4 );
54 }
54 }
55
55
56 .icon-remove-sign {
56 .icon-remove {
57 display: none;
57 display: none;
58 }
58 }
59
59
60 //disabled buttons
60 //disabled buttons
61 //last; overrides any other styles
61 //last; overrides any other styles
62 &:disabled {
62 &:disabled {
63 opacity: .7;
63 opacity: .7;
64 cursor: auto;
64 cursor: auto;
65 background-color: white;
65 background-color: white;
66 color: @grey4;
66 color: @grey4;
67 text-shadow: none;
67 text-shadow: none;
68 }
68 }
69
69
70 &.no-margin {
70 &.no-margin {
71 margin: 0 0 0 0;
71 margin: 0 0 0 0;
72 }
72 }
73
73
74 }
74 }
75
75
76
76
77 .btn-default {
77 .btn-default {
78 border: @border-thickness solid @grey5;
78 border: @border-thickness solid @grey5;
79 background-image: none;
79 background-image: none;
80 color: @grey2;
80 color: @grey2;
81
81
82 a {
82 a {
83 color: @grey2;
83 color: @grey2;
84 }
84 }
85
85
86 &:hover,
86 &:hover,
87 &.active {
87 &.active {
88 color: @rcdarkblue;
88 color: @rcdarkblue;
89 background-color: @white;
89 background-color: @white;
90 .border ( @border-thickness, @grey4 );
90 .border ( @border-thickness, @grey4 );
91
91
92 a {
92 a {
93 color: @grey2;
93 color: @grey2;
94 }
94 }
95 }
95 }
96 &:disabled {
96 &:disabled {
97 .border ( @border-thickness-buttons, @grey5 );
97 .border ( @border-thickness-buttons, @grey5 );
98 background-color: transparent;
98 background-color: transparent;
99 }
99 }
100 }
100 }
101
101
102 .btn-primary,
102 .btn-primary,
103 .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */
103 .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */
104 .btn-success {
104 .btn-success {
105 .border ( @border-thickness, @rcblue );
105 .border ( @border-thickness, @rcblue );
106 background-color: @rcblue;
106 background-color: @rcblue;
107 color: white;
107 color: white;
108
108
109 a {
109 a {
110 color: white;
110 color: white;
111 }
111 }
112
112
113 &:hover,
113 &:hover,
114 &.active {
114 &.active {
115 .border ( @border-thickness, @rcdarkblue );
115 .border ( @border-thickness, @rcdarkblue );
116 color: white;
116 color: white;
117 background-color: @rcdarkblue;
117 background-color: @rcdarkblue;
118
118
119 a {
119 a {
120 color: white;
120 color: white;
121 }
121 }
122 }
122 }
123 &:disabled {
123 &:disabled {
124 background-color: @rcblue;
124 background-color: @rcblue;
125 }
125 }
126 }
126 }
127
127
128 .btn-secondary {
128 .btn-secondary {
129 &:extend(.btn-default);
129 &:extend(.btn-default);
130
130
131 background-color: white;
131 background-color: white;
132
132
133 &:focus {
133 &:focus {
134 outline: 0;
134 outline: 0;
135 }
135 }
136
136
137 &:hover {
137 &:hover {
138 &:extend(.btn-default:hover);
138 &:extend(.btn-default:hover);
139 }
139 }
140
140
141 &.btn-link {
141 &.btn-link {
142 &:extend(.btn-link);
142 &:extend(.btn-link);
143 color: @rcblue;
143 color: @rcblue;
144 }
144 }
145
145
146 &:disabled {
146 &:disabled {
147 color: @rcblue;
147 color: @rcblue;
148 background-color: white;
148 background-color: white;
149 }
149 }
150 }
150 }
151
151
152 .btn-warning,
152 .btn-warning,
153 .btn-danger,
153 .btn-danger,
154 .revoke_perm,
154 .revoke_perm,
155 .btn-x,
155 .btn-x,
156 .form .action_button.btn-x {
156 .form .action_button.btn-x {
157 .border ( @border-thickness, @alert2 );
157 .border ( @border-thickness, @alert2 );
158 background-color: white;
158 background-color: white;
159 color: @alert2;
159 color: @alert2;
160
160
161 a {
161 a {
162 color: @alert2;
162 color: @alert2;
163 }
163 }
164
164
165 &:hover,
165 &:hover,
166 &.active {
166 &.active {
167 .border ( @border-thickness, @alert2 );
167 .border ( @border-thickness, @alert2 );
168 color: white;
168 color: white;
169 background-color: @alert2;
169 background-color: @alert2;
170
170
171 a {
171 a {
172 color: white;
172 color: white;
173 }
173 }
174 }
174 }
175
175
176 i {
176 i {
177 display:none;
177 display:none;
178 }
178 }
179
179
180 &:disabled {
180 &:disabled {
181 background-color: white;
181 background-color: white;
182 color: @alert2;
182 color: @alert2;
183 }
183 }
184 }
184 }
185
185
186 .btn-approved-status {
186 .btn-approved-status {
187 .border ( @border-thickness, @alert1 );
187 .border ( @border-thickness, @alert1 );
188 background-color: white;
188 background-color: white;
189 color: @alert1;
189 color: @alert1;
190
190
191 }
191 }
192
192
193 .btn-rejected-status {
193 .btn-rejected-status {
194 .border ( @border-thickness, @alert2 );
194 .border ( @border-thickness, @alert2 );
195 background-color: white;
195 background-color: white;
196 color: @alert2;
196 color: @alert2;
197 }
197 }
198
198
199 .btn-sm,
199 .btn-sm,
200 .btn-mini,
200 .btn-mini,
201 .field-sm .btn {
201 .field-sm .btn {
202 padding: @padding/3;
202 padding: @padding/3;
203 }
203 }
204
204
205 .btn-xs {
205 .btn-xs {
206 padding: @padding/4;
206 padding: @padding/4;
207 }
207 }
208
208
209 .btn-lg {
209 .btn-lg {
210 padding: @padding * 1.2;
210 padding: @padding * 1.2;
211 }
211 }
212
212
213 .btn-group {
213 .btn-group {
214 display: inline-block;
214 display: inline-block;
215 .btn {
215 .btn {
216 float: left;
216 float: left;
217 margin: 0 0 0 -1px;
217 margin: 0 0 0 -1px;
218 }
218 }
219 }
219 }
220
220
221 .btn-link {
221 .btn-link {
222 background: transparent;
222 background: transparent;
223 border: none;
223 border: none;
224 padding: 0;
224 padding: 0;
225 color: @rcblue;
225 color: @rcblue;
226
226
227 &:hover {
227 &:hover {
228 background: transparent;
228 background: transparent;
229 border: none;
229 border: none;
230 color: @rcdarkblue;
230 color: @rcdarkblue;
231 }
231 }
232
232
233 //disabled buttons
233 //disabled buttons
234 //last; overrides any other styles
234 //last; overrides any other styles
235 &:disabled {
235 &:disabled {
236 opacity: .7;
236 opacity: .7;
237 cursor: auto;
237 cursor: auto;
238 background-color: white;
238 background-color: white;
239 color: @grey4;
239 color: @grey4;
240 text-shadow: none;
240 text-shadow: none;
241 }
241 }
242
242
243 // TODO: johbo: Check if we can avoid this, indicates that the structure
243 // TODO: johbo: Check if we can avoid this, indicates that the structure
244 // is not yet good.
244 // is not yet good.
245 // lisa: The button CSS reflects the button HTML; both need a cleanup.
245 // lisa: The button CSS reflects the button HTML; both need a cleanup.
246 &.btn-danger {
246 &.btn-danger {
247 color: @alert2;
247 color: @alert2;
248
248
249 &:hover {
249 &:hover {
250 color: darken(@alert2,30%);
250 color: darken(@alert2,30%);
251 }
251 }
252
252
253 &:disabled {
253 &:disabled {
254 color: @alert2;
254 color: @alert2;
255 }
255 }
256 }
256 }
257 }
257 }
258
258
259 .btn-social {
259 .btn-social {
260 &:extend(.btn-default);
260 &:extend(.btn-default);
261 margin: 5px 5px 5px 0px;
261 margin: 5px 5px 5px 0px;
262 min-width: 160px;
262 min-width: 160px;
263 }
263 }
264
264
265 // TODO: johbo: check these exceptions
265 // TODO: johbo: check these exceptions
266
266
267 .links {
267 .links {
268
268
269 .btn + .btn {
269 .btn + .btn {
270 margin-top: @padding;
270 margin-top: @padding;
271 }
271 }
272 }
272 }
273
273
274
274
275 .action_button {
275 .action_button {
276 display:inline;
276 display:inline;
277 margin: 0;
277 margin: 0;
278 padding: 0 1em 0 0;
278 padding: 0 1em 0 0;
279 font-size: inherit;
279 font-size: inherit;
280 color: @rcblue;
280 color: @rcblue;
281 border: none;
281 border: none;
282 border-radius: 0;
282 border-radius: 0;
283 background-color: transparent;
283 background-color: transparent;
284
284
285 &.last-item {
285 &.last-item {
286 border: none;
286 border: none;
287 padding: 0 0 0 0;
287 padding: 0 0 0 0;
288 }
288 }
289
289
290 &:last-child {
290 &:last-child {
291 border: none;
291 border: none;
292 padding: 0 0 0 0;
292 padding: 0 0 0 0;
293 }
293 }
294
294
295 &:hover {
295 &:hover {
296 color: @rcdarkblue;
296 color: @rcdarkblue;
297 background-color: transparent;
297 background-color: transparent;
298 border: none;
298 border: none;
299 }
299 }
300 }
300 }
301 .grid_delete {
301 .grid_delete {
302 .action_button {
302 .action_button {
303 border: none;
303 border: none;
304 }
304 }
305 }
305 }
306
306
307
307
308 // TODO: johbo: Form button tweaks, check if we can use the classes instead
308 // TODO: johbo: Form button tweaks, check if we can use the classes instead
309 input[type="submit"] {
309 input[type="submit"] {
310 &:extend(.btn-primary);
310 &:extend(.btn-primary);
311
311
312 &:focus {
312 &:focus {
313 outline: 0;
313 outline: 0;
314 }
314 }
315
315
316 &:hover {
316 &:hover {
317 &:extend(.btn-primary:hover);
317 &:extend(.btn-primary:hover);
318 }
318 }
319
319
320 &.btn-link {
320 &.btn-link {
321 &:extend(.btn-link);
321 &:extend(.btn-link);
322 color: @rcblue;
322 color: @rcblue;
323
323
324 &:disabled {
324 &:disabled {
325 color: @rcblue;
325 color: @rcblue;
326 background-color: transparent;
326 background-color: transparent;
327 }
327 }
328 }
328 }
329
329
330 &:disabled {
330 &:disabled {
331 .border ( @border-thickness-buttons, @rcblue );
331 .border ( @border-thickness-buttons, @rcblue );
332 background-color: @rcblue;
332 background-color: @rcblue;
333 color: white;
333 color: white;
334 opacity: 0.5;
334 opacity: 0.5;
335 }
335 }
336 }
336 }
337
337
338 input[type="reset"] {
338 input[type="reset"] {
339 &:extend(.btn-default);
339 &:extend(.btn-default);
340
340
341 // TODO: johbo: Check if this tweak can be avoided.
341 // TODO: johbo: Check if this tweak can be avoided.
342 background: transparent;
342 background: transparent;
343
343
344 &:focus {
344 &:focus {
345 outline: 0;
345 outline: 0;
346 }
346 }
347
347
348 &:hover {
348 &:hover {
349 &:extend(.btn-default:hover);
349 &:extend(.btn-default:hover);
350 }
350 }
351
351
352 &.btn-link {
352 &.btn-link {
353 &:extend(.btn-link);
353 &:extend(.btn-link);
354 color: @rcblue;
354 color: @rcblue;
355
355
356 &:disabled {
356 &:disabled {
357 border: none;
357 border: none;
358 }
358 }
359 }
359 }
360
360
361 &:disabled {
361 &:disabled {
362 .border ( @border-thickness-buttons, @rcblue );
362 .border ( @border-thickness-buttons, @rcblue );
363 background-color: white;
363 background-color: white;
364 color: @rcblue;
364 color: @rcblue;
365 }
365 }
366 }
366 }
367
367
368 input[type="submit"],
368 input[type="submit"],
369 input[type="reset"] {
369 input[type="reset"] {
370 &.btn-danger {
370 &.btn-danger {
371 &:extend(.btn-danger);
371 &:extend(.btn-danger);
372
372
373 &:focus {
373 &:focus {
374 outline: 0;
374 outline: 0;
375 }
375 }
376
376
377 &:hover {
377 &:hover {
378 &:extend(.btn-danger:hover);
378 &:extend(.btn-danger:hover);
379 }
379 }
380
380
381 &.btn-link {
381 &.btn-link {
382 &:extend(.btn-link);
382 &:extend(.btn-link);
383 color: @alert2;
383 color: @alert2;
384
384
385 &:hover {
385 &:hover {
386 color: darken(@alert2,30%);
386 color: darken(@alert2,30%);
387 }
387 }
388 }
388 }
389
389
390 &:disabled {
390 &:disabled {
391 color: @alert2;
391 color: @alert2;
392 background-color: white;
392 background-color: white;
393 }
393 }
394 }
394 }
395 &.btn-danger-action {
395 &.btn-danger-action {
396 .border ( @border-thickness, @alert2 );
396 .border ( @border-thickness, @alert2 );
397 background-color: @alert2;
397 background-color: @alert2;
398 color: white;
398 color: white;
399
399
400 a {
400 a {
401 color: white;
401 color: white;
402 }
402 }
403
403
404 &:hover {
404 &:hover {
405 background-color: darken(@alert2,20%);
405 background-color: darken(@alert2,20%);
406 }
406 }
407
407
408 &.active {
408 &.active {
409 .border ( @border-thickness, @alert2 );
409 .border ( @border-thickness, @alert2 );
410 color: white;
410 color: white;
411 background-color: @alert2;
411 background-color: @alert2;
412
412
413 a {
413 a {
414 color: white;
414 color: white;
415 }
415 }
416 }
416 }
417
417
418 &:disabled {
418 &:disabled {
419 background-color: white;
419 background-color: white;
420 color: @alert2;
420 color: @alert2;
421 }
421 }
422 }
422 }
423 }
423 }
424
424
425
425
426 .button-links {
426 .button-links {
427 float: left;
427 float: left;
428 display: inline;
428 display: inline;
429 margin: 0;
429 margin: 0;
430 padding-left: 0;
430 padding-left: 0;
431 list-style: none;
431 list-style: none;
432 text-align: right;
432 text-align: right;
433
433
434 li {
434 li {
435
435
436
436
437 }
437 }
438
438
439 li.active {
439 li.active {
440 background-color: @grey6;
440 background-color: @grey6;
441 .border ( @border-thickness, @grey4 );
441 .border ( @border-thickness, @grey4 );
442 }
442 }
443
443
444 }
444 }
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,164 +1,164 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2
2
3 ${h.secure_form(h.route_path('repo_create'), request=request)}
3 ${h.secure_form(h.route_path('repo_create'), request=request)}
4 <div class="form">
4 <div class="form">
5 <!-- fields -->
5 <!-- fields -->
6 <div class="fields">
6 <div class="fields">
7 <div class="field">
7 <div class="field">
8 <div class="label">
8 <div class="label">
9 <label for="repo_name">${_('Repository name')}:</label>
9 <label for="repo_name">${_('Repository name')}:</label>
10 </div>
10 </div>
11 <div class="input">
11 <div class="input">
12 ${h.text('repo_name', class_="medium")}
12 ${h.text('repo_name', class_="medium")}
13 <div class="info-block">
13 <div class="info-block">
14 <a id="remote_clone_toggle" href="#"><i class="icon-download-alt"></i> ${_('Import Existing Repository ?')}</a>
14 <a id="remote_clone_toggle" href="#">${_('Import Existing Repository ?')}</a>
15 </div>
15 </div>
16 %if not c.rhodecode_user.is_admin:
16 %if not c.rhodecode_user.is_admin:
17 ${h.hidden('user_created',True)}
17 ${h.hidden('user_created',True)}
18 %endif
18 %endif
19 </div>
19 </div>
20 </div>
20 </div>
21 <div id="remote_clone" class="field" style="display: none;">
21 <div id="remote_clone" class="field" style="display: none;">
22 <div class="label">
22 <div class="label">
23 <label for="clone_uri">${_('Clone from')}:</label>
23 <label for="clone_uri">${_('Clone from')}:</label>
24 </div>
24 </div>
25 <div class="input">
25 <div class="input">
26 ${h.text('clone_uri', class_="medium")}
26 ${h.text('clone_uri', class_="medium")}
27 <span class="help-block">
27 <span class="help-block">
28 <pre>
28 <pre>
29 - The repository must be accessible over http:// or https://
29 - The repository must be accessible over http:// or https://
30 - For Git projects it's recommended appending .git to the end of clone url.
30 - For Git projects it's recommended appending .git to the end of clone url.
31 - Make sure to select proper repository type from the below selector before importing it.
31 - Make sure to select proper repository type from the below selector before importing it.
32 - If your HTTP[S] repository is not publicly accessible,
32 - If your HTTP[S] repository is not publicly accessible,
33 add authentication information to the URL: https://username:password@server.company.com/repo-name.
33 add authentication information to the URL: https://username:password@server.company.com/repo-name.
34 - The Git LFS/Mercurial Largefiles objects will not be imported.
34 - The Git LFS/Mercurial Largefiles objects will not be imported.
35 - For very large repositories, it's recommended to manually copy them into the
35 - For very large repositories, it's recommended to manually copy them into the
36 RhodeCode <a href="${h.route_path('admin_settings_vcs', _anchor='vcs-storage-options')}">storage location</a> and run <a href="${h.route_path('admin_settings_mapping')}">Remap and Rescan</a>.
36 RhodeCode <a href="${h.route_path('admin_settings_vcs', _anchor='vcs-storage-options')}">storage location</a> and run <a href="${h.route_path('admin_settings_mapping')}">Remap and Rescan</a>.
37 </pre>
37 </pre>
38 </span>
38 </span>
39 </div>
39 </div>
40 </div>
40 </div>
41 <div class="field">
41 <div class="field">
42 <div class="label">
42 <div class="label">
43 <label for="repo_type">${_('Type')}:</label>
43 <label for="repo_type">${_('Type')}:</label>
44 </div>
44 </div>
45 <div class="select">
45 <div class="select">
46 ${h.select('repo_type','hg',c.backends)}
46 ${h.select('repo_type','hg',c.backends)}
47 <span class="help-block">${_('Set the type of repository to create.')}</span>
47 <span class="help-block">${_('Set the type of repository to create.')}</span>
48 </div>
48 </div>
49 </div>
49 </div>
50 <div class="field">
50 <div class="field">
51 <div class="label">
51 <div class="label">
52 <label for="repo_group">${_('Repository group')}:</label>
52 <label for="repo_group">${_('Repository group')}:</label>
53 </div>
53 </div>
54 <div class="select">
54 <div class="select">
55 ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
55 ${h.select('repo_group',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
56 % if c.personal_repo_group:
56 % if c.personal_repo_group:
57 <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}">
57 <a class="btn" href="#" id="select_my_group" data-personal-group-id="${c.personal_repo_group.group_id}">
58 ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}}
58 ${_('Select my personal group (%(repo_group_name)s)') % {'repo_group_name': c.personal_repo_group.group_name}}
59 </a>
59 </a>
60 % endif
60 % endif
61 <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
61 <span class="help-block">${_('Optionally select a group to put this repository into.')}</span>
62 </div>
62 </div>
63 </div>
63 </div>
64 <div class="field">
64 <div class="field">
65 <div class="label">
65 <div class="label">
66 <label for="repo_description">${_('Description')}:</label>
66 <label for="repo_description">${_('Description')}:</label>
67 </div>
67 </div>
68 <div class="textarea editor">
68 <div class="textarea editor">
69 ${h.textarea('repo_description',cols=23,rows=5,class_="medium")}
69 ${h.textarea('repo_description',cols=23,rows=5,class_="medium")}
70 <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %>
70 <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %>
71 <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span>
71 <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span>
72 <span id="meta-tags-desc" style="display: none">
72 <span id="meta-tags-desc" style="display: none">
73 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
73 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
74 ${dt.metatags_help()}
74 ${dt.metatags_help()}
75 </span>
75 </span>
76 </div>
76 </div>
77 </div>
77 </div>
78 <div class="field">
78 <div class="field">
79 <div class="label">
79 <div class="label">
80 <label for="repo_landing_rev">${_('Landing commit')}:</label>
80 <label for="repo_landing_rev">${_('Landing commit')}:</label>
81 </div>
81 </div>
82 <div class="select">
82 <div class="select">
83 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
83 ${h.select('repo_landing_rev','',c.landing_revs,class_="medium")}
84 <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span>
84 <span class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</span>
85 </div>
85 </div>
86 </div>
86 </div>
87 <div id="copy_perms" class="field">
87 <div id="copy_perms" class="field">
88 <div class="label label-checkbox">
88 <div class="label label-checkbox">
89 <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label>
89 <label for="repo_copy_permissions">${_('Copy Parent Group Permissions')}:</label>
90 </div>
90 </div>
91 <div class="checkboxes">
91 <div class="checkboxes">
92 ${h.checkbox('repo_copy_permissions', value="True", checked="checked")}
92 ${h.checkbox('repo_copy_permissions', value="True", checked="checked")}
93 <span class="help-block">${_('Copy permissions from parent repository group.')}</span>
93 <span class="help-block">${_('Copy permissions from parent repository group.')}</span>
94 </div>
94 </div>
95 </div>
95 </div>
96 <div class="field">
96 <div class="field">
97 <div class="label label-checkbox">
97 <div class="label label-checkbox">
98 <label for="repo_private">${_('Private Repository')}:</label>
98 <label for="repo_private">${_('Private Repository')}:</label>
99 </div>
99 </div>
100 <div class="checkboxes">
100 <div class="checkboxes">
101 ${h.checkbox('repo_private',value="True")}
101 ${h.checkbox('repo_private',value="True")}
102 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
102 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
103 </div>
103 </div>
104 </div>
104 </div>
105 <div class="buttons">
105 <div class="buttons">
106 ${h.submit('save',_('Save'),class_="btn")}
106 ${h.submit('save',_('Save'),class_="btn")}
107 </div>
107 </div>
108 </div>
108 </div>
109 </div>
109 </div>
110 <script>
110 <script>
111 $(document).ready(function(){
111 $(document).ready(function(){
112 var setCopyPermsOption = function(group_val){
112 var setCopyPermsOption = function(group_val){
113 if(group_val != "-1"){
113 if(group_val != "-1"){
114 $('#copy_perms').show()
114 $('#copy_perms').show()
115 }
115 }
116 else{
116 else{
117 $('#copy_perms').hide();
117 $('#copy_perms').hide();
118 }
118 }
119 };
119 };
120
120
121 $('#remote_clone_toggle').on('click', function(e){
121 $('#remote_clone_toggle').on('click', function(e){
122 $('#remote_clone').show();
122 $('#remote_clone').show();
123 e.preventDefault();
123 e.preventDefault();
124 });
124 });
125
125
126 if($('#remote_clone input').hasClass('error')){
126 if($('#remote_clone input').hasClass('error')){
127 $('#remote_clone').show();
127 $('#remote_clone').show();
128 }
128 }
129 if($('#remote_clone input').val()){
129 if($('#remote_clone input').val()){
130 $('#remote_clone').show();
130 $('#remote_clone').show();
131 }
131 }
132
132
133 $("#repo_group").select2({
133 $("#repo_group").select2({
134 'containerCssClass': "drop-menu",
134 'containerCssClass': "drop-menu",
135 'dropdownCssClass': "drop-menu-dropdown",
135 'dropdownCssClass': "drop-menu-dropdown",
136 'dropdownAutoWidth': true,
136 'dropdownAutoWidth': true,
137 'width': "resolve"
137 'width': "resolve"
138 });
138 });
139
139
140 setCopyPermsOption($('#repo_group').val());
140 setCopyPermsOption($('#repo_group').val());
141 $("#repo_group").on("change", function(e) {
141 $("#repo_group").on("change", function(e) {
142 setCopyPermsOption(e.val)
142 setCopyPermsOption(e.val)
143 });
143 });
144
144
145 $("#repo_type").select2({
145 $("#repo_type").select2({
146 'containerCssClass': "drop-menu",
146 'containerCssClass': "drop-menu",
147 'dropdownCssClass': "drop-menu-dropdown",
147 'dropdownCssClass': "drop-menu-dropdown",
148 'minimumResultsForSearch': -1,
148 'minimumResultsForSearch': -1,
149 });
149 });
150 $("#repo_landing_rev").select2({
150 $("#repo_landing_rev").select2({
151 'containerCssClass': "drop-menu",
151 'containerCssClass': "drop-menu",
152 'dropdownCssClass': "drop-menu-dropdown",
152 'dropdownCssClass': "drop-menu-dropdown",
153 'minimumResultsForSearch': -1,
153 'minimumResultsForSearch': -1,
154 });
154 });
155 $('#repo_name').focus();
155 $('#repo_name').focus();
156
156
157 $('#select_my_group').on('click', function(e){
157 $('#select_my_group').on('click', function(e){
158 e.preventDefault();
158 e.preventDefault();
159 $("#repo_group").val($(this).data('personalGroupId')).trigger("change");
159 $("#repo_group").val($(this).data('personalGroupId')).trigger("change");
160 })
160 })
161
161
162 })
162 })
163 </script>
163 </script>
164 ${h.end_form()}
164 ${h.end_form()}
@@ -1,291 +1,291 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <%
3 <%
4 elems = [
4 elems = [
5 (_('Repository ID'), c.rhodecode_db_repo.repo_id, '', ''),
5 (_('Repository ID'), c.rhodecode_db_repo.repo_id, '', ''),
6 (_('Owner'), lambda:base.gravatar_with_user(c.rhodecode_db_repo.user.email), '', ''),
6 (_('Owner'), lambda:base.gravatar_with_user(c.rhodecode_db_repo.user.email), '', ''),
7 (_('Created on'), h.format_date(c.rhodecode_db_repo.created_on), '', ''),
7 (_('Created on'), h.format_date(c.rhodecode_db_repo.created_on), '', ''),
8 (_('Updated on'), h.format_date(c.rhodecode_db_repo.updated_on), '', ''),
8 (_('Updated on'), h.format_date(c.rhodecode_db_repo.updated_on), '', ''),
9 (_('Cached Commit id'), lambda: h.link_to(c.rhodecode_db_repo.changeset_cache.get('short_id'), h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.changeset_cache.get('raw_id'))), '', ''),
9 (_('Cached Commit id'), lambda: h.link_to(c.rhodecode_db_repo.changeset_cache.get('short_id'), h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.changeset_cache.get('raw_id'))), '', ''),
10 (_('Cached Commit date'), c.rhodecode_db_repo.changeset_cache.get('date'), '', ''),
10 (_('Cached Commit date'), c.rhodecode_db_repo.changeset_cache.get('date'), '', ''),
11 (_('Attached scoped tokens'), len(c.rhodecode_db_repo.scoped_tokens), '', [x.user for x in c.rhodecode_db_repo.scoped_tokens]),
11 (_('Attached scoped tokens'), len(c.rhodecode_db_repo.scoped_tokens), '', [x.user for x in c.rhodecode_db_repo.scoped_tokens]),
12 (_('Pull requests source'), len(c.rhodecode_db_repo.pull_requests_source), '', ['pr_id:{}, repo:{}'.format(x.pull_request_id,x.source_repo.repo_name) for x in c.rhodecode_db_repo.pull_requests_source]),
12 (_('Pull requests source'), len(c.rhodecode_db_repo.pull_requests_source), '', ['pr_id:{}, repo:{}'.format(x.pull_request_id,x.source_repo.repo_name) for x in c.rhodecode_db_repo.pull_requests_source]),
13 (_('Pull requests target'), len(c.rhodecode_db_repo.pull_requests_target), '', ['pr_id:{}, repo:{}'.format(x.pull_request_id,x.target_repo.repo_name) for x in c.rhodecode_db_repo.pull_requests_target]),
13 (_('Pull requests target'), len(c.rhodecode_db_repo.pull_requests_target), '', ['pr_id:{}, repo:{}'.format(x.pull_request_id,x.target_repo.repo_name) for x in c.rhodecode_db_repo.pull_requests_target]),
14 (_('Attached Artifacts'), len(c.rhodecode_db_repo.artifacts), '', ''),
14 (_('Attached Artifacts'), len(c.rhodecode_db_repo.artifacts), '', ''),
15 ]
15 ]
16 %>
16 %>
17
17
18 <div class="panel panel-default">
18 <div class="panel panel-default">
19 <div class="panel-heading" id="advanced-info" >
19 <div class="panel-heading" id="advanced-info" >
20 <h3 class="panel-title">${_('Repository: %s') % c.rhodecode_db_repo.repo_name} <a class="permalink" href="#advanced-info"></a></h3>
20 <h3 class="panel-title">${_('Repository: %s') % c.rhodecode_db_repo.repo_name} <a class="permalink" href="#advanced-info"></a></h3>
21 </div>
21 </div>
22 <div class="panel-body">
22 <div class="panel-body">
23 ${base.dt_info_panel(elems)}
23 ${base.dt_info_panel(elems)}
24 </div>
24 </div>
25 </div>
25 </div>
26
26
27
27
28 <div class="panel panel-default">
28 <div class="panel panel-default">
29 <div class="panel-heading" id="advanced-fork">
29 <div class="panel-heading" id="advanced-fork">
30 <h3 class="panel-title">${_('Fork Reference')} <a class="permalink" href="#advanced-fork"></a></h3>
30 <h3 class="panel-title">${_('Fork Reference')} <a class="permalink" href="#advanced-fork"></a></h3>
31 </div>
31 </div>
32 <div class="panel-body">
32 <div class="panel-body">
33 ${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
33 ${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
34
34
35 % if c.rhodecode_db_repo.fork:
35 % if c.rhodecode_db_repo.fork:
36 <div class="panel-body-title-text">${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.rhodecode_db_repo.fork.repo_name, h.route_path('repo_summary', repo_name=c.rhodecode_db_repo.fork.repo_name))})}
36 <div class="panel-body-title-text">${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.rhodecode_db_repo.fork.repo_name, h.route_path('repo_summary', repo_name=c.rhodecode_db_repo.fork.repo_name))})}
37 | <button class="btn btn-link btn-danger" type="submit">Remove fork reference</button></div>
37 | <button class="btn btn-link btn-danger" type="submit">Remove fork reference</button></div>
38 % endif
38 % endif
39
39
40 <div class="field">
40 <div class="field">
41 ${h.hidden('id_fork_of')}
41 ${h.hidden('id_fork_of')}
42 ${h.submit('set_as_fork_%s' % c.rhodecode_db_repo.repo_name,_('Set'),class_="btn btn-small",)}
42 ${h.submit('set_as_fork_%s' % c.rhodecode_db_repo.repo_name,_('Set'),class_="btn btn-small",)}
43 </div>
43 </div>
44 <div class="field">
44 <div class="field">
45 <span class="help-block">${_('Manually set this repository as a fork of another from the list')}</span>
45 <span class="help-block">${_('Manually set this repository as a fork of another from the list')}</span>
46 </div>
46 </div>
47 ${h.end_form()}
47 ${h.end_form()}
48 </div>
48 </div>
49 </div>
49 </div>
50
50
51
51
52 <div class="panel panel-default">
52 <div class="panel panel-default">
53 <div class="panel-heading" id="advanced-journal">
53 <div class="panel-heading" id="advanced-journal">
54 <h3 class="panel-title">${_('Public Journal Visibility')} <a class="permalink" href="#advanced-journal"></a></h3>
54 <h3 class="panel-title">${_('Public Journal Visibility')} <a class="permalink" href="#advanced-journal"></a></h3>
55 </div>
55 </div>
56 <div class="panel-body">
56 <div class="panel-body">
57 ${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
57 ${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
58 <div class="field">
58 <div class="field">
59 %if c.in_public_journal:
59 %if c.in_public_journal:
60 <button class="btn btn-small" type="submit">
60 <button class="btn btn-small" type="submit">
61 ${_('Remove from Public Journal')}
61 ${_('Remove from Public Journal')}
62 </button>
62 </button>
63 %else:
63 %else:
64 <button class="btn btn-small" type="submit">
64 <button class="btn btn-small" type="submit">
65 ${_('Add to Public Journal')}
65 ${_('Add to Public Journal')}
66 </button>
66 </button>
67 %endif
67 %endif
68 </div>
68 </div>
69 <div class="field" >
69 <div class="field" >
70 <span class="help-block">${_('All actions made on this repository will be visible to everyone following the public journal.')}</span>
70 <span class="help-block">${_('All actions made on this repository will be visible to everyone following the public journal.')}</span>
71 </div>
71 </div>
72 ${h.end_form()}
72 ${h.end_form()}
73 </div>
73 </div>
74 </div>
74 </div>
75
75
76
76
77 <div class="panel panel-default">
77 <div class="panel panel-default">
78 <div class="panel-heading" id="advanced-locking">
78 <div class="panel-heading" id="advanced-locking">
79 <h3 class="panel-title">${_('Locking state')} <a class="permalink" href="#advanced-locking"></a></h3>
79 <h3 class="panel-title">${_('Locking state')} <a class="permalink" href="#advanced-locking"></a></h3>
80 </div>
80 </div>
81 <div class="panel-body">
81 <div class="panel-body">
82 ${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
82 ${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
83
83
84 %if c.rhodecode_db_repo.locked[0]:
84 %if c.rhodecode_db_repo.locked[0]:
85 <div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.rhodecode_db_repo.locked[0]),
85 <div class="panel-body-title-text">${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.rhodecode_db_repo.locked[0]),
86 h.format_date(h. time_to_datetime(c.rhodecode_db_repo.locked[1])), c.rhodecode_db_repo.locked[2])}</div>
86 h.format_date(h. time_to_datetime(c.rhodecode_db_repo.locked[1])), c.rhodecode_db_repo.locked[2])}</div>
87 %else:
87 %else:
88 <div class="panel-body-title-text">${_('This Repository is not currently locked.')}</div>
88 <div class="panel-body-title-text">${_('This Repository is not currently locked.')}</div>
89 %endif
89 %endif
90
90
91 <div class="field" >
91 <div class="field" >
92 %if c.rhodecode_db_repo.locked[0]:
92 %if c.rhodecode_db_repo.locked[0]:
93 ${h.hidden('set_unlock', '1')}
93 ${h.hidden('set_unlock', '1')}
94 <button class="btn btn-small" type="submit"
94 <button class="btn btn-small" type="submit"
95 onclick="return confirm('${_('Confirm to unlock repository.')}');">
95 onclick="return confirm('${_('Confirm to unlock repository.')}');">
96 <i class="icon-unlock"></i>
96 <i class="icon-unlock"></i>
97 ${_('Unlock repository')}
97 ${_('Unlock repository')}
98 </button>
98 </button>
99 %else:
99 %else:
100 ${h.hidden('set_lock', '1')}
100 ${h.hidden('set_lock', '1')}
101 <button class="btn btn-small" type="submit"
101 <button class="btn btn-small" type="submit"
102 onclick="return confirm('${_('Confirm to lock repository.')}');">
102 onclick="return confirm('${_('Confirm to lock repository.')}');">
103 <i class="icon-lock"></i>
103 <i class="icon-lock"></i>
104 ${_('Lock repository')}
104 ${_('Lock repository')}
105 </button>
105 </button>
106 %endif
106 %endif
107 </div>
107 </div>
108 <div class="field" >
108 <div class="field" >
109 <span class="help-block">
109 <span class="help-block">
110 ${_('Force repository locking. This only works when anonymous access is disabled. Pulling from the repository locks the repository to that user until the same user pushes to that repository again.')}
110 ${_('Force repository locking. This only works when anonymous access is disabled. Pulling from the repository locks the repository to that user until the same user pushes to that repository again.')}
111 </span>
111 </span>
112 </div>
112 </div>
113 ${h.end_form()}
113 ${h.end_form()}
114 </div>
114 </div>
115 </div>
115 </div>
116
116
117
117
118 <div class="panel panel-default">
118 <div class="panel panel-default">
119 <div class="panel-heading" id="advanced-hooks">
119 <div class="panel-heading" id="advanced-hooks">
120 <h3 class="panel-title">${_('Hooks')} <a class="permalink" href="#advanced-hooks"></a></h3>
120 <h3 class="panel-title">${_('Hooks')} <a class="permalink" href="#advanced-hooks"></a></h3>
121 </div>
121 </div>
122 <div class="panel-body">
122 <div class="panel-body">
123 <table class="rctable">
123 <table class="rctable">
124 <th>${_('Hook type')}</th>
124 <th>${_('Hook type')}</th>
125 <th>${_('Hook version')}</th>
125 <th>${_('Hook version')}</th>
126 <th>${_('Current version')}</th>
126 <th>${_('Current version')}</th>
127 % if c.ver_info_dict:
127 % if c.ver_info_dict:
128 <tr>
128 <tr>
129 <td>${_('PRE HOOK')}</td>
129 <td>${_('PRE HOOK')}</td>
130 <td>${c.ver_info_dict['pre_version']}</td>
130 <td>${c.ver_info_dict['pre_version']}</td>
131 <td>${c.rhodecode_version}</td>
131 <td>${c.rhodecode_version}</td>
132 </tr>
132 </tr>
133 <tr>
133 <tr>
134 <td>${_('POST HOOK')}</td>
134 <td>${_('POST HOOK')}</td>
135 <td>${c.ver_info_dict['post_version']}</td>
135 <td>${c.ver_info_dict['post_version']}</td>
136 <td>${c.rhodecode_version}</td>
136 <td>${c.rhodecode_version}</td>
137 </tr>
137 </tr>
138 % else:
138 % else:
139 <tr>
139 <tr>
140 <td>${_('Unable to read hook information from VCS Server')}</td>
140 <td>${_('Unable to read hook information from VCS Server')}</td>
141 </tr>
141 </tr>
142 % endif
142 % endif
143 </table>
143 </table>
144
144
145 <a href="${h.route_path('edit_repo_advanced_hooks', repo_name=c.repo_name)}"
145 <a href="${h.route_path('edit_repo_advanced_hooks', repo_name=c.repo_name)}"
146 onclick="return confirm('${_('Confirm to reinstall hooks for this repository.')}');">
146 onclick="return confirm('${_('Confirm to reinstall hooks for this repository.')}');">
147 ${_('Update Hooks')}
147 ${_('Update Hooks')}
148 </a>
148 </a>
149 </div>
149 </div>
150 </div>
150 </div>
151
151
152 <div class="panel panel-warning">
152 <div class="panel panel-warning">
153 <div class="panel-heading" id="advanced-archive">
153 <div class="panel-heading" id="advanced-archive">
154 <h3 class="panel-title">${_('Archive repository')} <a class="permalink" href="#advanced-archive"></a></h3>
154 <h3 class="panel-title">${_('Archive repository')} <a class="permalink" href="#advanced-archive"></a></h3>
155 </div>
155 </div>
156 <div class="panel-body">
156 <div class="panel-body">
157 ${h.secure_form(h.route_path('edit_repo_advanced_archive', repo_name=c.repo_name), request=request)}
157 ${h.secure_form(h.route_path('edit_repo_advanced_archive', repo_name=c.repo_name), request=request)}
158
158
159 <div style="margin: 0 0 20px 0" class="fake-space"></div>
159 <div style="margin: 0 0 20px 0" class="fake-space"></div>
160
160
161 <div class="field">
161 <div class="field">
162 <button class="btn btn-small btn-danger" type="submit"
162 <button class="btn btn-small btn-danger" type="submit"
163 onclick="return confirm('${_('Confirm to archive this repository: %s') % c.repo_name}');">
163 onclick="return confirm('${_('Confirm to archive this repository: %s') % c.repo_name}');">
164 <i class="icon-remove-sign"></i>
164 <i class="icon-remove"></i>
165 ${_('Archive this repository')}
165 ${_('Archive this repository')}
166 </button>
166 </button>
167 </div>
167 </div>
168 <div class="field">
168 <div class="field">
169 <span class="help-block">
169 <span class="help-block">
170 ${_('Archiving the repository will make it entirely read-only. The repository cannot be committed to.'
170 ${_('Archiving the repository will make it entirely read-only. The repository cannot be committed to.'
171 'It is hidden from the search results and dashboard. ')}
171 'It is hidden from the search results and dashboard. ')}
172 </span>
172 </span>
173 </div>
173 </div>
174
174
175 ${h.end_form()}
175 ${h.end_form()}
176 </div>
176 </div>
177 </div>
177 </div>
178
178
179
179
180 <div class="panel panel-danger">
180 <div class="panel panel-danger">
181 <div class="panel-heading" id="advanced-delete">
181 <div class="panel-heading" id="advanced-delete">
182 <h3 class="panel-title">${_('Delete repository')} <a class="permalink" href="#advanced-delete"></a></h3>
182 <h3 class="panel-title">${_('Delete repository')} <a class="permalink" href="#advanced-delete"></a></h3>
183 </div>
183 </div>
184 <div class="panel-body">
184 <div class="panel-body">
185 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=c.repo_name), request=request)}
185 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=c.repo_name), request=request)}
186 <table class="display">
186 <table class="display">
187 <tr>
187 <tr>
188 <td>
188 <td>
189 ${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.rhodecode_db_repo.forks.count()) % c.rhodecode_db_repo.forks.count()}
189 ${_ungettext('This repository has %s fork.', 'This repository has %s forks.', c.rhodecode_db_repo.forks.count()) % c.rhodecode_db_repo.forks.count()}
190 </td>
190 </td>
191 <td>
191 <td>
192 %if c.rhodecode_db_repo.forks.count():
192 %if c.rhodecode_db_repo.forks.count():
193 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
193 <input type="radio" name="forks" value="detach_forks" checked="checked"/> <label for="forks">${_('Detach forks')}</label>
194 %endif
194 %endif
195 </td>
195 </td>
196 <td>
196 <td>
197 %if c.rhodecode_db_repo.forks.count():
197 %if c.rhodecode_db_repo.forks.count():
198 <input type="radio" name="forks" value="delete_forks"/> <label for="forks">${_('Delete forks')}</label>
198 <input type="radio" name="forks" value="delete_forks"/> <label for="forks">${_('Delete forks')}</label>
199 %endif
199 %endif
200 </td>
200 </td>
201 </tr>
201 </tr>
202 <% attached_prs = len(c.rhodecode_db_repo.pull_requests_source + c.rhodecode_db_repo.pull_requests_target) %>
202 <% attached_prs = len(c.rhodecode_db_repo.pull_requests_source + c.rhodecode_db_repo.pull_requests_target) %>
203 % if c.rhodecode_db_repo.pull_requests_source or c.rhodecode_db_repo.pull_requests_target:
203 % if c.rhodecode_db_repo.pull_requests_source or c.rhodecode_db_repo.pull_requests_target:
204 <tr>
204 <tr>
205 <td>
205 <td>
206 ${_ungettext('This repository has %s attached pull request.', 'This repository has %s attached pull requests.', attached_prs) % attached_prs}
206 ${_ungettext('This repository has %s attached pull request.', 'This repository has %s attached pull requests.', attached_prs) % attached_prs}
207 <br/>
207 <br/>
208 ${_('Consider to archive this repository instead.')}
208 ${_('Consider to archive this repository instead.')}
209 </td>
209 </td>
210 <td></td>
210 <td></td>
211 <td></td>
211 <td></td>
212 </tr>
212 </tr>
213 % endif
213 % endif
214 </table>
214 </table>
215 <div style="margin: 0 0 20px 0" class="fake-space"></div>
215 <div style="margin: 0 0 20px 0" class="fake-space"></div>
216
216
217 <div class="field">
217 <div class="field">
218 <button class="btn btn-small btn-danger" type="submit"
218 <button class="btn btn-small btn-danger" type="submit"
219 onclick="return confirm('${_('Confirm to delete this repository: %s') % c.repo_name}');">
219 onclick="return confirm('${_('Confirm to delete this repository: %s') % c.repo_name}');">
220 <i class="icon-remove-sign"></i>
220 <i class="icon-remove"></i>
221 ${_('Delete this repository')}
221 ${_('Delete this repository')}
222 </button>
222 </button>
223 </div>
223 </div>
224 <div class="field">
224 <div class="field">
225 <span class="help-block">
225 <span class="help-block">
226 ${_('This repository will be renamed in a special way in order to make it inaccessible to RhodeCode Enterprise and its VCS systems. If you need to fully delete it from the file system, please do it manually, or with rhodecode-cleanup-repos command available in rhodecode-tools.')}
226 ${_('This repository will be renamed in a special way in order to make it inaccessible to RhodeCode Enterprise and its VCS systems. If you need to fully delete it from the file system, please do it manually, or with rhodecode-cleanup-repos command available in rhodecode-tools.')}
227 </span>
227 </span>
228 </div>
228 </div>
229
229
230 ${h.end_form()}
230 ${h.end_form()}
231 </div>
231 </div>
232 </div>
232 </div>
233
233
234
234
235 <script>
235 <script>
236
236
237 var currentRepoId = ${c.rhodecode_db_repo.repo_id};
237 var currentRepoId = ${c.rhodecode_db_repo.repo_id};
238
238
239 var repoTypeFilter = function(data) {
239 var repoTypeFilter = function(data) {
240 var results = [];
240 var results = [];
241
241
242 if (!data.results[0]) {
242 if (!data.results[0]) {
243 return data
243 return data
244 }
244 }
245
245
246 $.each(data.results[0].children, function() {
246 $.each(data.results[0].children, function() {
247 // filter out the SAME repo, it cannot be used as fork of itself
247 // filter out the SAME repo, it cannot be used as fork of itself
248 if (this.repo_id != currentRepoId) {
248 if (this.repo_id != currentRepoId) {
249 this.id = this.repo_id;
249 this.id = this.repo_id;
250 results.push(this)
250 results.push(this)
251 }
251 }
252 });
252 });
253 data.results[0].children = results;
253 data.results[0].children = results;
254 return data;
254 return data;
255 };
255 };
256
256
257 $("#id_fork_of").select2({
257 $("#id_fork_of").select2({
258 cachedDataSource: {},
258 cachedDataSource: {},
259 minimumInputLength: 2,
259 minimumInputLength: 2,
260 placeholder: "${_('Change repository') if c.rhodecode_db_repo.fork else _('Pick repository')}",
260 placeholder: "${_('Change repository') if c.rhodecode_db_repo.fork else _('Pick repository')}",
261 dropdownAutoWidth: true,
261 dropdownAutoWidth: true,
262 containerCssClass: "drop-menu",
262 containerCssClass: "drop-menu",
263 dropdownCssClass: "drop-menu-dropdown",
263 dropdownCssClass: "drop-menu-dropdown",
264 formatResult: formatRepoResult,
264 formatResult: formatRepoResult,
265 query: $.debounce(250, function(query){
265 query: $.debounce(250, function(query){
266 self = this;
266 self = this;
267 var cacheKey = query.term;
267 var cacheKey = query.term;
268 var cachedData = self.cachedDataSource[cacheKey];
268 var cachedData = self.cachedDataSource[cacheKey];
269
269
270 if (cachedData) {
270 if (cachedData) {
271 query.callback({results: cachedData.results});
271 query.callback({results: cachedData.results});
272 } else {
272 } else {
273 $.ajax({
273 $.ajax({
274 url: pyroutes.url('repo_list_data'),
274 url: pyroutes.url('repo_list_data'),
275 data: {'query': query.term, repo_type: '${c.rhodecode_db_repo.repo_type}'},
275 data: {'query': query.term, repo_type: '${c.rhodecode_db_repo.repo_type}'},
276 dataType: 'json',
276 dataType: 'json',
277 type: 'GET',
277 type: 'GET',
278 success: function(data) {
278 success: function(data) {
279 data = repoTypeFilter(data);
279 data = repoTypeFilter(data);
280 self.cachedDataSource[cacheKey] = data;
280 self.cachedDataSource[cacheKey] = data;
281 query.callback({results: data.results});
281 query.callback({results: data.results});
282 },
282 },
283 error: function(data, textStatus, errorThrown) {
283 error: function(data, textStatus, errorThrown) {
284 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
284 alert("Error while fetching entries.\nError code {0} ({1}).".format(data.status, data.statusText));
285 }
285 }
286 })
286 })
287 }
287 }
288 })
288 })
289 });
289 });
290 </script>
290 </script>
291
291
@@ -1,329 +1,329 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="base" file="/base/base.mako"/>
3
3
4 <div class="panel panel-default">
4 <div class="panel panel-default">
5 <div class="panel-heading">
5 <div class="panel-heading">
6 <h3 class="panel-title">${_('Settings for Repository: %s') % c.rhodecode_db_repo.repo_name}</h3>
6 <h3 class="panel-title">${_('Settings for Repository: %s') % c.rhodecode_db_repo.repo_name}</h3>
7 </div>
7 </div>
8 <div class="panel-body">
8 <div class="panel-body">
9 ${h.secure_form(h.route_path('edit_repo', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
9 ${h.secure_form(h.route_path('edit_repo', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
10 <div class="form">
10 <div class="form">
11 <!-- fields -->
11 <!-- fields -->
12 <div class="fields">
12 <div class="fields">
13
13
14 <div class="field">
14 <div class="field">
15 <div class="label">
15 <div class="label">
16 <label for="repo_name">${_('Name')}:</label>
16 <label for="repo_name">${_('Name')}:</label>
17 </div>
17 </div>
18 <div class="input">
18 <div class="input">
19 ${c.form['repo_name'].render(css_class='medium', oid='repo_name')|n}
19 ${c.form['repo_name'].render(css_class='medium', oid='repo_name')|n}
20 ${c.form.render_error(request, c.form['repo_name'])|n}
20 ${c.form.render_error(request, c.form['repo_name'])|n}
21
21
22 <p class="help-block">${_('permalink id')}: `_${c.rhodecode_db_repo.repo_id}` <span><a href="#" onclick="$('#clone_id').toggle();return false">${_('what is that ?')}</a></span></p>
22 <p class="help-block">${_('permalink id')}: `_${c.rhodecode_db_repo.repo_id}` <span><a href="#" onclick="$('#clone_id').toggle();return false">${_('what is that ?')}</a></span></p>
23 <p id="clone_id" style="display:none;">
23 <p id="clone_id" style="display:none;">
24 ${_('URL by id')}: `${c.rhodecode_db_repo.clone_url(with_id=True)}` <br/>
24 ${_('URL by id')}: `${c.rhodecode_db_repo.clone_url(with_id=True)}` <br/>
25 ${_('''In case this repository is renamed or moved into another group the repository url changes.
25 ${_('''In case this repository is renamed or moved into another group the repository url changes.
26 Using above url guarantees that this repository will always be accessible under such url.
26 Using above url guarantees that this repository will always be accessible under such url.
27 Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</p>
27 Useful for CI systems, or any other cases that you need to hardcode the url into 3rd party service.''')}</p>
28 </div>
28 </div>
29 </div>
29 </div>
30
30
31 <div class="field">
31 <div class="field">
32 <div class="label">
32 <div class="label">
33 <label for="repo_group">${_('Repository group')}:</label>
33 <label for="repo_group">${_('Repository group')}:</label>
34 </div>
34 </div>
35 <div class="select">
35 <div class="select">
36 ${c.form['repo_group'].render(css_class='medium', oid='repo_group')|n}
36 ${c.form['repo_group'].render(css_class='medium', oid='repo_group')|n}
37 ${c.form.render_error(request, c.form['repo_group'])|n}
37 ${c.form.render_error(request, c.form['repo_group'])|n}
38
38
39 % if c.personal_repo_group:
39 % if c.personal_repo_group:
40 <a class="btn" href="#" data-personal-group-name="${c.personal_repo_group.group_name}" data-personal-group-id="${c.personal_repo_group.group_id}" onclick="selectMyGroup(this); return false">
40 <a class="btn" href="#" data-personal-group-name="${c.personal_repo_group.group_name}" data-personal-group-id="${c.personal_repo_group.group_id}" onclick="selectMyGroup(this); return false">
41 ${_('Select my personal group (`%(repo_group_name)s`)') % {'repo_group_name': c.personal_repo_group.group_name}}
41 ${_('Select my personal group (`%(repo_group_name)s`)') % {'repo_group_name': c.personal_repo_group.group_name}}
42 </a>
42 </a>
43 % endif
43 % endif
44 <p class="help-block">${_('Optional select a group to put this repository into.')}</p>
44 <p class="help-block">${_('Optional select a group to put this repository into.')}</p>
45 </div>
45 </div>
46 </div>
46 </div>
47
47
48 % if c.rhodecode_db_repo.repo_type != 'svn':
48 % if c.rhodecode_db_repo.repo_type != 'svn':
49 <% sync_link = h.literal(h.link_to('remote sync', h.route_path('edit_repo_remote', repo_name=c.repo_name))) %>
49 <% sync_link = h.literal(h.link_to('remote sync', h.route_path('edit_repo_remote', repo_name=c.repo_name))) %>
50 <div class="field">
50 <div class="field">
51 <div class="label">
51 <div class="label">
52 <label for="clone_uri">${_('Remote pull uri')}:</label>
52 <label for="clone_uri">${_('Remote pull uri')}:</label>
53 </div>
53 </div>
54 <div class="input">
54 <div class="input">
55 %if c.rhodecode_db_repo.clone_uri:
55 %if c.rhodecode_db_repo.clone_uri:
56 ## display, if we don't have any errors
56 ## display, if we don't have any errors
57 % if not c.form['repo_clone_uri'].error:
57 % if not c.form['repo_clone_uri'].error:
58 <div id="clone_uri_hidden" class='text-as-placeholder'>
58 <div id="clone_uri_hidden" class='text-as-placeholder'>
59 <span id="clone_uri_hidden_value">${c.rhodecode_db_repo.clone_uri_hidden}</span>
59 <span id="clone_uri_hidden_value">${c.rhodecode_db_repo.clone_uri_hidden}</span>
60 <span class="link" id="edit_clone_uri"><i class="icon-edit"></i>${_('edit')}</span>
60 <span class="link" id="edit_clone_uri">${_('edit')}</span>
61 </div>
61 </div>
62 % endif
62 % endif
63
63
64 ## alter field
64 ## alter field
65 <div id="alter_clone_uri" style="${'' if c.form['repo_clone_uri'].error else 'display: none'}">
65 <div id="alter_clone_uri" style="${'' if c.form['repo_clone_uri'].error else 'display: none'}">
66 ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri', placeholder=_('enter new value, or leave empty to remove'))|n}
66 ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri', placeholder=_('enter new value, or leave empty to remove'))|n}
67 ${c.form.render_error(request, c.form['repo_clone_uri'])|n}
67 ${c.form.render_error(request, c.form['repo_clone_uri'])|n}
68 % if c.form['repo_clone_uri'].error:
68 % if c.form['repo_clone_uri'].error:
69 ## we got error from form subit, means we modify the url
69 ## we got error from form subit, means we modify the url
70 ${h.hidden('repo_clone_uri_change', 'MOD')}
70 ${h.hidden('repo_clone_uri_change', 'MOD')}
71 % else:
71 % else:
72 ${h.hidden('repo_clone_uri_change', 'OLD')}
72 ${h.hidden('repo_clone_uri_change', 'OLD')}
73 % endif
73 % endif
74
74
75 % if not c.form['repo_clone_uri'].error:
75 % if not c.form['repo_clone_uri'].error:
76 <span class="link" id="cancel_edit_clone_uri">${_('cancel')}</span>
76 <span class="link" id="cancel_edit_clone_uri">${_('cancel')}</span>
77 % endif
77 % endif
78
78
79 </div>
79 </div>
80 %else:
80 %else:
81 ## not set yet, display form to set it
81 ## not set yet, display form to set it
82 ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri')|n}
82 ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri')|n}
83 ${c.form.render_error(request, c.form['repo_clone_uri'])|n}
83 ${c.form.render_error(request, c.form['repo_clone_uri'])|n}
84 ${h.hidden('repo_clone_uri_change', 'NEW')}
84 ${h.hidden('repo_clone_uri_change', 'NEW')}
85 %endif
85 %endif
86 <p id="alter_clone_uri_help_block" class="help-block">
86 <p id="alter_clone_uri_help_block" class="help-block">
87 ${_('http[s] url where from repository was imported. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n} <br/>
87 ${_('http[s] url where from repository was imported. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n} <br/>
88 ${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')}
88 ${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')}
89 </p>
89 </p>
90 </div>
90 </div>
91 </div>
91 </div>
92 <div class="field">
92 <div class="field">
93 <div class="label">
93 <div class="label">
94 <label for="push_uri">${_('Remote push uri')}:</label>
94 <label for="push_uri">${_('Remote push uri')}:</label>
95 </div>
95 </div>
96 <div class="input">
96 <div class="input">
97 %if c.rhodecode_db_repo.push_uri:
97 %if c.rhodecode_db_repo.push_uri:
98 ## display, if we don't have any errors
98 ## display, if we don't have any errors
99 % if not c.form['repo_push_uri'].error:
99 % if not c.form['repo_push_uri'].error:
100 <div id="push_uri_hidden" class='text-as-placeholder'>
100 <div id="push_uri_hidden" class='text-as-placeholder'>
101 <span id="push_uri_hidden_value">${c.rhodecode_db_repo.push_uri_hidden}</span>
101 <span id="push_uri_hidden_value">${c.rhodecode_db_repo.push_uri_hidden}</span>
102 <span class="link" id="edit_push_uri"><i class="icon-edit"></i>${_('edit')}</span>
102 <span class="link" id="edit_push_uri">${_('edit')}</span>
103 </div>
103 </div>
104 % endif
104 % endif
105
105
106 ## alter field
106 ## alter field
107 <div id="alter_push_uri" style="${'' if c.form['repo_push_uri'].error else 'display: none'}">
107 <div id="alter_push_uri" style="${'' if c.form['repo_push_uri'].error else 'display: none'}">
108 ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri', placeholder=_('enter new value, or leave empty to remove'))|n}
108 ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri', placeholder=_('enter new value, or leave empty to remove'))|n}
109 ${c.form.render_error(request, c.form['repo_push_uri'])|n}
109 ${c.form.render_error(request, c.form['repo_push_uri'])|n}
110 % if c.form['repo_push_uri'].error:
110 % if c.form['repo_push_uri'].error:
111 ## we got error from form subit, means we modify the url
111 ## we got error from form subit, means we modify the url
112 ${h.hidden('repo_push_uri_change', 'MOD')}
112 ${h.hidden('repo_push_uri_change', 'MOD')}
113 % else:
113 % else:
114 ${h.hidden('repo_push_uri_change', 'OLD')}
114 ${h.hidden('repo_push_uri_change', 'OLD')}
115 % endif
115 % endif
116
116
117 % if not c.form['repo_push_uri'].error:
117 % if not c.form['repo_push_uri'].error:
118 <span class="link" id="cancel_edit_push_uri">${_('cancel')}</span>
118 <span class="link" id="cancel_edit_push_uri">${_('cancel')}</span>
119 % endif
119 % endif
120
120
121 </div>
121 </div>
122 %else:
122 %else:
123 ## not set yet, display form to set it
123 ## not set yet, display form to set it
124 ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri')|n}
124 ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri')|n}
125 ${c.form.render_error(request, c.form['repo_push_uri'])|n}
125 ${c.form.render_error(request, c.form['repo_push_uri'])|n}
126 ${h.hidden('repo_push_uri_change', 'NEW')}
126 ${h.hidden('repo_push_uri_change', 'NEW')}
127 %endif
127 %endif
128 <p id="alter_push_uri_help_block" class="help-block">
128 <p id="alter_push_uri_help_block" class="help-block">
129 ${_('http[s] url to sync data back. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n} <br/>
129 ${_('http[s] url to sync data back. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n} <br/>
130 ${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')}
130 ${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')}
131 </p>
131 </p>
132 </div>
132 </div>
133 </div>
133 </div>
134 % else:
134 % else:
135 ${h.hidden('repo_clone_uri', '')}
135 ${h.hidden('repo_clone_uri', '')}
136 ${h.hidden('repo_push_uri', '')}
136 ${h.hidden('repo_push_uri', '')}
137 % endif
137 % endif
138
138
139 <div class="field">
139 <div class="field">
140 <div class="label">
140 <div class="label">
141 <label for="repo_landing_commit_ref">${_('Landing commit')}:</label>
141 <label for="repo_landing_commit_ref">${_('Landing commit')}:</label>
142 </div>
142 </div>
143 <div class="select">
143 <div class="select">
144 ${c.form['repo_landing_commit_ref'].render(css_class='medium', oid='repo_landing_commit_ref')|n}
144 ${c.form['repo_landing_commit_ref'].render(css_class='medium', oid='repo_landing_commit_ref')|n}
145 ${c.form.render_error(request, c.form['repo_landing_commit_ref'])|n}
145 ${c.form.render_error(request, c.form['repo_landing_commit_ref'])|n}
146 <p class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</p>
146 <p class="help-block">${_('The default commit for file pages, downloads, full text search index, and README generation.')}</p>
147 </div>
147 </div>
148 </div>
148 </div>
149
149
150 <div class="field badged-field">
150 <div class="field badged-field">
151 <div class="label">
151 <div class="label">
152 <label for="repo_owner">${_('Owner')}:</label>
152 <label for="repo_owner">${_('Owner')}:</label>
153 </div>
153 </div>
154 <div class="input">
154 <div class="input">
155 <div class="badge-input-container">
155 <div class="badge-input-container">
156 <div class="user-badge">
156 <div class="user-badge">
157 ${base.gravatar_with_user(c.rhodecode_db_repo.user.email or c.rhodecode_db_repo.user.username, show_disabled=not c.rhodecode_db_repo.user.active)}
157 ${base.gravatar_with_user(c.rhodecode_db_repo.user.email or c.rhodecode_db_repo.user.username, show_disabled=not c.rhodecode_db_repo.user.active)}
158 </div>
158 </div>
159 <div class="badge-input-wrap">
159 <div class="badge-input-wrap">
160 ${c.form['repo_owner'].render(css_class='medium', oid='repo_owner')|n}
160 ${c.form['repo_owner'].render(css_class='medium', oid='repo_owner')|n}
161 </div>
161 </div>
162 </div>
162 </div>
163 ${c.form.render_error(request, c.form['repo_owner'])|n}
163 ${c.form.render_error(request, c.form['repo_owner'])|n}
164 <p class="help-block">${_('Change owner of this repository.')}</p>
164 <p class="help-block">${_('Change owner of this repository.')}</p>
165 </div>
165 </div>
166 </div>
166 </div>
167
167
168 <div class="field">
168 <div class="field">
169 <div class="label label-textarea">
169 <div class="label label-textarea">
170 <label for="repo_description">${_('Description')}:</label>
170 <label for="repo_description">${_('Description')}:</label>
171 </div>
171 </div>
172 <div class="textarea text-area editor">
172 <div class="textarea text-area editor">
173 ${c.form['repo_description'].render(css_class='medium', oid='repo_description')|n}
173 ${c.form['repo_description'].render(css_class='medium', oid='repo_description')|n}
174 ${c.form.render_error(request, c.form['repo_description'])|n}
174 ${c.form.render_error(request, c.form['repo_description'])|n}
175
175
176 <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %>
176 <% metatags_url = h.literal('''<a href="#metatagsShow" onclick="$('#meta-tags-desc').toggle();return false">meta-tags</a>''') %>
177 <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span>
177 <span class="help-block">${_('Plain text format with support of {metatags}. Add a README file for longer descriptions').format(metatags=metatags_url)|n}</span>
178 <span id="meta-tags-desc" style="display: none">
178 <span id="meta-tags-desc" style="display: none">
179 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
179 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
180 ${dt.metatags_help()}
180 ${dt.metatags_help()}
181 </span>
181 </span>
182 </div>
182 </div>
183 </div>
183 </div>
184
184
185 <div class="field">
185 <div class="field">
186 <div class="label label-checkbox">
186 <div class="label label-checkbox">
187 <label for="${c.form['repo_private'].oid}">${_('Private repository')}:</label>
187 <label for="${c.form['repo_private'].oid}">${_('Private repository')}:</label>
188 </div>
188 </div>
189 <div class="checkboxes">
189 <div class="checkboxes">
190 ${c.form['repo_private'].render(css_class='medium')|n}
190 ${c.form['repo_private'].render(css_class='medium')|n}
191 ${c.form.render_error(request, c.form['repo_private'])|n}
191 ${c.form.render_error(request, c.form['repo_private'])|n}
192 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
192 <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
193 </div>
193 </div>
194 </div>
194 </div>
195 <div class="field">
195 <div class="field">
196 <div class="label label-checkbox">
196 <div class="label label-checkbox">
197 <label for="${c.form['repo_enable_statistics'].oid}">${_('Enable statistics')}:</label>
197 <label for="${c.form['repo_enable_statistics'].oid}">${_('Enable statistics')}:</label>
198 </div>
198 </div>
199 <div class="checkboxes">
199 <div class="checkboxes">
200 ${c.form['repo_enable_statistics'].render(css_class='medium')|n}
200 ${c.form['repo_enable_statistics'].render(css_class='medium')|n}
201 ${c.form.render_error(request, c.form['repo_enable_statistics'])|n}
201 ${c.form.render_error(request, c.form['repo_enable_statistics'])|n}
202 <span class="help-block">${_('Enable statistics window on summary page.')}</span>
202 <span class="help-block">${_('Enable statistics window on summary page.')}</span>
203 </div>
203 </div>
204 </div>
204 </div>
205 <div class="field">
205 <div class="field">
206 <div class="label label-checkbox">
206 <div class="label label-checkbox">
207 <label for="${c.form['repo_enable_downloads'].oid}">${_('Enable downloads')}:</label>
207 <label for="${c.form['repo_enable_downloads'].oid}">${_('Enable downloads')}:</label>
208 </div>
208 </div>
209 <div class="checkboxes">
209 <div class="checkboxes">
210 ${c.form['repo_enable_downloads'].render(css_class='medium')|n}
210 ${c.form['repo_enable_downloads'].render(css_class='medium')|n}
211 ${c.form.render_error(request, c.form['repo_enable_downloads'])|n}
211 ${c.form.render_error(request, c.form['repo_enable_downloads'])|n}
212 <span class="help-block">${_('Enable download menu on summary page.')}</span>
212 <span class="help-block">${_('Enable download menu on summary page.')}</span>
213 </div>
213 </div>
214 </div>
214 </div>
215 <div class="field">
215 <div class="field">
216 <div class="label label-checkbox">
216 <div class="label label-checkbox">
217 <label for="${c.form['repo_enable_locking'].oid}">${_('Enable automatic locking')}:</label>
217 <label for="${c.form['repo_enable_locking'].oid}">${_('Enable automatic locking')}:</label>
218 </div>
218 </div>
219 <div class="checkboxes">
219 <div class="checkboxes">
220 ${c.form['repo_enable_locking'].render(css_class='medium')|n}
220 ${c.form['repo_enable_locking'].render(css_class='medium')|n}
221 ${c.form.render_error(request, c.form['repo_enable_locking'])|n}
221 ${c.form.render_error(request, c.form['repo_enable_locking'])|n}
222 <span class="help-block">${_('Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user')}</span>
222 <span class="help-block">${_('Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user')}</span>
223 </div>
223 </div>
224 </div>
224 </div>
225
225
226 %if c.visual.repository_fields:
226 %if c.visual.repository_fields:
227 ## EXTRA FIELDS
227 ## EXTRA FIELDS
228 %for field in c.repo_fields:
228 %for field in c.repo_fields:
229 <div class="field">
229 <div class="field">
230 <div class="label">
230 <div class="label">
231 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
231 <label for="${field.field_key_prefixed}">${field.field_label} (${field.field_key}):</label>
232 </div>
232 </div>
233 <div class="input input-medium">
233 <div class="input input-medium">
234 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
234 ${h.text(field.field_key_prefixed, field.field_value, class_='medium')}
235 %if field.field_desc:
235 %if field.field_desc:
236 <span class="help-block">${field.field_desc}</span>
236 <span class="help-block">${field.field_desc}</span>
237 %endif
237 %endif
238 </div>
238 </div>
239 </div>
239 </div>
240 %endfor
240 %endfor
241 %endif
241 %endif
242 <div class="buttons">
242 <div class="buttons">
243 ${h.submit('save',_('Save'),class_="btn")}
243 ${h.submit('save',_('Save'),class_="btn")}
244 ${h.reset('reset',_('Reset'),class_="btn")}
244 ${h.reset('reset',_('Reset'),class_="btn")}
245 </div>
245 </div>
246 </div>
246 </div>
247 </div>
247 </div>
248 ${h.end_form()}
248 ${h.end_form()}
249 </div>
249 </div>
250 </div>
250 </div>
251
251
252 <script>
252 <script>
253 $(document).ready(function () {
253 $(document).ready(function () {
254 var cloneUrl = function (
254 var cloneUrl = function (
255 alterButton, editButton, cancelEditButton,
255 alterButton, editButton, cancelEditButton,
256 hiddenUrl, hiddenUrlValue, input, helpBlock, changedFlag) {
256 hiddenUrl, hiddenUrlValue, input, helpBlock, changedFlag) {
257
257
258 var originalText = helpBlock.html();
258 var originalText = helpBlock.html();
259 var obfuscatedUrl = hiddenUrlValue.html();
259 var obfuscatedUrl = hiddenUrlValue.html();
260
260
261 var edit = function(e) {
261 var edit = function(e) {
262 alterButton.show();
262 alterButton.show();
263 editButton.hide();
263 editButton.hide();
264 hiddenUrl.hide();
264 hiddenUrl.hide();
265
265
266 //add the old value next to input for verification
266 //add the old value next to input for verification
267 helpBlock.html("(" + obfuscatedUrl + ")" + "<br\>" + originalText);
267 helpBlock.html("(" + obfuscatedUrl + ")" + "<br\>" + originalText);
268 changedFlag.val('MOD');
268 changedFlag.val('MOD');
269 };
269 };
270
270
271 var cancelEdit = function(e) {
271 var cancelEdit = function(e) {
272 alterButton.hide();
272 alterButton.hide();
273 editButton.show();
273 editButton.show();
274 hiddenUrl.show();
274 hiddenUrl.show();
275
275
276 helpBlock.html(originalText);
276 helpBlock.html(originalText);
277 changedFlag.val('OLD');
277 changedFlag.val('OLD');
278 input.val('');
278 input.val('');
279 };
279 };
280
280
281 var initEvents = function() {
281 var initEvents = function() {
282 editButton.on('click', edit);
282 editButton.on('click', edit);
283 cancelEditButton.on('click', cancelEdit);
283 cancelEditButton.on('click', cancelEdit);
284 };
284 };
285
285
286 var setInitialState = function() {
286 var setInitialState = function() {
287 if (input.hasClass('error')) {
287 if (input.hasClass('error')) {
288 alterButton.show();
288 alterButton.show();
289 editButton.hide();
289 editButton.hide();
290 hiddenUrl.hide();
290 hiddenUrl.hide();
291 }
291 }
292 };
292 };
293
293
294 setInitialState();
294 setInitialState();
295 initEvents();
295 initEvents();
296 };
296 };
297
297
298
298
299 var alterButton = $('#alter_clone_uri');
299 var alterButton = $('#alter_clone_uri');
300 var editButton = $('#edit_clone_uri');
300 var editButton = $('#edit_clone_uri');
301 var cancelEditButton = $('#cancel_edit_clone_uri');
301 var cancelEditButton = $('#cancel_edit_clone_uri');
302 var hiddenUrl = $('#clone_uri_hidden');
302 var hiddenUrl = $('#clone_uri_hidden');
303 var hiddenUrlValue = $('#clone_uri_hidden_value');
303 var hiddenUrlValue = $('#clone_uri_hidden_value');
304 var input = $('#clone_uri');
304 var input = $('#clone_uri');
305 var helpBlock = $('#alter_clone_uri_help_block');
305 var helpBlock = $('#alter_clone_uri_help_block');
306 var changedFlag = $('#repo_clone_uri_change');
306 var changedFlag = $('#repo_clone_uri_change');
307 cloneUrl(
307 cloneUrl(
308 alterButton, editButton, cancelEditButton, hiddenUrl,
308 alterButton, editButton, cancelEditButton, hiddenUrl,
309 hiddenUrlValue, input, helpBlock, changedFlag);
309 hiddenUrlValue, input, helpBlock, changedFlag);
310
310
311 var alterButton = $('#alter_push_uri');
311 var alterButton = $('#alter_push_uri');
312 var editButton = $('#edit_push_uri');
312 var editButton = $('#edit_push_uri');
313 var cancelEditButton = $('#cancel_edit_push_uri');
313 var cancelEditButton = $('#cancel_edit_push_uri');
314 var hiddenUrl = $('#push_uri_hidden');
314 var hiddenUrl = $('#push_uri_hidden');
315 var hiddenUrlValue = $('#push_uri_hidden_value');
315 var hiddenUrlValue = $('#push_uri_hidden_value');
316 var input = $('#push_uri');
316 var input = $('#push_uri');
317 var helpBlock = $('#alter_push_uri_help_block');
317 var helpBlock = $('#alter_push_uri_help_block');
318 var changedFlag = $('#repo_push_uri_change');
318 var changedFlag = $('#repo_push_uri_change');
319 cloneUrl(
319 cloneUrl(
320 alterButton, editButton, cancelEditButton, hiddenUrl,
320 alterButton, editButton, cancelEditButton, hiddenUrl,
321 hiddenUrlValue, input, helpBlock, changedFlag);
321 hiddenUrlValue, input, helpBlock, changedFlag);
322
322
323 selectMyGroup = function(element) {
323 selectMyGroup = function(element) {
324 $("#repo_group").val($(element).data('personalGroupId')).trigger("change");
324 $("#repo_group").val($(element).data('personalGroupId')).trigger("change");
325 };
325 };
326
326
327 UsersAutoComplete('repo_owner', '${c.rhodecode_user.user_id}');
327 UsersAutoComplete('repo_owner', '${c.rhodecode_user.user_id}');
328 });
328 });
329 </script>
329 </script>
@@ -1,38 +1,38 b''
1 <div class="panel panel-default">
1 <div class="panel panel-default">
2 <div class="panel-heading">
2 <div class="panel-heading">
3 <h3 class="panel-title">${_('Exceptions Tracker - Exception ID')}: ${c.exception_id}</h3>
3 <h3 class="panel-title">${_('Exceptions Tracker - Exception ID')}: ${c.exception_id}</h3>
4 </div>
4 </div>
5 <div class="panel-body">
5 <div class="panel-body">
6 % if c.traceback:
6 % if c.traceback:
7
7
8 <h4>${_('Exception `{}` generated on UTC date: {}').format(c.traceback.get('exc_type', 'NO_TYPE'), c.traceback.get('exc_utc_date', 'NO_DATE'))}</h4>
8 <h4>${_('Exception `{}` generated on UTC date: {}').format(c.traceback.get('exc_type', 'NO_TYPE'), c.traceback.get('exc_utc_date', 'NO_DATE'))}</h4>
9 <pre>${c.traceback.get('exc_message', 'NO_MESSAGE')}</pre>
9 <pre>${c.traceback.get('exc_message', 'NO_MESSAGE')}</pre>
10
10
11 % else:
11 % else:
12 ${_('Unable to Read Exception. It might be removed or non-existing.')}
12 ${_('Unable to Read Exception. It might be removed or non-existing.')}
13 % endif
13 % endif
14 </div>
14 </div>
15 </div>
15 </div>
16
16
17
17
18 % if c.traceback:
18 % if c.traceback:
19 <div class="panel panel-danger">
19 <div class="panel panel-danger">
20 <div class="panel-heading" id="advanced-delete">
20 <div class="panel-heading" id="advanced-delete">
21 <h3 class="panel-title">${_('Delete this Exception')}</h3>
21 <h3 class="panel-title">${_('Delete this Exception')}</h3>
22 </div>
22 </div>
23 <div class="panel-body">
23 <div class="panel-body">
24 ${h.secure_form(h.route_path('admin_settings_exception_tracker_delete', exception_id=c.exception_id), request=request)}
24 ${h.secure_form(h.route_path('admin_settings_exception_tracker_delete', exception_id=c.exception_id), request=request)}
25 <div style="margin: 0 0 20px 0" class="fake-space"></div>
25 <div style="margin: 0 0 20px 0" class="fake-space"></div>
26
26
27 <div class="field">
27 <div class="field">
28 <button class="btn btn-small btn-danger" type="submit"
28 <button class="btn btn-small btn-danger" type="submit"
29 onclick="return confirm('${_('Confirm to delete this exception')}');">
29 onclick="return confirm('${_('Confirm to delete this exception')}');">
30 <i class="icon-remove-sign"></i>
30 <i class="icon-remove"></i>
31 ${_('Delete This Exception')}
31 ${_('Delete This Exception')}
32 </button>
32 </button>
33 </div>
33 </div>
34
34
35 ${h.end_form()}
35 ${h.end_form()}
36 </div>
36 </div>
37 </div>
37 </div>
38 % endif
38 % endif
@@ -1,65 +1,65 b''
1 <div class="panel panel-default">
1 <div class="panel panel-default">
2 <div class="panel-heading">
2 <div class="panel-heading">
3 <h3 class="panel-title">${_('Exceptions Tracker ')}</h3>
3 <h3 class="panel-title">${_('Exceptions Tracker ')}</h3>
4 </div>
4 </div>
5 <div class="panel-body">
5 <div class="panel-body">
6 % if c.exception_list_count == 1:
6 % if c.exception_list_count == 1:
7 ${_('There is {} stored exception.').format(c.exception_list_count)}
7 ${_('There is {} stored exception.').format(c.exception_list_count)}
8 % else:
8 % else:
9 ${_('There are total {} stored exceptions.').format(c.exception_list_count)}
9 ${_('There are total {} stored exceptions.').format(c.exception_list_count)}
10 % endif
10 % endif
11 <br/>
11 <br/>
12 ${_('Store directory')}: ${c.exception_store_dir}
12 ${_('Store directory')}: ${c.exception_store_dir}
13
13
14 ${h.secure_form(h.route_path('admin_settings_exception_tracker_delete_all'), request=request)}
14 ${h.secure_form(h.route_path('admin_settings_exception_tracker_delete_all'), request=request)}
15 <div style="margin: 0 0 20px 0" class="fake-space"></div>
15 <div style="margin: 0 0 20px 0" class="fake-space"></div>
16 <input type="hidden" name="type_filter", value="${c.type_filter}">
16 <input type="hidden" name="type_filter", value="${c.type_filter}">
17 <div class="field">
17 <div class="field">
18 <button class="btn btn-small btn-danger" type="submit"
18 <button class="btn btn-small btn-danger" type="submit"
19 onclick="return confirm('${_('Confirm to delete all exceptions')}');">
19 onclick="return confirm('${_('Confirm to delete all exceptions')}');">
20 <i class="icon-remove-sign"></i>
20 <i class="icon-remove"></i>
21 % if c.type_filter:
21 % if c.type_filter:
22 ${_('Delete All `{}`').format(c.type_filter)}
22 ${_('Delete All `{}`').format(c.type_filter)}
23 % else:
23 % else:
24 ${_('Delete All')}
24 ${_('Delete All')}
25 % endif
25 % endif
26
26
27 </button>
27 </button>
28 </div>
28 </div>
29
29
30 ${h.end_form()}
30 ${h.end_form()}
31
31
32 </div>
32 </div>
33 </div>
33 </div>
34
34
35
35
36 <div class="panel panel-default">
36 <div class="panel panel-default">
37 <div class="panel-heading">
37 <div class="panel-heading">
38 <h3 class="panel-title">${_('Exceptions Tracker - Showing the last {} Exceptions').format(c.limit)}.</h3>
38 <h3 class="panel-title">${_('Exceptions Tracker - Showing the last {} Exceptions').format(c.limit)}.</h3>
39 <a class="panel-edit" href="${h.current_route_path(request, limit=c.next_limit)}">${_('Show more')}</a>
39 <a class="panel-edit" href="${h.current_route_path(request, limit=c.next_limit)}">${_('Show more')}</a>
40 </div>
40 </div>
41 <div class="panel-body">
41 <div class="panel-body">
42 <table class="rctable">
42 <table class="rctable">
43 <tr>
43 <tr>
44 <th>#</th>
44 <th>#</th>
45 <th>Exception ID</th>
45 <th>Exception ID</th>
46 <th>Date</th>
46 <th>Date</th>
47 <th>App Type</th>
47 <th>App Type</th>
48 <th>Exc Type</th>
48 <th>Exc Type</th>
49 </tr>
49 </tr>
50 <% cnt = len(c.exception_list)%>
50 <% cnt = len(c.exception_list)%>
51 % for tb in c.exception_list:
51 % for tb in c.exception_list:
52 <tr>
52 <tr>
53 <td>${cnt}</td>
53 <td>${cnt}</td>
54 <td><a href="${h.route_path('admin_settings_exception_tracker_show', exception_id=tb['exc_id'])}"><code>${tb['exc_id']}</code></a></td>
54 <td><a href="${h.route_path('admin_settings_exception_tracker_show', exception_id=tb['exc_id'])}"><code>${tb['exc_id']}</code></a></td>
55 <td>${h.format_date(tb['exc_utc_date'])}</td>
55 <td>${h.format_date(tb['exc_utc_date'])}</td>
56 <td>${tb['app_type']}</td>
56 <td>${tb['app_type']}</td>
57 <td>
57 <td>
58 <a href="${h.current_route_path(request, type_filter=tb['exc_type'])}">${tb['exc_type']}</a>
58 <a href="${h.current_route_path(request, type_filter=tb['exc_type'])}">${tb['exc_type']}</a>
59 </td>
59 </td>
60 </tr>
60 </tr>
61 <% cnt -=1 %>
61 <% cnt -=1 %>
62 % endfor
62 % endfor
63 </table>
63 </table>
64 </div>
64 </div>
65 </div>
65 </div>
@@ -1,85 +1,85 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <%
3 <%
4 elems = [
4 elems = [
5 (_('User Group ID'), c.user_group.users_group_id, '', ''),
5 (_('User Group ID'), c.user_group.users_group_id, '', ''),
6 (_('Owner'), lambda:base.gravatar_with_user(c.user_group.user.email), '', ''),
6 (_('Owner'), lambda:base.gravatar_with_user(c.user_group.user.email), '', ''),
7 (_('Created on'), h.format_date(c.user_group.created_on), '', '',),
7 (_('Created on'), h.format_date(c.user_group.created_on), '', '',),
8
8
9 (_('Members'), len(c.group_members_obj),'', [x for x in c.group_members_obj]),
9 (_('Members'), len(c.group_members_obj),'', [x for x in c.group_members_obj]),
10 (_('Automatic member sync'), 'Yes' if c.user_group.group_data.get('extern_type') else 'No', '', '',),
10 (_('Automatic member sync'), 'Yes' if c.user_group.group_data.get('extern_type') else 'No', '', '',),
11
11
12 (_('Assigned to repositories'), len(c.group_to_repos),'', [x for x in c.group_to_repos]),
12 (_('Assigned to repositories'), len(c.group_to_repos),'', [x for x in c.group_to_repos]),
13 (_('Assigned to repo groups'), len(c.group_to_repo_groups), '', [x for x in c.group_to_repo_groups]),
13 (_('Assigned to repo groups'), len(c.group_to_repo_groups), '', [x for x in c.group_to_repo_groups]),
14
14
15 (_('Assigned to review rules'), len(c.group_to_review_rules), '', [x for x in c.group_to_review_rules]),
15 (_('Assigned to review rules'), len(c.group_to_review_rules), '', [x for x in c.group_to_review_rules]),
16 ]
16 ]
17 %>
17 %>
18
18
19 <div class="panel panel-default">
19 <div class="panel panel-default">
20 <div class="panel-heading">
20 <div class="panel-heading">
21 <h3 class="panel-title">${_('User Group: %s') % c.user_group.users_group_name}</h3>
21 <h3 class="panel-title">${_('User Group: %s') % c.user_group.users_group_name}</h3>
22 </div>
22 </div>
23 <div class="panel-body">
23 <div class="panel-body">
24 ${base.dt_info_panel(elems)}
24 ${base.dt_info_panel(elems)}
25 </div>
25 </div>
26
26
27 </div>
27 </div>
28
28
29 <div class="panel panel-default">
29 <div class="panel panel-default">
30 <div class="panel-heading">
30 <div class="panel-heading">
31 <h3 class="panel-title">${_('Group members sync')}</h3>
31 <h3 class="panel-title">${_('Group members sync')}</h3>
32 </div>
32 </div>
33 <div class="panel-body">
33 <div class="panel-body">
34 <% sync_type = c.user_group.group_data.get('extern_type') %>
34 <% sync_type = c.user_group.group_data.get('extern_type') %>
35
35
36 % if sync_type:
36 % if sync_type:
37 <p>
37 <p>
38 ${_('This group is set to be automatically synchronised.')}<br/>
38 ${_('This group is set to be automatically synchronised.')}<br/>
39 ${_('This group synchronization was set by')}: <strong>${sync_type}</strong>
39 ${_('This group synchronization was set by')}: <strong>${sync_type}</strong>
40 </p>
40 </p>
41 % else:
41 % else:
42 <p>
42 <p>
43 ${_('This group is not set to be automatically synchronised')}
43 ${_('This group is not set to be automatically synchronised')}
44 </p>
44 </p>
45 % endif
45 % endif
46
46
47 <div>
47 <div>
48 ${h.secure_form(h.route_path('edit_user_group_advanced_sync', user_group_id=c.user_group.users_group_id), request=request)}
48 ${h.secure_form(h.route_path('edit_user_group_advanced_sync', user_group_id=c.user_group.users_group_id), request=request)}
49 <div class="field">
49 <div class="field">
50 <button class="btn btn-default" type="submit">
50 <button class="btn btn-default" type="submit">
51 %if sync_type:
51 %if sync_type:
52 ${_('Disable synchronization')}
52 ${_('Disable synchronization')}
53 %else:
53 %else:
54 ${_('Enable synchronization')}
54 ${_('Enable synchronization')}
55 %endif
55 %endif
56 </button>
56 </button>
57 </div>
57 </div>
58 <div class="field">
58 <div class="field">
59 <span class="help-block">
59 <span class="help-block">
60 ${_('Users will be added or removed from this group when they authenticate with RhodeCode system, based on LDAP group membership. '
60 ${_('Users will be added or removed from this group when they authenticate with RhodeCode system, based on LDAP group membership. '
61 'This requires `LDAP+User group` authentication plugin to be configured and enabled. (EE only feature)')}
61 'This requires `LDAP+User group` authentication plugin to be configured and enabled. (EE only feature)')}
62 </span>
62 </span>
63 </div>
63 </div>
64 ${h.end_form()}
64 ${h.end_form()}
65 </div>
65 </div>
66
66
67 </div>
67 </div>
68 </div>
68 </div>
69
69
70
70
71 <div class="panel panel-danger">
71 <div class="panel panel-danger">
72 <div class="panel-heading">
72 <div class="panel-heading">
73 <h3 class="panel-title">${_('Delete User Group')}</h3>
73 <h3 class="panel-title">${_('Delete User Group')}</h3>
74 </div>
74 </div>
75 <div class="panel-body">
75 <div class="panel-body">
76 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=c.user_group.users_group_id), request=request)}
76 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=c.user_group.users_group_id), request=request)}
77 ${h.hidden('force', 1)}
77 ${h.hidden('force', 1)}
78 <button class="btn btn-small btn-danger" type="submit"
78 <button class="btn btn-small btn-danger" type="submit"
79 onclick="return confirm('${_('Confirm to delete user group `%(ugroup)s` with all permission assignments') % {'ugroup': c.user_group.users_group_name}}');">
79 onclick="return confirm('${_('Confirm to delete user group `%(ugroup)s` with all permission assignments') % {'ugroup': c.user_group.users_group_name}}');">
80 <i class="icon-remove-sign"></i>
80 <i class="icon-remove"></i>
81 ${_('Delete This User Group')}
81 ${_('Delete This User Group')}
82 </button>
82 </button>
83 ${h.end_form()}
83 ${h.end_form()}
84 </div>
84 </div>
85 </div>
85 </div>
@@ -1,186 +1,186 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="base" file="/base/base.mako"/>
3
3
4 <div class="panel panel-default">
4 <div class="panel panel-default">
5 <div class="panel-heading">
5 <div class="panel-heading">
6 <h3 class="panel-title">${_('User Group: %s') % c.user_group.users_group_name}</h3>
6 <h3 class="panel-title">${_('User Group: %s') % c.user_group.users_group_name}</h3>
7 </div>
7 </div>
8 <div class="panel-body">
8 <div class="panel-body">
9 ${h.secure_form(h.route_path('user_groups_update', user_group_id=c.user_group.users_group_id), id='edit_user_group', request=request)}
9 ${h.secure_form(h.route_path('user_groups_update', user_group_id=c.user_group.users_group_id), id='edit_user_group', request=request)}
10 <div class="form">
10 <div class="form">
11 <!-- fields -->
11 <!-- fields -->
12 <div class="fields">
12 <div class="fields">
13 <div class="field">
13 <div class="field">
14 <div class="label">
14 <div class="label">
15 <label for="users_group_name">${_('Group name')}:</label>
15 <label for="users_group_name">${_('Group name')}:</label>
16 </div>
16 </div>
17 <div class="input">
17 <div class="input">
18 ${h.text('users_group_name',class_='medium')}
18 ${h.text('users_group_name',class_='medium')}
19 </div>
19 </div>
20 </div>
20 </div>
21
21
22 <div class="field badged-field">
22 <div class="field badged-field">
23 <div class="label">
23 <div class="label">
24 <label for="user">${_('Owner')}:</label>
24 <label for="user">${_('Owner')}:</label>
25 </div>
25 </div>
26 <div class="input">
26 <div class="input">
27 <div class="badge-input-container">
27 <div class="badge-input-container">
28 <div class="user-badge">
28 <div class="user-badge">
29 ${base.gravatar_with_user(c.user_group.user.email, show_disabled=not c.user_group.user.active)}
29 ${base.gravatar_with_user(c.user_group.user.email, show_disabled=not c.user_group.user.active)}
30 </div>
30 </div>
31 <div class="badge-input-wrap">
31 <div class="badge-input-wrap">
32 ${h.text('user', class_="medium", autocomplete="off")}
32 ${h.text('user', class_="medium", autocomplete="off")}
33 </div>
33 </div>
34 </div>
34 </div>
35 <form:error name="user"/>
35 <form:error name="user"/>
36 <p class="help-block">${_('Change owner of this user group.')}</p>
36 <p class="help-block">${_('Change owner of this user group.')}</p>
37 </div>
37 </div>
38 </div>
38 </div>
39
39
40 <div class="field">
40 <div class="field">
41 <div class="label label-textarea">
41 <div class="label label-textarea">
42 <label for="user_group_description">${_('Description')}:</label>
42 <label for="user_group_description">${_('Description')}:</label>
43 </div>
43 </div>
44 <div class="textarea textarea-small editor">
44 <div class="textarea textarea-small editor">
45 ${h.textarea('user_group_description',cols=23,rows=5,class_="medium")}
45 ${h.textarea('user_group_description',cols=23,rows=5,class_="medium")}
46 <span class="help-block">${_('Short, optional description for this user group.')}</span>
46 <span class="help-block">${_('Short, optional description for this user group.')}</span>
47 </div>
47 </div>
48 </div>
48 </div>
49 <div class="field">
49 <div class="field">
50 <div class="label label-checkbox">
50 <div class="label label-checkbox">
51 <label for="users_group_active">${_('Active')}:</label>
51 <label for="users_group_active">${_('Active')}:</label>
52 </div>
52 </div>
53 <div class="checkboxes">
53 <div class="checkboxes">
54 ${h.checkbox('users_group_active',value=True)}
54 ${h.checkbox('users_group_active',value=True)}
55 </div>
55 </div>
56 </div>
56 </div>
57
57
58 <div class="field">
58 <div class="field">
59 <div class="label label-checkbox">
59 <div class="label label-checkbox">
60 <label for="users_group_active">${_('Add members')}:</label>
60 <label for="users_group_active">${_('Add members')}:</label>
61 </div>
61 </div>
62 <div class="input">
62 <div class="input">
63 ${h.text('user_group_add_members', placeholder="user/usergroup", class_="medium")}
63 ${h.text('user_group_add_members', placeholder="user/usergroup", class_="medium")}
64 </div>
64 </div>
65 </div>
65 </div>
66
66
67 <input type="hidden" name="__start__" value="user_group_members:sequence"/>
67 <input type="hidden" name="__start__" value="user_group_members:sequence"/>
68 <table id="group_members_placeholder" class="rctable group_members">
68 <table id="group_members_placeholder" class="rctable group_members">
69 <tr>
69 <tr>
70 <th>${_('Username')}</th>
70 <th>${_('Username')}</th>
71 <th>${_('Action')}</th>
71 <th>${_('Action')}</th>
72 </tr>
72 </tr>
73
73
74 % if c.group_members_obj:
74 % if c.group_members_obj:
75 % for user in c.group_members_obj:
75 % for user in c.group_members_obj:
76 <tr>
76 <tr>
77 <td id="member_user_${user.user_id}" class="td-author">
77 <td id="member_user_${user.user_id}" class="td-author">
78 <div class="group_member">
78 <div class="group_member">
79 ${base.gravatar(user.email, 16)}
79 ${base.gravatar(user.email, 16)}
80 <span class="username user">${h.link_to(h.person(user), h.route_path('user_edit',user_id=user.user_id))}</span>
80 <span class="username user">${h.link_to(h.person(user), h.route_path('user_edit',user_id=user.user_id))}</span>
81 <input type="hidden" name="__start__" value="member:mapping">
81 <input type="hidden" name="__start__" value="member:mapping">
82 <input type="hidden" name="member_user_id" value="${user.user_id}">
82 <input type="hidden" name="member_user_id" value="${user.user_id}">
83 <input type="hidden" name="type" value="existing" id="member_${user.user_id}">
83 <input type="hidden" name="type" value="existing" id="member_${user.user_id}">
84 <input type="hidden" name="__end__" value="member:mapping">
84 <input type="hidden" name="__end__" value="member:mapping">
85 </div>
85 </div>
86 </td>
86 </td>
87 <td class="">
87 <td class="">
88 <div class="usergroup_member_remove action_button" onclick="removeUserGroupMember(${user.user_id}, true)" style="visibility: visible;">
88 <div class="usergroup_member_remove action_button" onclick="removeUserGroupMember(${user.user_id}, true)" style="visibility: visible;">
89 <i class="icon-remove-sign"></i>
89 <i class="icon-remove"></i>
90 </div>
90 </div>
91 </td>
91 </td>
92 </tr>
92 </tr>
93 % endfor
93 % endfor
94
94
95 % else:
95 % else:
96 <tr><td colspan="2">${_('No members yet')}</td></tr>
96 <tr><td colspan="2">${_('No members yet')}</td></tr>
97 % endif
97 % endif
98 </table>
98 </table>
99 <input type="hidden" name="__end__" value="user_group_members:sequence"/>
99 <input type="hidden" name="__end__" value="user_group_members:sequence"/>
100
100
101 <div class="buttons">
101 <div class="buttons">
102 ${h.submit('Save',_('Save'),class_="btn")}
102 ${h.submit('Save',_('Save'),class_="btn")}
103 </div>
103 </div>
104 </div>
104 </div>
105 </div>
105 </div>
106 ${h.end_form()}
106 ${h.end_form()}
107 </div>
107 </div>
108 </div>
108 </div>
109 <script>
109 <script>
110 $(document).ready(function(){
110 $(document).ready(function(){
111 $("#group_parent_id").select2({
111 $("#group_parent_id").select2({
112 'containerCssClass': "drop-menu",
112 'containerCssClass': "drop-menu",
113 'dropdownCssClass': "drop-menu-dropdown",
113 'dropdownCssClass': "drop-menu-dropdown",
114 'dropdownAutoWidth': true
114 'dropdownAutoWidth': true
115 });
115 });
116
116
117 removeUserGroupMember = function(userId){
117 removeUserGroupMember = function(userId){
118 $('#member_'+userId).val('remove');
118 $('#member_'+userId).val('remove');
119 $('#member_user_'+userId).addClass('to-delete');
119 $('#member_user_'+userId).addClass('to-delete');
120 };
120 };
121
121
122 $('#user_group_add_members').autocomplete({
122 $('#user_group_add_members').autocomplete({
123 serviceUrl: pyroutes.url('user_autocomplete_data'),
123 serviceUrl: pyroutes.url('user_autocomplete_data'),
124 minChars:2,
124 minChars:2,
125 maxHeight:400,
125 maxHeight:400,
126 width:300,
126 width:300,
127 deferRequestBy: 300, //miliseconds
127 deferRequestBy: 300, //miliseconds
128 showNoSuggestionNotice: true,
128 showNoSuggestionNotice: true,
129 params: { user_groups:true },
129 params: { user_groups:true },
130 formatResult: autocompleteFormatResult,
130 formatResult: autocompleteFormatResult,
131 lookupFilter: autocompleteFilterResult,
131 lookupFilter: autocompleteFilterResult,
132 onSelect: function(element, suggestion){
132 onSelect: function(element, suggestion){
133
133
134 function addMember(user, fromUserGroup) {
134 function addMember(user, fromUserGroup) {
135 var gravatar = user.icon_link;
135 var gravatar = user.icon_link;
136 var username = user.value_display;
136 var username = user.value_display;
137 var userLink = pyroutes.url('user_edit', {"user_id": user.id});
137 var userLink = pyroutes.url('user_edit', {"user_id": user.id});
138 var uid = user.id;
138 var uid = user.id;
139
139
140 if (fromUserGroup) {
140 if (fromUserGroup) {
141 username = username +" "+ _gettext('(from usergroup {0})'.format(fromUserGroup))
141 username = username +" "+ _gettext('(from usergroup {0})'.format(fromUserGroup))
142 }
142 }
143
143
144 var elem = $(
144 var elem = $(
145 ('<tr>'+
145 ('<tr>'+
146 '<td id="member_user_{6}" class="td-author td-author-new-entry">'+
146 '<td id="member_user_{6}" class="td-author td-author-new-entry">'+
147 '<div class="group_member">'+
147 '<div class="group_member">'+
148 '<img class="gravatar" src="{0}" height="16" width="16">'+
148 '<img class="gravatar" src="{0}" height="16" width="16">'+
149 '<span class="username user"><a href="{1}">{2}</a></span>'+
149 '<span class="username user"><a href="{1}">{2}</a></span>'+
150 '<input type="hidden" name="__start__" value="member:mapping">'+
150 '<input type="hidden" name="__start__" value="member:mapping">'+
151 '<input type="hidden" name="member_user_id" value="{3}">'+
151 '<input type="hidden" name="member_user_id" value="{3}">'+
152 '<input type="hidden" name="type" value="new" id="member_{4}">'+
152 '<input type="hidden" name="type" value="new" id="member_{4}">'+
153 '<input type="hidden" name="__end__" value="member:mapping">'+
153 '<input type="hidden" name="__end__" value="member:mapping">'+
154 '</div>'+
154 '</div>'+
155 '</td>'+
155 '</td>'+
156 '<td class="td-author-new-entry">'+
156 '<td class="td-author-new-entry">'+
157 '<div class="usergroup_member_remove action_button" onclick="removeUserGroupMember({5}, true)" style="visibility: visible;">'+
157 '<div class="usergroup_member_remove action_button" onclick="removeUserGroupMember({5}, true)" style="visibility: visible;">'+
158 '<i class="icon-remove-sign"></i>'+
158 '<i class="icon-remove"></i>'+
159 '</div>'+
159 '</div>'+
160 '</td>'+
160 '</td>'+
161 '</tr>').format(gravatar, userLink, username,
161 '</tr>').format(gravatar, userLink, username,
162 uid, uid, uid, uid)
162 uid, uid, uid, uid)
163 );
163 );
164 $('#group_members_placeholder').append(elem)
164 $('#group_members_placeholder').append(elem)
165 }
165 }
166
166
167 if (suggestion.value_type == 'user_group') {
167 if (suggestion.value_type == 'user_group') {
168 $.getJSON(
168 $.getJSON(
169 pyroutes.url('user_group_members_data',
169 pyroutes.url('user_group_members_data',
170 {'user_group_id': suggestion.id}),
170 {'user_group_id': suggestion.id}),
171 function(data) {
171 function(data) {
172 $.each(data.members, function(idx, user) {
172 $.each(data.members, function(idx, user) {
173 addMember(user, suggestion.value)
173 addMember(user, suggestion.value)
174 });
174 });
175 }
175 }
176 );
176 );
177 } else if (suggestion.value_type == 'user') {
177 } else if (suggestion.value_type == 'user') {
178 addMember(suggestion, null);
178 addMember(suggestion, null);
179 }
179 }
180 }
180 }
181 });
181 });
182
182
183
183
184 UsersAutoComplete('user', '${c.rhodecode_user.user_id}');
184 UsersAutoComplete('user', '${c.rhodecode_user.user_id}');
185 })
185 })
186 </script>
186 </script>
@@ -1,1031 +1,1031 b''
1 <%namespace name="commentblock" file="/changeset/changeset_file_comment.mako"/>
1 <%namespace name="commentblock" file="/changeset/changeset_file_comment.mako"/>
2
2
3 <%def name="diff_line_anchor(commit, filename, line, type)"><%
3 <%def name="diff_line_anchor(commit, filename, line, type)"><%
4 return '%s_%s_%i' % (h.md5_safe(commit+filename), type, line)
4 return '%s_%s_%i' % (h.md5_safe(commit+filename), type, line)
5 %></%def>
5 %></%def>
6
6
7 <%def name="action_class(action)">
7 <%def name="action_class(action)">
8 <%
8 <%
9 return {
9 return {
10 '-': 'cb-deletion',
10 '-': 'cb-deletion',
11 '+': 'cb-addition',
11 '+': 'cb-addition',
12 ' ': 'cb-context',
12 ' ': 'cb-context',
13 }.get(action, 'cb-empty')
13 }.get(action, 'cb-empty')
14 %>
14 %>
15 </%def>
15 </%def>
16
16
17 <%def name="op_class(op_id)">
17 <%def name="op_class(op_id)">
18 <%
18 <%
19 return {
19 return {
20 DEL_FILENODE: 'deletion', # file deleted
20 DEL_FILENODE: 'deletion', # file deleted
21 BIN_FILENODE: 'warning' # binary diff hidden
21 BIN_FILENODE: 'warning' # binary diff hidden
22 }.get(op_id, 'addition')
22 }.get(op_id, 'addition')
23 %>
23 %>
24 </%def>
24 </%def>
25
25
26
26
27
27
28 <%def name="render_diffset(diffset, commit=None,
28 <%def name="render_diffset(diffset, commit=None,
29
29
30 # collapse all file diff entries when there are more than this amount of files in the diff
30 # collapse all file diff entries when there are more than this amount of files in the diff
31 collapse_when_files_over=20,
31 collapse_when_files_over=20,
32
32
33 # collapse lines in the diff when more than this amount of lines changed in the file diff
33 # collapse lines in the diff when more than this amount of lines changed in the file diff
34 lines_changed_limit=500,
34 lines_changed_limit=500,
35
35
36 # add a ruler at to the output
36 # add a ruler at to the output
37 ruler_at_chars=0,
37 ruler_at_chars=0,
38
38
39 # show inline comments
39 # show inline comments
40 use_comments=False,
40 use_comments=False,
41
41
42 # disable new comments
42 # disable new comments
43 disable_new_comments=False,
43 disable_new_comments=False,
44
44
45 # special file-comments that were deleted in previous versions
45 # special file-comments that were deleted in previous versions
46 # it's used for showing outdated comments for deleted files in a PR
46 # it's used for showing outdated comments for deleted files in a PR
47 deleted_files_comments=None,
47 deleted_files_comments=None,
48
48
49 # for cache purpose
49 # for cache purpose
50 inline_comments=None,
50 inline_comments=None,
51
51
52 )">
52 )">
53 %if use_comments:
53 %if use_comments:
54 <div id="cb-comments-inline-container-template" class="js-template">
54 <div id="cb-comments-inline-container-template" class="js-template">
55 ${inline_comments_container([], inline_comments)}
55 ${inline_comments_container([], inline_comments)}
56 </div>
56 </div>
57 <div class="js-template" id="cb-comment-inline-form-template">
57 <div class="js-template" id="cb-comment-inline-form-template">
58 <div class="comment-inline-form ac">
58 <div class="comment-inline-form ac">
59
59
60 %if c.rhodecode_user.username != h.DEFAULT_USER:
60 %if c.rhodecode_user.username != h.DEFAULT_USER:
61 ## render template for inline comments
61 ## render template for inline comments
62 ${commentblock.comment_form(form_type='inline')}
62 ${commentblock.comment_form(form_type='inline')}
63 %else:
63 %else:
64 ${h.form('', class_='inline-form comment-form-login', method='get')}
64 ${h.form('', class_='inline-form comment-form-login', method='get')}
65 <div class="pull-left">
65 <div class="pull-left">
66 <div class="comment-help pull-right">
66 <div class="comment-help pull-right">
67 ${_('You need to be logged in to leave comments.')} <a href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}">${_('Login now')}</a>
67 ${_('You need to be logged in to leave comments.')} <a href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}">${_('Login now')}</a>
68 </div>
68 </div>
69 </div>
69 </div>
70 <div class="comment-button pull-right">
70 <div class="comment-button pull-right">
71 <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);">
71 <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);">
72 ${_('Cancel')}
72 ${_('Cancel')}
73 </button>
73 </button>
74 </div>
74 </div>
75 <div class="clearfix"></div>
75 <div class="clearfix"></div>
76 ${h.end_form()}
76 ${h.end_form()}
77 %endif
77 %endif
78 </div>
78 </div>
79 </div>
79 </div>
80
80
81 %endif
81 %endif
82 <%
82 <%
83 collapse_all = len(diffset.files) > collapse_when_files_over
83 collapse_all = len(diffset.files) > collapse_when_files_over
84 %>
84 %>
85
85
86 %if c.user_session_attrs["diffmode"] == 'sideside':
86 %if c.user_session_attrs["diffmode"] == 'sideside':
87 <style>
87 <style>
88 .wrapper {
88 .wrapper {
89 max-width: 1600px !important;
89 max-width: 1600px !important;
90 }
90 }
91 </style>
91 </style>
92 %endif
92 %endif
93
93
94 %if ruler_at_chars:
94 %if ruler_at_chars:
95 <style>
95 <style>
96 .diff table.cb .cb-content:after {
96 .diff table.cb .cb-content:after {
97 content: "";
97 content: "";
98 border-left: 1px solid blue;
98 border-left: 1px solid blue;
99 position: absolute;
99 position: absolute;
100 top: 0;
100 top: 0;
101 height: 18px;
101 height: 18px;
102 opacity: .2;
102 opacity: .2;
103 z-index: 10;
103 z-index: 10;
104 //## +5 to account for diff action (+/-)
104 //## +5 to account for diff action (+/-)
105 left: ${ruler_at_chars + 5}ch;
105 left: ${ruler_at_chars + 5}ch;
106 </style>
106 </style>
107 %endif
107 %endif
108
108
109 <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}">
109 <div class="diffset ${disable_new_comments and 'diffset-comments-disabled'}">
110 <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}">
110 <div class="diffset-heading ${diffset.limited_diff and 'diffset-heading-warning' or ''}">
111 %if commit:
111 %if commit:
112 <div class="pull-right">
112 <div class="pull-right">
113 <a class="btn tooltip" title="${h.tooltip(_('Browse Files at revision {}').format(commit.raw_id))}" href="${h.route_path('repo_files',repo_name=diffset.repo_name, commit_id=commit.raw_id, f_path='')}">
113 <a class="btn tooltip" title="${h.tooltip(_('Browse Files at revision {}').format(commit.raw_id))}" href="${h.route_path('repo_files',repo_name=diffset.repo_name, commit_id=commit.raw_id, f_path='')}">
114 ${_('Browse Files')}
114 ${_('Browse Files')}
115 </a>
115 </a>
116 </div>
116 </div>
117 %endif
117 %endif
118 <h2 class="clearinner">
118 <h2 class="clearinner">
119 ## invidual commit
119 ## invidual commit
120 % if commit:
120 % if commit:
121 <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.route_path('repo_commit',repo_name=diffset.repo_name,commit_id=commit.raw_id)}">${('r%s:%s' % (commit.idx,h.short_id(commit.raw_id)))}</a> -
121 <a class="tooltip revision" title="${h.tooltip(commit.message)}" href="${h.route_path('repo_commit',repo_name=diffset.repo_name,commit_id=commit.raw_id)}">${('r%s:%s' % (commit.idx,h.short_id(commit.raw_id)))}</a> -
122 ${h.age_component(commit.date)}
122 ${h.age_component(commit.date)}
123 % if diffset.limited_diff:
123 % if diffset.limited_diff:
124 - ${_('The requested changes are too big and content was truncated.')}
124 - ${_('The requested changes are too big and content was truncated.')}
125 ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}}
125 ${_ungettext('%(num)s file changed.', '%(num)s files changed.', diffset.changed_files) % {'num': diffset.changed_files}}
126 <a href="${h.current_route_path(request, fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
126 <a href="${h.current_route_path(request, fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
127 % elif hasattr(c, 'commit_ranges') and len(c.commit_ranges) > 1:
127 % elif hasattr(c, 'commit_ranges') and len(c.commit_ranges) > 1:
128 ## compare diff, has no file-selector and we want to show stats anyway
128 ## compare diff, has no file-selector and we want to show stats anyway
129 ${_ungettext('{num} file changed: {linesadd} inserted, ''{linesdel} deleted',
129 ${_ungettext('{num} file changed: {linesadd} inserted, ''{linesdel} deleted',
130 '{num} files changed: {linesadd} inserted, {linesdel} deleted', diffset.changed_files) \
130 '{num} files changed: {linesadd} inserted, {linesdel} deleted', diffset.changed_files) \
131 .format(num=diffset.changed_files, linesadd=diffset.lines_added, linesdel=diffset.lines_deleted)}
131 .format(num=diffset.changed_files, linesadd=diffset.lines_added, linesdel=diffset.lines_deleted)}
132 % endif
132 % endif
133 % else:
133 % else:
134 ## pull requests/compare
134 ## pull requests/compare
135 ${_('File Changes')}
135 ${_('File Changes')}
136 % endif
136 % endif
137
137
138 </h2>
138 </h2>
139 </div>
139 </div>
140
140
141 %if diffset.has_hidden_changes:
141 %if diffset.has_hidden_changes:
142 <p class="empty_data">${_('Some changes may be hidden')}</p>
142 <p class="empty_data">${_('Some changes may be hidden')}</p>
143 %elif not diffset.files:
143 %elif not diffset.files:
144 <p class="empty_data">${_('No files')}</p>
144 <p class="empty_data">${_('No files')}</p>
145 %endif
145 %endif
146
146
147 <div class="filediffs">
147 <div class="filediffs">
148
148
149 ## initial value could be marked as False later on
149 ## initial value could be marked as False later on
150 <% over_lines_changed_limit = False %>
150 <% over_lines_changed_limit = False %>
151 %for i, filediff in enumerate(diffset.files):
151 %for i, filediff in enumerate(diffset.files):
152
152
153 <%
153 <%
154 lines_changed = filediff.patch['stats']['added'] + filediff.patch['stats']['deleted']
154 lines_changed = filediff.patch['stats']['added'] + filediff.patch['stats']['deleted']
155 over_lines_changed_limit = lines_changed > lines_changed_limit
155 over_lines_changed_limit = lines_changed > lines_changed_limit
156 %>
156 %>
157 ## anchor with support of sticky header
157 ## anchor with support of sticky header
158 <div class="anchor" id="a_${h.FID(filediff.raw_id, filediff.patch['filename'])}"></div>
158 <div class="anchor" id="a_${h.FID(filediff.raw_id, filediff.patch['filename'])}"></div>
159
159
160 <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox" onchange="updateSticky();">
160 <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox" onchange="updateSticky();">
161 <div
161 <div
162 class="filediff"
162 class="filediff"
163 data-f-path="${filediff.patch['filename']}"
163 data-f-path="${filediff.patch['filename']}"
164 data-anchor-id="${h.FID(filediff.raw_id, filediff.patch['filename'])}"
164 data-anchor-id="${h.FID(filediff.raw_id, filediff.patch['filename'])}"
165 >
165 >
166 <label for="filediff-collapse-${id(filediff)}" class="filediff-heading">
166 <label for="filediff-collapse-${id(filediff)}" class="filediff-heading">
167 <div class="filediff-collapse-indicator"></div>
167 <div class="filediff-collapse-indicator"></div>
168 ${diff_ops(filediff)}
168 ${diff_ops(filediff)}
169 </label>
169 </label>
170
170
171 ${diff_menu(filediff, use_comments=use_comments)}
171 ${diff_menu(filediff, use_comments=use_comments)}
172 <table data-f-path="${filediff.patch['filename']}" data-anchor-id="${h.FID(filediff.raw_id, filediff.patch['filename'])}" class="code-visible-block cb cb-diff-${c.user_session_attrs["diffmode"]} code-highlight ${(over_lines_changed_limit and 'cb-collapsed' or '')}">
172 <table data-f-path="${filediff.patch['filename']}" data-anchor-id="${h.FID(filediff.raw_id, filediff.patch['filename'])}" class="code-visible-block cb cb-diff-${c.user_session_attrs["diffmode"]} code-highlight ${(over_lines_changed_limit and 'cb-collapsed' or '')}">
173
173
174 ## new/deleted/empty content case
174 ## new/deleted/empty content case
175 % if not filediff.hunks:
175 % if not filediff.hunks:
176 ## Comment container, on "fakes" hunk that contains all data to render comments
176 ## Comment container, on "fakes" hunk that contains all data to render comments
177 ${render_hunk_lines(filediff, c.user_session_attrs["diffmode"], filediff.hunk_ops, use_comments=use_comments, inline_comments=inline_comments)}
177 ${render_hunk_lines(filediff, c.user_session_attrs["diffmode"], filediff.hunk_ops, use_comments=use_comments, inline_comments=inline_comments)}
178 % endif
178 % endif
179
179
180 %if filediff.limited_diff:
180 %if filediff.limited_diff:
181 <tr class="cb-warning cb-collapser">
181 <tr class="cb-warning cb-collapser">
182 <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}>
182 <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}>
183 ${_('The requested commit or file is too big and content was truncated.')} <a href="${h.current_route_path(request, fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
183 ${_('The requested commit or file is too big and content was truncated.')} <a href="${h.current_route_path(request, fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
184 </td>
184 </td>
185 </tr>
185 </tr>
186 %else:
186 %else:
187 %if over_lines_changed_limit:
187 %if over_lines_changed_limit:
188 <tr class="cb-warning cb-collapser">
188 <tr class="cb-warning cb-collapser">
189 <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}>
189 <td class="cb-text" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=6')}>
190 ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)}
190 ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)}
191 <a href="#" class="cb-expand"
191 <a href="#" class="cb-expand"
192 onclick="$(this).closest('table').removeClass('cb-collapsed'); updateSticky(); return false;">${_('Show them')}
192 onclick="$(this).closest('table').removeClass('cb-collapsed'); updateSticky(); return false;">${_('Show them')}
193 </a>
193 </a>
194 <a href="#" class="cb-collapse"
194 <a href="#" class="cb-collapse"
195 onclick="$(this).closest('table').addClass('cb-collapsed'); updateSticky(); return false;">${_('Hide them')}
195 onclick="$(this).closest('table').addClass('cb-collapsed'); updateSticky(); return false;">${_('Hide them')}
196 </a>
196 </a>
197 </td>
197 </td>
198 </tr>
198 </tr>
199 %endif
199 %endif
200 %endif
200 %endif
201
201
202 % for hunk in filediff.hunks:
202 % for hunk in filediff.hunks:
203 <tr class="cb-hunk">
203 <tr class="cb-hunk">
204 <td ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=3' or '')}>
204 <td ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=3' or '')}>
205 ## TODO: dan: add ajax loading of more context here
205 ## TODO: dan: add ajax loading of more context here
206 ## <a href="#">
206 ## <a href="#">
207 <i class="icon-more"></i>
207 <i class="icon-more"></i>
208 ## </a>
208 ## </a>
209 </td>
209 </td>
210 <td ${(c.user_session_attrs["diffmode"] == 'sideside' and 'colspan=5' or '')}>
210 <td ${(c.user_session_attrs["diffmode"] == 'sideside' and 'colspan=5' or '')}>
211 @@
211 @@
212 -${hunk.source_start},${hunk.source_length}
212 -${hunk.source_start},${hunk.source_length}
213 +${hunk.target_start},${hunk.target_length}
213 +${hunk.target_start},${hunk.target_length}
214 ${hunk.section_header}
214 ${hunk.section_header}
215 </td>
215 </td>
216 </tr>
216 </tr>
217 ${render_hunk_lines(filediff, c.user_session_attrs["diffmode"], hunk, use_comments=use_comments, inline_comments=inline_comments)}
217 ${render_hunk_lines(filediff, c.user_session_attrs["diffmode"], hunk, use_comments=use_comments, inline_comments=inline_comments)}
218 % endfor
218 % endfor
219
219
220 <% unmatched_comments = (inline_comments or {}).get(filediff.patch['filename'], {}) %>
220 <% unmatched_comments = (inline_comments or {}).get(filediff.patch['filename'], {}) %>
221
221
222 ## outdated comments that do not fit into currently displayed lines
222 ## outdated comments that do not fit into currently displayed lines
223 % for lineno, comments in unmatched_comments.items():
223 % for lineno, comments in unmatched_comments.items():
224
224
225 %if c.user_session_attrs["diffmode"] == 'unified':
225 %if c.user_session_attrs["diffmode"] == 'unified':
226 % if loop.index == 0:
226 % if loop.index == 0:
227 <tr class="cb-hunk">
227 <tr class="cb-hunk">
228 <td colspan="3"></td>
228 <td colspan="3"></td>
229 <td>
229 <td>
230 <div>
230 <div>
231 ${_('Unmatched inline comments below')}
231 ${_('Unmatched inline comments below')}
232 </div>
232 </div>
233 </td>
233 </td>
234 </tr>
234 </tr>
235 % endif
235 % endif
236 <tr class="cb-line">
236 <tr class="cb-line">
237 <td class="cb-data cb-context"></td>
237 <td class="cb-data cb-context"></td>
238 <td class="cb-lineno cb-context"></td>
238 <td class="cb-lineno cb-context"></td>
239 <td class="cb-lineno cb-context"></td>
239 <td class="cb-lineno cb-context"></td>
240 <td class="cb-content cb-context">
240 <td class="cb-content cb-context">
241 ${inline_comments_container(comments, inline_comments)}
241 ${inline_comments_container(comments, inline_comments)}
242 </td>
242 </td>
243 </tr>
243 </tr>
244 %elif c.user_session_attrs["diffmode"] == 'sideside':
244 %elif c.user_session_attrs["diffmode"] == 'sideside':
245 % if loop.index == 0:
245 % if loop.index == 0:
246 <tr class="cb-comment-info">
246 <tr class="cb-comment-info">
247 <td colspan="2"></td>
247 <td colspan="2"></td>
248 <td class="cb-line">
248 <td class="cb-line">
249 <div>
249 <div>
250 ${_('Unmatched inline comments below')}
250 ${_('Unmatched inline comments below')}
251 </div>
251 </div>
252 </td>
252 </td>
253 <td colspan="2"></td>
253 <td colspan="2"></td>
254 <td class="cb-line">
254 <td class="cb-line">
255 <div>
255 <div>
256 ${_('Unmatched comments below')}
256 ${_('Unmatched comments below')}
257 </div>
257 </div>
258 </td>
258 </td>
259 </tr>
259 </tr>
260 % endif
260 % endif
261 <tr class="cb-line">
261 <tr class="cb-line">
262 <td class="cb-data cb-context"></td>
262 <td class="cb-data cb-context"></td>
263 <td class="cb-lineno cb-context"></td>
263 <td class="cb-lineno cb-context"></td>
264 <td class="cb-content cb-context">
264 <td class="cb-content cb-context">
265 % if lineno.startswith('o'):
265 % if lineno.startswith('o'):
266 ${inline_comments_container(comments, inline_comments)}
266 ${inline_comments_container(comments, inline_comments)}
267 % endif
267 % endif
268 </td>
268 </td>
269
269
270 <td class="cb-data cb-context"></td>
270 <td class="cb-data cb-context"></td>
271 <td class="cb-lineno cb-context"></td>
271 <td class="cb-lineno cb-context"></td>
272 <td class="cb-content cb-context">
272 <td class="cb-content cb-context">
273 % if lineno.startswith('n'):
273 % if lineno.startswith('n'):
274 ${inline_comments_container(comments, inline_comments)}
274 ${inline_comments_container(comments, inline_comments)}
275 % endif
275 % endif
276 </td>
276 </td>
277 </tr>
277 </tr>
278 %endif
278 %endif
279
279
280 % endfor
280 % endfor
281
281
282 </table>
282 </table>
283 </div>
283 </div>
284 %endfor
284 %endfor
285
285
286 ## outdated comments that are made for a file that has been deleted
286 ## outdated comments that are made for a file that has been deleted
287 % for filename, comments_dict in (deleted_files_comments or {}).items():
287 % for filename, comments_dict in (deleted_files_comments or {}).items():
288 <%
288 <%
289 display_state = 'display: none'
289 display_state = 'display: none'
290 open_comments_in_file = [x for x in comments_dict['comments'] if x.outdated is False]
290 open_comments_in_file = [x for x in comments_dict['comments'] if x.outdated is False]
291 if open_comments_in_file:
291 if open_comments_in_file:
292 display_state = ''
292 display_state = ''
293 %>
293 %>
294 <div class="filediffs filediff-outdated" style="${display_state}">
294 <div class="filediffs filediff-outdated" style="${display_state}">
295 <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filename)}" type="checkbox" onchange="updateSticky();">
295 <input ${(collapse_all and 'checked' or '')} class="filediff-collapse-state" id="filediff-collapse-${id(filename)}" type="checkbox" onchange="updateSticky();">
296 <div class="filediff" data-f-path="${filename}" id="a_${h.FID(filediff.raw_id, filename)}">
296 <div class="filediff" data-f-path="${filename}" id="a_${h.FID(filediff.raw_id, filename)}">
297 <label for="filediff-collapse-${id(filename)}" class="filediff-heading">
297 <label for="filediff-collapse-${id(filename)}" class="filediff-heading">
298 <div class="filediff-collapse-indicator"></div>
298 <div class="filediff-collapse-indicator"></div>
299 <span class="pill">
299 <span class="pill">
300 ## file was deleted
300 ## file was deleted
301 <strong>${filename}</strong>
301 <strong>${filename}</strong>
302 </span>
302 </span>
303 <span class="pill-group" style="float: left">
303 <span class="pill-group" style="float: left">
304 ## file op, doesn't need translation
304 ## file op, doesn't need translation
305 <span class="pill" op="removed">removed in this version</span>
305 <span class="pill" op="removed">removed in this version</span>
306 </span>
306 </span>
307 <a class="pill filediff-anchor" href="#a_${h.FID(filediff.raw_id, filename)}"></a>
307 <a class="pill filediff-anchor" href="#a_${h.FID(filediff.raw_id, filename)}"></a>
308 <span class="pill-group" style="float: right">
308 <span class="pill-group" style="float: right">
309 <span class="pill" op="deleted">-${comments_dict['stats']}</span>
309 <span class="pill" op="deleted">-${comments_dict['stats']}</span>
310 </span>
310 </span>
311 </label>
311 </label>
312
312
313 <table class="cb cb-diff-${c.user_session_attrs["diffmode"]} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}">
313 <table class="cb cb-diff-${c.user_session_attrs["diffmode"]} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}">
314 <tr>
314 <tr>
315 % if c.user_session_attrs["diffmode"] == 'unified':
315 % if c.user_session_attrs["diffmode"] == 'unified':
316 <td></td>
316 <td></td>
317 %endif
317 %endif
318
318
319 <td></td>
319 <td></td>
320 <td class="cb-text cb-${op_class(BIN_FILENODE)}" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=5')}>
320 <td class="cb-text cb-${op_class(BIN_FILENODE)}" ${(c.user_session_attrs["diffmode"] == 'unified' and 'colspan=4' or 'colspan=5')}>
321 ${_('File was deleted in this version. There are still outdated/unresolved comments attached to it.')}
321 ${_('File was deleted in this version. There are still outdated/unresolved comments attached to it.')}
322 </td>
322 </td>
323 </tr>
323 </tr>
324 %if c.user_session_attrs["diffmode"] == 'unified':
324 %if c.user_session_attrs["diffmode"] == 'unified':
325 <tr class="cb-line">
325 <tr class="cb-line">
326 <td class="cb-data cb-context"></td>
326 <td class="cb-data cb-context"></td>
327 <td class="cb-lineno cb-context"></td>
327 <td class="cb-lineno cb-context"></td>
328 <td class="cb-lineno cb-context"></td>
328 <td class="cb-lineno cb-context"></td>
329 <td class="cb-content cb-context">
329 <td class="cb-content cb-context">
330 ${inline_comments_container(comments_dict['comments'], inline_comments)}
330 ${inline_comments_container(comments_dict['comments'], inline_comments)}
331 </td>
331 </td>
332 </tr>
332 </tr>
333 %elif c.user_session_attrs["diffmode"] == 'sideside':
333 %elif c.user_session_attrs["diffmode"] == 'sideside':
334 <tr class="cb-line">
334 <tr class="cb-line">
335 <td class="cb-data cb-context"></td>
335 <td class="cb-data cb-context"></td>
336 <td class="cb-lineno cb-context"></td>
336 <td class="cb-lineno cb-context"></td>
337 <td class="cb-content cb-context"></td>
337 <td class="cb-content cb-context"></td>
338
338
339 <td class="cb-data cb-context"></td>
339 <td class="cb-data cb-context"></td>
340 <td class="cb-lineno cb-context"></td>
340 <td class="cb-lineno cb-context"></td>
341 <td class="cb-content cb-context">
341 <td class="cb-content cb-context">
342 ${inline_comments_container(comments_dict['comments'], inline_comments)}
342 ${inline_comments_container(comments_dict['comments'], inline_comments)}
343 </td>
343 </td>
344 </tr>
344 </tr>
345 %endif
345 %endif
346 </table>
346 </table>
347 </div>
347 </div>
348 </div>
348 </div>
349 % endfor
349 % endfor
350
350
351 </div>
351 </div>
352 </div>
352 </div>
353 </%def>
353 </%def>
354
354
355 <%def name="diff_ops(filediff)">
355 <%def name="diff_ops(filediff)">
356 <%
356 <%
357 from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
357 from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
358 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE
358 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE
359 %>
359 %>
360 <span class="pill">
360 <span class="pill">
361 %if filediff.source_file_path and filediff.target_file_path:
361 %if filediff.source_file_path and filediff.target_file_path:
362 %if filediff.source_file_path != filediff.target_file_path:
362 %if filediff.source_file_path != filediff.target_file_path:
363 ## file was renamed, or copied
363 ## file was renamed, or copied
364 %if RENAMED_FILENODE in filediff.patch['stats']['ops']:
364 %if RENAMED_FILENODE in filediff.patch['stats']['ops']:
365 <strong>${filediff.target_file_path}</strong><del>${filediff.source_file_path}</del>
365 <strong>${filediff.target_file_path}</strong><del>${filediff.source_file_path}</del>
366 <% final_path = filediff.target_file_path %>
366 <% final_path = filediff.target_file_path %>
367 %elif COPIED_FILENODE in filediff.patch['stats']['ops']:
367 %elif COPIED_FILENODE in filediff.patch['stats']['ops']:
368 <strong>${filediff.target_file_path}</strong>${filediff.source_file_path}
368 <strong>${filediff.target_file_path}</strong>${filediff.source_file_path}
369 <% final_path = filediff.target_file_path %>
369 <% final_path = filediff.target_file_path %>
370 %endif
370 %endif
371 %else:
371 %else:
372 ## file was modified
372 ## file was modified
373 <strong>${filediff.source_file_path}</strong>
373 <strong>${filediff.source_file_path}</strong>
374 <% final_path = filediff.source_file_path %>
374 <% final_path = filediff.source_file_path %>
375 %endif
375 %endif
376 %else:
376 %else:
377 %if filediff.source_file_path:
377 %if filediff.source_file_path:
378 ## file was deleted
378 ## file was deleted
379 <strong>${filediff.source_file_path}</strong>
379 <strong>${filediff.source_file_path}</strong>
380 <% final_path = filediff.source_file_path %>
380 <% final_path = filediff.source_file_path %>
381 %else:
381 %else:
382 ## file was added
382 ## file was added
383 <strong>${filediff.target_file_path}</strong>
383 <strong>${filediff.target_file_path}</strong>
384 <% final_path = filediff.target_file_path %>
384 <% final_path = filediff.target_file_path %>
385 %endif
385 %endif
386 %endif
386 %endif
387 <i style="color: #aaa" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="${_('Copy the full path')}" onclick="return false;"></i>
387 <i style="color: #aaa" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="${_('Copy the full path')}" onclick="return false;"></i>
388 </span>
388 </span>
389 ## anchor link
389 ## anchor link
390 <a class="pill filediff-anchor" href="#a_${h.FID(filediff.raw_id, filediff.patch['filename'])}"></a>
390 <a class="pill filediff-anchor" href="#a_${h.FID(filediff.raw_id, filediff.patch['filename'])}"></a>
391
391
392 <span class="pill-group" style="float: right">
392 <span class="pill-group" style="float: right">
393
393
394 ## ops pills
394 ## ops pills
395 %if filediff.limited_diff:
395 %if filediff.limited_diff:
396 <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span>
396 <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span>
397 %endif
397 %endif
398
398
399 %if NEW_FILENODE in filediff.patch['stats']['ops']:
399 %if NEW_FILENODE in filediff.patch['stats']['ops']:
400 <span class="pill" op="created">created</span>
400 <span class="pill" op="created">created</span>
401 %if filediff['target_mode'].startswith('120'):
401 %if filediff['target_mode'].startswith('120'):
402 <span class="pill" op="symlink">symlink</span>
402 <span class="pill" op="symlink">symlink</span>
403 %else:
403 %else:
404 <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span>
404 <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span>
405 %endif
405 %endif
406 %endif
406 %endif
407
407
408 %if RENAMED_FILENODE in filediff.patch['stats']['ops']:
408 %if RENAMED_FILENODE in filediff.patch['stats']['ops']:
409 <span class="pill" op="renamed">renamed</span>
409 <span class="pill" op="renamed">renamed</span>
410 %endif
410 %endif
411
411
412 %if COPIED_FILENODE in filediff.patch['stats']['ops']:
412 %if COPIED_FILENODE in filediff.patch['stats']['ops']:
413 <span class="pill" op="copied">copied</span>
413 <span class="pill" op="copied">copied</span>
414 %endif
414 %endif
415
415
416 %if DEL_FILENODE in filediff.patch['stats']['ops']:
416 %if DEL_FILENODE in filediff.patch['stats']['ops']:
417 <span class="pill" op="removed">removed</span>
417 <span class="pill" op="removed">removed</span>
418 %endif
418 %endif
419
419
420 %if CHMOD_FILENODE in filediff.patch['stats']['ops']:
420 %if CHMOD_FILENODE in filediff.patch['stats']['ops']:
421 <span class="pill" op="mode">
421 <span class="pill" op="mode">
422 ${nice_mode(filediff['source_mode'])}${nice_mode(filediff['target_mode'])}
422 ${nice_mode(filediff['source_mode'])}${nice_mode(filediff['target_mode'])}
423 </span>
423 </span>
424 %endif
424 %endif
425
425
426 %if BIN_FILENODE in filediff.patch['stats']['ops']:
426 %if BIN_FILENODE in filediff.patch['stats']['ops']:
427 <span class="pill" op="binary">binary</span>
427 <span class="pill" op="binary">binary</span>
428 %if MOD_FILENODE in filediff.patch['stats']['ops']:
428 %if MOD_FILENODE in filediff.patch['stats']['ops']:
429 <span class="pill" op="modified">modified</span>
429 <span class="pill" op="modified">modified</span>
430 %endif
430 %endif
431 %endif
431 %endif
432
432
433 <span class="pill" op="added">${('+' if filediff.patch['stats']['added'] else '')}${filediff.patch['stats']['added']}</span>
433 <span class="pill" op="added">${('+' if filediff.patch['stats']['added'] else '')}${filediff.patch['stats']['added']}</span>
434 <span class="pill" op="deleted">${((h.safe_int(filediff.patch['stats']['deleted']) or 0) * -1)}</span>
434 <span class="pill" op="deleted">${((h.safe_int(filediff.patch['stats']['deleted']) or 0) * -1)}</span>
435
435
436 </span>
436 </span>
437
437
438 </%def>
438 </%def>
439
439
440 <%def name="nice_mode(filemode)">
440 <%def name="nice_mode(filemode)">
441 ${(filemode.startswith('100') and filemode[3:] or filemode)}
441 ${(filemode.startswith('100') and filemode[3:] or filemode)}
442 </%def>
442 </%def>
443
443
444 <%def name="diff_menu(filediff, use_comments=False)">
444 <%def name="diff_menu(filediff, use_comments=False)">
445 <div class="filediff-menu">
445 <div class="filediff-menu">
446
446
447 %if filediff.diffset.source_ref:
447 %if filediff.diffset.source_ref:
448
448
449 ## FILE BEFORE CHANGES
449 ## FILE BEFORE CHANGES
450 %if filediff.operation in ['D', 'M']:
450 %if filediff.operation in ['D', 'M']:
451 <a
451 <a
452 class="tooltip"
452 class="tooltip"
453 href="${h.route_path('repo_files',repo_name=filediff.diffset.target_repo_name,commit_id=filediff.diffset.source_ref,f_path=filediff.source_file_path)}"
453 href="${h.route_path('repo_files',repo_name=filediff.diffset.target_repo_name,commit_id=filediff.diffset.source_ref,f_path=filediff.source_file_path)}"
454 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
454 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
455 >
455 >
456 ${_('Show file before')}
456 ${_('Show file before')}
457 </a> |
457 </a> |
458 %else:
458 %else:
459 <span
459 <span
460 class="tooltip"
460 class="tooltip"
461 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
461 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
462 >
462 >
463 ${_('Show file before')}
463 ${_('Show file before')}
464 </span> |
464 </span> |
465 %endif
465 %endif
466
466
467 ## FILE AFTER CHANGES
467 ## FILE AFTER CHANGES
468 %if filediff.operation in ['A', 'M']:
468 %if filediff.operation in ['A', 'M']:
469 <a
469 <a
470 class="tooltip"
470 class="tooltip"
471 href="${h.route_path('repo_files',repo_name=filediff.diffset.source_repo_name,commit_id=filediff.diffset.target_ref,f_path=filediff.target_file_path)}"
471 href="${h.route_path('repo_files',repo_name=filediff.diffset.source_repo_name,commit_id=filediff.diffset.target_ref,f_path=filediff.target_file_path)}"
472 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
472 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
473 >
473 >
474 ${_('Show file after')}
474 ${_('Show file after')}
475 </a>
475 </a>
476 %else:
476 %else:
477 <span
477 <span
478 class="tooltip"
478 class="tooltip"
479 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
479 title="${h.tooltip(_('File not present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
480 >
480 >
481 ${_('Show file after')}
481 ${_('Show file after')}
482 </span>
482 </span>
483 %endif
483 %endif
484
484
485 % if use_comments:
485 % if use_comments:
486 |
486 |
487 <a href="#" onclick="return Rhodecode.comments.toggleComments(this);">
487 <a href="#" onclick="return Rhodecode.comments.toggleComments(this);">
488 <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span>
488 <span class="show-comment-button">${_('Show comments')}</span><span class="hide-comment-button">${_('Hide comments')}</span>
489 </a>
489 </a>
490 % endif
490 % endif
491
491
492 %endif
492 %endif
493
493
494 </div>
494 </div>
495 </%def>
495 </%def>
496
496
497
497
498 <%def name="inline_comments_container(comments, inline_comments)">
498 <%def name="inline_comments_container(comments, inline_comments)">
499 <div class="inline-comments">
499 <div class="inline-comments">
500 %for comment in comments:
500 %for comment in comments:
501 ${commentblock.comment_block(comment, inline=True)}
501 ${commentblock.comment_block(comment, inline=True)}
502 %endfor
502 %endfor
503 % if comments and comments[-1].outdated:
503 % if comments and comments[-1].outdated:
504 <span class="btn btn-secondary cb-comment-add-button comment-outdated}"
504 <span class="btn btn-secondary cb-comment-add-button comment-outdated}"
505 style="display: none;}">
505 style="display: none;}">
506 ${_('Add another comment')}
506 ${_('Add another comment')}
507 </span>
507 </span>
508 % else:
508 % else:
509 <span onclick="return Rhodecode.comments.createComment(this)"
509 <span onclick="return Rhodecode.comments.createComment(this)"
510 class="btn btn-secondary cb-comment-add-button">
510 class="btn btn-secondary cb-comment-add-button">
511 ${_('Add another comment')}
511 ${_('Add another comment')}
512 </span>
512 </span>
513 % endif
513 % endif
514
514
515 </div>
515 </div>
516 </%def>
516 </%def>
517
517
518 <%!
518 <%!
519 def get_comments_for(diff_type, comments, filename, line_version, line_number):
519 def get_comments_for(diff_type, comments, filename, line_version, line_number):
520 if hasattr(filename, 'unicode_path'):
520 if hasattr(filename, 'unicode_path'):
521 filename = filename.unicode_path
521 filename = filename.unicode_path
522
522
523 if not isinstance(filename, (unicode, str)):
523 if not isinstance(filename, (unicode, str)):
524 return None
524 return None
525
525
526 line_key = '{}{}'.format(line_version, line_number) ## e.g o37, n12
526 line_key = '{}{}'.format(line_version, line_number) ## e.g o37, n12
527
527
528 if comments and filename in comments:
528 if comments and filename in comments:
529 file_comments = comments[filename]
529 file_comments = comments[filename]
530 if line_key in file_comments:
530 if line_key in file_comments:
531 data = file_comments.pop(line_key)
531 data = file_comments.pop(line_key)
532 return data
532 return data
533 %>
533 %>
534
534
535 <%def name="render_hunk_lines_sideside(filediff, hunk, use_comments=False, inline_comments=None)">
535 <%def name="render_hunk_lines_sideside(filediff, hunk, use_comments=False, inline_comments=None)">
536 %for i, line in enumerate(hunk.sideside):
536 %for i, line in enumerate(hunk.sideside):
537 <%
537 <%
538 old_line_anchor, new_line_anchor = None, None
538 old_line_anchor, new_line_anchor = None, None
539
539
540 if line.original.lineno:
540 if line.original.lineno:
541 old_line_anchor = diff_line_anchor(filediff.raw_id, hunk.source_file_path, line.original.lineno, 'o')
541 old_line_anchor = diff_line_anchor(filediff.raw_id, hunk.source_file_path, line.original.lineno, 'o')
542 if line.modified.lineno:
542 if line.modified.lineno:
543 new_line_anchor = diff_line_anchor(filediff.raw_id, hunk.target_file_path, line.modified.lineno, 'n')
543 new_line_anchor = diff_line_anchor(filediff.raw_id, hunk.target_file_path, line.modified.lineno, 'n')
544 %>
544 %>
545
545
546 <tr class="cb-line">
546 <tr class="cb-line">
547 <td class="cb-data ${action_class(line.original.action)}"
547 <td class="cb-data ${action_class(line.original.action)}"
548 data-line-no="${line.original.lineno}"
548 data-line-no="${line.original.lineno}"
549 >
549 >
550 <div>
550 <div>
551
551
552 <% line_old_comments = None %>
552 <% line_old_comments = None %>
553 %if line.original.get_comment_args:
553 %if line.original.get_comment_args:
554 <% line_old_comments = get_comments_for('side-by-side', inline_comments, *line.original.get_comment_args) %>
554 <% line_old_comments = get_comments_for('side-by-side', inline_comments, *line.original.get_comment_args) %>
555 %endif
555 %endif
556 %if line_old_comments:
556 %if line_old_comments:
557 <% has_outdated = any([x.outdated for x in line_old_comments]) %>
557 <% has_outdated = any([x.outdated for x in line_old_comments]) %>
558 % if has_outdated:
558 % if has_outdated:
559 <i title="${_('comments including outdated')}:${len(line_old_comments)}" class="icon-comment_toggle" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
559 <i title="${_('comments including outdated')}:${len(line_old_comments)}" class="icon-comment-toggle" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
560 % else:
560 % else:
561 <i title="${_('comments')}: ${len(line_old_comments)}" class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
561 <i title="${_('comments')}: ${len(line_old_comments)}" class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
562 % endif
562 % endif
563 %endif
563 %endif
564 </div>
564 </div>
565 </td>
565 </td>
566 <td class="cb-lineno ${action_class(line.original.action)}"
566 <td class="cb-lineno ${action_class(line.original.action)}"
567 data-line-no="${line.original.lineno}"
567 data-line-no="${line.original.lineno}"
568 %if old_line_anchor:
568 %if old_line_anchor:
569 id="${old_line_anchor}"
569 id="${old_line_anchor}"
570 %endif
570 %endif
571 >
571 >
572 %if line.original.lineno:
572 %if line.original.lineno:
573 <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a>
573 <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a>
574 %endif
574 %endif
575 </td>
575 </td>
576 <td class="cb-content ${action_class(line.original.action)}"
576 <td class="cb-content ${action_class(line.original.action)}"
577 data-line-no="o${line.original.lineno}"
577 data-line-no="o${line.original.lineno}"
578 >
578 >
579 %if use_comments and line.original.lineno:
579 %if use_comments and line.original.lineno:
580 ${render_add_comment_button()}
580 ${render_add_comment_button()}
581 %endif
581 %endif
582 <span class="cb-code"><span class="cb-action ${action_class(line.original.action)}"></span>${line.original.content or '' | n}</span>
582 <span class="cb-code"><span class="cb-action ${action_class(line.original.action)}"></span>${line.original.content or '' | n}</span>
583
583
584 %if use_comments and line.original.lineno and line_old_comments:
584 %if use_comments and line.original.lineno and line_old_comments:
585 ${inline_comments_container(line_old_comments, inline_comments)}
585 ${inline_comments_container(line_old_comments, inline_comments)}
586 %endif
586 %endif
587
587
588 </td>
588 </td>
589 <td class="cb-data ${action_class(line.modified.action)}"
589 <td class="cb-data ${action_class(line.modified.action)}"
590 data-line-no="${line.modified.lineno}"
590 data-line-no="${line.modified.lineno}"
591 >
591 >
592 <div>
592 <div>
593
593
594 %if line.modified.get_comment_args:
594 %if line.modified.get_comment_args:
595 <% line_new_comments = get_comments_for('side-by-side', inline_comments, *line.modified.get_comment_args) %>
595 <% line_new_comments = get_comments_for('side-by-side', inline_comments, *line.modified.get_comment_args) %>
596 %else:
596 %else:
597 <% line_new_comments = None%>
597 <% line_new_comments = None%>
598 %endif
598 %endif
599 %if line_new_comments:
599 %if line_new_comments:
600 <% has_outdated = any([x.outdated for x in line_new_comments]) %>
600 <% has_outdated = any([x.outdated for x in line_new_comments]) %>
601 % if has_outdated:
601 % if has_outdated:
602 <i title="${_('comments including outdated')}:${len(line_new_comments)}" class="icon-comment_toggle" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
602 <i title="${_('comments including outdated')}:${len(line_new_comments)}" class="icon-comment-toggle" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
603 % else:
603 % else:
604 <i title="${_('comments')}: ${len(line_new_comments)}" class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
604 <i title="${_('comments')}: ${len(line_new_comments)}" class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
605 % endif
605 % endif
606 %endif
606 %endif
607 </div>
607 </div>
608 </td>
608 </td>
609 <td class="cb-lineno ${action_class(line.modified.action)}"
609 <td class="cb-lineno ${action_class(line.modified.action)}"
610 data-line-no="${line.modified.lineno}"
610 data-line-no="${line.modified.lineno}"
611 %if new_line_anchor:
611 %if new_line_anchor:
612 id="${new_line_anchor}"
612 id="${new_line_anchor}"
613 %endif
613 %endif
614 >
614 >
615 %if line.modified.lineno:
615 %if line.modified.lineno:
616 <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a>
616 <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a>
617 %endif
617 %endif
618 </td>
618 </td>
619 <td class="cb-content ${action_class(line.modified.action)}"
619 <td class="cb-content ${action_class(line.modified.action)}"
620 data-line-no="n${line.modified.lineno}"
620 data-line-no="n${line.modified.lineno}"
621 >
621 >
622 %if use_comments and line.modified.lineno:
622 %if use_comments and line.modified.lineno:
623 ${render_add_comment_button()}
623 ${render_add_comment_button()}
624 %endif
624 %endif
625 <span class="cb-code"><span class="cb-action ${action_class(line.modified.action)}"></span>${line.modified.content or '' | n}</span>
625 <span class="cb-code"><span class="cb-action ${action_class(line.modified.action)}"></span>${line.modified.content or '' | n}</span>
626 %if use_comments and line.modified.lineno and line_new_comments:
626 %if use_comments and line.modified.lineno and line_new_comments:
627 ${inline_comments_container(line_new_comments, inline_comments)}
627 ${inline_comments_container(line_new_comments, inline_comments)}
628 %endif
628 %endif
629 </td>
629 </td>
630 </tr>
630 </tr>
631 %endfor
631 %endfor
632 </%def>
632 </%def>
633
633
634
634
635 <%def name="render_hunk_lines_unified(filediff, hunk, use_comments=False, inline_comments=None)">
635 <%def name="render_hunk_lines_unified(filediff, hunk, use_comments=False, inline_comments=None)">
636 %for old_line_no, new_line_no, action, content, comments_args in hunk.unified:
636 %for old_line_no, new_line_no, action, content, comments_args in hunk.unified:
637
637
638 <%
638 <%
639 old_line_anchor, new_line_anchor = None, None
639 old_line_anchor, new_line_anchor = None, None
640 if old_line_no:
640 if old_line_no:
641 old_line_anchor = diff_line_anchor(filediff.raw_id, hunk.source_file_path, old_line_no, 'o')
641 old_line_anchor = diff_line_anchor(filediff.raw_id, hunk.source_file_path, old_line_no, 'o')
642 if new_line_no:
642 if new_line_no:
643 new_line_anchor = diff_line_anchor(filediff.raw_id, hunk.target_file_path, new_line_no, 'n')
643 new_line_anchor = diff_line_anchor(filediff.raw_id, hunk.target_file_path, new_line_no, 'n')
644 %>
644 %>
645 <tr class="cb-line">
645 <tr class="cb-line">
646 <td class="cb-data ${action_class(action)}">
646 <td class="cb-data ${action_class(action)}">
647 <div>
647 <div>
648
648
649 %if comments_args:
649 %if comments_args:
650 <% comments = get_comments_for('unified', inline_comments, *comments_args) %>
650 <% comments = get_comments_for('unified', inline_comments, *comments_args) %>
651 %else:
651 %else:
652 <% comments = None %>
652 <% comments = None %>
653 %endif
653 %endif
654
654
655 % if comments:
655 % if comments:
656 <% has_outdated = any([x.outdated for x in comments]) %>
656 <% has_outdated = any([x.outdated for x in comments]) %>
657 % if has_outdated:
657 % if has_outdated:
658 <i title="${_('comments including outdated')}:${len(comments)}" class="icon-comment_toggle" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
658 <i title="${_('comments including outdated')}:${len(comments)}" class="icon-comment-toggle" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
659 % else:
659 % else:
660 <i title="${_('comments')}: ${len(comments)}" class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
660 <i title="${_('comments')}: ${len(comments)}" class="icon-comment" onclick="return Rhodecode.comments.toggleLineComments(this)"></i>
661 % endif
661 % endif
662 % endif
662 % endif
663 </div>
663 </div>
664 </td>
664 </td>
665 <td class="cb-lineno ${action_class(action)}"
665 <td class="cb-lineno ${action_class(action)}"
666 data-line-no="${old_line_no}"
666 data-line-no="${old_line_no}"
667 %if old_line_anchor:
667 %if old_line_anchor:
668 id="${old_line_anchor}"
668 id="${old_line_anchor}"
669 %endif
669 %endif
670 >
670 >
671 %if old_line_anchor:
671 %if old_line_anchor:
672 <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a>
672 <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a>
673 %endif
673 %endif
674 </td>
674 </td>
675 <td class="cb-lineno ${action_class(action)}"
675 <td class="cb-lineno ${action_class(action)}"
676 data-line-no="${new_line_no}"
676 data-line-no="${new_line_no}"
677 %if new_line_anchor:
677 %if new_line_anchor:
678 id="${new_line_anchor}"
678 id="${new_line_anchor}"
679 %endif
679 %endif
680 >
680 >
681 %if new_line_anchor:
681 %if new_line_anchor:
682 <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a>
682 <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a>
683 %endif
683 %endif
684 </td>
684 </td>
685 <td class="cb-content ${action_class(action)}"
685 <td class="cb-content ${action_class(action)}"
686 data-line-no="${(new_line_no and 'n' or 'o')}${(new_line_no or old_line_no)}"
686 data-line-no="${(new_line_no and 'n' or 'o')}${(new_line_no or old_line_no)}"
687 >
687 >
688 %if use_comments:
688 %if use_comments:
689 ${render_add_comment_button()}
689 ${render_add_comment_button()}
690 %endif
690 %endif
691 <span class="cb-code"><span class="cb-action ${action_class(action)}"></span> ${content or '' | n}</span>
691 <span class="cb-code"><span class="cb-action ${action_class(action)}"></span> ${content or '' | n}</span>
692 %if use_comments and comments:
692 %if use_comments and comments:
693 ${inline_comments_container(comments, inline_comments)}
693 ${inline_comments_container(comments, inline_comments)}
694 %endif
694 %endif
695 </td>
695 </td>
696 </tr>
696 </tr>
697 %endfor
697 %endfor
698 </%def>
698 </%def>
699
699
700
700
701 <%def name="render_hunk_lines(filediff, diff_mode, hunk, use_comments, inline_comments)">
701 <%def name="render_hunk_lines(filediff, diff_mode, hunk, use_comments, inline_comments)">
702 % if diff_mode == 'unified':
702 % if diff_mode == 'unified':
703 ${render_hunk_lines_unified(filediff, hunk, use_comments=use_comments, inline_comments=inline_comments)}
703 ${render_hunk_lines_unified(filediff, hunk, use_comments=use_comments, inline_comments=inline_comments)}
704 % elif diff_mode == 'sideside':
704 % elif diff_mode == 'sideside':
705 ${render_hunk_lines_sideside(filediff, hunk, use_comments=use_comments, inline_comments=inline_comments)}
705 ${render_hunk_lines_sideside(filediff, hunk, use_comments=use_comments, inline_comments=inline_comments)}
706 % else:
706 % else:
707 <tr class="cb-line">
707 <tr class="cb-line">
708 <td>unknown diff mode</td>
708 <td>unknown diff mode</td>
709 </tr>
709 </tr>
710 % endif
710 % endif
711 </%def>file changes
711 </%def>file changes
712
712
713
713
714 <%def name="render_add_comment_button()">
714 <%def name="render_add_comment_button()">
715 <button class="btn btn-small btn-primary cb-comment-box-opener" onclick="return Rhodecode.comments.createComment(this)">
715 <button class="btn btn-small btn-primary cb-comment-box-opener" onclick="return Rhodecode.comments.createComment(this)">
716 <span><i class="icon-comment"></i></span>
716 <span><i class="icon-comment"></i></span>
717 </button>
717 </button>
718 </%def>
718 </%def>
719
719
720 <%def name="render_diffset_menu(diffset=None, range_diff_on=None)">
720 <%def name="render_diffset_menu(diffset=None, range_diff_on=None)">
721
721
722 <div id="diff-file-sticky" class="diffset-menu clearinner">
722 <div id="diff-file-sticky" class="diffset-menu clearinner">
723 ## auto adjustable
723 ## auto adjustable
724 <div class="sidebar__inner">
724 <div class="sidebar__inner">
725 <div class="sidebar__bar">
725 <div class="sidebar__bar">
726 <div class="pull-right">
726 <div class="pull-right">
727 <div class="btn-group">
727 <div class="btn-group">
728
728
729 ## DIFF OPTIONS via Select2
729 ## DIFF OPTIONS via Select2
730 <div class="pull-left">
730 <div class="pull-left">
731 ${h.hidden('diff_menu')}
731 ${h.hidden('diff_menu')}
732 </div>
732 </div>
733
733
734 <a
734 <a
735 class="btn ${(c.user_session_attrs["diffmode"] == 'sideside' and 'btn-primary')} tooltip"
735 class="btn ${(c.user_session_attrs["diffmode"] == 'sideside' and 'btn-primary')} tooltip"
736 title="${h.tooltip(_('View side by side'))}"
736 title="${h.tooltip(_('View side by side'))}"
737 href="${h.current_route_path(request, diffmode='sideside')}">
737 href="${h.current_route_path(request, diffmode='sideside')}">
738 <span>${_('Side by Side')}</span>
738 <span>${_('Side by Side')}</span>
739 </a>
739 </a>
740
740
741 <a
741 <a
742 class="btn ${(c.user_session_attrs["diffmode"] == 'unified' and 'btn-primary')} tooltip"
742 class="btn ${(c.user_session_attrs["diffmode"] == 'unified' and 'btn-primary')} tooltip"
743 title="${h.tooltip(_('View unified'))}" href="${h.current_route_path(request, diffmode='unified')}">
743 title="${h.tooltip(_('View unified'))}" href="${h.current_route_path(request, diffmode='unified')}">
744 <span>${_('Unified')}</span>
744 <span>${_('Unified')}</span>
745 </a>
745 </a>
746
746
747 % if range_diff_on is True:
747 % if range_diff_on is True:
748 <a
748 <a
749 title="${_('Turn off: Show the diff as commit range')}"
749 title="${_('Turn off: Show the diff as commit range')}"
750 class="btn btn-primary"
750 class="btn btn-primary"
751 href="${h.current_route_path(request, **{"range-diff":"0"})}">
751 href="${h.current_route_path(request, **{"range-diff":"0"})}">
752 <span>${_('Range Diff')}</span>
752 <span>${_('Range Diff')}</span>
753 </a>
753 </a>
754 % elif range_diff_on is False:
754 % elif range_diff_on is False:
755 <a
755 <a
756 title="${_('Show the diff as commit range')}"
756 title="${_('Show the diff as commit range')}"
757 class="btn"
757 class="btn"
758 href="${h.current_route_path(request, **{"range-diff":"1"})}">
758 href="${h.current_route_path(request, **{"range-diff":"1"})}">
759 <span>${_('Range Diff')}</span>
759 <span>${_('Range Diff')}</span>
760 </a>
760 </a>
761 % endif
761 % endif
762 </div>
762 </div>
763 </div>
763 </div>
764 <div class="pull-left">
764 <div class="pull-left">
765 <div class="btn-group">
765 <div class="btn-group">
766 <div class="pull-left">
766 <div class="pull-left">
767 ${h.hidden('file_filter')}
767 ${h.hidden('file_filter')}
768 </div>
768 </div>
769 <a
769 <a
770 class="btn"
770 class="btn"
771 href="#"
771 href="#"
772 onclick="$('input[class=filediff-collapse-state]').prop('checked', false); updateSticky(); return false">${_('Expand All Files')}</a>
772 onclick="$('input[class=filediff-collapse-state]').prop('checked', false); updateSticky(); return false">${_('Expand All Files')}</a>
773 <a
773 <a
774 class="btn"
774 class="btn"
775 href="#"
775 href="#"
776 onclick="$('input[class=filediff-collapse-state]').prop('checked', true); updateSticky(); return false">${_('Collapse All Files')}</a>
776 onclick="$('input[class=filediff-collapse-state]').prop('checked', true); updateSticky(); return false">${_('Collapse All Files')}</a>
777 </div>
777 </div>
778 </div>
778 </div>
779 </div>
779 </div>
780 <div class="fpath-placeholder">
780 <div class="fpath-placeholder">
781 <i class="icon-file-text"></i>
781 <i class="icon-file-text"></i>
782 <strong class="fpath-placeholder-text">
782 <strong class="fpath-placeholder-text">
783 Context file:
783 Context file:
784 </strong>
784 </strong>
785 </div>
785 </div>
786 <div class="sidebar_inner_shadow"></div>
786 <div class="sidebar_inner_shadow"></div>
787 </div>
787 </div>
788 </div>
788 </div>
789
789
790 % if diffset:
790 % if diffset:
791
791
792 %if diffset.limited_diff:
792 %if diffset.limited_diff:
793 <% file_placeholder = _ungettext('%(num)s file changed', '%(num)s files changed', diffset.changed_files) % {'num': diffset.changed_files} %>
793 <% file_placeholder = _ungettext('%(num)s file changed', '%(num)s files changed', diffset.changed_files) % {'num': diffset.changed_files} %>
794 %else:
794 %else:
795 <% file_placeholder = _ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}%>
795 <% file_placeholder = _ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}%>
796 %endif
796 %endif
797 ## case on range-diff placeholder needs to be updated
797 ## case on range-diff placeholder needs to be updated
798 % if range_diff_on is True:
798 % if range_diff_on is True:
799 <% file_placeholder = _('Disabled on range diff') %>
799 <% file_placeholder = _('Disabled on range diff') %>
800 % endif
800 % endif
801
801
802 <script>
802 <script>
803
803
804 var feedFilesOptions = function (query, initialData) {
804 var feedFilesOptions = function (query, initialData) {
805 var data = {results: []};
805 var data = {results: []};
806 var isQuery = typeof query.term !== 'undefined';
806 var isQuery = typeof query.term !== 'undefined';
807
807
808 var section = _gettext('Changed files');
808 var section = _gettext('Changed files');
809 var filteredData = [];
809 var filteredData = [];
810
810
811 //filter results
811 //filter results
812 $.each(initialData.results, function (idx, value) {
812 $.each(initialData.results, function (idx, value) {
813
813
814 if (!isQuery || query.term.length === 0 || value.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
814 if (!isQuery || query.term.length === 0 || value.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
815 filteredData.push({
815 filteredData.push({
816 'id': this.id,
816 'id': this.id,
817 'text': this.text,
817 'text': this.text,
818 "ops": this.ops,
818 "ops": this.ops,
819 })
819 })
820 }
820 }
821
821
822 });
822 });
823
823
824 data.results = filteredData;
824 data.results = filteredData;
825
825
826 query.callback(data);
826 query.callback(data);
827 };
827 };
828
828
829 var formatFileResult = function(result, container, query, escapeMarkup) {
829 var formatFileResult = function(result, container, query, escapeMarkup) {
830 return function(data, escapeMarkup) {
830 return function(data, escapeMarkup) {
831 var container = '<div class="filelist" style="padding-right:100px">{0}</div>';
831 var container = '<div class="filelist" style="padding-right:100px">{0}</div>';
832 var tmpl = '<span style="margin-right:-50px"><strong>{0}</strong></span>'.format(escapeMarkup(data['text']));
832 var tmpl = '<span style="margin-right:-50px"><strong>{0}</strong></span>'.format(escapeMarkup(data['text']));
833 var pill = '<span class="pill-group" style="float: right;margin-right: -100px">' +
833 var pill = '<span class="pill-group" style="float: right;margin-right: -100px">' +
834 '<span class="pill" op="added">{0}</span>' +
834 '<span class="pill" op="added">{0}</span>' +
835 '<span class="pill" op="deleted">{1}</span>' +
835 '<span class="pill" op="deleted">{1}</span>' +
836 '</span>'
836 '</span>'
837 ;
837 ;
838 var added = data['ops']['added'];
838 var added = data['ops']['added'];
839 if (added === 0) {
839 if (added === 0) {
840 // don't show +0
840 // don't show +0
841 added = 0;
841 added = 0;
842 } else {
842 } else {
843 added = '+' + added;
843 added = '+' + added;
844 }
844 }
845
845
846 var deleted = -1*data['ops']['deleted'];
846 var deleted = -1*data['ops']['deleted'];
847
847
848 tmpl += pill.format(added, deleted);
848 tmpl += pill.format(added, deleted);
849 return container.format(tmpl);
849 return container.format(tmpl);
850
850
851 }(result, escapeMarkup);
851 }(result, escapeMarkup);
852 };
852 };
853
853
854 var preloadFileFilterData = {
854 var preloadFileFilterData = {
855 results: [
855 results: [
856 % for filediff in diffset.files:
856 % for filediff in diffset.files:
857 {id:"a_${h.FID(filediff.raw_id, filediff.patch['filename'])}",
857 {id:"a_${h.FID(filediff.raw_id, filediff.patch['filename'])}",
858 text:"${filediff.patch['filename']}",
858 text:"${filediff.patch['filename']}",
859 ops:${h.json.dumps(filediff.patch['stats'])|n}}${('' if loop.last else ',')}
859 ops:${h.json.dumps(filediff.patch['stats'])|n}}${('' if loop.last else ',')}
860 % endfor
860 % endfor
861 ]
861 ]
862 };
862 };
863
863
864 $(document).ready(function () {
864 $(document).ready(function () {
865
865
866 var fileFilter = $("#file_filter").select2({
866 var fileFilter = $("#file_filter").select2({
867 'dropdownAutoWidth': true,
867 'dropdownAutoWidth': true,
868 'width': 'auto',
868 'width': 'auto',
869 'placeholder': "${file_placeholder}",
869 'placeholder': "${file_placeholder}",
870 containerCssClass: "drop-menu",
870 containerCssClass: "drop-menu",
871 dropdownCssClass: "drop-menu-dropdown",
871 dropdownCssClass: "drop-menu-dropdown",
872 data: preloadFileFilterData,
872 data: preloadFileFilterData,
873 query: function(query) {
873 query: function(query) {
874 feedFilesOptions(query, preloadFileFilterData);
874 feedFilesOptions(query, preloadFileFilterData);
875 },
875 },
876 formatResult: formatFileResult
876 formatResult: formatFileResult
877 });
877 });
878
878
879 % if range_diff_on is True:
879 % if range_diff_on is True:
880 fileFilter.select2("enable", false);
880 fileFilter.select2("enable", false);
881 % endif
881 % endif
882
882
883 $("#file_filter").on('click', function (e) {
883 $("#file_filter").on('click', function (e) {
884 e.preventDefault();
884 e.preventDefault();
885 var selected = $('#file_filter').select2('data');
885 var selected = $('#file_filter').select2('data');
886 var idSelector = "#"+selected.id;
886 var idSelector = "#"+selected.id;
887 window.location.hash = idSelector;
887 window.location.hash = idSelector;
888 // expand the container if we quick-select the field
888 // expand the container if we quick-select the field
889 $(idSelector).next().prop('checked', false);
889 $(idSelector).next().prop('checked', false);
890 updateSticky()
890 updateSticky()
891 });
891 });
892
892
893 var contextPrefix = _gettext('Context file: ');
893 var contextPrefix = _gettext('Context file: ');
894 ## sticky sidebar
894 ## sticky sidebar
895 var sidebarElement = document.getElementById('diff-file-sticky');
895 var sidebarElement = document.getElementById('diff-file-sticky');
896 sidebar = new StickySidebar(sidebarElement, {
896 sidebar = new StickySidebar(sidebarElement, {
897 topSpacing: 0,
897 topSpacing: 0,
898 bottomSpacing: 0,
898 bottomSpacing: 0,
899 innerWrapperSelector: '.sidebar__inner'
899 innerWrapperSelector: '.sidebar__inner'
900 });
900 });
901 sidebarElement.addEventListener('affixed.static.stickySidebar', function () {
901 sidebarElement.addEventListener('affixed.static.stickySidebar', function () {
902 // reset our file so it's not holding new value
902 // reset our file so it's not holding new value
903 $('.fpath-placeholder-text').html(contextPrefix)
903 $('.fpath-placeholder-text').html(contextPrefix)
904 });
904 });
905
905
906 updateSticky = function () {
906 updateSticky = function () {
907 sidebar.updateSticky();
907 sidebar.updateSticky();
908 Waypoint.refreshAll();
908 Waypoint.refreshAll();
909 };
909 };
910
910
911 var animateText = $.debounce(100, function(fPath, anchorId) {
911 var animateText = $.debounce(100, function(fPath, anchorId) {
912 fPath = Select2.util.escapeMarkup(fPath);
912 fPath = Select2.util.escapeMarkup(fPath);
913
913
914 // animate setting the text
914 // animate setting the text
915 var callback = function () {
915 var callback = function () {
916 $('.fpath-placeholder-text').animate({'opacity': 1.00}, 200)
916 $('.fpath-placeholder-text').animate({'opacity': 1.00}, 200)
917 $('.fpath-placeholder-text').html(contextPrefix + '<a href="#a_' + anchorId + '">' + fPath + '</a>')
917 $('.fpath-placeholder-text').html(contextPrefix + '<a href="#a_' + anchorId + '">' + fPath + '</a>')
918 };
918 };
919 $('.fpath-placeholder-text').animate({'opacity': 0.15}, 200, callback);
919 $('.fpath-placeholder-text').animate({'opacity': 0.15}, 200, callback);
920 });
920 });
921
921
922 ## dynamic file waypoints
922 ## dynamic file waypoints
923 var setFPathInfo = function(fPath, anchorId){
923 var setFPathInfo = function(fPath, anchorId){
924 animateText(fPath, anchorId)
924 animateText(fPath, anchorId)
925 };
925 };
926
926
927 var codeBlock = $('.filediff');
927 var codeBlock = $('.filediff');
928 // forward waypoint
928 // forward waypoint
929 codeBlock.waypoint(
929 codeBlock.waypoint(
930 function(direction) {
930 function(direction) {
931 if (direction === "down"){
931 if (direction === "down"){
932 setFPathInfo($(this.element).data('fPath'), $(this.element).data('anchorId'))
932 setFPathInfo($(this.element).data('fPath'), $(this.element).data('anchorId'))
933 }
933 }
934 }, {
934 }, {
935 offset: 70,
935 offset: 70,
936 context: '.fpath-placeholder'
936 context: '.fpath-placeholder'
937 }
937 }
938 );
938 );
939
939
940 // backward waypoint
940 // backward waypoint
941 codeBlock.waypoint(
941 codeBlock.waypoint(
942 function(direction) {
942 function(direction) {
943 if (direction === "up"){
943 if (direction === "up"){
944 setFPathInfo($(this.element).data('fPath'), $(this.element).data('anchorId'))
944 setFPathInfo($(this.element).data('fPath'), $(this.element).data('anchorId'))
945 }
945 }
946 }, {
946 }, {
947 offset: function () {
947 offset: function () {
948 return -this.element.clientHeight + 90
948 return -this.element.clientHeight + 90
949 },
949 },
950 context: '.fpath-placeholder'
950 context: '.fpath-placeholder'
951 }
951 }
952 );
952 );
953
953
954 var preloadDiffMenuData = {
954 var preloadDiffMenuData = {
955 results: [
955 results: [
956 ## Wide diff mode
956 ## Wide diff mode
957 {
957 {
958 id: 1,
958 id: 1,
959 text: _gettext('Toggle Wide Mode diff'),
959 text: _gettext('Toggle Wide Mode diff'),
960 action: function () {
960 action: function () {
961 updateSticky();
961 updateSticky();
962 var wide = Rhodecode.comments.toggleWideMode(this);
962 var wide = Rhodecode.comments.toggleWideMode(this);
963 storeUserSessionAttr('rc_user_session_attr.wide_diff_mode', wide);
963 storeUserSessionAttr('rc_user_session_attr.wide_diff_mode', wide);
964 return null;
964 return null;
965 },
965 },
966 url: null,
966 url: null,
967 },
967 },
968
968
969 ## Whitespace change
969 ## Whitespace change
970 % if request.GET.get('ignorews', '') == '1':
970 % if request.GET.get('ignorews', '') == '1':
971 {
971 {
972 id: 2,
972 id: 2,
973 text: _gettext('Show whitespace changes'),
973 text: _gettext('Show whitespace changes'),
974 action: function () {},
974 action: function () {},
975 url: "${h.current_route_path(request, ignorews=0)|n}"
975 url: "${h.current_route_path(request, ignorews=0)|n}"
976 },
976 },
977 % else:
977 % else:
978 {
978 {
979 id: 2,
979 id: 2,
980 text: _gettext('Hide whitespace changes'),
980 text: _gettext('Hide whitespace changes'),
981 action: function () {},
981 action: function () {},
982 url: "${h.current_route_path(request, ignorews=1)|n}"
982 url: "${h.current_route_path(request, ignorews=1)|n}"
983 },
983 },
984 % endif
984 % endif
985
985
986 ## FULL CONTEXT
986 ## FULL CONTEXT
987 % if request.GET.get('fullcontext', '') == '1':
987 % if request.GET.get('fullcontext', '') == '1':
988 {
988 {
989 id: 3,
989 id: 3,
990 text: _gettext('Hide full context diff'),
990 text: _gettext('Hide full context diff'),
991 action: function () {},
991 action: function () {},
992 url: "${h.current_route_path(request, fullcontext=0)|n}"
992 url: "${h.current_route_path(request, fullcontext=0)|n}"
993 },
993 },
994 % else:
994 % else:
995 {
995 {
996 id: 3,
996 id: 3,
997 text: _gettext('Show full context diff'),
997 text: _gettext('Show full context diff'),
998 action: function () {},
998 action: function () {},
999 url: "${h.current_route_path(request, fullcontext=1)|n}"
999 url: "${h.current_route_path(request, fullcontext=1)|n}"
1000 },
1000 },
1001 % endif
1001 % endif
1002
1002
1003 ]
1003 ]
1004 };
1004 };
1005
1005
1006 // get stored diff mode and pre-enable it
1006 // get stored diff mode and pre-enable it
1007 if (templateContext.session_attrs.wide_diff_mode === "true") {
1007 if (templateContext.session_attrs.wide_diff_mode === "true") {
1008 Rhodecode.comments.toggleWideMode(null);
1008 Rhodecode.comments.toggleWideMode(null);
1009 }
1009 }
1010
1010
1011 $("#diff_menu").select2({
1011 $("#diff_menu").select2({
1012 minimumResultsForSearch: -1,
1012 minimumResultsForSearch: -1,
1013 containerCssClass: "drop-menu",
1013 containerCssClass: "drop-menu",
1014 dropdownCssClass: "drop-menu-dropdown",
1014 dropdownCssClass: "drop-menu-dropdown",
1015 dropdownAutoWidth: true,
1015 dropdownAutoWidth: true,
1016 data: preloadDiffMenuData,
1016 data: preloadDiffMenuData,
1017 placeholder: "${_('Diff Options')}",
1017 placeholder: "${_('Diff Options')}",
1018 });
1018 });
1019 $("#diff_menu").on('select2-selecting', function (e) {
1019 $("#diff_menu").on('select2-selecting', function (e) {
1020 e.choice.action();
1020 e.choice.action();
1021 if (e.choice.url !== null) {
1021 if (e.choice.url !== null) {
1022 window.location = e.choice.url
1022 window.location = e.choice.url
1023 }
1023 }
1024 });
1024 });
1025
1025
1026 });
1026 });
1027
1027
1028 </script>
1028 </script>
1029 % endif
1029 % endif
1030
1030
1031 </%def>
1031 </%def>
@@ -1,450 +1,452 b''
1 ## DATA TABLE RE USABLE ELEMENTS
1 ## DATA TABLE RE USABLE ELEMENTS
2 ## usage:
2 ## usage:
3 ## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
3 ## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
4 <%namespace name="base" file="/base/base.mako"/>
4 <%namespace name="base" file="/base/base.mako"/>
5
5
6 <%def name="metatags_help()">
6 <%def name="metatags_help()">
7 <table>
7 <table>
8 <%
8 <%
9 example_tags = [
9 example_tags = [
10 ('state','[stable]'),
10 ('state','[stable]'),
11 ('state','[stale]'),
11 ('state','[stale]'),
12 ('state','[featured]'),
12 ('state','[featured]'),
13 ('state','[dev]'),
13 ('state','[dev]'),
14 ('state','[dead]'),
14 ('state','[dead]'),
15 ('state','[deprecated]'),
15 ('state','[deprecated]'),
16
16
17 ('label','[personal]'),
17 ('label','[personal]'),
18 ('generic','[v2.0.0]'),
18 ('generic','[v2.0.0]'),
19
19
20 ('lang','[lang =&gt; JavaScript]'),
20 ('lang','[lang =&gt; JavaScript]'),
21 ('license','[license =&gt; LicenseName]'),
21 ('license','[license =&gt; LicenseName]'),
22
22
23 ('ref','[requires =&gt; RepoName]'),
23 ('ref','[requires =&gt; RepoName]'),
24 ('ref','[recommends =&gt; GroupName]'),
24 ('ref','[recommends =&gt; GroupName]'),
25 ('ref','[conflicts =&gt; SomeName]'),
25 ('ref','[conflicts =&gt; SomeName]'),
26 ('ref','[base =&gt; SomeName]'),
26 ('ref','[base =&gt; SomeName]'),
27 ('url','[url =&gt; [linkName](https://rhodecode.com)]'),
27 ('url','[url =&gt; [linkName](https://rhodecode.com)]'),
28 ('see','[see =&gt; http://rhodecode.com]'),
28 ('see','[see =&gt; http://rhodecode.com]'),
29 ]
29 ]
30 %>
30 %>
31 % for tag_type, tag in example_tags:
31 % for tag_type, tag in example_tags:
32 <tr>
32 <tr>
33 <td>${tag|n}</td>
33 <td>${tag|n}</td>
34 <td>${h.style_metatag(tag_type, tag)|n}</td>
34 <td>${h.style_metatag(tag_type, tag)|n}</td>
35 </tr>
35 </tr>
36 % endfor
36 % endfor
37 </table>
37 </table>
38 </%def>
38 </%def>
39
39
40 ## REPOSITORY RENDERERS
40 ## REPOSITORY RENDERERS
41 <%def name="quick_menu(repo_name)">
41 <%def name="quick_menu(repo_name)">
42 <i class="icon-more"></i>
42 <i class="icon-more"></i>
43 <div class="menu_items_container hidden">
43 <div class="menu_items_container hidden">
44 <ul class="menu_items">
44 <ul class="menu_items">
45 <li>
45 <li>
46 <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
46 <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
47 <span>${_('Summary')}</span>
47 <span>${_('Summary')}</span>
48 </a>
48 </a>
49 </li>
49 </li>
50 <li>
50 <li>
51 <a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
51 <a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
52 <span>${_('Commits')}</span>
52 <span>${_('Commits')}</span>
53 </a>
53 </a>
54 </li>
54 </li>
55 <li>
55 <li>
56 <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
56 <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
57 <span>${_('Files')}</span>
57 <span>${_('Files')}</span>
58 </a>
58 </a>
59 </li>
59 </li>
60 <li>
60 <li>
61 <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
61 <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
62 <span>${_('Fork')}</span>
62 <span>${_('Fork')}</span>
63 </a>
63 </a>
64 </li>
64 </li>
65 </ul>
65 </ul>
66 </div>
66 </div>
67 </%def>
67 </%def>
68
68
69 <%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
69 <%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
70 <%
70 <%
71 def get_name(name,short_name=short_name):
71 def get_name(name,short_name=short_name):
72 if short_name:
72 if short_name:
73 return name.split('/')[-1]
73 return name.split('/')[-1]
74 else:
74 else:
75 return name
75 return name
76 %>
76 %>
77 <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
77 <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
78 ##NAME
78 ##NAME
79 <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
79 <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
80
80
81 ##TYPE OF REPO
81 ##TYPE OF REPO
82 %if h.is_hg(rtype):
82 %if h.is_hg(rtype):
83 <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
83 <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
84 %elif h.is_git(rtype):
84 %elif h.is_git(rtype):
85 <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
85 <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
86 %elif h.is_svn(rtype):
86 %elif h.is_svn(rtype):
87 <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
87 <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
88 %endif
88 %endif
89
89
90 ##PRIVATE/PUBLIC
90 ##PRIVATE/PUBLIC
91 %if private is True and c.visual.show_private_icon:
91 %if private is True and c.visual.show_private_icon:
92 <i class="icon-lock" title="${_('Private repository')}"></i>
92 <i class="icon-lock" title="${_('Private repository')}"></i>
93 %elif private is False and c.visual.show_public_icon:
93 %elif private is False and c.visual.show_public_icon:
94 <i class="icon-unlock-alt" title="${_('Public repository')}"></i>
94 <i class="icon-unlock-alt" title="${_('Public repository')}"></i>
95 %else:
95 %else:
96 <span></span>
96 <span></span>
97 %endif
97 %endif
98 ${get_name(name)}
98 ${get_name(name)}
99 </a>
99 </a>
100 %if fork_of:
100 %if fork_of:
101 <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
101 <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
102 %endif
102 %endif
103 %if rstate == 'repo_state_pending':
103 %if rstate == 'repo_state_pending':
104 <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
104 <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
105 (${_('creating...')})
105 (${_('creating...')})
106 </span>
106 </span>
107 %endif
107 %endif
108
108
109 </div>
109 </div>
110 </%def>
110 </%def>
111
111
112 <%def name="repo_desc(description, stylify_metatags)">
112 <%def name="repo_desc(description, stylify_metatags)">
113 <%
113 <%
114 tags, description = h.extract_metatags(description)
114 tags, description = h.extract_metatags(description)
115 %>
115 %>
116
116
117 <div class="truncate-wrap">
117 <div class="truncate-wrap">
118 % if stylify_metatags:
118 % if stylify_metatags:
119 % for tag_type, tag in tags:
119 % for tag_type, tag in tags:
120 ${h.style_metatag(tag_type, tag)|n}
120 ${h.style_metatag(tag_type, tag)|n}
121 % endfor
121 % endfor
122 % endif
122 % endif
123 ${description}
123 ${description}
124 </div>
124 </div>
125
125
126 </%def>
126 </%def>
127
127
128 <%def name="last_change(last_change)">
128 <%def name="last_change(last_change)">
129 ${h.age_component(last_change, time_is_local=True)}
129 ${h.age_component(last_change, time_is_local=True)}
130 </%def>
130 </%def>
131
131
132 <%def name="revision(name,rev,tip,author,last_msg, commit_date)">
132 <%def name="revision(name,rev,tip,author,last_msg, commit_date)">
133 <div>
133 <div>
134 %if rev >= 0:
134 %if rev >= 0:
135 <code><a title="${h.tooltip('%s\n%s\n\n%s' % (author, commit_date, last_msg))}" class="tooltip" href="${h.route_path('repo_commit',repo_name=name,commit_id=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></code>
135 <code><a title="${h.tooltip('%s\n%s\n\n%s' % (author, commit_date, last_msg))}" class="tooltip" href="${h.route_path('repo_commit',repo_name=name,commit_id=tip)}">${'r%s:%s' % (rev,h.short_id(tip))}</a></code>
136 %else:
136 %else:
137 ${_('No commits yet')}
137 ${_('No commits yet')}
138 %endif
138 %endif
139 </div>
139 </div>
140 </%def>
140 </%def>
141
141
142 <%def name="rss(name)">
142 <%def name="rss(name)">
143 %if c.rhodecode_user.username != h.DEFAULT_USER:
143 %if c.rhodecode_user.username != h.DEFAULT_USER:
144 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
144 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
145 %else:
145 %else:
146 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
146 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
147 %endif
147 %endif
148 </%def>
148 </%def>
149
149
150 <%def name="atom(name)">
150 <%def name="atom(name)">
151 %if c.rhodecode_user.username != h.DEFAULT_USER:
151 %if c.rhodecode_user.username != h.DEFAULT_USER:
152 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
152 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
153 %else:
153 %else:
154 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
154 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
155 %endif
155 %endif
156 </%def>
156 </%def>
157
157
158 <%def name="user_gravatar(email, size=16)">
158 <%def name="user_gravatar(email, size=16)">
159 <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
159 <div class="rc-user tooltip" title="${h.tooltip(h.author_string(email))}">
160 ${base.gravatar(email, 16)}
160 ${base.gravatar(email, 16)}
161 </div>
161 </div>
162 </%def>
162 </%def>
163
163
164 <%def name="repo_actions(repo_name, super_user=True)">
164 <%def name="repo_actions(repo_name, super_user=True)">
165 <div>
165 <div>
166 <div class="grid_edit">
166 <div class="grid_edit">
167 <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
167 <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
168 <i class="icon-pencil"></i>Edit</a>
168 Edit
169 </a>
169 </div>
170 </div>
170 <div class="grid_delete">
171 <div class="grid_delete">
171 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
172 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
172 ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
173 ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
173 onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
174 onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
174 ${h.end_form()}
175 ${h.end_form()}
175 </div>
176 </div>
176 </div>
177 </div>
177 </%def>
178 </%def>
178
179
179 <%def name="repo_state(repo_state)">
180 <%def name="repo_state(repo_state)">
180 <div>
181 <div>
181 %if repo_state == 'repo_state_pending':
182 %if repo_state == 'repo_state_pending':
182 <div class="tag tag4">${_('Creating')}</div>
183 <div class="tag tag4">${_('Creating')}</div>
183 %elif repo_state == 'repo_state_created':
184 %elif repo_state == 'repo_state_created':
184 <div class="tag tag1">${_('Created')}</div>
185 <div class="tag tag1">${_('Created')}</div>
185 %else:
186 %else:
186 <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
187 <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
187 %endif
188 %endif
188 </div>
189 </div>
189 </%def>
190 </%def>
190
191
191
192
192 ## REPO GROUP RENDERERS
193 ## REPO GROUP RENDERERS
193 <%def name="quick_repo_group_menu(repo_group_name)">
194 <%def name="quick_repo_group_menu(repo_group_name)">
194 <i class="icon-more"></i>
195 <i class="icon-more"></i>
195 <div class="menu_items_container hidden">
196 <div class="menu_items_container hidden">
196 <ul class="menu_items">
197 <ul class="menu_items">
197 <li>
198 <li>
198 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
199 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
199 </li>
200 </li>
200
201
201 </ul>
202 </ul>
202 </div>
203 </div>
203 </%def>
204 </%def>
204
205
205 <%def name="repo_group_name(repo_group_name, children_groups=None)">
206 <%def name="repo_group_name(repo_group_name, children_groups=None)">
206 <div>
207 <div>
207 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
208 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
208 <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
209 <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
209 %if children_groups:
210 %if children_groups:
210 ${h.literal(' &raquo; '.join(children_groups))}
211 ${h.literal(' &raquo; '.join(children_groups))}
211 %else:
212 %else:
212 ${repo_group_name}
213 ${repo_group_name}
213 %endif
214 %endif
214 </a>
215 </a>
215 </div>
216 </div>
216 </%def>
217 </%def>
217
218
218 <%def name="repo_group_desc(description, personal, stylify_metatags)">
219 <%def name="repo_group_desc(description, personal, stylify_metatags)">
219
220
220 <%
221 <%
221 tags, description = h.extract_metatags(description)
222 tags, description = h.extract_metatags(description)
222 %>
223 %>
223
224
224 <div class="truncate-wrap">
225 <div class="truncate-wrap">
225 % if personal:
226 % if personal:
226 <div class="metatag" tag="personal">${_('personal')}</div>
227 <div class="metatag" tag="personal">${_('personal')}</div>
227 % endif
228 % endif
228
229
229 % if stylify_metatags:
230 % if stylify_metatags:
230 % for tag_type, tag in tags:
231 % for tag_type, tag in tags:
231 ${h.style_metatag(tag_type, tag)|n}
232 ${h.style_metatag(tag_type, tag)|n}
232 % endfor
233 % endfor
233 % endif
234 % endif
234 ${description}
235 ${description}
235 </div>
236 </div>
236
237
237 </%def>
238 </%def>
238
239
239 <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
240 <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
240 <div class="grid_edit">
241 <div class="grid_edit">
241 <a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
242 <a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
242 </div>
243 </div>
243 <div class="grid_delete">
244 <div class="grid_delete">
244 ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
245 ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
245 ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
246 ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
246 onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
247 onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
247 ${h.end_form()}
248 ${h.end_form()}
248 </div>
249 </div>
249 </%def>
250 </%def>
250
251
251
252
252 <%def name="user_actions(user_id, username)">
253 <%def name="user_actions(user_id, username)">
253 <div class="grid_edit">
254 <div class="grid_edit">
254 <a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
255 <a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
255 <i class="icon-pencil"></i>${_('Edit')}</a>
256 ${_('Edit')}
257 </a>
256 </div>
258 </div>
257 <div class="grid_delete">
259 <div class="grid_delete">
258 ${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
260 ${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
259 ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
261 ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
260 onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
262 onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
261 ${h.end_form()}
263 ${h.end_form()}
262 </div>
264 </div>
263 </%def>
265 </%def>
264
266
265 <%def name="user_group_actions(user_group_id, user_group_name)">
267 <%def name="user_group_actions(user_group_id, user_group_name)">
266 <div class="grid_edit">
268 <div class="grid_edit">
267 <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
269 <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
268 </div>
270 </div>
269 <div class="grid_delete">
271 <div class="grid_delete">
270 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
272 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
271 ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
273 ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
272 onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
274 onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
273 ${h.end_form()}
275 ${h.end_form()}
274 </div>
276 </div>
275 </%def>
277 </%def>
276
278
277
279
278 <%def name="user_name(user_id, username)">
280 <%def name="user_name(user_id, username)">
279 ${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
281 ${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
280 </%def>
282 </%def>
281
283
282 <%def name="user_profile(username)">
284 <%def name="user_profile(username)">
283 ${base.gravatar_with_user(username, 16)}
285 ${base.gravatar_with_user(username, 16)}
284 </%def>
286 </%def>
285
287
286 <%def name="user_group_name(user_group_name)">
288 <%def name="user_group_name(user_group_name)">
287 <div>
289 <div>
288 <i class="icon-user-group" title="${_('User group')}"></i>
290 <i class="icon-user-group" title="${_('User group')}"></i>
289 ${h.link_to_group(user_group_name)}
291 ${h.link_to_group(user_group_name)}
290 </div>
292 </div>
291 </%def>
293 </%def>
292
294
293
295
294 ## GISTS
296 ## GISTS
295
297
296 <%def name="gist_gravatar(full_contact)">
298 <%def name="gist_gravatar(full_contact)">
297 <div class="gist_gravatar">
299 <div class="gist_gravatar">
298 ${base.gravatar(full_contact, 30)}
300 ${base.gravatar(full_contact, 30)}
299 </div>
301 </div>
300 </%def>
302 </%def>
301
303
302 <%def name="gist_access_id(gist_access_id, full_contact)">
304 <%def name="gist_access_id(gist_access_id, full_contact)">
303 <div>
305 <div>
304 <b>
306 <b>
305 <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
307 <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
306 </b>
308 </b>
307 </div>
309 </div>
308 </%def>
310 </%def>
309
311
310 <%def name="gist_author(full_contact, created_on, expires)">
312 <%def name="gist_author(full_contact, created_on, expires)">
311 ${base.gravatar_with_user(full_contact, 16)}
313 ${base.gravatar_with_user(full_contact, 16)}
312 </%def>
314 </%def>
313
315
314
316
315 <%def name="gist_created(created_on)">
317 <%def name="gist_created(created_on)">
316 <div class="created">
318 <div class="created">
317 ${h.age_component(created_on, time_is_local=True)}
319 ${h.age_component(created_on, time_is_local=True)}
318 </div>
320 </div>
319 </%def>
321 </%def>
320
322
321 <%def name="gist_expires(expires)">
323 <%def name="gist_expires(expires)">
322 <div class="created">
324 <div class="created">
323 %if expires == -1:
325 %if expires == -1:
324 ${_('never')}
326 ${_('never')}
325 %else:
327 %else:
326 ${h.age_component(h.time_to_utcdatetime(expires))}
328 ${h.age_component(h.time_to_utcdatetime(expires))}
327 %endif
329 %endif
328 </div>
330 </div>
329 </%def>
331 </%def>
330
332
331 <%def name="gist_type(gist_type)">
333 <%def name="gist_type(gist_type)">
332 %if gist_type != 'public':
334 %if gist_type != 'public':
333 <div class="tag">${_('Private')}</div>
335 <div class="tag">${_('Private')}</div>
334 %endif
336 %endif
335 </%def>
337 </%def>
336
338
337 <%def name="gist_description(gist_description)">
339 <%def name="gist_description(gist_description)">
338 ${gist_description}
340 ${gist_description}
339 </%def>
341 </%def>
340
342
341
343
342 ## PULL REQUESTS GRID RENDERERS
344 ## PULL REQUESTS GRID RENDERERS
343
345
344 <%def name="pullrequest_target_repo(repo_name)">
346 <%def name="pullrequest_target_repo(repo_name)">
345 <div class="truncate">
347 <div class="truncate">
346 ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
348 ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
347 </div>
349 </div>
348 </%def>
350 </%def>
349 <%def name="pullrequest_status(status)">
351 <%def name="pullrequest_status(status)">
350 <div class="${'flag_status %s' % status} pull-left"></div>
352 <div class="${'flag_status %s' % status} pull-left"></div>
351 </%def>
353 </%def>
352
354
353 <%def name="pullrequest_title(title, description)">
355 <%def name="pullrequest_title(title, description)">
354 ${title}
356 ${title}
355 </%def>
357 </%def>
356
358
357 <%def name="pullrequest_comments(comments_nr)">
359 <%def name="pullrequest_comments(comments_nr)">
358 <i class="icon-comment"></i> ${comments_nr}
360 <i class="icon-comment"></i> ${comments_nr}
359 </%def>
361 </%def>
360
362
361 <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
363 <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
362 <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
364 <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
363 % if short:
365 % if short:
364 #${pull_request_id}
366 #${pull_request_id}
365 % else:
367 % else:
366 ${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}}
368 ${_('Pull request #%(pr_number)s') % {'pr_number': pull_request_id,}}
367 % endif
369 % endif
368 </a>
370 </a>
369 </%def>
371 </%def>
370
372
371 <%def name="pullrequest_updated_on(updated_on)">
373 <%def name="pullrequest_updated_on(updated_on)">
372 ${h.age_component(h.time_to_utcdatetime(updated_on))}
374 ${h.age_component(h.time_to_utcdatetime(updated_on))}
373 </%def>
375 </%def>
374
376
375 <%def name="pullrequest_author(full_contact)">
377 <%def name="pullrequest_author(full_contact)">
376 ${base.gravatar_with_user(full_contact, 16)}
378 ${base.gravatar_with_user(full_contact, 16)}
377 </%def>
379 </%def>
378
380
379
381
380 ## ARTIFACT RENDERERS
382 ## ARTIFACT RENDERERS
381
383
382 <%def name="repo_artifact_uid(repo_name, file_uid)">
384 <%def name="repo_artifact_uid(repo_name, file_uid)">
383 <code><a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">${file_uid}</a></code>
385 <code><a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">${file_uid}</a></code>
384 </%def>
386 </%def>
385
387
386 <%def name="repo_artifact_uid_action(repo_name, file_uid)">
388 <%def name="repo_artifact_uid_action(repo_name, file_uid)">
387 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
389 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
388 </%def>
390 </%def>
389
391
390 <%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
392 <%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
391 ## <div class="grid_edit">
393 ## <div class="grid_edit">
392 ## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
394 ## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
393 ## </div>
395 ## </div>
394 % if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
396 % if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
395 <div class="grid_delete">
397 <div class="grid_delete">
396 ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
398 ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
397 ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
399 ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
398 onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
400 onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
399 ${h.end_form()}
401 ${h.end_form()}
400 </div>
402 </div>
401 % endif
403 % endif
402 </%def>
404 </%def>
403
405
404 <%def name="markup_form(form_id, form_text='', help_text=None)">
406 <%def name="markup_form(form_id, form_text='', help_text=None)">
405
407
406 <div class="markup-form">
408 <div class="markup-form">
407 <div class="markup-form-area">
409 <div class="markup-form-area">
408 <div class="markup-form-area-header">
410 <div class="markup-form-area-header">
409 <ul class="nav-links clearfix">
411 <ul class="nav-links clearfix">
410 <li class="active">
412 <li class="active">
411 <a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
413 <a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
412 </li>
414 </li>
413 <li class="">
415 <li class="">
414 <a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
416 <a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
415 </li>
417 </li>
416 </ul>
418 </ul>
417 </div>
419 </div>
418
420
419 <div class="markup-form-area-write" style="display: block;">
421 <div class="markup-form-area-write" style="display: block;">
420 <div id="edit-container_${form_id}">
422 <div id="edit-container_${form_id}">
421 <textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
423 <textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
422 </div>
424 </div>
423 <div id="preview-container_${form_id}" class="clearfix" style="display: none;">
425 <div id="preview-container_${form_id}" class="clearfix" style="display: none;">
424 <div id="preview-box_${form_id}" class="preview-box"></div>
426 <div id="preview-box_${form_id}" class="preview-box"></div>
425 </div>
427 </div>
426 </div>
428 </div>
427
429
428 <div class="markup-form-area-footer">
430 <div class="markup-form-area-footer">
429 <div class="toolbar">
431 <div class="toolbar">
430 <div class="toolbar-text">
432 <div class="toolbar-text">
431 ${(_('Parsed using %s syntax') % (
433 ${(_('Parsed using %s syntax') % (
432 ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
434 ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
433 )
435 )
434 )|n}
436 )|n}
435 </div>
437 </div>
436 </div>
438 </div>
437 </div>
439 </div>
438 </div>
440 </div>
439
441
440 <div class="markup-form-footer">
442 <div class="markup-form-footer">
441 % if help_text:
443 % if help_text:
442 <span class="help-block">${help_text}</span>
444 <span class="help-block">${help_text}</span>
443 % endif
445 % endif
444 </div>
446 </div>
445 </div>
447 </div>
446 <script type="text/javascript">
448 <script type="text/javascript">
447 new MarkupForm('${form_id}');
449 new MarkupForm('${form_id}');
448 </script>
450 </script>
449
451
450 </%def>
452 </%def>
@@ -1,1160 +1,1160 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%namespace name="base" file="/base/base.mako"/>
2 <%namespace name="base" file="/base/base.mako"/>
3 <%inherit file="/debug_style/index.html"/>
3 <%inherit file="/debug_style/index.html"/>
4
4
5 <%def name="breadcrumbs_links()">
5 <%def name="breadcrumbs_links()">
6 ${h.link_to(_('Style'), h.route_path('debug_style_home'))}
6 ${h.link_to(_('Style'), h.route_path('debug_style_home'))}
7 &raquo;
7 &raquo;
8 ${c.active}
8 ${c.active}
9 </%def>
9 </%def>
10
10
11 <%def name="js_extra()">
11 <%def name="js_extra()">
12 </%def>
12 </%def>
13
13
14 <%def name="css_extra()">
14 <%def name="css_extra()">
15 </%def>
15 </%def>
16
16
17
17
18 <%def name="real_main()">
18 <%def name="real_main()">
19 <div class="box">
19 <div class="box">
20 <div class="title">
20 <div class="title">
21 ${self.breadcrumbs()}
21 ${self.breadcrumbs()}
22 </div>
22 </div>
23
23
24 ##main
24 ##main
25 <div class='sidebar-col-wrapper'>
25 <div class='sidebar-col-wrapper'>
26 ${self.sidebar()}
26 ${self.sidebar()}
27
27
28 <div class="main-content">
28 <div class="main-content">
29
29
30
30
31
31
32 <h2>Code Blocks</h2>
32 <h2>Code Blocks</h2>
33
33
34 <dl class="dl-horizontal">
34 <dl class="dl-horizontal">
35 <dt><code>.codeblock</code></dt>
35 <dt><code>.codeblock</code></dt>
36 <dd>Used as a wrapping element around <code>.code-header</code> and
36 <dd>Used as a wrapping element around <code>.code-header</code> and
37 <code>.code-body</code>. Used to show the content of a file or a
37 <code>.code-body</code>. Used to show the content of a file or a
38 Gist.</dd>
38 Gist.</dd>
39
39
40 <dt><code>.diffblock</code></dt>
40 <dt><code>.diffblock</code></dt>
41 <dd>Used as a wrapping element to show a diff in a Commit or Pull
41 <dd>Used as a wrapping element to show a diff in a Commit or Pull
42 Request page. Contains usually <code>.code-header</code>,
42 Request page. Contains usually <code>.code-header</code>,
43 <code>.code-body</code> and in the edit case a <code>.message</code>.
43 <code>.code-body</code> and in the edit case a <code>.message</code>.
44 </dd>
44 </dd>
45 </dl>
45 </dl>
46
46
47
47
48 <p>Code Blocks are used in the following areas:</p>
48 <p>Code Blocks are used in the following areas:</p>
49
49
50 <ul>
50 <ul>
51 <li>Commit: Showing the Diff (still called Changeset in a few
51 <li>Commit: Showing the Diff (still called Changeset in a few
52 places).</li>
52 places).</li>
53 <li>File: Display a file, annotations, and edit a file.</li>
53 <li>File: Display a file, annotations, and edit a file.</li>
54 <li>Gist: Show the Gist and edit it.</li>
54 <li>Gist: Show the Gist and edit it.</li>
55 <li>Pull Request: Display the Diff of a Pull Request.</li>
55 <li>Pull Request: Display the Diff of a Pull Request.</li>
56 </ul>
56 </ul>
57
57
58
58
59
59
60 <!--
60 <!--
61 Compare Commits
61 Compare Commits
62 -->
62 -->
63 <h2>Compare Commits</h2>
63 <h2>Compare Commits</h2>
64
64
65 <div id="c-e589e34d6be8-5ab783e6d81b" class="diffblock margined comm">
65 <div id="c-e589e34d6be8-5ab783e6d81b" class="diffblock margined comm">
66 <div class="code-header">
66 <div class="code-header">
67 <div title="Go back to changed files overview">
67 <div title="Go back to changed files overview">
68 <a href="#changes_box">
68 <a href="#changes_box">
69 <i class="icon-circle-arrow-up"></i>
69 <i class="icon-circle-arrow-up"></i>
70 </a>
70 </a>
71 </div>
71 </div>
72 <div class="changeset_header">
72 <div class="changeset_header">
73 <div class="changeset_file">
73 <div class="changeset_file">
74 <i class="icon-file"></i>
74 <i class="icon-file"></i>
75 <a href="/example/files/e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d/rhodecode/public/css/code-block.less">rhodecode/public/css/code-block.less</a>
75 <a href="/example/files/e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d/rhodecode/public/css/code-block.less">rhodecode/public/css/code-block.less</a>
76 </div>
76 </div>
77 <div class="diff-actions">
77 <div class="diff-actions">
78 <a href="/example/diff/rhodecode/public/css/code-block.less?fulldiff=1&amp;diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=diff&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Show full diff for this file">
78 <a href="/example/diff/rhodecode/public/css/code-block.less?fulldiff=1&amp;diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=diff&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Show full diff for this file">
79 <img class="icon" src="/images/icons/page_white_go.png">
79 <img class="icon" src="/images/icons/page_white_go.png">
80 </a>
80 </a>
81 <a href="/example/diff-2way/rhodecode/public/css/code-block.less?fulldiff=1&amp;diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=diff&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Show full side-by-side diff for this file">
81 <a href="/example/diff-2way/rhodecode/public/css/code-block.less?fulldiff=1&amp;diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=diff&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Show full side-by-side diff for this file">
82 <img class="icon" src="/images/icons/application_double.png">
82 <img class="icon" src="/images/icons/application_double.png">
83 </a>
83 </a>
84 <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=raw&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Raw diff" tt_title="Raw diff">
84 <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=raw&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Raw diff" tt_title="Raw diff">
85 <img class="icon" src="/images/icons/page_white.png">
85 <img class="icon" src="/images/icons/page_white.png">
86 </a>
86 </a>
87 <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=download&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Download diff">
87 <a href="/example/diff/rhodecode/public/css/code-block.less?diff1=d12301bafcc0aea15c9283d3af018daee2b04cd9&amp;diff=download&amp;diff2=e589e34d6be8ec2b44017f6c2e0bbe782f1aba6d" class="tooltip" title="Download diff">
88 <img class="icon" src="/images/icons/page_save.png">
88 <img class="icon" src="/images/icons/page_save.png">
89 </a>
89 </a>
90 <a class="tooltip" href="/example/changeset/d12301bafcc0aea15c9283d3af018daee2b04cd9...80ead1899f50a894889e19ffeb49c9cebf5bf045?c-e589e34d6be8-5ab783e6d81b=WS%3A1&amp;c-e589e34d6be8-5ab783e6d81b=C%3A3#c-e589e34d6be8-5ab783e6d81b" title="Ignore white space"><img alt="Ignore white space" class="icon" src="/images/icons/text_strikethrough.png"></a>
90 <a class="tooltip" href="/example/changeset/d12301bafcc0aea15c9283d3af018daee2b04cd9...80ead1899f50a894889e19ffeb49c9cebf5bf045?c-e589e34d6be8-5ab783e6d81b=WS%3A1&amp;c-e589e34d6be8-5ab783e6d81b=C%3A3#c-e589e34d6be8-5ab783e6d81b" title="Ignore white space"><img alt="Ignore white space" class="icon" src="/images/icons/text_strikethrough.png"></a>
91 <a class="tooltip" href="/example/changeset/d12301bafcc0aea15c9283d3af018daee2b04cd9...80ead1899f50a894889e19ffeb49c9cebf5bf045?c-e589e34d6be8-5ab783e6d81b=C%3A6#c-e589e34d6be8-5ab783e6d81b" title="increase diff context to 6 lines"><img alt="increase diff context to 6 lines" class="icon" src="/images/icons/table_add.png"></a>
91 <a class="tooltip" href="/example/changeset/d12301bafcc0aea15c9283d3af018daee2b04cd9...80ead1899f50a894889e19ffeb49c9cebf5bf045?c-e589e34d6be8-5ab783e6d81b=C%3A6#c-e589e34d6be8-5ab783e6d81b" title="increase diff context to 6 lines"><img alt="increase diff context to 6 lines" class="icon" src="/images/icons/table_add.png"></a>
92 </div>
92 </div>
93 <span>
93 <span>
94 <label>
94 <label>
95 Show inline comments
95 Show inline comments
96 <input checked="checked" class="show-inline-comments" id="" id_for="c-e589e34d6be8-5ab783e6d81b" name="" type="checkbox" value="1">
96 <input checked="checked" class="show-inline-comments" id="" id_for="c-e589e34d6be8-5ab783e6d81b" name="" type="checkbox" value="1">
97 </label>
97 </label>
98 </span>
98 </span>
99 </div>
99 </div>
100 </div>
100 </div>
101 <div class="code-body">
101 <div class="code-body">
102 <div class="full_f_path" path="rhodecode/public/css/code-block.less"></div>
102 <div class="full_f_path" path="rhodecode/public/css/code-block.less"></div>
103 <table class="code-difftable">
103 <table class="code-difftable">
104 <tbody><tr class="line context">
104 <tbody><tr class="line context">
105 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td>
105 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td>
106 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td>
106 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td>
107 <td class="code no-comment">
107 <td class="code no-comment">
108 <pre>@@ -391,7 +391,7 @@
108 <pre>@@ -391,7 +391,7 @@
109 </pre>
109 </pre>
110 </td>
110 </td>
111 </tr>
111 </tr>
112 <tr class="line unmod">
112 <tr class="line unmod">
113 <td id="rhodecodepubliccsscode-blockless_o391" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o391">391</a></td>
113 <td id="rhodecodepubliccsscode-blockless_o391" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o391">391</a></td>
114 <td id="rhodecodepubliccsscode-blockless_n391" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n391">391</a></td>
114 <td id="rhodecodepubliccsscode-blockless_n391" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n391">391</a></td>
115 <td class="code no-comment">
115 <td class="code no-comment">
116 <pre>} /* Existing line, it might have a quite long content actually and in this case we might need some horizontal scrolling. The remaining text here is just used to make this line very long.
116 <pre>} /* Existing line, it might have a quite long content actually and in this case we might need some horizontal scrolling. The remaining text here is just used to make this line very long.
117 </pre>
117 </pre>
118 </td>
118 </td>
119 </tr>
119 </tr>
120 <tr class="line unmod">
120 <tr class="line unmod">
121 <td id="rhodecodepubliccsscode-blockless_o392" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o392">392</a></td>
121 <td id="rhodecodepubliccsscode-blockless_o392" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o392">392</a></td>
122 <td id="rhodecodepubliccsscode-blockless_n392" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n392">392</a></td>
122 <td id="rhodecodepubliccsscode-blockless_n392" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n392">392</a></td>
123 <td class="code no-comment">
123 <td class="code no-comment">
124 <pre></pre>
124 <pre></pre>
125 </td>
125 </td>
126 </tr>
126 </tr>
127 <tr class="line unmod">
127 <tr class="line unmod">
128 <td id="rhodecodepubliccsscode-blockless_o393" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o393">393</a></td>
128 <td id="rhodecodepubliccsscode-blockless_o393" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o393">393</a></td>
129 <td id="rhodecodepubliccsscode-blockless_n393" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n393">393</a></td>
129 <td id="rhodecodepubliccsscode-blockless_n393" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n393">393</a></td>
130 <td class="code no-comment">
130 <td class="code no-comment">
131 <pre>.code-body.textarea.editor,
131 <pre>.code-body.textarea.editor,
132 </pre>
132 </pre>
133 </td>
133 </td>
134 </tr>
134 </tr>
135 <tr class="line del">
135 <tr class="line del">
136 <td id="rhodecodepubliccsscode-blockless_o394" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o394">394</a></td>
136 <td id="rhodecodepubliccsscode-blockless_o394" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o394">394</a></td>
137 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n"></a></td>
137 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n"></a></td>
138 <td class="code no-comment">
138 <td class="code no-comment">
139 <pre>div.code-body{
139 <pre>div.code-body{
140 </pre>
140 </pre>
141 </td>
141 </td>
142 </tr>
142 </tr>
143 <tr class="line add">
143 <tr class="line add">
144 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
144 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
145 <td id="rhodecodepubliccsscode-blockless_n394" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n394">394</a></td>
145 <td id="rhodecodepubliccsscode-blockless_n394" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n394">394</a></td>
146 <td class="code no-comment">
146 <td class="code no-comment">
147 <pre>div.code-body<ins> </ins>{
147 <pre>div.code-body<ins> </ins>{
148 </pre>
148 </pre>
149 </td>
149 </td>
150 </tr>
150 </tr>
151 <tr class="line unmod">
151 <tr class="line unmod">
152 <td id="rhodecodepubliccsscode-blockless_o395" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o395">395</a></td>
152 <td id="rhodecodepubliccsscode-blockless_o395" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o395">395</a></td>
153 <td id="rhodecodepubliccsscode-blockless_n395" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n395">395</a></td>
153 <td id="rhodecodepubliccsscode-blockless_n395" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n395">395</a></td>
154 <td class="code no-comment">
154 <td class="code no-comment">
155 <pre> float: left;
155 <pre> float: left;
156 </pre>
156 </pre>
157 </td>
157 </td>
158 </tr>
158 </tr>
159 <tr class="line unmod">
159 <tr class="line unmod">
160 <td id="rhodecodepubliccsscode-blockless_o396" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o396">396</a></td>
160 <td id="rhodecodepubliccsscode-blockless_o396" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o396">396</a></td>
161 <td id="rhodecodepubliccsscode-blockless_n396" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n396">396</a></td>
161 <td id="rhodecodepubliccsscode-blockless_n396" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n396">396</a></td>
162 <td class="code no-comment">
162 <td class="code no-comment">
163 <pre> position: relative;
163 <pre> position: relative;
164 </pre>
164 </pre>
165 </td>
165 </td>
166 </tr>
166 </tr>
167 <tr class="line unmod">
167 <tr class="line unmod">
168 <td id="rhodecodepubliccsscode-blockless_o397" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o397">397</a></td>
168 <td id="rhodecodepubliccsscode-blockless_o397" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o397">397</a></td>
169 <td id="rhodecodepubliccsscode-blockless_n397" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n397">397</a></td>
169 <td id="rhodecodepubliccsscode-blockless_n397" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n397">397</a></td>
170 <td class="code no-comment">
170 <td class="code no-comment">
171 <pre> max-width: none;
171 <pre> max-width: none;
172 </pre>
172 </pre>
173 </td>
173 </td>
174 </tr>
174 </tr>
175 <tr class="line context">
175 <tr class="line context">
176 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td>
176 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td>
177 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td>
177 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td>
178 <td class="code no-comment">
178 <td class="code no-comment">
179 <pre>@@ -399,3 +399,6 @@
179 <pre>@@ -399,3 +399,6 @@
180 </pre>
180 </pre>
181 </td>
181 </td>
182 </tr>
182 </tr>
183 <tr class="line unmod">
183 <tr class="line unmod">
184 <td id="rhodecodepubliccsscode-blockless_o399" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o399">399</a></td>
184 <td id="rhodecodepubliccsscode-blockless_o399" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o399">399</a></td>
185 <td id="rhodecodepubliccsscode-blockless_n399" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n399">399</a></td>
185 <td id="rhodecodepubliccsscode-blockless_n399" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n399">399</a></td>
186 <td class="code no-comment">
186 <td class="code no-comment">
187 <pre> box-sizing: border-box;
187 <pre> box-sizing: border-box;
188 </pre>
188 </pre>
189 </td>
189 </td>
190 </tr>
190 </tr>
191 <tr class="line unmod">
191 <tr class="line unmod">
192 <td id="rhodecodepubliccsscode-blockless_o400" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o400">400</a></td>
192 <td id="rhodecodepubliccsscode-blockless_o400" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o400">400</a></td>
193 <td id="rhodecodepubliccsscode-blockless_n400" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n400">400</a></td>
193 <td id="rhodecodepubliccsscode-blockless_n400" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n400">400</a></td>
194 <td class="code no-comment">
194 <td class="code no-comment">
195 <pre>}
195 <pre>}
196 </pre>
196 </pre>
197 </td>
197 </td>
198 </tr>
198 </tr>
199 <tr class="line unmod">
199 <tr class="line unmod">
200 <td id="rhodecodepubliccsscode-blockless_o401" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o401">401</a></td>
200 <td id="rhodecodepubliccsscode-blockless_o401" class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o401">401</a></td>
201 <td id="rhodecodepubliccsscode-blockless_n401" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n401">401</a></td>
201 <td id="rhodecodepubliccsscode-blockless_n401" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n401">401</a></td>
202 <td class="code no-comment">
202 <td class="code no-comment">
203 <pre></pre>
203 <pre></pre>
204 </td>
204 </td>
205 </tr>
205 </tr>
206 <tr class="line add">
206 <tr class="line add">
207 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
207 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
208 <td id="rhodecodepubliccsscode-blockless_n402" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n402">402</a></td>
208 <td id="rhodecodepubliccsscode-blockless_n402" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n402">402</a></td>
209 <td class="code no-comment">
209 <td class="code no-comment">
210 <pre>.code-body td{
210 <pre>.code-body td{
211 </pre>
211 </pre>
212 </td>
212 </td>
213 </tr>
213 </tr>
214 <tr class="line add">
214 <tr class="line add">
215 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
215 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
216 <td id="rhodecodepubliccsscode-blockless_n403" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n403">403</a></td>
216 <td id="rhodecodepubliccsscode-blockless_n403" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n403">403</a></td>
217 <td class="code no-comment">
217 <td class="code no-comment">
218 <pre> line-height: 1.2em;
218 <pre> line-height: 1.2em;
219 </pre>
219 </pre>
220 </td>
220 </td>
221 </tr>
221 </tr>
222 <tr class="line add">
222 <tr class="line add">
223 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
223 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o"></a></td>
224 <td id="rhodecodepubliccsscode-blockless_n404" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n404">404</a></td>
224 <td id="rhodecodepubliccsscode-blockless_n404" class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n404">404</a></td>
225 <td class="code no-comment">
225 <td class="code no-comment">
226 <pre>}
226 <pre>}
227 </pre>
227 </pre>
228 </td>
228 </td>
229 </tr>
229 </tr>
230 <tr class="line context">
230 <tr class="line context">
231 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td>
231 <td class="lineno old"><a href="#rhodecodepubliccsscode-blockless_o...">...</a></td>
232 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td>
232 <td class="lineno new"><a href="#rhodecodepubliccsscode-blockless_n...">...</a></td>
233 <td class="code no-comment">
233 <td class="code no-comment">
234 <pre> No newline at end of file
234 <pre> No newline at end of file
235 </pre>
235 </pre>
236 </td>
236 </td>
237 </tr>
237 </tr>
238 </tbody></table>
238 </tbody></table>
239 </div>
239 </div>
240 </div>
240 </div>
241
241
242
242
243
243
244
244
245
245
246
246
247 <!--
247 <!--
248 Pull Request
248 Pull Request
249 -->
249 -->
250
250
251 <h2>Pull Request</h2>
251 <h2>Pull Request</h2>
252
252
253 <div class="cs_files">
253 <div class="cs_files">
254 <table class="compare_view_files">
254 <table class="compare_view_files">
255
255
256 <tbody><tr class="cs_M collapse_file" fid="c--5f1d017cf13b">
256 <tbody><tr class="cs_M collapse_file" fid="c--5f1d017cf13b">
257 <td class="cs_icon_td">
257 <td class="cs_icon_td">
258 <span class="collapse_file_icon" fid="c--5f1d017cf13b"></span>
258 <span class="collapse_file_icon" fid="c--5f1d017cf13b"></span>
259 </td>
259 </td>
260 <td class="cs_icon_td">
260 <td class="cs_icon_td">
261 <div class="flag_status not_reviewed hidden"></div>
261 <div class="flag_status not_reviewed hidden"></div>
262 </td>
262 </td>
263 <td id="a_c--5f1d017cf13b">
263 <td id="a_c--5f1d017cf13b">
264 <a class="compare_view_filepath" href="#a_c--5f1d017cf13b">
264 <a class="compare_view_filepath" href="#a_c--5f1d017cf13b">
265 rhodecode/public/css/main.less
265 rhodecode/public/css/main.less
266 </a>
266 </a>
267 <span id="diff_c--5f1d017cf13b" class="diff_links" style="">
267 <span id="diff_c--5f1d017cf13b" class="diff_links" style="">
268 <a href="/example/diff/rhodecode/public/css/main.less?fulldiff=1&amp;diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&amp;diff=diff&amp;diff2=27eb56cf467ca849112536d62decb2ed020b3ebc">
268 <a href="/example/diff/rhodecode/public/css/main.less?fulldiff=1&amp;diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&amp;diff=diff&amp;diff2=27eb56cf467ca849112536d62decb2ed020b3ebc">
269 Unified Diff
269 Unified Diff
270 </a>
270 </a>
271 |
271 |
272 <a href="/example/diff-2way/rhodecode/public/css/main.less?fulldiff=1&amp;diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&amp;diff=diff&amp;diff2=27eb56cf467ca849112536d62decb2ed020b3ebc">
272 <a href="/example/diff-2way/rhodecode/public/css/main.less?fulldiff=1&amp;diff1=f73e9946825c8a7ef2c1178cd1e67986d5831f8f&amp;diff=diff&amp;diff2=27eb56cf467ca849112536d62decb2ed020b3ebc">
273 Side-by-side Diff
273 Side-by-side Diff
274 </a>
274 </a>
275 </span>
275 </span>
276 </td>
276 </td>
277 <td>
277 <td>
278 <div class="changes pull-right"><div style="width:100px"><div class="added top-left-rounded-corner-mid bottom-left-rounded-corner-mid" style="width:33.3333333333%">1</div><div class="deleted top-right-rounded-corner-mid bottom-right-rounded-corner-mid" style="width:66.6666666667%">2</div></div></div>
278 <div class="changes pull-right"><div style="width:100px"><div class="added top-left-rounded-corner-mid bottom-left-rounded-corner-mid" style="width:33.3333333333%">1</div><div class="deleted top-right-rounded-corner-mid bottom-right-rounded-corner-mid" style="width:66.6666666667%">2</div></div></div>
279 <div class="comment-bubble pull-right" data-path="rhodecode/public/css/main.less">
279 <div class="comment-bubble pull-right" data-path="rhodecode/public/css/main.less">
280 <i class="icon-comment"></i>
280 <i class="icon-comment"></i>
281 </div>
281 </div>
282 </td>
282 </td>
283 </tr>
283 </tr>
284 <tr id="tr_c--5f1d017cf13b">
284 <tr id="tr_c--5f1d017cf13b">
285 <td></td>
285 <td></td>
286 <td></td>
286 <td></td>
287 <td class="injected_diff" colspan="2">
287 <td class="injected_diff" colspan="2">
288
288
289 <div class="diff-container" id="diff-container-140360026534904">
289 <div class="diff-container" id="diff-container-140360026534904">
290 <div id="c--5f1d017cf13b_target"></div>
290 <div id="c--5f1d017cf13b_target"></div>
291 <div id="c--5f1d017cf13b" class="diffblock margined comm">
291 <div id="c--5f1d017cf13b" class="diffblock margined comm">
292 <div class="code-body">
292 <div class="code-body">
293 <div class="full_f_path" path="rhodecode/public/css/main.less" style="display: none;"></div>
293 <div class="full_f_path" path="rhodecode/public/css/main.less" style="display: none;"></div>
294 <table class="code-difftable">
294 <table class="code-difftable">
295 <tbody><tr class="line context">
295 <tbody><tr class="line context">
296 <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td>
296 <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td>
297 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td>
297 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td>
298 <td class="code ">
298 <td class="code ">
299 <pre>@@ -2110,7 +2110,6 @@
299 <pre>@@ -2110,7 +2110,6 @@
300 </pre>
300 </pre>
301 </td>
301 </td>
302 </tr>
302 </tr>
303 <tr class="line unmod">
303 <tr class="line unmod">
304 <td id="rhodecodepubliccssmainless_o2110" class="lineno old"><a href="#rhodecodepubliccssmainless_o2110">2110</a></td>
304 <td id="rhodecodepubliccssmainless_o2110" class="lineno old"><a href="#rhodecodepubliccssmainless_o2110">2110</a></td>
305 <td id="rhodecodepubliccssmainless_n2110" class="lineno new"><a href="#rhodecodepubliccssmainless_n2110">2110</a></td>
305 <td id="rhodecodepubliccssmainless_n2110" class="lineno new"><a href="#rhodecodepubliccssmainless_n2110">2110</a></td>
306 <td class="code ">
306 <td class="code ">
307 <pre><span class="tab-escape"> </span>width: auto !important;
307 <pre><span class="tab-escape"> </span>width: auto !important;
308 </pre>
308 </pre>
309 </td>
309 </td>
310 </tr>
310 </tr>
311 <tr class="line unmod">
311 <tr class="line unmod">
312 <td id="rhodecodepubliccssmainless_o2111" class="lineno old"><a href="#rhodecodepubliccssmainless_o2111">2111</a></td>
312 <td id="rhodecodepubliccssmainless_o2111" class="lineno old"><a href="#rhodecodepubliccssmainless_o2111">2111</a></td>
313 <td id="rhodecodepubliccssmainless_n2111" class="lineno new"><a href="#rhodecodepubliccssmainless_n2111">2111</a></td>
313 <td id="rhodecodepubliccssmainless_n2111" class="lineno new"><a href="#rhodecodepubliccssmainless_n2111">2111</a></td>
314 <td class="code ">
314 <td class="code ">
315 <pre><span class="tab-escape"> </span>min-width: 160px;
315 <pre><span class="tab-escape"> </span>min-width: 160px;
316 </pre>
316 </pre>
317 </td>
317 </td>
318 </tr>
318 </tr>
319 <tr class="line unmod">
319 <tr class="line unmod">
320 <td id="rhodecodepubliccssmainless_o2112" class="lineno old"><a href="#rhodecodepubliccssmainless_o2112">2112</a></td>
320 <td id="rhodecodepubliccssmainless_o2112" class="lineno old"><a href="#rhodecodepubliccssmainless_o2112">2112</a></td>
321 <td id="rhodecodepubliccssmainless_n2112" class="lineno new"><a href="#rhodecodepubliccssmainless_n2112">2112</a></td>
321 <td id="rhodecodepubliccssmainless_n2112" class="lineno new"><a href="#rhodecodepubliccssmainless_n2112">2112</a></td>
322 <td class="code ">
322 <td class="code ">
323 <pre><span class="tab-escape"> </span>margin: @padding @padding @padding 0;
323 <pre><span class="tab-escape"> </span>margin: @padding @padding @padding 0;
324 </pre>
324 </pre>
325 </td>
325 </td>
326 </tr>
326 </tr>
327 <tr class="line del">
327 <tr class="line del">
328 <td id="rhodecodepubliccssmainless_o2113" class="lineno old"><a href="#rhodecodepubliccssmainless_o2113">2113</a></td>
328 <td id="rhodecodepubliccssmainless_o2113" class="lineno old"><a href="#rhodecodepubliccssmainless_o2113">2113</a></td>
329 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td>
329 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td>
330 <td class="code ">
330 <td class="code ">
331 <pre><span class="tab-escape"> </span>padding: .9em; /* Old comment which was making this line a very long line so that we might have to deal with it by either adding horizontal scrolling or some smart way of breaking this line. */
331 <pre><span class="tab-escape"> </span>padding: .9em; /* Old comment which was making this line a very long line so that we might have to deal with it by either adding horizontal scrolling or some smart way of breaking this line. */
332 </pre>
332 </pre>
333 </td>
333 </td>
334 </tr>
334 </tr>
335 <tr class="line unmod">
335 <tr class="line unmod">
336 <td id="rhodecodepubliccssmainless_o2114" class="lineno old"><a href="#rhodecodepubliccssmainless_o2114">2114</a></td>
336 <td id="rhodecodepubliccssmainless_o2114" class="lineno old"><a href="#rhodecodepubliccssmainless_o2114">2114</a></td>
337 <td id="rhodecodepubliccssmainless_n2113" class="lineno new"><a href="#rhodecodepubliccssmainless_n2113">2113</a></td>
337 <td id="rhodecodepubliccssmainless_n2113" class="lineno new"><a href="#rhodecodepubliccssmainless_n2113">2113</a></td>
338 <td class="code ">
338 <td class="code ">
339 <pre> line-height: 1em;
339 <pre> line-height: 1em;
340 </pre>
340 </pre>
341 </td>
341 </td>
342 </tr>
342 </tr>
343 <tr class="line unmod">
343 <tr class="line unmod">
344 <td id="rhodecodepubliccssmainless_o2115" class="lineno old"><a href="#rhodecodepubliccssmainless_o2115">2115</a></td>
344 <td id="rhodecodepubliccssmainless_o2115" class="lineno old"><a href="#rhodecodepubliccssmainless_o2115">2115</a></td>
345 <td id="rhodecodepubliccssmainless_n2114" class="lineno new"><a href="#rhodecodepubliccssmainless_n2114">2114</a></td>
345 <td id="rhodecodepubliccssmainless_n2114" class="lineno new"><a href="#rhodecodepubliccssmainless_n2114">2114</a></td>
346 <td class="code ">
346 <td class="code ">
347 <pre><span class="tab-escape"> </span>z-index: 100;//js sets the menu below it to 9999
347 <pre><span class="tab-escape"> </span>z-index: 100;//js sets the menu below it to 9999
348 </pre>
348 </pre>
349 </td>
349 </td>
350 </tr>
350 </tr>
351 <tr class="line unmod">
351 <tr class="line unmod">
352 <td id="rhodecodepubliccssmainless_o2116" class="lineno old"><a href="#rhodecodepubliccssmainless_o2116">2116</a></td>
352 <td id="rhodecodepubliccssmainless_o2116" class="lineno old"><a href="#rhodecodepubliccssmainless_o2116">2116</a></td>
353 <td id="rhodecodepubliccssmainless_n2115" class="lineno new"><a href="#rhodecodepubliccssmainless_n2115">2115</a></td>
353 <td id="rhodecodepubliccssmainless_n2115" class="lineno new"><a href="#rhodecodepubliccssmainless_n2115">2115</a></td>
354 <td class="code ">
354 <td class="code ">
355 <pre><span class="tab-escape"> </span>background-color: white;
355 <pre><span class="tab-escape"> </span>background-color: white;
356 </pre>
356 </pre>
357 </td>
357 </td>
358 </tr>
358 </tr>
359 <tr class="line context">
359 <tr class="line context">
360 <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td>
360 <td class="lineno old"><a href="#rhodecodepubliccssmainless_o...">...</a></td>
361 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td>
361 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n...">...</a></td>
362 <td class="code ">
362 <td class="code ">
363 <pre>@@ -2118,7 +2117,7 @@
363 <pre>@@ -2118,7 +2117,7 @@
364 </pre>
364 </pre>
365 </td>
365 </td>
366 </tr>
366 </tr>
367 <tr class="line unmod">
367 <tr class="line unmod">
368 <td id="rhodecodepubliccssmainless_o2118" class="lineno old"><a href="#rhodecodepubliccssmainless_o2118">2118</a></td>
368 <td id="rhodecodepubliccssmainless_o2118" class="lineno old"><a href="#rhodecodepubliccssmainless_o2118">2118</a></td>
369 <td id="rhodecodepubliccssmainless_n2117" class="lineno new"><a href="#rhodecodepubliccssmainless_n2117">2117</a></td>
369 <td id="rhodecodepubliccssmainless_n2117" class="lineno new"><a href="#rhodecodepubliccssmainless_n2117">2117</a></td>
370 <td class="code ">
370 <td class="code ">
371 <pre></pre>
371 <pre></pre>
372 </td>
372 </td>
373 </tr>
373 </tr>
374 <tr class="line unmod">
374 <tr class="line unmod">
375 <td id="rhodecodepubliccssmainless_o2119" class="lineno old"><a href="#rhodecodepubliccssmainless_o2119">2119</a></td>
375 <td id="rhodecodepubliccssmainless_o2119" class="lineno old"><a href="#rhodecodepubliccssmainless_o2119">2119</a></td>
376 <td id="rhodecodepubliccssmainless_n2118" class="lineno new"><a href="#rhodecodepubliccssmainless_n2118">2118</a></td>
376 <td id="rhodecodepubliccssmainless_n2118" class="lineno new"><a href="#rhodecodepubliccssmainless_n2118">2118</a></td>
377 <td class="code ">
377 <td class="code ">
378 <pre><span class="tab-escape"> </span>a {
378 <pre><span class="tab-escape"> </span>a {
379 </pre>
379 </pre>
380 </td>
380 </td>
381 </tr>
381 </tr>
382 <tr class="line unmod">
382 <tr class="line unmod">
383 <td id="rhodecodepubliccssmainless_o2120" class="lineno old"><a href="#rhodecodepubliccssmainless_o2120">2120</a></td>
383 <td id="rhodecodepubliccssmainless_o2120" class="lineno old"><a href="#rhodecodepubliccssmainless_o2120">2120</a></td>
384 <td id="rhodecodepubliccssmainless_n2119" class="lineno new"><a href="#rhodecodepubliccssmainless_n2119">2119</a></td>
384 <td id="rhodecodepubliccssmainless_n2119" class="lineno new"><a href="#rhodecodepubliccssmainless_n2119">2119</a></td>
385 <td class="code ">
385 <td class="code ">
386 <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>display:block;
386 <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>display:block;
387 </pre>
387 </pre>
388 </td>
388 </td>
389 </tr>
389 </tr>
390 <tr class="line del">
390 <tr class="line del">
391 <td id="rhodecodepubliccssmainless_o2121" class="lineno old"><a href="#rhodecodepubliccssmainless_o2121">2121</a></td>
391 <td id="rhodecodepubliccssmainless_o2121" class="lineno old"><a href="#rhodecodepubliccssmainless_o2121">2121</a></td>
392 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td>
392 <td class="lineno new"><a href="#rhodecodepubliccssmainless_n"></a></td>
393 <td class="code ">
393 <td class="code ">
394 <pre><span class="tab-escape"> </span><del><span< del=""> <del>class=</del><del>"tab-escape"</del><del>&gt; </del>padding: <del>0</del>;
394 <pre><span class="tab-escape"> </span><del><span< del=""> <del>class=</del><del>"tab-escape"</del><del>&gt; </del>padding: <del>0</del>;
395 </span<></del></pre>
395 </span<></del></pre>
396 </td>
396 </td>
397 </tr>
397 </tr>
398 <tr class="line add">
398 <tr class="line add">
399 <td class="lineno old"><a href="#rhodecodepubliccssmainless_o"></a></td>
399 <td class="lineno old"><a href="#rhodecodepubliccssmainless_o"></a></td>
400 <td id="rhodecodepubliccssmainless_n2120" class="lineno new"><a href="#rhodecodepubliccssmainless_n2120">2120</a></td>
400 <td id="rhodecodepubliccssmainless_n2120" class="lineno new"><a href="#rhodecodepubliccssmainless_n2120">2120</a></td>
401 <td class="code ">
401 <td class="code ">
402 <pre><span class="tab-escape"> </span><ins> </ins> <ins> </ins><ins> </ins>padding: <ins>.9em</ins>;
402 <pre><span class="tab-escape"> </span><ins> </ins> <ins> </ins><ins> </ins>padding: <ins>.9em</ins>;
403 </pre>
403 </pre>
404 </td>
404 </td>
405 </tr>
405 </tr>
406 <tr class="line unmod">
406 <tr class="line unmod">
407 <td id="rhodecodepubliccssmainless_o2122" class="lineno old"><a href="#rhodecodepubliccssmainless_o2122">2122</a></td>
407 <td id="rhodecodepubliccssmainless_o2122" class="lineno old"><a href="#rhodecodepubliccssmainless_o2122">2122</a></td>
408 <td id="rhodecodepubliccssmainless_n2121" class="lineno new"><a href="#rhodecodepubliccssmainless_n2121">2121</a></td>
408 <td id="rhodecodepubliccssmainless_n2121" class="lineno new"><a href="#rhodecodepubliccssmainless_n2121">2121</a></td>
409 <td class="code ">
409 <td class="code ">
410 <pre></pre>
410 <pre></pre>
411 </td>
411 </td>
412 </tr>
412 </tr>
413 <tr class="line unmod">
413 <tr class="line unmod">
414 <td id="rhodecodepubliccssmainless_o2123" class="lineno old"><a href="#rhodecodepubliccssmainless_o2123">2123</a></td>
414 <td id="rhodecodepubliccssmainless_o2123" class="lineno old"><a href="#rhodecodepubliccssmainless_o2123">2123</a></td>
415 <td id="rhodecodepubliccssmainless_n2122" class="lineno new"><a href="#rhodecodepubliccssmainless_n2122">2122</a></td>
415 <td id="rhodecodepubliccssmainless_n2122" class="lineno new"><a href="#rhodecodepubliccssmainless_n2122">2122</a></td>
416 <td class="code ">
416 <td class="code ">
417 <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>&amp;:after {
417 <pre><span class="tab-escape"> </span><span class="tab-escape"> </span>&amp;:after {
418 </pre>
418 </pre>
419 </td>
419 </td>
420 </tr>
420 </tr>
421 <tr class="line unmod">
421 <tr class="line unmod">
422 <td id="rhodecodepubliccssmainless_o2124" class="lineno old"><a href="#rhodecodepubliccssmainless_o2124">2124</a></td>
422 <td id="rhodecodepubliccssmainless_o2124" class="lineno old"><a href="#rhodecodepubliccssmainless_o2124">2124</a></td>
423 <td id="rhodecodepubliccssmainless_n2123" class="lineno new"><a href="#rhodecodepubliccssmainless_n2123">2123</a></td>
423 <td id="rhodecodepubliccssmainless_n2123" class="lineno new"><a href="#rhodecodepubliccssmainless_n2123">2123</a></td>
424 <td class="code ">
424 <td class="code ">
425 <pre><span class="tab-escape"> </span><span class="tab-escape"> </span><span class="tab-escape"> </span>content: "\00A0\25BE";
425 <pre><span class="tab-escape"> </span><span class="tab-escape"> </span><span class="tab-escape"> </span>content: "\00A0\25BE";
426 </pre>
426 </pre>
427 </td>
427 </td>
428 </tr>
428 </tr>
429 </tbody></table>
429 </tbody></table>
430 </div>
430 </div>
431 </div>
431 </div>
432 </div>
432 </div>
433
433
434 </td>
434 </td>
435 </tr>
435 </tr>
436 </tbody></table>
436 </tbody></table>
437 </div>
437 </div>
438
438
439
439
440
440
441
441
442
442
443
443
444
444
445
445
446
446
447 <!--
447 <!--
448 File View
448 File View
449 -->
449 -->
450
450
451 ##TODO: lisa: I believe this needs to be updated as the layout has changed.
451 ##TODO: lisa: I believe this needs to be updated as the layout has changed.
452 <h2>File View</h2>
452 <h2>File View</h2>
453
453
454 <div class="codeblock">
454 <div class="codeblock">
455 <div class="code-header">
455 <div class="code-header">
456 <div class="stats">
456 <div class="stats">
457 <div class="img">
457 <div class="img">
458 <i class="icon-file"></i>
458 <i class="icon-file"></i>
459 <span class="revision_id item"><a href="/example/changeset/fc252256eb0fcb4f2613e66f0126ea27967ae28c">r5487:fc252256eb0f</a></span>
459 <span class="revision_id item"><a href="/example/changeset/fc252256eb0fcb4f2613e66f0126ea27967ae28c">r5487:fc252256eb0f</a></span>
460 <span>1.2 KiB</span>
460 <span>1.2 KiB</span>
461 <span class="item last">text/x-python</span>
461 <span class="item last">text/x-python</span>
462 <div class="buttons">
462 <div class="buttons">
463
463
464 <a id="file_history_overview" class="btn btn-mini" href="#">
464 <a id="file_history_overview" class="btn btn-mini" href="#">
465 <i class="icon-time"></i> history
465 <i class="icon-time"></i> history
466 </a>
466 </a>
467 <a id="file_history_overview_full" class="btn btn-mini" style="display: none" href="/example/changelog/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">
467 <a id="file_history_overview_full" class="btn btn-mini" style="display: none" href="/example/changelog/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">
468 <i class="icon-time"></i> show full history
468 <i class="icon-time"></i> show full history
469 </a>
469 </a>
470 <a class="btn btn-mini" href="/example/annotate/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">annotation</a>
470 <a class="btn btn-mini" href="/example/annotate/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">annotation</a>
471 <a class="btn btn-mini" href="/example/raw/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">raw</a>
471 <a class="btn btn-mini" href="/example/raw/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">raw</a>
472 <a class="btn btn-mini" href="/example/rawfile/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">
472 <a class="btn btn-mini" href="/example/rawfile/fc252256eb0fcb4f2613e66f0126ea27967ae28c/rhodecode/websetup.py">
473 <i class="icon-archive"></i> download
473 download
474 </a>
474 </a>
475
475
476 <a class="btn btn-mini disabled tooltip" href="#" title="Editing files allowed only when on branch head commit">edit</a>
476 <a class="btn btn-mini disabled tooltip" href="#" title="Editing files allowed only when on branch head commit">edit</a>
477 <a class="btn btn-mini btn-danger disabled tooltip" href="#" title="Deleting files allowed only when on branch head commit">delete</a>
477 <a class="btn btn-mini btn-danger disabled tooltip" href="#" title="Deleting files allowed only when on branch head commit">delete</a>
478 </div>
478 </div>
479 </div>
479 </div>
480 </div>
480 </div>
481 <div id="file_history_container"></div>
481 <div id="file_history_container"></div>
482 <div class="author">
482 <div class="author">
483 <div class="gravatar">
483 <div class="gravatar">
484 <img alt="gravatar" src="https://secure.gravatar.com/avatar/99e27b99c64003ca8c9875c9e3843495?d=identicon&amp;s=32" height="16" width="16">
484 <img alt="gravatar" src="https://secure.gravatar.com/avatar/99e27b99c64003ca8c9875c9e3843495?d=identicon&amp;s=32" height="16" width="16">
485 </div>
485 </div>
486 <div title="Marcin Kuzminski <marcin@python-works.com>" class="user">Marcin Kuzminski - <span class="tooltip" title="Wed, 02 Jul 2014 08:48:15">6m and 12d ago</span></div>
486 <div title="Marcin Kuzminski <marcin@python-works.com>" class="user">Marcin Kuzminski - <span class="tooltip" title="Wed, 02 Jul 2014 08:48:15">6m and 12d ago</span></div>
487 </div>
487 </div>
488 <div id="trimmed_message_box" class="commit">License changes</div>
488 <div id="trimmed_message_box" class="commit">License changes</div>
489 <div id="message_expand" style="display: none;">
489 <div id="message_expand" style="display: none;">
490 <i class="icon-resize-vertical"></i>
490 <i class="icon-resize-vertical"></i>
491 expand
491 expand
492 <i class="icon-resize-vertical"></i>
492 <i class="icon-resize-vertical"></i>
493 </div>
493 </div>
494 </div>
494 </div>
495 <div class="code-body">
495 <div class="code-body">
496 <table class="code-highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L1"> 1</a>
496 <table class="code-highlighttable"><tbody><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L1"> 1</a>
497 <a href="#L2"> 2</a>
497 <a href="#L2"> 2</a>
498 <a href="#L3"> 3</a>
498 <a href="#L3"> 3</a>
499 <a href="#L4"> 4</a>
499 <a href="#L4"> 4</a>
500 <a href="#L5"> 5</a>
500 <a href="#L5"> 5</a>
501 <a href="#L6"> 6</a>
501 <a href="#L6"> 6</a>
502 <a href="#L7"> 7</a>
502 <a href="#L7"> 7</a>
503 <a href="#L8"> 8</a>
503 <a href="#L8"> 8</a>
504 <a href="#L9"> 9</a>
504 <a href="#L9"> 9</a>
505 <a href="#L10">10</a>
505 <a href="#L10">10</a>
506 <a href="#L11">11</a>
506 <a href="#L11">11</a>
507 <a href="#L12">12</a>
507 <a href="#L12">12</a>
508 <a href="#L13">13</a>
508 <a href="#L13">13</a>
509 <a href="#L14">14</a>
509 <a href="#L14">14</a>
510 <a href="#L15">15</a>
510 <a href="#L15">15</a>
511 <a href="#L16">16</a>
511 <a href="#L16">16</a>
512 <a href="#L17">17</a>
512 <a href="#L17">17</a>
513 <a href="#L18">18</a>
513 <a href="#L18">18</a>
514 <a href="#L19">19</a>
514 <a href="#L19">19</a>
515 <a href="#L20">20</a>
515 <a href="#L20">20</a>
516 <a href="#L21">21</a>
516 <a href="#L21">21</a>
517 <a href="#L22">22</a>
517 <a href="#L22">22</a>
518 <a href="#L23">23</a>
518 <a href="#L23">23</a>
519 <a href="#L24">24</a>
519 <a href="#L24">24</a>
520 <a href="#L25">25</a>
520 <a href="#L25">25</a>
521 <a href="#L26">26</a>
521 <a href="#L26">26</a>
522 <a href="#L27">27</a>
522 <a href="#L27">27</a>
523 <a href="#L28">28</a>
523 <a href="#L28">28</a>
524 <a href="#L29">29</a>
524 <a href="#L29">29</a>
525 <a href="#L30">30</a>
525 <a href="#L30">30</a>
526 <a href="#L31">31</a>
526 <a href="#L31">31</a>
527 <a href="#L32">32</a>
527 <a href="#L32">32</a>
528 <a href="#L33">33</a>
528 <a href="#L33">33</a>
529 <a href="#L34">34</a>
529 <a href="#L34">34</a>
530 <a href="#L35">35</a>
530 <a href="#L35">35</a>
531 <a href="#L36">36</a>
531 <a href="#L36">36</a>
532 <a href="#L37">37</a>
532 <a href="#L37">37</a>
533 <a href="#L38">38</a>
533 <a href="#L38">38</a>
534 <a href="#L39">39</a>
534 <a href="#L39">39</a>
535 <a href="#L40">40</a>
535 <a href="#L40">40</a>
536 <a href="#L41">41</a>
536 <a href="#L41">41</a>
537 <a href="#L42">42</a></pre></div></td><td id="hlcode" class="code"><div class="code-highlight"><pre><div id="L1"><a name="L-1"></a><span class="c"># -*- coding: utf-8 -*-</span>
537 <a href="#L42">42</a></pre></div></td><td id="hlcode" class="code"><div class="code-highlight"><pre><div id="L1"><a name="L-1"></a><span class="c"># -*- coding: utf-8 -*-</span>
538 </div><div id="L2"><a name="L-2"></a>
538 </div><div id="L2"><a name="L-2"></a>
539 </div><div id="L3"><a name="L-3"></a><span class="c"># Published under Business Source License.</span>
539 </div><div id="L3"><a name="L-3"></a><span class="c"># Published under Business Source License.</span>
540 </div><div id="L4"><a name="L-4"></a><span class="c"># Read the full license text at https://rhodecode.com/licenses.</span>
540 </div><div id="L4"><a name="L-4"></a><span class="c"># Read the full license text at https://rhodecode.com/licenses.</span>
541 </div><div id="L5"><a name="L-5"></a><span class="sd">"""</span>
541 </div><div id="L5"><a name="L-5"></a><span class="sd">"""</span>
542 </div><div id="L6"><a name="L-6"></a><span class="sd">rhodecode.websetup</span>
542 </div><div id="L6"><a name="L-6"></a><span class="sd">rhodecode.websetup</span>
543 </div><div id="L7"><a name="L-7"></a><span class="sd">~~~~~~~~~~~~~~~~~~</span>
543 </div><div id="L7"><a name="L-7"></a><span class="sd">~~~~~~~~~~~~~~~~~~</span>
544 </div><div id="L8"><a name="L-8"></a>
544 </div><div id="L8"><a name="L-8"></a>
545 </div><div id="L9"><a name="L-9"></a><span class="sd">Weboperations and setup for rhodecode. Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</span>
545 </div><div id="L9"><a name="L-9"></a><span class="sd">Weboperations and setup for rhodecode. Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</span>
546 </div><div id="L10"><a name="L-10"></a>
546 </div><div id="L10"><a name="L-10"></a>
547 </div><div id="L11"><a name="L-11"></a><span class="sd">:created_on: Dec 11, 2010</span>
547 </div><div id="L11"><a name="L-11"></a><span class="sd">:created_on: Dec 11, 2010</span>
548 </div><div id="L12"><a name="L-12"></a><span class="sd">:author: marcink</span>
548 </div><div id="L12"><a name="L-12"></a><span class="sd">:author: marcink</span>
549 </div><div id="L13"><a name="L-13"></a><span class="sd">:copyright: (c) 2013-2015 RhodeCode GmbH.</span>
549 </div><div id="L13"><a name="L-13"></a><span class="sd">:copyright: (c) 2013-2015 RhodeCode GmbH.</span>
550 </div><div id="L14"><a name="L-14"></a><span class="sd">:license: Business Source License, see LICENSE for more details.</span>
550 </div><div id="L14"><a name="L-14"></a><span class="sd">:license: Business Source License, see LICENSE for more details.</span>
551 </div><div id="L15"><a name="L-15"></a><span class="sd">"""</span>
551 </div><div id="L15"><a name="L-15"></a><span class="sd">"""</span>
552 </div><div id="L16"><a name="L-16"></a>
552 </div><div id="L16"><a name="L-16"></a>
553 </div><div id="L17"><a name="L-17"></a><span class="kn">import</span> <span class="nn">logging</span>
553 </div><div id="L17"><a name="L-17"></a><span class="kn">import</span> <span class="nn">logging</span>
554 </div><div id="L18"><a name="L-18"></a>
554 </div><div id="L18"><a name="L-18"></a>
555 </div><div id="L19"><a name="L-19"></a><span class="kn">from</span> <span class="nn">rhodecode.config.environment</span> <span class="kn">import</span> <span class="n">load_environment</span>
555 </div><div id="L19"><a name="L-19"></a><span class="kn">from</span> <span class="nn">rhodecode.config.environment</span> <span class="kn">import</span> <span class="n">load_environment</span>
556 </div><div id="L20"><a name="L-20"></a><span class="kn">from</span> <span class="nn">rhodecode.lib.db_manage</span> <span class="kn">import</span> <span class="n">DbManage</span>
556 </div><div id="L20"><a name="L-20"></a><span class="kn">from</span> <span class="nn">rhodecode.lib.db_manage</span> <span class="kn">import</span> <span class="n">DbManage</span>
557 </div><div id="L21"><a name="L-21"></a><span class="kn">from</span> <span class="nn">rhodecode.model.meta</span> <span class="kn">import</span> <span class="n">Session</span>
557 </div><div id="L21"><a name="L-21"></a><span class="kn">from</span> <span class="nn">rhodecode.model.meta</span> <span class="kn">import</span> <span class="n">Session</span>
558 </div><div id="L22"><a name="L-22"></a>
558 </div><div id="L22"><a name="L-22"></a>
559 </div><div id="L23"><a name="L-23"></a>
559 </div><div id="L23"><a name="L-23"></a>
560 </div><div id="L24"><a name="L-24"></a><span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">__name__</span><span class="p">)</span>
560 </div><div id="L24"><a name="L-24"></a><span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="n">__name__</span><span class="p">)</span>
561 </div><div id="L25"><a name="L-25"></a>
561 </div><div id="L25"><a name="L-25"></a>
562 </div><div id="L26"><a name="L-26"></a>
562 </div><div id="L26"><a name="L-26"></a>
563 </div><div id="L27"><a name="L-27"></a><span class="k">def</span> <span class="nf">setup_app</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">conf</span><span class="p">,</span> <span class="nb">vars</span><span class="p">):</span>
563 </div><div id="L27"><a name="L-27"></a><span class="k">def</span> <span class="nf">setup_app</span><span class="p">(</span><span class="n">command</span><span class="p">,</span> <span class="n">conf</span><span class="p">,</span> <span class="nb">vars</span><span class="p">):</span>
564 </div><div id="L28"><a name="L-28"></a> <span class="sd">"""Place any commands to setup rhodecode here"""</span>
564 </div><div id="L28"><a name="L-28"></a> <span class="sd">"""Place any commands to setup rhodecode here"""</span>
565 </div><div id="L29"><a name="L-29"></a> <span class="n">dbconf</span> <span class="o">=</span> <span class="n">conf</span><span class="p">[</span><span class="s">'sqlalchemy.db1.url'</span><span class="p">]</span>
565 </div><div id="L29"><a name="L-29"></a> <span class="n">dbconf</span> <span class="o">=</span> <span class="n">conf</span><span class="p">[</span><span class="s">'sqlalchemy.db1.url'</span><span class="p">]</span>
566 </div><div id="L30"><a name="L-30"></a> <span class="n">dbmanage</span> <span class="o">=</span> <span class="n">DbManage</span><span class="p">(</span><span class="n">log_sql</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">dbconf</span><span class="o">=</span><span class="n">dbconf</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">conf</span><span class="p">[</span><span class="s">'here'</span><span class="p">],</span>
566 </div><div id="L30"><a name="L-30"></a> <span class="n">dbmanage</span> <span class="o">=</span> <span class="n">DbManage</span><span class="p">(</span><span class="n">log_sql</span><span class="o">=</span><span class="bp">True</span><span class="p">,</span> <span class="n">dbconf</span><span class="o">=</span><span class="n">dbconf</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">conf</span><span class="p">[</span><span class="s">'here'</span><span class="p">],</span>
567 </div><div id="L31"><a name="L-31"></a> <span class="n">tests</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">cli_args</span><span class="o">=</span><span class="n">command</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">__dict__</span><span class="p">)</span>
567 </div><div id="L31"><a name="L-31"></a> <span class="n">tests</span><span class="o">=</span><span class="bp">False</span><span class="p">,</span> <span class="n">cli_args</span><span class="o">=</span><span class="n">command</span><span class="o">.</span><span class="n">options</span><span class="o">.</span><span class="n">__dict__</span><span class="p">)</span>
568 </div><div id="L32"><a name="L-32"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_tables</span><span class="p">(</span><span class="n">override</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
568 </div><div id="L32"><a name="L-32"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_tables</span><span class="p">(</span><span class="n">override</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
569 </div><div id="L33"><a name="L-33"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">set_db_version</span><span class="p">()</span>
569 </div><div id="L33"><a name="L-33"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">set_db_version</span><span class="p">()</span>
570 </div><div id="L34"><a name="L-34"></a> <span class="n">opts</span> <span class="o">=</span> <span class="n">dbmanage</span><span class="o">.</span><span class="n">config_prompt</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span>
570 </div><div id="L34"><a name="L-34"></a> <span class="n">opts</span> <span class="o">=</span> <span class="n">dbmanage</span><span class="o">.</span><span class="n">config_prompt</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span>
571 </div><div id="L35"><a name="L-35"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_settings</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>
571 </div><div id="L35"><a name="L-35"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_settings</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>
572 </div><div id="L36"><a name="L-36"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_default_user</span><span class="p">()</span>
572 </div><div id="L36"><a name="L-36"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_default_user</span><span class="p">()</span>
573 </div><div id="L37"><a name="L-37"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">admin_prompt</span><span class="p">()</span>
573 </div><div id="L37"><a name="L-37"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">admin_prompt</span><span class="p">()</span>
574 </div><div id="L38"><a name="L-38"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_permissions</span><span class="p">()</span>
574 </div><div id="L38"><a name="L-38"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">create_permissions</span><span class="p">()</span>
575 </div><div id="L39"><a name="L-39"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">populate_default_permissions</span><span class="p">()</span>
575 </div><div id="L39"><a name="L-39"></a> <span class="n">dbmanage</span><span class="o">.</span><span class="n">populate_default_permissions</span><span class="p">()</span>
576 </div><div id="L40"><a name="L-40"></a> <span class="n">Session</span><span class="p">()</span><span class="o">.</span><span class="n">commit</span><span class="p">()</span>
576 </div><div id="L40"><a name="L-40"></a> <span class="n">Session</span><span class="p">()</span><span class="o">.</span><span class="n">commit</span><span class="p">()</span>
577 </div><div id="L41"><a name="L-41"></a> <span class="n">load_environment</span><span class="p">(</span><span class="n">conf</span><span class="o">.</span><span class="n">global_conf</span><span class="p">,</span> <span class="n">conf</span><span class="o">.</span><span class="n">local_conf</span><span class="p">,</span> <span class="n">initial</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
577 </div><div id="L41"><a name="L-41"></a> <span class="n">load_environment</span><span class="p">(</span><span class="n">conf</span><span class="o">.</span><span class="n">global_conf</span><span class="p">,</span> <span class="n">conf</span><span class="o">.</span><span class="n">local_conf</span><span class="p">,</span> <span class="n">initial</span><span class="o">=</span><span class="bp">True</span><span class="p">)</span>
578 </div><div id="L42"><a name="L-42"></a> <span class="n">DbManage</span><span class="o">.</span><span class="n">check_waitress</span><span class="p">()</span>
578 </div><div id="L42"><a name="L-42"></a> <span class="n">DbManage</span><span class="o">.</span><span class="n">check_waitress</span><span class="p">()</span>
579 </div></pre></div>
579 </div></pre></div>
580 </td></tr></tbody></table>
580 </td></tr></tbody></table>
581 </div>
581 </div>
582 </div>
582 </div>
583
583
584
584
585
585
586
586
587
587
588
588
589
589
590
590
591
591
592 <!--
592 <!--
593 Gist Edit
593 Gist Edit
594 -->
594 -->
595
595
596
596
597 <h2>Gist Edit</h2>
597 <h2>Gist Edit</h2>
598
598
599 <div class="codeblock">
599 <div class="codeblock">
600 <div class="code-header">
600 <div class="code-header">
601 <div class="form">
601 <div class="form">
602 <div class="fields">
602 <div class="fields">
603 <input id="filename" name="filename" placeholder="name this file..." size="30" type="text">
603 <input id="filename" name="filename" placeholder="name this file..." size="30" type="text">
604 <div class="select2-container drop-menu" id="s2id_mimetype"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-3">Python</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen3" class="select2-offscreen"></label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-3" id="s2id_autogen3"><div class="select2-drop select2-display-none drop-menu-dropdown select2-with-searchbox"> <div class="select2-search"> <label for="s2id_autogen3_search" class="select2-offscreen"></label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-3" id="s2id_autogen3_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-3"> </ul></div></div><select id="mimetype" name="mimetype" tabindex="-1" title="" style="display: none;">
604 <div class="select2-container drop-menu" id="s2id_mimetype"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-3">Python</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen3" class="select2-offscreen"></label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-3" id="s2id_autogen3"><div class="select2-drop select2-display-none drop-menu-dropdown select2-with-searchbox"> <div class="select2-search"> <label for="s2id_autogen3_search" class="select2-offscreen"></label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-3" id="s2id_autogen3_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-3"> </ul></div></div><select id="mimetype" name="mimetype" tabindex="-1" title="" style="display: none;">
605 <option selected="selected" value="plain">plain</option>
605 <option selected="selected" value="plain">plain</option>
606 <option value="text/apl" mode="apl">APL</option><option value="text/x-asterisk" mode="asterisk">Asterisk</option><option value="text/x-csrc" mode="clike">C</option><option value="text/x-c++src" mode="clike">C++</option><option value="text/x-cobol" mode="cobol">Cobol</option><option value="text/x-java" mode="clike">Java</option><option value="text/x-csharp" mode="clike">C#</option><option value="text/x-scala" mode="clike">Scala</option><option value="text/x-clojure" mode="clojure">Clojure</option><option value="text/x-coffeescript" mode="coffeescript">CoffeeScript</option><option value="text/x-common-lisp" mode="commonlisp">Common Lisp</option><option value="text/css" mode="css">CSS</option><option value="text/x-d" mode="d">D</option><option value="text/x-diff" mode="diff">diff</option><option value="application/xml-dtd" mode="dtd">DTD</option><option value="text/x-dylan" mode="dylan">Dylan</option><option value="text/x-ecl" mode="ecl">ECL</option><option value="text/x-eiffel" mode="eiffel">Eiffel</option><option value="text/x-erlang" mode="erlang">Erlang</option><option value="text/x-fortran" mode="fortran">Fortran</option><option value="text/x-fsharp" mode="mllike">F#</option><option value="text/x-gas" mode="gas">Gas</option><option value="text/x-go" mode="go">GO</option><option value="text/x-feature" mode="gherkin">Gherkin</option><option value="text/x-go" mode="go">Go</option><option value="text/x-groovy" mode="groovy">Groovy</option><option value="text/x-haml" mode="haml">HAML</option><option value="text/x-haskell" mode="haskell">Haskell</option><option value="text/x-haxe" mode="haxe">Haxe</option><option value="application/x-aspx" mode="htmlembedded">ASP.NET</option><option value="application/x-ejs" mode="htmlembedded">Embedded Javascript</option><option value="application/x-jsp" mode="htmlembedded">JavaServer Pages</option><option value="text/html" mode="htmlmixed">HTML</option><option value="message/http" mode="http">HTTP</option><option value="text/x-jade" mode="jade">Jade</option><option value="text/javascript" mode="javascript">JavaScript</option><option value="application/json" mode="javascript">JSON</option><option value="application/typescript" mode="javascript">TypeScript</option><option value="jinja2" mode="jinja2">Jinja2</option><option value="text/x-julia" mode="julia">Julia</option><option value="text/x-less" mode="less">LESS</option><option value="text/x-livescript" mode="livescript">LiveScript</option><option value="text/x-lua" mode="lua">Lua</option><option value="text/x-markdown" mode="markdown">Markdown (GitHub-flavour)</option><option value="text/mirc" mode="mirc">mIRC</option><option value="text/x-nginx-conf" mode="nginx">Nginx</option><option value="text/n-triples" mode="ntriples">NTriples</option><option value="text/x-ocaml" mode="ocaml">OCaml</option><option value="text/x-ocaml" mode="mllike">OCaml</option><option value="text/x-octave" mode="octave">Octave</option><option value="text/x-pascal" mode="pascal">Pascal</option><option value="null" mode="pegjs">PEG.js</option><option value="text/x-perl" mode="perl">Perl</option><option value="text/x-php" mode="php">PHP</option><option value="text/x-pig" mode="pig">Pig</option><option value="text/plain" mode="null">Plain Text</option><option value="text/x-properties" mode="properties">Properties files</option><option value="text/x-python" mode="python">Python</option><option value="text/x-puppet" mode="puppet">Puppet</option><option value="text/x-rsrc" mode="r">R</option><option value="text/x-rst" mode="rst">reStructuredText</option><option value="text/x-ruby" mode="ruby">Ruby</option><option value="text/x-rustsrc" mode="rust">Rust</option><option value="text/x-sass" mode="sass">Sass</option><option value="text/x-scheme" mode="scheme">Scheme</option><option value="text/x-scss" mode="css">SCSS</option><option value="text/x-sh" mode="shell">Shell</option><option value="application/sieve" mode="sieve">Sieve</option><option value="text/x-stsrc" mode="smalltalk">Smalltalk</option><option value="text/x-smarty" mode="smarty">Smarty</option><option value="text/x-smarty" mode="smartymixed">SmartyMixed</option><option value="text/x-solr" mode="solr">Solr</option><option value="application/x-sparql-query" mode="sparql">SPARQL</option><option value="text/x-sql" mode="sql">SQL</option><option value="text/x-mariadb" mode="sql">MariaDB</option><option value="text/x-stex" mode="stex">sTeX</option><option value="text/x-latex" mode="stex">LaTeX</option><option value="text/x-systemverilog" mode="verilog">SystemVerilog</option><option value="text/x-tcl" mode="tcl">Tcl</option><option value="text/x-tiddlywiki" mode="tiddlywiki">TiddlyWiki </option><option value="text/tiki" mode="tiki">Tiki wiki</option><option value="text/x-toml" mode="toml">TOML</option><option value="text/turtle" mode="turtle">Turtle</option><option value="text/x-vb" mode="vb">VB.NET</option><option value="text/vbscript" mode="vbscript">VBScript</option><option value="text/velocity" mode="velocity">Velocity</option><option value="text/x-verilog" mode="verilog">Verilog</option><option value="application/xml" mode="xml">XML</option><option value="text/html" mode="xml">HTML</option><option value="application/xquery" mode="xquery">XQuery</option><option value="text/x-yaml" mode="yaml">YAML</option><option value="text/x-z80" mode="z80">Z80</option></select>
606 <option value="text/apl" mode="apl">APL</option><option value="text/x-asterisk" mode="asterisk">Asterisk</option><option value="text/x-csrc" mode="clike">C</option><option value="text/x-c++src" mode="clike">C++</option><option value="text/x-cobol" mode="cobol">Cobol</option><option value="text/x-java" mode="clike">Java</option><option value="text/x-csharp" mode="clike">C#</option><option value="text/x-scala" mode="clike">Scala</option><option value="text/x-clojure" mode="clojure">Clojure</option><option value="text/x-coffeescript" mode="coffeescript">CoffeeScript</option><option value="text/x-common-lisp" mode="commonlisp">Common Lisp</option><option value="text/css" mode="css">CSS</option><option value="text/x-d" mode="d">D</option><option value="text/x-diff" mode="diff">diff</option><option value="application/xml-dtd" mode="dtd">DTD</option><option value="text/x-dylan" mode="dylan">Dylan</option><option value="text/x-ecl" mode="ecl">ECL</option><option value="text/x-eiffel" mode="eiffel">Eiffel</option><option value="text/x-erlang" mode="erlang">Erlang</option><option value="text/x-fortran" mode="fortran">Fortran</option><option value="text/x-fsharp" mode="mllike">F#</option><option value="text/x-gas" mode="gas">Gas</option><option value="text/x-go" mode="go">GO</option><option value="text/x-feature" mode="gherkin">Gherkin</option><option value="text/x-go" mode="go">Go</option><option value="text/x-groovy" mode="groovy">Groovy</option><option value="text/x-haml" mode="haml">HAML</option><option value="text/x-haskell" mode="haskell">Haskell</option><option value="text/x-haxe" mode="haxe">Haxe</option><option value="application/x-aspx" mode="htmlembedded">ASP.NET</option><option value="application/x-ejs" mode="htmlembedded">Embedded Javascript</option><option value="application/x-jsp" mode="htmlembedded">JavaServer Pages</option><option value="text/html" mode="htmlmixed">HTML</option><option value="message/http" mode="http">HTTP</option><option value="text/x-jade" mode="jade">Jade</option><option value="text/javascript" mode="javascript">JavaScript</option><option value="application/json" mode="javascript">JSON</option><option value="application/typescript" mode="javascript">TypeScript</option><option value="jinja2" mode="jinja2">Jinja2</option><option value="text/x-julia" mode="julia">Julia</option><option value="text/x-less" mode="less">LESS</option><option value="text/x-livescript" mode="livescript">LiveScript</option><option value="text/x-lua" mode="lua">Lua</option><option value="text/x-markdown" mode="markdown">Markdown (GitHub-flavour)</option><option value="text/mirc" mode="mirc">mIRC</option><option value="text/x-nginx-conf" mode="nginx">Nginx</option><option value="text/n-triples" mode="ntriples">NTriples</option><option value="text/x-ocaml" mode="ocaml">OCaml</option><option value="text/x-ocaml" mode="mllike">OCaml</option><option value="text/x-octave" mode="octave">Octave</option><option value="text/x-pascal" mode="pascal">Pascal</option><option value="null" mode="pegjs">PEG.js</option><option value="text/x-perl" mode="perl">Perl</option><option value="text/x-php" mode="php">PHP</option><option value="text/x-pig" mode="pig">Pig</option><option value="text/plain" mode="null">Plain Text</option><option value="text/x-properties" mode="properties">Properties files</option><option value="text/x-python" mode="python">Python</option><option value="text/x-puppet" mode="puppet">Puppet</option><option value="text/x-rsrc" mode="r">R</option><option value="text/x-rst" mode="rst">reStructuredText</option><option value="text/x-ruby" mode="ruby">Ruby</option><option value="text/x-rustsrc" mode="rust">Rust</option><option value="text/x-sass" mode="sass">Sass</option><option value="text/x-scheme" mode="scheme">Scheme</option><option value="text/x-scss" mode="css">SCSS</option><option value="text/x-sh" mode="shell">Shell</option><option value="application/sieve" mode="sieve">Sieve</option><option value="text/x-stsrc" mode="smalltalk">Smalltalk</option><option value="text/x-smarty" mode="smarty">Smarty</option><option value="text/x-smarty" mode="smartymixed">SmartyMixed</option><option value="text/x-solr" mode="solr">Solr</option><option value="application/x-sparql-query" mode="sparql">SPARQL</option><option value="text/x-sql" mode="sql">SQL</option><option value="text/x-mariadb" mode="sql">MariaDB</option><option value="text/x-stex" mode="stex">sTeX</option><option value="text/x-latex" mode="stex">LaTeX</option><option value="text/x-systemverilog" mode="verilog">SystemVerilog</option><option value="text/x-tcl" mode="tcl">Tcl</option><option value="text/x-tiddlywiki" mode="tiddlywiki">TiddlyWiki </option><option value="text/tiki" mode="tiki">Tiki wiki</option><option value="text/x-toml" mode="toml">TOML</option><option value="text/turtle" mode="turtle">Turtle</option><option value="text/x-vb" mode="vb">VB.NET</option><option value="text/vbscript" mode="vbscript">VBScript</option><option value="text/velocity" mode="velocity">Velocity</option><option value="text/x-verilog" mode="verilog">Verilog</option><option value="application/xml" mode="xml">XML</option><option value="text/html" mode="xml">HTML</option><option value="application/xquery" mode="xquery">XQuery</option><option value="text/x-yaml" mode="yaml">YAML</option><option value="text/x-z80" mode="z80">Z80</option></select>
607 <script>
607 <script>
608 $(document).ready(function() {
608 $(document).ready(function() {
609 $('#mimetype').select2({
609 $('#mimetype').select2({
610 containerCssClass: 'drop-menu',
610 containerCssClass: 'drop-menu',
611 dropdownCssClass: 'drop-menu-dropdown',
611 dropdownCssClass: 'drop-menu-dropdown',
612 dropdownAutoWidth: true
612 dropdownAutoWidth: true
613 });
613 });
614 });
614 });
615 </script>
615 </script>
616
616
617 </div>
617 </div>
618 </div>
618 </div>
619 </div>
619 </div>
620 <div id="editor_container">
620 <div id="editor_container">
621 <div id="editor_pre"></div>
621 <div id="editor_pre"></div>
622 <textarea id="editor" name="content" style="display: none;"></textarea><div class="CodeMirror cm-s-default"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 484px; left: 219.4091796875px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-hscrollbar" style="left: 29px; min-height: 18px;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-vscrollbar" style="min-width: 18px; display: block; bottom: 0px;"><div style="min-width: 1px; height: 619px;"></div></div><div class="CodeMirror-scrollbar-filler"></div><div class="CodeMirror-gutter-filler"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="min-width: 700.269653320313px; margin-left: 29px; min-height: 619px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines"><div style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>47</div></div></div><div style="position: relative; z-index: 1; display: none;"></div><div class="CodeMirror-code"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div></div><pre><span class="cm-keyword">import</span> <span class="cm-variable">re</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">django</span>.<span class="cm-variable">utils</span>.<span class="cm-variable">text</span> <span class="cm-keyword">import</span> <span class="cm-variable">compress_sequence</span>, <span class="cm-variable">compress_string</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">django</span>.<span class="cm-variable">utils</span>.<span class="cm-variable">cache</span> <span class="cm-keyword">import</span> <span class="cm-variable">patch_vary_headers</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">6</div></div><pre><span class="cm-variable">re_accepts_gzip</span> = <span class="cm-variable">re</span>.<span class="cm-builtin">compile</span>(<span class="cm-string">r'\bgzip\b'</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">7</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">8</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">9</div></div><pre><span class="cm-keyword">class</span> <span class="cm-def">GZipMiddleware</span>(<span class="cm-builtin">object</span>): # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">10</div></div><pre> <span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">11</div></div><pre><span class="cm-string"> This middleware compresses content if the browser allows gzip compression.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">12</div></div><pre><span class="cm-string"> It sets the Vary header accordingly, so that caches will base their storage</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">13</div></div><pre><span class="cm-string"> on the Accept-Encoding header.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">14</div></div><pre><span class="cm-string"> """</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">15</div></div><pre> <span class="cm-keyword">def</span> <span class="cm-def">process_response</span>(<span class="cm-variable-2">self</span>, <span class="cm-variable">request</span>, <span class="cm-variable">response</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">16</div></div><pre> <span class="cm-comment"># It's not worth attempting to compress really short responses.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">17</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-operator">not</span> <span class="cm-variable">response</span>.<span class="cm-variable">streaming</span> <span class="cm-operator">and</span> <span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>) <span class="cm-operator">&lt;</span> <span class="cm-number">200</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">18</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">19</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">20</div></div><pre> <span class="cm-comment"># Avoid gzipping if we've already got a content-encoding.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">21</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">has_header</span>(<span class="cm-string">'Content-Encoding'</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">22</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">23</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">24</div></div><pre> <span class="cm-variable">patch_vary_headers</span>(<span class="cm-variable">response</span>, (<span class="cm-string">'Accept-Encoding'</span>,))</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">25</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">26</div></div><pre> <span class="cm-variable">ae</span> = <span class="cm-variable">request</span>.<span class="cm-variable">META</span>.<span class="cm-variable">get</span>(<span class="cm-string">'HTTP_ACCEPT_ENCODING'</span>, <span class="cm-string">''</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">27</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-operator">not</span> <span class="cm-variable">re_accepts_gzip</span>.<span class="cm-variable">search</span>(<span class="cm-variable">ae</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">28</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">29</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">30</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">streaming</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">31</div></div><pre> <span class="cm-comment"># Delete the `Content-Length` header for streaming content, because</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">32</div></div><pre> <span class="cm-comment"># we won't know the compressed size until we stream it.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">33</div></div><pre> <span class="cm-variable">response</span>.<span class="cm-variable">streaming_content</span> = <span class="cm-variable">compress_sequence</span>(<span class="cm-variable">response</span>.<span class="cm-variable">streaming_content</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">34</div></div><pre> <span class="cm-keyword">del</span> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Length'</span>]</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">35</div></div><pre> <span class="cm-keyword">else</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">36</div></div><pre> <span class="cm-comment"># Return the compressed content only if it's actually shorter.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">37</div></div><pre> <span class="cm-variable">compressed_content</span> = <span class="cm-variable">compress_string</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">38</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-builtin">len</span>(<span class="cm-variable">compressed_content</span>) <span class="cm-operator">&gt;=</span> <span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">39</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">40</div></div><pre> <span class="cm-variable">response</span>.<span class="cm-variable">content</span> = <span class="cm-variable">compressed_content</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">41</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Length'</span>] = <span class="cm-builtin">str</span>(<span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>))</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">42</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">43</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">has_header</span>(<span class="cm-string">'ETag'</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">44</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'ETag'</span>] = <span class="cm-variable">re</span>.<span class="cm-variable">sub</span>(<span class="cm-string">'"$'</span>, <span class="cm-string">';gzip"'</span>, <span class="cm-variable">response</span>[<span class="cm-string">'ETag'</span>])</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">45</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Encoding'</span>] = <span class="cm-string">'gzip'</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">46</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">47</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div></div><div class="CodeMirror-cursor" style="left: 189.4091796875px; top: 598px; height: 13px;">&nbsp;</div><div class="CodeMirror-cursor CodeMirror-secondarycursor" style="display: none;">&nbsp;</div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; top: 619px;"></div><div class="CodeMirror-gutters" style="height: 619px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div>
622 <textarea id="editor" name="content" style="display: none;"></textarea><div class="CodeMirror cm-s-default"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 484px; left: 219.4091796875px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-hscrollbar" style="left: 29px; min-height: 18px;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-vscrollbar" style="min-width: 18px; display: block; bottom: 0px;"><div style="min-width: 1px; height: 619px;"></div></div><div class="CodeMirror-scrollbar-filler"></div><div class="CodeMirror-gutter-filler"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="min-width: 700.269653320313px; margin-left: 29px; min-height: 619px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines"><div style="position: relative; outline: none;"><div class="CodeMirror-measure"><div class="CodeMirror-linenumber CodeMirror-gutter-elt"><div>47</div></div></div><div style="position: relative; z-index: 1; display: none;"></div><div class="CodeMirror-code"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div></div><pre><span class="cm-keyword">import</span> <span class="cm-variable">re</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">django</span>.<span class="cm-variable">utils</span>.<span class="cm-variable">text</span> <span class="cm-keyword">import</span> <span class="cm-variable">compress_sequence</span>, <span class="cm-variable">compress_string</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">django</span>.<span class="cm-variable">utils</span>.<span class="cm-variable">cache</span> <span class="cm-keyword">import</span> <span class="cm-variable">patch_vary_headers</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">6</div></div><pre><span class="cm-variable">re_accepts_gzip</span> = <span class="cm-variable">re</span>.<span class="cm-builtin">compile</span>(<span class="cm-string">r'\bgzip\b'</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">7</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">8</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">9</div></div><pre><span class="cm-keyword">class</span> <span class="cm-def">GZipMiddleware</span>(<span class="cm-builtin">object</span>): # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">10</div></div><pre> <span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">11</div></div><pre><span class="cm-string"> This middleware compresses content if the browser allows gzip compression.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">12</div></div><pre><span class="cm-string"> It sets the Vary header accordingly, so that caches will base their storage</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">13</div></div><pre><span class="cm-string"> on the Accept-Encoding header.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">14</div></div><pre><span class="cm-string"> """</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">15</div></div><pre> <span class="cm-keyword">def</span> <span class="cm-def">process_response</span>(<span class="cm-variable-2">self</span>, <span class="cm-variable">request</span>, <span class="cm-variable">response</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">16</div></div><pre> <span class="cm-comment"># It's not worth attempting to compress really short responses.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">17</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-operator">not</span> <span class="cm-variable">response</span>.<span class="cm-variable">streaming</span> <span class="cm-operator">and</span> <span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>) <span class="cm-operator">&lt;</span> <span class="cm-number">200</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">18</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">19</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">20</div></div><pre> <span class="cm-comment"># Avoid gzipping if we've already got a content-encoding.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">21</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">has_header</span>(<span class="cm-string">'Content-Encoding'</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">22</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">23</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">24</div></div><pre> <span class="cm-variable">patch_vary_headers</span>(<span class="cm-variable">response</span>, (<span class="cm-string">'Accept-Encoding'</span>,))</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">25</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">26</div></div><pre> <span class="cm-variable">ae</span> = <span class="cm-variable">request</span>.<span class="cm-variable">META</span>.<span class="cm-variable">get</span>(<span class="cm-string">'HTTP_ACCEPT_ENCODING'</span>, <span class="cm-string">''</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">27</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-operator">not</span> <span class="cm-variable">re_accepts_gzip</span>.<span class="cm-variable">search</span>(<span class="cm-variable">ae</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">28</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">29</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">30</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">streaming</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">31</div></div><pre> <span class="cm-comment"># Delete the `Content-Length` header for streaming content, because</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">32</div></div><pre> <span class="cm-comment"># we won't know the compressed size until we stream it.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">33</div></div><pre> <span class="cm-variable">response</span>.<span class="cm-variable">streaming_content</span> = <span class="cm-variable">compress_sequence</span>(<span class="cm-variable">response</span>.<span class="cm-variable">streaming_content</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">34</div></div><pre> <span class="cm-keyword">del</span> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Length'</span>]</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">35</div></div><pre> <span class="cm-keyword">else</span>:</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">36</div></div><pre> <span class="cm-comment"># Return the compressed content only if it's actually shorter.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">37</div></div><pre> <span class="cm-variable">compressed_content</span> = <span class="cm-variable">compress_string</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">38</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-builtin">len</span>(<span class="cm-variable">compressed_content</span>) <span class="cm-operator">&gt;=</span> <span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">39</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">40</div></div><pre> <span class="cm-variable">response</span>.<span class="cm-variable">content</span> = <span class="cm-variable">compressed_content</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">41</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Length'</span>] = <span class="cm-builtin">str</span>(<span class="cm-builtin">len</span>(<span class="cm-variable">response</span>.<span class="cm-variable">content</span>))</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">42</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">43</div></div><pre> <span class="cm-keyword">if</span> <span class="cm-variable">response</span>.<span class="cm-variable">has_header</span>(<span class="cm-string">'ETag'</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">44</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'ETag'</span>] = <span class="cm-variable">re</span>.<span class="cm-variable">sub</span>(<span class="cm-string">'"$'</span>, <span class="cm-string">';gzip"'</span>, <span class="cm-variable">response</span>[<span class="cm-string">'ETag'</span>])</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">45</div></div><pre> <span class="cm-variable">response</span>[<span class="cm-string">'Content-Encoding'</span>] = <span class="cm-string">'gzip'</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">46</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">47</div></div><pre> <span class="cm-keyword">return</span> <span class="cm-variable">response</span></pre></div></div><div class="CodeMirror-cursor" style="left: 189.4091796875px; top: 598px; height: 13px;">&nbsp;</div><div class="CodeMirror-cursor CodeMirror-secondarycursor" style="display: none;">&nbsp;</div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; top: 619px;"></div><div class="CodeMirror-gutters" style="height: 619px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div>
623 </div>
623 </div>
624 </div>
624 </div>
625
625
626
626
627
627
628
628
629
629
630 <!--
630 <!--
631 File Edit
631 File Edit
632 -->
632 -->
633
633
634 <h2>File Edit</h2>
634 <h2>File Edit</h2>
635
635
636 <div class="codeblock">
636 <div class="codeblock">
637 <div class="code-header">
637 <div class="code-header">
638 <div class="stats">
638 <div class="stats">
639 <i class="icon-file"></i>
639 <i class="icon-file"></i>
640 <span class="item"><a href="/example/changeset/80ead1899f50a894889e19ffeb49c9cebf5bf045">r8248:80ead1899f50</a></span>
640 <span class="item"><a href="/example/changeset/80ead1899f50a894889e19ffeb49c9cebf5bf045">r8248:80ead1899f50</a></span>
641 <span class="item">1.2 KiB</span>
641 <span class="item">1.2 KiB</span>
642 <span class="item last">text/x-python</span>
642 <span class="item last">text/x-python</span>
643 <div class="buttons">
643 <div class="buttons">
644 <a class="btn btn-mini" href="/example/commits/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">
644 <a class="btn btn-mini" href="/example/commits/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">
645 <i class="icon-time"></i> history
645 <i class="icon-time"></i> history
646 </a>
646 </a>
647
647
648 <a class="btn btn-mini" href="/example/files/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">source</a>
648 <a class="btn btn-mini" href="/example/files/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">source</a>
649 <a class="btn btn-mini" href="/example/raw/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">raw</a>
649 <a class="btn btn-mini" href="/example/raw/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">raw</a>
650 <a class="btn btn-mini" href="/example/rawfile/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">
650 <a class="btn btn-mini" href="/example/rawfile/80ead1899f50a894889e19ffeb49c9cebf5bf045/rhodecode/websetup.py">
651 <i class="icon-archive"></i> download
651 download
652 </a>
652 </a>
653 </div>
653 </div>
654 </div>
654 </div>
655 <div class="form">
655 <div class="form">
656 <label for="set_mode">Editing file:</label>
656 <label for="set_mode">Editing file:</label>
657 rhodecode /
657 rhodecode /
658 <input type="text" name="filename" value="websetup.py">
658 <input type="text" name="filename" value="websetup.py">
659
659
660 <div class="select2-container drop-menu" id="s2id_set_mode"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-2">plain</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen2" class="select2-offscreen">Editing file:</label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-2" id="s2id_autogen2"><div class="select2-drop select2-display-none drop-menu-dropdown select2-with-searchbox"> <div class="select2-search"> <label for="s2id_autogen2_search" class="select2-offscreen">Editing file:</label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-2" id="s2id_autogen2_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-2"> </ul></div></div><select id="set_mode" name="set_mode" tabindex="-1" title="Editing file:" style="display: none;">
660 <div class="select2-container drop-menu" id="s2id_set_mode"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-2">plain</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen2" class="select2-offscreen">Editing file:</label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-2" id="s2id_autogen2"><div class="select2-drop select2-display-none drop-menu-dropdown select2-with-searchbox"> <div class="select2-search"> <label for="s2id_autogen2_search" class="select2-offscreen">Editing file:</label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-2" id="s2id_autogen2_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-2"> </ul></div></div><select id="set_mode" name="set_mode" tabindex="-1" title="Editing file:" style="display: none;">
661 <option selected="selected" value="plain">plain</option>
661 <option selected="selected" value="plain">plain</option>
662 <option value="apl">APL</option><option value="asterisk">Asterisk</option><option value="clike">C</option><option value="clike">C++</option><option value="cobol">Cobol</option><option value="clike">Java</option><option value="clike">C#</option><option value="clike">Scala</option><option value="clojure">Clojure</option><option value="coffeescript">CoffeeScript</option><option value="commonlisp">Common Lisp</option><option value="css">CSS</option><option value="d">D</option><option value="diff">diff</option><option value="dtd">DTD</option><option value="dylan">Dylan</option><option value="ecl">ECL</option><option value="eiffel">Eiffel</option><option value="erlang">Erlang</option><option value="fortran">Fortran</option><option value="mllike">F#</option><option value="gas">Gas</option><option value="go">GO</option><option value="gherkin">Gherkin</option><option value="go">Go</option><option value="groovy">Groovy</option><option value="haml">HAML</option><option value="haskell">Haskell</option><option value="haxe">Haxe</option><option value="htmlembedded">ASP.NET</option><option value="htmlembedded">Embedded Javascript</option><option value="htmlembedded">JavaServer Pages</option><option value="htmlmixed">HTML</option><option value="http">HTTP</option><option value="jade">Jade</option><option value="javascript">JavaScript</option><option value="javascript">JSON</option><option value="javascript">TypeScript</option><option value="jinja2">Jinja2</option><option value="julia">Julia</option><option value="less">LESS</option><option value="livescript">LiveScript</option><option value="lua">Lua</option><option value="markdown">Markdown (GitHub-flavour)</option><option value="mirc">mIRC</option><option value="nginx">Nginx</option><option value="ntriples">NTriples</option><option value="ocaml">OCaml</option><option value="mllike">OCaml</option><option value="octave">Octave</option><option value="pascal">Pascal</option><option value="pegjs">PEG.js</option><option value="perl">Perl</option><option value="php">PHP</option><option value="pig">Pig</option><option value="null">Plain Text</option><option value="properties">Properties files</option><option value="python" selected="selected">Python</option><option value="puppet">Puppet</option><option value="r">R</option><option value="rst">reStructuredText</option><option value="ruby">Ruby</option><option value="rust">Rust</option><option value="sass">Sass</option><option value="scheme">Scheme</option><option value="css">SCSS</option><option value="shell">Shell</option><option value="sieve">Sieve</option><option value="smalltalk">Smalltalk</option><option value="smarty">Smarty</option><option value="smartymixed">SmartyMixed</option><option value="solr">Solr</option><option value="sparql">SPARQL</option><option value="sql">SQL</option><option value="sql">MariaDB</option><option value="stex">sTeX</option><option value="stex">LaTeX</option><option value="verilog">SystemVerilog</option><option value="tcl">Tcl</option><option value="tiddlywiki">TiddlyWiki </option><option value="tiki">Tiki wiki</option><option value="toml">TOML</option><option value="turtle">Turtle</option><option value="vb">VB.NET</option><option value="vbscript">VBScript</option><option value="velocity">Velocity</option><option value="verilog">Verilog</option><option value="xml">XML</option><option value="xml">HTML</option><option value="xquery">XQuery</option><option value="yaml">YAML</option><option value="z80">Z80</option></select>
662 <option value="apl">APL</option><option value="asterisk">Asterisk</option><option value="clike">C</option><option value="clike">C++</option><option value="cobol">Cobol</option><option value="clike">Java</option><option value="clike">C#</option><option value="clike">Scala</option><option value="clojure">Clojure</option><option value="coffeescript">CoffeeScript</option><option value="commonlisp">Common Lisp</option><option value="css">CSS</option><option value="d">D</option><option value="diff">diff</option><option value="dtd">DTD</option><option value="dylan">Dylan</option><option value="ecl">ECL</option><option value="eiffel">Eiffel</option><option value="erlang">Erlang</option><option value="fortran">Fortran</option><option value="mllike">F#</option><option value="gas">Gas</option><option value="go">GO</option><option value="gherkin">Gherkin</option><option value="go">Go</option><option value="groovy">Groovy</option><option value="haml">HAML</option><option value="haskell">Haskell</option><option value="haxe">Haxe</option><option value="htmlembedded">ASP.NET</option><option value="htmlembedded">Embedded Javascript</option><option value="htmlembedded">JavaServer Pages</option><option value="htmlmixed">HTML</option><option value="http">HTTP</option><option value="jade">Jade</option><option value="javascript">JavaScript</option><option value="javascript">JSON</option><option value="javascript">TypeScript</option><option value="jinja2">Jinja2</option><option value="julia">Julia</option><option value="less">LESS</option><option value="livescript">LiveScript</option><option value="lua">Lua</option><option value="markdown">Markdown (GitHub-flavour)</option><option value="mirc">mIRC</option><option value="nginx">Nginx</option><option value="ntriples">NTriples</option><option value="ocaml">OCaml</option><option value="mllike">OCaml</option><option value="octave">Octave</option><option value="pascal">Pascal</option><option value="pegjs">PEG.js</option><option value="perl">Perl</option><option value="php">PHP</option><option value="pig">Pig</option><option value="null">Plain Text</option><option value="properties">Properties files</option><option value="python" selected="selected">Python</option><option value="puppet">Puppet</option><option value="r">R</option><option value="rst">reStructuredText</option><option value="ruby">Ruby</option><option value="rust">Rust</option><option value="sass">Sass</option><option value="scheme">Scheme</option><option value="css">SCSS</option><option value="shell">Shell</option><option value="sieve">Sieve</option><option value="smalltalk">Smalltalk</option><option value="smarty">Smarty</option><option value="smartymixed">SmartyMixed</option><option value="solr">Solr</option><option value="sparql">SPARQL</option><option value="sql">SQL</option><option value="sql">MariaDB</option><option value="stex">sTeX</option><option value="stex">LaTeX</option><option value="verilog">SystemVerilog</option><option value="tcl">Tcl</option><option value="tiddlywiki">TiddlyWiki </option><option value="tiki">Tiki wiki</option><option value="toml">TOML</option><option value="turtle">Turtle</option><option value="vb">VB.NET</option><option value="vbscript">VBScript</option><option value="velocity">Velocity</option><option value="verilog">Verilog</option><option value="xml">XML</option><option value="xml">HTML</option><option value="xquery">XQuery</option><option value="yaml">YAML</option><option value="z80">Z80</option></select>
663 <script>
663 <script>
664 $(document).ready(function() {
664 $(document).ready(function() {
665 $('#set_mode').select2({
665 $('#set_mode').select2({
666 containerCssClass: 'drop-menu',
666 containerCssClass: 'drop-menu',
667 dropdownCssClass: 'drop-menu-dropdown',
667 dropdownCssClass: 'drop-menu-dropdown',
668 dropdownAutoWidth: true
668 dropdownAutoWidth: true
669 });
669 });
670 });
670 });
671 </script>
671 </script>
672
672
673 <label for="line_wrap">line wraps</label>
673 <label for="line_wrap">line wraps</label>
674 <div class="select2-container drop-menu" id="s2id_line_wrap"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-3">off</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen3" class="select2-offscreen">line wraps</label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-3" id="s2id_autogen3"><div class="select2-drop select2-display-none drop-menu-dropdown"> <div class="select2-search select2-search-hidden select2-offscreen"> <label for="s2id_autogen3_search" class="select2-offscreen">line wraps</label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-3" id="s2id_autogen3_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-3"> </ul></div></div><select id="line_wrap" name="line_wrap" tabindex="-1" title="line wraps" style="display: none;">
674 <div class="select2-container drop-menu" id="s2id_line_wrap"><a href="javascript:void(0)" class="select2-choice" tabindex="-1"> <span class="select2-chosen" id="select2-chosen-3">off</span><abbr class="select2-search-choice-close"></abbr> <span class="select2-arrow" role="presentation"><b role="presentation"></b></span></a><label for="s2id_autogen3" class="select2-offscreen">line wraps</label><input class="select2-focusser select2-offscreen" type="text" aria-haspopup="true" role="button" aria-labelledby="select2-chosen-3" id="s2id_autogen3"><div class="select2-drop select2-display-none drop-menu-dropdown"> <div class="select2-search select2-search-hidden select2-offscreen"> <label for="s2id_autogen3_search" class="select2-offscreen">line wraps</label> <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" role="combobox" aria-expanded="true" aria-autocomplete="list" aria-owns="select2-results-3" id="s2id_autogen3_search" placeholder=""> </div> <ul class="select2-results" role="listbox" id="select2-results-3"> </ul></div></div><select id="line_wrap" name="line_wrap" tabindex="-1" title="line wraps" style="display: none;">
675 <option value="on">on</option>
675 <option value="on">on</option>
676 <option selected="selected" value="off">off</option>
676 <option selected="selected" value="off">off</option>
677 </select>
677 </select>
678 <script>
678 <script>
679 $(document).ready(function() {
679 $(document).ready(function() {
680 $('#line_wrap').select2({
680 $('#line_wrap').select2({
681 containerCssClass: 'drop-menu',
681 containerCssClass: 'drop-menu',
682 dropdownCssClass: 'drop-menu-dropdown',
682 dropdownCssClass: 'drop-menu-dropdown',
683 dropdownAutoWidth: true,
683 dropdownAutoWidth: true,
684 minimumResultsForSearch: -1
684 minimumResultsForSearch: -1
685
685
686 });
686 });
687 });
687 });
688 </script>
688 </script>
689
689
690 <div id="render_preview" class="btn btn-mini hidden disabled">Preview</div>
690 <div id="render_preview" class="btn btn-mini hidden disabled">Preview</div>
691 </div>
691 </div>
692 </div>
692 </div>
693 <div id="editor_container">
693 <div id="editor_container">
694 <pre id="editor_pre"></pre>
694 <pre id="editor_pre"></pre>
695 <textarea id="editor" name="content" style="display: none;"># -*- coding: utf-8 -*-
695 <textarea id="editor" name="content" style="display: none;"># -*- coding: utf-8 -*-
696
696
697 # Published under Commercial License.
697 # Published under Commercial License.
698 # Read the full license text at https://rhodecode.com/licenses.
698 # Read the full license text at https://rhodecode.com/licenses.
699 """
699 """
700 rhodecode.websetup
700 rhodecode.websetup
701 ~~~~~~~~~~~~~~~~~~
701 ~~~~~~~~~~~~~~~~~~
702
702
703 Weboperations and setup for rhodecode
703 Weboperations and setup for rhodecode
704
704
705 :created_on: Dec 11, 2010
705 :created_on: Dec 11, 2010
706 :author: marcink
706 :author: marcink
707 :copyright: (c) 2013-2015 RhodeCode GmbH.
707 :copyright: (c) 2013-2015 RhodeCode GmbH.
708 :license: Commercial License, see LICENSE for more details.
708 :license: Commercial License, see LICENSE for more details.
709 """
709 """
710
710
711 import logging
711 import logging
712
712
713 from rhodecode.config.environment import load_environment
713 from rhodecode.config.environment import load_environment
714 from rhodecode.lib.db_manage import DbManage
714 from rhodecode.lib.db_manage import DbManage
715 from rhodecode.model.meta import Session
715 from rhodecode.model.meta import Session
716
716
717
717
718 log = logging.getLogger(__name__)
718 log = logging.getLogger(__name__)
719
719
720
720
721 def setup_app(command, conf, vars):
721 def setup_app(command, conf, vars):
722 """Place any commands to setup rhodecode here"""
722 """Place any commands to setup rhodecode here"""
723 dbconf = conf['sqlalchemy.db1.url']
723 dbconf = conf['sqlalchemy.db1.url']
724 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'],
724 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'],
725 tests=False, cli_args=command.options.__dict__)
725 tests=False, cli_args=command.options.__dict__)
726 dbmanage.create_tables(override=True)
726 dbmanage.create_tables(override=True)
727 dbmanage.set_db_version()
727 dbmanage.set_db_version()
728 opts = dbmanage.config_prompt(None)
728 opts = dbmanage.config_prompt(None)
729 dbmanage.create_settings(opts)
729 dbmanage.create_settings(opts)
730 dbmanage.create_default_user()
730 dbmanage.create_default_user()
731 dbmanage.admin_prompt()
731 dbmanage.admin_prompt()
732 dbmanage.create_permissions()
732 dbmanage.create_permissions()
733 dbmanage.populate_default_permissions()
733 dbmanage.populate_default_permissions()
734 Session().commit()
734 Session().commit()
735 load_environment(conf.global_conf, conf.local_conf, initial=True)
735 load_environment(conf.global_conf, conf.local_conf, initial=True)
736 </textarea><div class="CodeMirror cm-s-default CodeMirror-focused"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-hscrollbar" style="left: 29px; min-height: 18px;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-vscrollbar" style="display: block; bottom: 0px; min-width: 18px;"><div style="min-width: 1px; height: 554px;"></div></div><div class="CodeMirror-scrollbar-filler"></div><div class="CodeMirror-gutter-filler"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="min-width: 579.350463867188px; margin-left: 29px; min-height: 554px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines"><div style="position: relative; outline: none;"><div class="CodeMirror-measure"><div style="width: 50px; height: 50px; overflow-x: scroll;"></div></div><div style="position: relative; z-index: 1; display: none;"></div><div class="CodeMirror-code"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div></div><pre><span class="cm-comment"># -*- coding: utf-8 -*-</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre><span class="cm-comment"># Published under Commercial License.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre><span class="cm-comment"># Read the full license text at https://rhodecode.com/licenses.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre><span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">6</div></div><pre><span class="cm-string">rhodecode.websetup</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">7</div></div><pre><span class="cm-string">~~~~~~~~~~~~~~~~~~</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">8</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">9</div></div><pre><span class="cm-string">Weboperations and setup for rhodecode</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">10</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">11</div></div><pre><span class="cm-string">:created_on: Dec 11, 2010</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">12</div></div><pre><span class="cm-string">:author: marcink</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">13</div></div><pre><span class="cm-string">:copyright: (c) 2013-2015 RhodeCode GmbH.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">14</div></div><pre><span class="cm-string">:license: Commercial License, see LICENSE for more details.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">15</div></div><pre><span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">16</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">17</div></div><pre><span class="cm-keyword">import</span> <span class="cm-variable">logging</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">18</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">19</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">config</span>.<span class="cm-variable">environment</span> <span class="cm-keyword">import</span> <span class="cm-variable">load_environment</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">20</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">lib</span>.<span class="cm-variable">db_manage</span> <span class="cm-keyword">import</span> <span class="cm-variable">DbManage</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">21</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">model</span>.<span class="cm-variable">meta</span> <span class="cm-keyword">import</span> <span class="cm-variable">Session</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">22</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">23</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">24</div></div><pre><span class="cm-variable">log</span> = <span class="cm-variable">logging</span>.<span class="cm-variable">getLogger</span>(<span class="cm-variable">__name__</span>) # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">25</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">26</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">27</div></div><pre><span class="cm-keyword">def</span> <span class="cm-def">setup_app</span>(<span class="cm-variable">command</span>, <span class="cm-variable">conf</span>, <span class="cm-builtin">vars</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">28</div></div><pre> <span class="cm-string">"""Place any commands to setup rhodecode here"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">29</div></div><pre> <span class="cm-variable">dbconf</span> = <span class="cm-variable">conf</span>[<span class="cm-string">'sqlalchemy.db1.url'</span>]</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">30</div></div><pre> <span class="cm-variable">dbmanage</span> = <span class="cm-variable">DbManage</span>(<span class="cm-variable">log_sql</span>=<span class="cm-builtin">True</span>, <span class="cm-variable">dbconf</span>=<span class="cm-variable">dbconf</span>, <span class="cm-variable">root</span>=<span class="cm-variable">conf</span>[<span class="cm-string">'here'</span>],</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">31</div></div><pre> <span class="cm-variable">tests</span>=<span class="cm-builtin">False</span>, <span class="cm-variable">cli_args</span>=<span class="cm-variable">command</span>.<span class="cm-variable">options</span>.<span class="cm-variable">__dict__</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">32</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_tables</span>(<span class="cm-variable">override</span>=<span class="cm-builtin">True</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">33</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">set_db_version</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">34</div></div><pre> <span class="cm-variable">opts</span> = <span class="cm-variable">dbmanage</span>.<span class="cm-variable">config_prompt</span>(<span class="cm-builtin">None</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">35</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_settings</span>(<span class="cm-variable">opts</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">36</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_default_user</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">37</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">admin_prompt</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">38</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_permissions</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">39</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">populate_default_permissions</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">40</div></div><pre> <span class="cm-variable">Session</span>().<span class="cm-variable">commit</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">41</div></div><pre> <span class="cm-variable">load_environment</span>(<span class="cm-variable">conf</span>.<span class="cm-variable">global_conf</span>, <span class="cm-variable">conf</span>.<span class="cm-variable">local_conf</span>, <span class="cm-variable">initial</span>=<span class="cm-builtin">True</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">42</div></div><pre>&nbsp;</pre></div></div><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 13px;">&nbsp;</div><div class="CodeMirror-cursor CodeMirror-secondarycursor" style="display: none;">&nbsp;</div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; top: 554px;"></div><div class="CodeMirror-gutters" style="height: 554px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div>
736 </textarea><div class="CodeMirror cm-s-default CodeMirror-focused"><div style="overflow: hidden; position: relative; width: 3px; height: 0px; top: 5px; left: 34px;"><textarea autocorrect="off" autocapitalize="off" spellcheck="false" style="position: absolute; padding: 0px; width: 1000px; height: 1em; outline: none;" tabindex="0"></textarea></div><div class="CodeMirror-hscrollbar" style="left: 29px; min-height: 18px;"><div style="height: 100%; min-height: 1px; width: 0px;"></div></div><div class="CodeMirror-vscrollbar" style="display: block; bottom: 0px; min-width: 18px;"><div style="min-width: 1px; height: 554px;"></div></div><div class="CodeMirror-scrollbar-filler"></div><div class="CodeMirror-gutter-filler"></div><div class="CodeMirror-scroll" tabindex="-1"><div class="CodeMirror-sizer" style="min-width: 579.350463867188px; margin-left: 29px; min-height: 554px;"><div style="position: relative; top: 0px;"><div class="CodeMirror-lines"><div style="position: relative; outline: none;"><div class="CodeMirror-measure"><div style="width: 50px; height: 50px; overflow-x: scroll;"></div></div><div style="position: relative; z-index: 1; display: none;"></div><div class="CodeMirror-code"><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">1</div></div><pre><span class="cm-comment"># -*- coding: utf-8 -*-</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">2</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">3</div></div><pre><span class="cm-comment"># Published under Commercial License.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">4</div></div><pre><span class="cm-comment"># Read the full license text at https://rhodecode.com/licenses.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">5</div></div><pre><span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">6</div></div><pre><span class="cm-string">rhodecode.websetup</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">7</div></div><pre><span class="cm-string">~~~~~~~~~~~~~~~~~~</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">8</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">9</div></div><pre><span class="cm-string">Weboperations and setup for rhodecode</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">10</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">11</div></div><pre><span class="cm-string">:created_on: Dec 11, 2010</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">12</div></div><pre><span class="cm-string">:author: marcink</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">13</div></div><pre><span class="cm-string">:copyright: (c) 2013-2015 RhodeCode GmbH.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">14</div></div><pre><span class="cm-string">:license: Commercial License, see LICENSE for more details.</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">15</div></div><pre><span class="cm-string">"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">16</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">17</div></div><pre><span class="cm-keyword">import</span> <span class="cm-variable">logging</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">18</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">19</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">config</span>.<span class="cm-variable">environment</span> <span class="cm-keyword">import</span> <span class="cm-variable">load_environment</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">20</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">lib</span>.<span class="cm-variable">db_manage</span> <span class="cm-keyword">import</span> <span class="cm-variable">DbManage</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">21</div></div><pre><span class="cm-keyword">from</span> <span class="cm-variable">rhodecode</span>.<span class="cm-variable">model</span>.<span class="cm-variable">meta</span> <span class="cm-keyword">import</span> <span class="cm-variable">Session</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">22</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">23</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">24</div></div><pre><span class="cm-variable">log</span> = <span class="cm-variable">logging</span>.<span class="cm-variable">getLogger</span>(<span class="cm-variable">__name__</span>) # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">25</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">26</div></div><pre>&nbsp;</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">27</div></div><pre><span class="cm-keyword">def</span> <span class="cm-def">setup_app</span>(<span class="cm-variable">command</span>, <span class="cm-variable">conf</span>, <span class="cm-builtin">vars</span>):</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">28</div></div><pre> <span class="cm-string">"""Place any commands to setup rhodecode here"""</span></pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">29</div></div><pre> <span class="cm-variable">dbconf</span> = <span class="cm-variable">conf</span>[<span class="cm-string">'sqlalchemy.db1.url'</span>]</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">30</div></div><pre> <span class="cm-variable">dbmanage</span> = <span class="cm-variable">DbManage</span>(<span class="cm-variable">log_sql</span>=<span class="cm-builtin">True</span>, <span class="cm-variable">dbconf</span>=<span class="cm-variable">dbconf</span>, <span class="cm-variable">root</span>=<span class="cm-variable">conf</span>[<span class="cm-string">'here'</span>],</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">31</div></div><pre> <span class="cm-variable">tests</span>=<span class="cm-builtin">False</span>, <span class="cm-variable">cli_args</span>=<span class="cm-variable">command</span>.<span class="cm-variable">options</span>.<span class="cm-variable">__dict__</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">32</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_tables</span>(<span class="cm-variable">override</span>=<span class="cm-builtin">True</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">33</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">set_db_version</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">34</div></div><pre> <span class="cm-variable">opts</span> = <span class="cm-variable">dbmanage</span>.<span class="cm-variable">config_prompt</span>(<span class="cm-builtin">None</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">35</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_settings</span>(<span class="cm-variable">opts</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">36</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_default_user</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">37</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">admin_prompt</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">38</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">create_permissions</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">39</div></div><pre> <span class="cm-variable">dbmanage</span>.<span class="cm-variable">populate_default_permissions</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">40</div></div><pre> <span class="cm-variable">Session</span>().<span class="cm-variable">commit</span>()</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">41</div></div><pre> <span class="cm-variable">load_environment</span>(<span class="cm-variable">conf</span>.<span class="cm-variable">global_conf</span>, <span class="cm-variable">conf</span>.<span class="cm-variable">local_conf</span>, <span class="cm-variable">initial</span>=<span class="cm-builtin">True</span>)</pre></div><div style="position: relative;"><div class="CodeMirror-gutter-wrapper" style="position: absolute; left: -29px;"><div class="CodeMirror-linenumber CodeMirror-gutter-elt" style="left: 0px; width: 20px;">42</div></div><pre>&nbsp;</pre></div></div><div class="CodeMirror-cursor" style="left: 4px; top: 0px; height: 13px;">&nbsp;</div><div class="CodeMirror-cursor CodeMirror-secondarycursor" style="display: none;">&nbsp;</div></div></div></div></div><div style="position: absolute; height: 30px; width: 1px; top: 554px;"></div><div class="CodeMirror-gutters" style="height: 554px;"><div class="CodeMirror-gutter CodeMirror-linenumbers" style="width: 28px;"></div></div></div></div>
737 <div id="editor_preview"></div>
737 <div id="editor_preview"></div>
738 </div>
738 </div>
739 <div class="message">
739 <div class="message">
740 <label class="codeblock-label">Commit Message</label>
740 <label class="codeblock-label">Commit Message</label>
741 <textarea id="commit" name="message" placeholder="Edited file rhodecode/websetup.py via RhodeCode"></textarea>
741 <textarea id="commit" name="message" placeholder="Edited file rhodecode/websetup.py via RhodeCode"></textarea>
742 </div>
742 </div>
743 </div>
743 </div>
744
744
745
745
746
746
747
747
748
748
749
749
750 <!--
750 <!--
751 Commit with comments
751 Commit with comments
752 -->
752 -->
753
753
754 <h2>Commit with comments</h2>
754 <h2>Commit with comments</h2>
755
755
756 <div class="diff-container" id="diff-container-140360037209920">
756 <div class="diff-container" id="diff-container-140360037209920">
757 <div id="c-4e5ee86997c6-7046e4320b26_target"></div>
757 <div id="c-4e5ee86997c6-7046e4320b26_target"></div>
758 <div id="c-4e5ee86997c6-7046e4320b26" class="diffblock margined comm">
758 <div id="c-4e5ee86997c6-7046e4320b26" class="diffblock margined comm">
759 <div class="code-header">
759 <div class="code-header">
760 <div title="Go back to changed files overview">
760 <div title="Go back to changed files overview">
761 <a href="#changes_box">
761 <a href="#changes_box">
762 <i class="icon-circle-arrow-up"></i>
762 <i class="icon-circle-arrow-up"></i>
763 </a>
763 </a>
764 </div>
764 </div>
765 <div class="changeset_header">
765 <div class="changeset_header">
766 <div class="changeset_file">
766 <div class="changeset_file">
767 <i class="icon-file"></i>
767 <i class="icon-file"></i>
768 <a href="/andersonsantos/rhodecode-dev-fork/files/4e5ee86997c64981d85cf62283af448624e26929/rhodecode/tests/functional/test_compare_local.py">rhodecode/tests/functional/test_compare_local.py</a>
768 <a href="/andersonsantos/rhodecode-dev-fork/files/4e5ee86997c64981d85cf62283af448624e26929/rhodecode/tests/functional/test_compare_local.py">rhodecode/tests/functional/test_compare_local.py</a>
769 </div>
769 </div>
770 <div class="diff-actions">
770 <div class="diff-actions">
771 <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?fulldiff=1&amp;diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=diff&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Show full diff for this file">
771 <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?fulldiff=1&amp;diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=diff&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Show full diff for this file">
772 <img class="icon" src="/images/icons/page_white_go.png">
772 <img class="icon" src="/images/icons/page_white_go.png">
773 </a>
773 </a>
774 <a href="/andersonsantos/rhodecode-dev-fork/diff-2way/rhodecode/tests/functional/test_compare_local.py?fulldiff=1&amp;diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=diff&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Show full side-by-side diff for this file">
774 <a href="/andersonsantos/rhodecode-dev-fork/diff-2way/rhodecode/tests/functional/test_compare_local.py?fulldiff=1&amp;diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=diff&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Show full side-by-side diff for this file">
775 <img class="icon" src="/images/icons/application_double.png">
775 <img class="icon" src="/images/icons/application_double.png">
776 </a>
776 </a>
777 <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=raw&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Raw diff">
777 <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=raw&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Raw diff">
778 <img class="icon" src="/images/icons/page_white.png">
778 <img class="icon" src="/images/icons/page_white.png">
779 </a>
779 </a>
780 <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=download&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Download diff">
780 <a href="/andersonsantos/rhodecode-dev-fork/diff/rhodecode/tests/functional/test_compare_local.py?diff1=682135c2e3958d7c84db06d716efe482bd3ce7c6&amp;diff=download&amp;diff2=4e5ee86997c64981d85cf62283af448624e26929" class="tooltip" title="Download diff">
781 <img class="icon" src="/images/icons/page_save.png">
781 <img class="icon" src="/images/icons/page_save.png">
782 </a>
782 </a>
783 <a class="tooltip" href="/andersonsantos/rhodecode-dev-fork/changeset/4e5ee86997c64981d85cf62283af448624e26929?c-4e5ee86997c6-7046e4320b26=WS%3A1&amp;c-4e5ee86997c6-7046e4320b26=C%3A3#c-4e5ee86997c6-7046e4320b26" title="Ignore white space"><img alt="Ignore white space" class="icon" src="/images/icons/text_strikethrough.png"></a>
783 <a class="tooltip" href="/andersonsantos/rhodecode-dev-fork/changeset/4e5ee86997c64981d85cf62283af448624e26929?c-4e5ee86997c6-7046e4320b26=WS%3A1&amp;c-4e5ee86997c6-7046e4320b26=C%3A3#c-4e5ee86997c6-7046e4320b26" title="Ignore white space"><img alt="Ignore white space" class="icon" src="/images/icons/text_strikethrough.png"></a>
784 <a class="tooltip" href="/andersonsantos/rhodecode-dev-fork/changeset/4e5ee86997c64981d85cf62283af448624e26929?c-4e5ee86997c6-7046e4320b26=C%3A6#c-4e5ee86997c6-7046e4320b26" title="increase diff context to 6 lines"><img alt="increase diff context to 6 lines" class="icon" src="/images/icons/table_add.png"></a>
784 <a class="tooltip" href="/andersonsantos/rhodecode-dev-fork/changeset/4e5ee86997c64981d85cf62283af448624e26929?c-4e5ee86997c6-7046e4320b26=C%3A6#c-4e5ee86997c6-7046e4320b26" title="increase diff context to 6 lines"><img alt="increase diff context to 6 lines" class="icon" src="/images/icons/table_add.png"></a>
785 </div>
785 </div>
786 <span>
786 <span>
787 <label>
787 <label>
788 Show inline comments
788 Show inline comments
789 <input checked="checked" class="show-inline-comments" id="" id_for="c-4e5ee86997c6-7046e4320b26" name="" type="checkbox" value="1">
789 <input checked="checked" class="show-inline-comments" id="" id_for="c-4e5ee86997c6-7046e4320b26" name="" type="checkbox" value="1">
790 </label>
790 </label>
791 </span>
791 </span>
792 </div>
792 </div>
793 </div>
793 </div>
794 <div class="code-body">
794 <div class="code-body">
795 <div class="full_f_path" path="rhodecode/tests/functional/test_compare_local.py"></div>
795 <div class="full_f_path" path="rhodecode/tests/functional/test_compare_local.py"></div>
796 <table class="code-difftable">
796 <table class="code-difftable">
797 <tbody><tr class="line context">
797 <tbody><tr class="line context">
798 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td>
798 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td>
799 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td>
799 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td>
800 <td class="code ">
800 <td class="code ">
801 <pre>@@ -59,7 +59,7 @@
801 <pre>@@ -59,7 +59,7 @@
802 </pre>
802 </pre>
803 </td>
803 </td>
804 </tr>
804 </tr>
805 <tr class="line unmod">
805 <tr class="line unmod">
806 <td id="rhodecodetestsfunctionaltest_compare_localpy_o59" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o59">59</a></td>
806 <td id="rhodecodetestsfunctionaltest_compare_localpy_o59" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o59">59</a></td>
807 <td id="rhodecodetestsfunctionaltest_compare_localpy_n59" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n59">59</a></td>
807 <td id="rhodecodetestsfunctionaltest_compare_localpy_n59" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n59">59</a></td>
808 <td class="code ">
808 <td class="code ">
809 <pre> 'tag': 'v0.2.0',
809 <pre> 'tag': 'v0.2.0',
810 </pre>
810 </pre>
811 </td>
811 </td>
812 </tr>
812 </tr>
813 <tr class="line unmod">
813 <tr class="line unmod">
814 <td id="rhodecodetestsfunctionaltest_compare_localpy_o60" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o60">60</a></td>
814 <td id="rhodecodetestsfunctionaltest_compare_localpy_o60" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o60">60</a></td>
815 <td id="rhodecodetestsfunctionaltest_compare_localpy_n60" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n60">60</a></td>
815 <td id="rhodecodetestsfunctionaltest_compare_localpy_n60" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n60">60</a></td>
816 <td class="code ">
816 <td class="code ">
817 <pre> 'branch': 'default',
817 <pre> 'branch': 'default',
818 </pre>
818 </pre>
819 </td>
819 </td>
820 </tr>
820 </tr>
821 <tr class="line unmod">
821 <tr class="line unmod">
822 <td id="rhodecodetestsfunctionaltest_compare_localpy_o61" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o61">61</a></td>
822 <td id="rhodecodetestsfunctionaltest_compare_localpy_o61" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o61">61</a></td>
823 <td id="rhodecodetestsfunctionaltest_compare_localpy_n61" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n61">61</a></td>
823 <td id="rhodecodetestsfunctionaltest_compare_localpy_n61" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n61">61</a></td>
824 <td class="code ">
824 <td class="code ">
825 <pre> 'response': # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.
825 <pre> 'response': # Intentionally long line to show what will happen if this line does not fit onto the screen. It might have some horizontal scrolling applied or some other fancy mechanism to deal with it.
826 </pre>
826 </pre>
827 </td>
827 </td>
828 </tr>
828 </tr>
829 <tr class="line del">
829 <tr class="line del">
830 <td id="rhodecodetestsfunctionaltest_compare_localpy_o62" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o62">62</a></td>
830 <td id="rhodecodetestsfunctionaltest_compare_localpy_o62" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o62">62</a></td>
831 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td>
831 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td>
832 <td class="code ">
832 <td class="code ">
833 <pre> '147 files changed: 5700 inserted, 10176 deleted'
833 <pre> '147 files changed: 5700 inserted, 10176 deleted'
834 </pre>
834 </pre>
835 </td>
835 </td>
836 </tr>
836 </tr>
837 <tr class="line add">
837 <tr class="line add">
838 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
838 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
839 <td id="rhodecodetestsfunctionaltest_compare_localpy_n62" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n62">62</a></td>
839 <td id="rhodecodetestsfunctionaltest_compare_localpy_n62" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n62">62</a></td>
840 <td class="code ">
840 <td class="code ">
841 <pre><ins> </ins> '147 files changed: 5700 inserted, 10176 deleted'
841 <pre><ins> </ins> '147 files changed: 5700 inserted, 10176 deleted'
842 </pre>
842 </pre>
843 </td>
843 </td>
844 </tr>
844 </tr>
845 <tr class="line unmod">
845 <tr class="line unmod">
846 <td id="rhodecodetestsfunctionaltest_compare_localpy_o63" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o63">63</a></td>
846 <td id="rhodecodetestsfunctionaltest_compare_localpy_o63" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o63">63</a></td>
847 <td id="rhodecodetestsfunctionaltest_compare_localpy_n63" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n63">63</a></td>
847 <td id="rhodecodetestsfunctionaltest_compare_localpy_n63" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n63">63</a></td>
848 <td class="code ">
848 <td class="code ">
849 <pre> },
849 <pre> },
850 </pre>
850 </pre>
851 </td>
851 </td>
852 </tr>
852 </tr>
853 <tr class="line unmod">
853 <tr class="line unmod">
854 <td id="rhodecodetestsfunctionaltest_compare_localpy_o64" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o64">64</a></td>
854 <td id="rhodecodetestsfunctionaltest_compare_localpy_o64" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o64">64</a></td>
855 <td id="rhodecodetestsfunctionaltest_compare_localpy_n64" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n64">64</a></td>
855 <td id="rhodecodetestsfunctionaltest_compare_localpy_n64" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n64">64</a></td>
856 <td class="code ">
856 <td class="code ">
857 <pre> 'git': {
857 <pre> 'git': {
858 </pre>
858 </pre>
859 </td>
859 </td>
860 </tr>
860 </tr>
861 <tr class="line unmod">
861 <tr class="line unmod">
862 <td id="rhodecodetestsfunctionaltest_compare_localpy_o65" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o65">65</a></td>
862 <td id="rhodecodetestsfunctionaltest_compare_localpy_o65" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o65">65</a></td>
863 <td id="rhodecodetestsfunctionaltest_compare_localpy_n65" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n65">65</a></td>
863 <td id="rhodecodetestsfunctionaltest_compare_localpy_n65" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n65">65</a></td>
864 <td class="code ">
864 <td class="code ">
865 <pre> 'tag': 'v0.2.2',
865 <pre> 'tag': 'v0.2.2',
866 </pre>
866 </pre>
867 </td>
867 </td>
868 </tr>
868 </tr>
869 <tr class="line context">
869 <tr class="line context">
870 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td>
870 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o...">...</a></td>
871 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td>
871 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n...">...</a></td>
872 <td class="code ">
872 <td class="code ">
873 <pre>@@ -77,9 +77,11 @@
873 <pre>@@ -77,9 +77,11 @@
874 </pre>
874 </pre>
875 </td>
875 </td>
876 </tr>
876 </tr>
877 <tr class="line unmod">
877 <tr class="line unmod">
878 <td id="rhodecodetestsfunctionaltest_compare_localpy_o77" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o77">77</a></td>
878 <td id="rhodecodetestsfunctionaltest_compare_localpy_o77" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o77">77</a></td>
879 <td id="rhodecodetestsfunctionaltest_compare_localpy_n77" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n77">77</a></td>
879 <td id="rhodecodetestsfunctionaltest_compare_localpy_n77" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n77">77</a></td>
880 <td class="code ">
880 <td class="code ">
881 <pre> target_ref=revisions[backend.alias]['tag'],
881 <pre> target_ref=revisions[backend.alias]['tag'],
882 </pre>
882 </pre>
883 </td>
883 </td>
884 </tr>
884 </tr>
885 <tr class="line unmod">
885 <tr class="line unmod">
886 <td id="rhodecodetestsfunctionaltest_compare_localpy_o78" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o78">78</a></td>
886 <td id="rhodecodetestsfunctionaltest_compare_localpy_o78" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o78">78</a></td>
887 <td id="rhodecodetestsfunctionaltest_compare_localpy_n78" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n78">78</a></td>
887 <td id="rhodecodetestsfunctionaltest_compare_localpy_n78" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n78">78</a></td>
888 <td class="code ">
888 <td class="code ">
889 <pre> ))
889 <pre> ))
890 </pre>
890 </pre>
891 </td>
891 </td>
892 </tr><tr id="comment-tr-3754" class="inline-comments"><td></td><td></td><td>
892 </tr><tr id="comment-tr-3754" class="inline-comments"><td></td><td></td><td>
893
893
894 <div class="comment" id="comment-3754" line="n78">
894 <div class="comment" id="comment-3754" line="n78">
895 <div class="comment-wrapp">
895 <div class="comment-wrapp">
896 <div class="meta">
896 <div class="meta">
897 <span class="gravatar">
897 <span class="gravatar">
898 <img src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&amp;s=40" height="20" width="20">
898 <img src="https://secure.gravatar.com/avatar/72706ebd30734451af9ff3fb59f05ff1?d=identicon&amp;s=40" height="20" width="20">
899 </span>
899 </span>
900 <span class="user">
900 <span class="user">
901 anderson
901 anderson
902 </span>
902 </span>
903 <span class="date">
903 <span class="date">
904 just now |
904 just now |
905 </span>
905 </span>
906 <span class="status-change">
906 <span class="status-change">
907 Comment on commit
907 Comment on commit
908 </span>
908 </span>
909 <a class="permalink" href="#comment-3754"></a>
909 <a class="permalink" href="#comment-3754"></a>
910 </div>
910 </div>
911 <div class="text">
911 <div class="text">
912 <div class="rst-block"><p>commented line
912 <div class="rst-block"><p>commented line
913 with multiple lines</p>
913 with multiple lines</p>
914 </div>
914 </div>
915 </div>
915 </div>
916 </div>
916 </div>
917 </div><div class="add-comment"><span class="btn btn-default">Add another comment</span></div>
917 </div><div class="add-comment"><span class="btn btn-default">Add another comment</span></div>
918
918
919 </td></tr>
919 </td></tr>
920 <tr class="line unmod">
920 <tr class="line unmod">
921 <td id="rhodecodetestsfunctionaltest_compare_localpy_o79" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o79">79</a></td>
921 <td id="rhodecodetestsfunctionaltest_compare_localpy_o79" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o79">79</a></td>
922 <td id="rhodecodetestsfunctionaltest_compare_localpy_n79" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n79">79</a></td>
922 <td id="rhodecodetestsfunctionaltest_compare_localpy_n79" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n79">79</a></td>
923 <td class="code ">
923 <td class="code ">
924 <pre></pre>
924 <pre></pre>
925 </td>
925 </td>
926 </tr>
926 </tr>
927 <tr class="line del form-open hl-comment">
927 <tr class="line del form-open hl-comment">
928 <td id="rhodecodetestsfunctionaltest_compare_localpy_o80" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o80">80</a></td>
928 <td id="rhodecodetestsfunctionaltest_compare_localpy_o80" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o80">80</a></td>
929 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td>
929 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td>
930 <td class="code ">
930 <td class="code ">
931 <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del>
931 <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del>
932 </pre>
932 </pre>
933 </td>
933 </td>
934 </tr><tr id="comment-tr-undefined" class="comment-form-inline"><td></td><td></td><td>
934 </tr><tr id="comment-tr-undefined" class="comment-form-inline"><td></td><td></td><td>
935 <div class="comment-inline-form ac">
935 <div class="comment-inline-form ac">
936 <div class="overlay"><div class="overlay-text">Submitting...</div></div>
936 <div class="overlay"><div class="overlay-text">Submitting...</div></div>
937 <form action="#" class="inline-form" method="get">
937 <form action="#" class="inline-form" method="get">
938 <div id="edit-container_o80" class="clearfix">
938 <div id="edit-container_o80" class="clearfix">
939 <div class="comment-title pull-left">
939 <div class="comment-title pull-left">
940 Commenting on line o80.
940 Commenting on line o80.
941 </div>
941 </div>
942 <div class="comment-help pull-right">
942 <div class="comment-help pull-right">
943 Comments parsed using <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">RST</a> syntax with <span class="tooltip" title="Use @username inside this text to send notification to this RhodeCode user">@mention</span> support.
943 Comments parsed using <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">RST</a> syntax with <span class="tooltip" title="Use @username inside this text to send notification to this RhodeCode user">@mention</span> support.
944 </div>
944 </div>
945 <div style="clear: both"></div>
945 <div style="clear: both"></div>
946 <textarea id="text_o80" name="text" class="comment-block-ta ac-input" autocomplete="off"></textarea>
946 <textarea id="text_o80" name="text" class="comment-block-ta ac-input" autocomplete="off"></textarea>
947 </div>
947 </div>
948 <div id="preview-container_o80" class="clearfix" style="display: none;">
948 <div id="preview-container_o80" class="clearfix" style="display: none;">
949 <div class="comment-help">
949 <div class="comment-help">
950 Comment preview
950 Comment preview
951 </div>
951 </div>
952 <div id="preview-box_o80" class="preview-box"></div>
952 <div id="preview-box_o80" class="preview-box"></div>
953 </div>
953 </div>
954 <div class="comment-button pull-right">
954 <div class="comment-button pull-right">
955 <input type="hidden" name="f_path" value="rhodecode/tests/functional/test_compare_local.py">
955 <input type="hidden" name="f_path" value="rhodecode/tests/functional/test_compare_local.py">
956 <input type="hidden" name="line" value="o80">
956 <input type="hidden" name="line" value="o80">
957 <div id="preview-btn_o80" class="btn btn-default">Preview</div>
957 <div id="preview-btn_o80" class="btn btn-default">Preview</div>
958 <div id="edit-btn_o80" class="btn" style="display: none;">Edit</div>
958 <div id="edit-btn_o80" class="btn" style="display: none;">Edit</div>
959 <input class="btn btn-success save-inline-form" id="save" name="save" type="submit" value="Comment">
959 <input class="btn btn-success save-inline-form" id="save" name="save" type="submit" value="Comment">
960 </div>
960 </div>
961 <div class="comment-button hide-inline-form-button">
961 <div class="comment-button hide-inline-form-button">
962 <input class="btn hide-inline-form" id="hide-inline-form" name="hide-inline-form" type="reset" value="Cancel">
962 <input class="btn hide-inline-form" id="hide-inline-form" name="hide-inline-form" type="reset" value="Cancel">
963 </div>
963 </div>
964 </form>
964 </form>
965 </div>
965 </div>
966 </td></tr>
966 </td></tr>
967 <tr class="line add">
967 <tr class="line add">
968 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
968 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
969 <td id="rhodecodetestsfunctionaltest_compare_localpy_n80" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n80">80</a></td>
969 <td id="rhodecodetestsfunctionaltest_compare_localpy_n80" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n80">80</a></td>
970 <td class="code ">
970 <td class="code ">
971 <pre> response.mustcontain('%s@%s' % (
971 <pre> response.mustcontain('%s@%s' % (
972 </pre>
972 </pre>
973 </td>
973 </td>
974 </tr>
974 </tr>
975 <tr class="line add">
975 <tr class="line add">
976 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
976 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
977 <td id="rhodecodetestsfunctionaltest_compare_localpy_n81" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n81">81</a></td>
977 <td id="rhodecodetestsfunctionaltest_compare_localpy_n81" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n81">81</a></td>
978 <td class="code ">
978 <td class="code ">
979 <pre> backend.repo_name,
979 <pre> backend.repo_name,
980 </pre>
980 </pre>
981 </td>
981 </td>
982 </tr>
982 </tr>
983 <tr class="line unmod">
983 <tr class="line unmod">
984 <td id="rhodecodetestsfunctionaltest_compare_localpy_o81" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o81">81</a></td>
984 <td id="rhodecodetestsfunctionaltest_compare_localpy_o81" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o81">81</a></td>
985 <td id="rhodecodetestsfunctionaltest_compare_localpy_n82" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n82">82</a></td>
985 <td id="rhodecodetestsfunctionaltest_compare_localpy_n82" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n82">82</a></td>
986 <td class="code ">
986 <td class="code ">
987 <pre> revisions[backend.alias]['branch']))
987 <pre> revisions[backend.alias]['branch']))
988 </pre>
988 </pre>
989 </td>
989 </td>
990 </tr>
990 </tr>
991 <tr class="line del">
991 <tr class="line del">
992 <td id="rhodecodetestsfunctionaltest_compare_localpy_o82" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o82">82</a></td>
992 <td id="rhodecodetestsfunctionaltest_compare_localpy_o82" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o82">82</a></td>
993 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td>
993 <td class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n"></a></td>
994 <td class="code ">
994 <td class="code ">
995 <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del>
995 <pre> response.mustcontain('%s@%s' % (<del>backend.repo_name,</del>
996 </pre>
996 </pre>
997 </td>
997 </td>
998 </tr>
998 </tr>
999 <tr class="line add">
999 <tr class="line add">
1000 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
1000 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
1001 <td id="rhodecodetestsfunctionaltest_compare_localpy_n83" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n83">83</a></td>
1001 <td id="rhodecodetestsfunctionaltest_compare_localpy_n83" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n83">83</a></td>
1002 <td class="code ">
1002 <td class="code ">
1003 <pre> response.mustcontain('%s@%s' % (
1003 <pre> response.mustcontain('%s@%s' % (
1004 </pre>
1004 </pre>
1005 </td>
1005 </td>
1006 </tr>
1006 </tr>
1007 <tr class="line add">
1007 <tr class="line add">
1008 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
1008 <td class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o"></a></td>
1009 <td id="rhodecodetestsfunctionaltest_compare_localpy_n84" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n84">84</a></td>
1009 <td id="rhodecodetestsfunctionaltest_compare_localpy_n84" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n84">84</a></td>
1010 <td class="code ">
1010 <td class="code ">
1011 <pre> backend.repo_name,
1011 <pre> backend.repo_name,
1012 </pre>
1012 </pre>
1013 </td>
1013 </td>
1014 </tr>
1014 </tr>
1015 <tr class="line unmod">
1015 <tr class="line unmod">
1016 <td id="rhodecodetestsfunctionaltest_compare_localpy_o83" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o83">83</a></td>
1016 <td id="rhodecodetestsfunctionaltest_compare_localpy_o83" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o83">83</a></td>
1017 <td id="rhodecodetestsfunctionaltest_compare_localpy_n85" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n85">85</a></td>
1017 <td id="rhodecodetestsfunctionaltest_compare_localpy_n85" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n85">85</a></td>
1018 <td class="code ">
1018 <td class="code ">
1019 <pre> revisions[backend.alias]['tag']))
1019 <pre> revisions[backend.alias]['tag']))
1020 </pre>
1020 </pre>
1021 </td>
1021 </td>
1022 </tr>
1022 </tr>
1023 <tr class="line unmod">
1023 <tr class="line unmod">
1024 <td id="rhodecodetestsfunctionaltest_compare_localpy_o84" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o84">84</a></td>
1024 <td id="rhodecodetestsfunctionaltest_compare_localpy_o84" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o84">84</a></td>
1025 <td id="rhodecodetestsfunctionaltest_compare_localpy_n86" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n86">86</a></td>
1025 <td id="rhodecodetestsfunctionaltest_compare_localpy_n86" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n86">86</a></td>
1026 <td class="code ">
1026 <td class="code ">
1027 <pre> response.mustcontain(revisions[backend.alias]['response'])
1027 <pre> response.mustcontain(revisions[backend.alias]['response'])
1028 </pre>
1028 </pre>
1029 </td>
1029 </td>
1030 </tr>
1030 </tr>
1031 <tr class="line unmod">
1031 <tr class="line unmod">
1032 <td id="rhodecodetestsfunctionaltest_compare_localpy_o85" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o85">85</a></td>
1032 <td id="rhodecodetestsfunctionaltest_compare_localpy_o85" class="lineno old"><a href="#rhodecodetestsfunctionaltest_compare_localpy_o85">85</a></td>
1033 <td id="rhodecodetestsfunctionaltest_compare_localpy_n87" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n87">87</a></td>
1033 <td id="rhodecodetestsfunctionaltest_compare_localpy_n87" class="lineno new"><a href="#rhodecodetestsfunctionaltest_compare_localpy_n87">87</a></td>
1034 <td class="code ">
1034 <td class="code ">
1035 <pre></pre>
1035 <pre></pre>
1036 </td>
1036 </td>
1037 </tr>
1037 </tr>
1038 </tbody></table>
1038 </tbody></table>
1039 </div>
1039 </div>
1040 </div>
1040 </div>
1041 </div>
1041 </div>
1042
1042
1043
1043
1044
1044
1045 <!--
1045 <!--
1046 Side-by-side diff
1046 Side-by-side diff
1047 -->
1047 -->
1048
1048
1049 <h2>Side-by-side diff</h2>
1049 <h2>Side-by-side diff</h2>
1050
1050
1051 <div class="box">
1051 <div class="box">
1052 <div class="diff-container" style="overflow-x: hidden">
1052 <div class="diff-container" style="overflow-x: hidden">
1053 <div class="diffblock comm" style="margin:3px; padding:1px">
1053 <div class="diffblock comm" style="margin:3px; padding:1px">
1054 <div class="code-header">
1054 <div class="code-header">
1055 <div class="changeset_header">
1055 <div class="changeset_header">
1056 <div class="changeset_file">
1056 <div class="changeset_file">
1057 <i class="icon-file"></i>
1057 <i class="icon-file"></i>
1058 <a href="/pygments/files/ea295cfb622620f5ba13e226ec531e3fe5296399/tests/test_basic_api.py">tests/test_basic_api.py</a>
1058 <a href="/pygments/files/ea295cfb622620f5ba13e226ec531e3fe5296399/tests/test_basic_api.py">tests/test_basic_api.py</a>
1059 [mode: <span id="selected_mode">python</span>]
1059 [mode: <span id="selected_mode">python</span>]
1060 </div>
1060 </div>
1061 <div class="diff-actions">
1061 <div class="diff-actions">
1062 <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff=diff&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;fulldiff=1" class="tooltip" title="Show full diff for this file">
1062 <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff=diff&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;fulldiff=1" class="tooltip" title="Show full diff for this file">
1063 <img class="icon" src="/images/icons/page_white_go.png">
1063 <img class="icon" src="/images/icons/page_white_go.png">
1064 </a>
1064 </a>
1065 <a href="/pygments/diff-2way/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff=diff&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;fulldiff=1" class="tooltip" title="Show full side-by-side diff for this file" tt_title="Show full side-by-side diff for this file">
1065 <a href="/pygments/diff-2way/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff=diff&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;fulldiff=1" class="tooltip" title="Show full side-by-side diff for this file" tt_title="Show full side-by-side diff for this file">
1066 <img class="icon" src="/images/icons/application_double.png">
1066 <img class="icon" src="/images/icons/application_double.png">
1067 </a>
1067 </a>
1068 <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;diff=raw" class="tooltip" title="Raw diff">
1068 <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;diff=raw" class="tooltip" title="Raw diff">
1069 <img class="icon" src="/images/icons/page_white.png">
1069 <img class="icon" src="/images/icons/page_white.png">
1070 </a>
1070 </a>
1071 <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;diff=download" class="tooltip" title="Download diff">
1071 <a href="/pygments/diff/tests/test_basic_api.py?diff2=ea295cfb622620f5ba13e226ec531e3fe5296399&amp;diff1=de45f950b669e2d991c4ba512fa6fe450c6616db&amp;diff=download" class="tooltip" title="Download diff">
1072 <img class="icon" src="/images/icons/page_save.png">
1072 <img class="icon" src="/images/icons/page_save.png">
1073 </a>
1073 </a>
1074 <label><input id="ignorews" name="ignorews" type="checkbox" value="1">ignore white space</label>
1074 <label><input id="ignorews" name="ignorews" type="checkbox" value="1">ignore white space</label>
1075 <label><input id="edit_mode" name="edit_mode" type="checkbox" value="1">turn on edit mode</label>
1075 <label><input id="edit_mode" name="edit_mode" type="checkbox" value="1">turn on edit mode</label>
1076
1076
1077 </div>
1077 </div>
1078 <div style="float: right; padding: 0px 10px 0px 0px">
1078 <div style="float: right; padding: 0px 10px 0px 0px">
1079 r1538:de45f950b669 ... r1539:ea295cfb6226
1079 r1538:de45f950b669 ... r1539:ea295cfb6226
1080 </div>
1080 </div>
1081 </div>
1081 </div>
1082 </div>
1082 </div>
1083 <div id="compare"></div>
1083 <div id="compare"></div>
1084 </div>
1084 </div>
1085 </div>
1085 </div>
1086
1086
1087 <script>
1087 <script>
1088 $(document).ready(function () {
1088 $(document).ready(function () {
1089 var example_lines = '1\n2\n3\n4\n5\n6\n7\n8\n9\n \n';
1089 var example_lines = '1\n2\n3\n4\n5\n6\n7\n8\n9\n \n';
1090
1090
1091 $('#compare').mergely({
1091 $('#compare').mergely({
1092 width: 'auto',
1092 width: 'auto',
1093 height: '600',
1093 height: '600',
1094 fgcolor: {a:'#ddffdd',c:'#cccccc',d:'#ffdddd'},
1094 fgcolor: {a:'#ddffdd',c:'#cccccc',d:'#ffdddd'},
1095 bgcolor: '#fff',
1095 bgcolor: '#fff',
1096 viewport: true,
1096 viewport: true,
1097 cmsettings: {mode: 'text/plain', readOnly: true, lineWrapping: false, lineNumbers: true},
1097 cmsettings: {mode: 'text/plain', readOnly: true, lineWrapping: false, lineNumbers: true},
1098 lhs: function(setValue) {
1098 lhs: function(setValue) {
1099 if("False" == "True"){
1099 if("False" == "True"){
1100 setValue('Binary file')
1100 setValue('Binary file')
1101 }
1101 }
1102 else if("MercurialCommit" == "EmptyCommit"){
1102 else if("MercurialCommit" == "EmptyCommit"){
1103 setValue('');
1103 setValue('');
1104 }
1104 }
1105 else{
1105 else{
1106 var left_value = example_lines.slice(0, 10) +
1106 var left_value = example_lines.slice(0, 10) +
1107 '123456789 '.repeat(10) +
1107 '123456789 '.repeat(10) +
1108 '\n'+
1108 '\n'+
1109 example_lines.slice(10, 20);
1109 example_lines.slice(10, 20);
1110 setValue(left_value + example_lines.repeat(9));
1110 setValue(left_value + example_lines.repeat(9));
1111 }
1111 }
1112
1112
1113 },
1113 },
1114 rhs: function(setValue) {
1114 rhs: function(setValue) {
1115 if("False" == "True"){
1115 if("False" == "True"){
1116 setValue('Binary file')
1116 setValue('Binary file')
1117 }
1117 }
1118 else if("MercurialCommit" == "EmptyCommit"){
1118 else if("MercurialCommit" == "EmptyCommit"){
1119 setValue('');
1119 setValue('');
1120 }
1120 }
1121 else{
1121 else{
1122 var right_value = example_lines +
1122 var right_value = example_lines +
1123 example_lines.slice(0, 8) +
1123 example_lines.slice(0, 8) +
1124 'abcdefghi '.repeat(10) +
1124 'abcdefghi '.repeat(10) +
1125 '\n'+
1125 '\n'+
1126 example_lines.slice(8, 20);
1126 example_lines.slice(8, 20);
1127 setValue(right_value + example_lines.repeat(9));
1127 setValue(right_value + example_lines.repeat(9));
1128 }
1128 }
1129 },
1129 },
1130 });
1130 });
1131
1131
1132 var detected_mode = detectCodeMirrorModeFromExt('test_basic_api.py', true);
1132 var detected_mode = detectCodeMirrorModeFromExt('test_basic_api.py', true);
1133 if(detected_mode){
1133 if(detected_mode){
1134 setCodeMirrorMode($('#compare').mergely('cm', 'lhs'), detected_mode);
1134 setCodeMirrorMode($('#compare').mergely('cm', 'lhs'), detected_mode);
1135 setCodeMirrorMode($('#compare').mergely('cm', 'rhs'), detected_mode);
1135 setCodeMirrorMode($('#compare').mergely('cm', 'rhs'), detected_mode);
1136 $('#selected_mode').html(detected_mode);
1136 $('#selected_mode').html(detected_mode);
1137 }
1137 }
1138
1138
1139 $('#ignorews').change(function(e){
1139 $('#ignorews').change(function(e){
1140 var val = e.currentTarget.checked;
1140 var val = e.currentTarget.checked;
1141 $('#compare').mergely('options', {ignorews: val});
1141 $('#compare').mergely('options', {ignorews: val});
1142 $('#compare').mergely('update');
1142 $('#compare').mergely('update');
1143 });
1143 });
1144 $('#edit_mode').change(function(e){
1144 $('#edit_mode').change(function(e){
1145 var val = !e.currentTarget.checked;
1145 var val = !e.currentTarget.checked;
1146 $('#compare').mergely('cm', 'lhs').setOption('readOnly', val);
1146 $('#compare').mergely('cm', 'lhs').setOption('readOnly', val);
1147 $('#compare').mergely('cm', 'rhs').setOption('readOnly', val);
1147 $('#compare').mergely('cm', 'rhs').setOption('readOnly', val);
1148 $('#compare').mergely('update');
1148 $('#compare').mergely('update');
1149 })
1149 })
1150 });
1150 });
1151 </script>
1151 </script>
1152
1152
1153 </div>
1153 </div>
1154
1154
1155 <!-- end examples -->
1155 <!-- end examples -->
1156
1156
1157 </div>
1157 </div>
1158 </div>
1158 </div>
1159 </div>
1159 </div>
1160 </%def>
1160 </%def>
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now