Show More
@@ -1,379 +1,383 b'' | |||||
1 |
|
1 | |||
2 | // Contains the style definitions used for .main-content |
|
2 | // Contains the style definitions used for .main-content | |
3 | // elements which are mainly around the admin settings. |
|
3 | // elements which are mainly around the admin settings. | |
4 |
|
4 | |||
5 |
|
5 | |||
6 | // TODO: johbo: Integrate in a better way, this is for "main content" which |
|
6 | // TODO: johbo: Integrate in a better way, this is for "main content" which | |
7 | // should not have a limit on the width. |
|
7 | // should not have a limit on the width. | |
8 | .main-content-full { |
|
8 | .main-content-full { | |
9 | clear: both; |
|
9 | clear: both; | |
10 | } |
|
10 | } | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | .main-content { |
|
13 | .main-content { | |
14 | max-width: @maincontent-maxwidth; |
|
14 | max-width: @maincontent-maxwidth; | |
15 |
|
15 | |||
16 | h3, |
|
16 | h3, | |
17 | // TODO: johbo: Change templates to use h3 instead of h4 here |
|
17 | // TODO: johbo: Change templates to use h3 instead of h4 here | |
18 | h4 { |
|
18 | h4 { | |
19 | line-height: 1em; |
|
19 | line-height: 1em; | |
20 | } |
|
20 | } | |
21 |
|
21 | |||
22 | // TODO: johbo: Check if we can do that on a global level |
|
22 | // TODO: johbo: Check if we can do that on a global level | |
23 | table { |
|
23 | table { | |
24 | th { |
|
24 | th { | |
25 | padding: 0; |
|
25 | padding: 0; | |
26 | } |
|
26 | } | |
27 | td.field{ |
|
27 | td.field{ | |
28 | .help-block{ |
|
28 | .help-block{ | |
29 | margin-left: 0; |
|
29 | margin-left: 0; | |
30 | } |
|
30 | } | |
31 | } |
|
31 | } | |
32 | } |
|
32 | } | |
33 |
|
33 | |||
34 | // TODO: johbo: Tweak this into the general styling, for a full width |
|
34 | // TODO: johbo: Tweak this into the general styling, for a full width | |
35 | // textarea |
|
35 | // textarea | |
36 | .textarea-full { |
|
36 | .textarea-full { | |
37 | // 2x 10px padding and 2x 1px border |
|
37 | // 2x 10px padding and 2x 1px border | |
38 | margin-right: 22px; |
|
38 | margin-right: 22px; | |
39 | } |
|
39 | } | |
40 |
|
40 | |||
41 | } |
|
41 | } | |
42 |
|
42 | |||
43 |
|
43 | |||
44 | // TODO: johbo: duplicated, think about a mixins.less |
|
44 | // TODO: johbo: duplicated, think about a mixins.less | |
45 | .block-left{ |
|
45 | .block-left{ | |
46 | float: left; |
|
46 | float: left; | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | .form { |
|
49 | .form { | |
50 | .checkboxes { |
|
50 | .checkboxes { | |
51 | // TODO: johbo: Should be changed in .checkboxes already |
|
51 | // TODO: johbo: Should be changed in .checkboxes already | |
52 | width: auto; |
|
52 | width: auto; | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | // TODO: johbo: some settings pages are broken and don't have the .buttons |
|
55 | // TODO: johbo: some settings pages are broken and don't have the .buttons | |
56 | // inside the .fields, tweak those templates and remove this. |
|
56 | // inside the .fields, tweak those templates and remove this. | |
57 | .buttons { |
|
57 | .buttons { | |
58 | margin-top: @textmargin; |
|
58 | margin-top: @textmargin; | |
59 | } |
|
59 | } | |
60 |
|
60 | |||
61 | .help-block { |
|
61 | .help-block { | |
62 | display: block; |
|
62 | display: block; | |
63 | margin-left: @label-width; |
|
63 | margin-left: @label-width; | |
64 | white-space: pre; |
|
64 | white-space: pre; | |
65 | } |
|
65 | } | |
66 |
|
66 | |||
67 | .action_button { |
|
67 | .action_button { | |
68 | color: @grey4; |
|
68 | color: @grey4; | |
69 | } |
|
69 | } | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | .main-content-full-width { |
|
72 | .main-content-full-width { | |
73 | .main-content; |
|
73 | .main-content; | |
74 | width: 100%; |
|
74 | width: 100%; | |
75 | min-width: 100%; |
|
75 | min-width: 100%; | |
76 | } |
|
76 | } | |
77 |
|
77 | |||
78 | .field { |
|
78 | .field { | |
79 | clear: left; |
|
79 | clear: left; | |
80 | margin-bottom: @padding; |
|
80 | margin-bottom: @padding; | |
81 |
|
81 | |||
82 | } |
|
82 | } | |
83 |
|
83 | |||
|
84 | .input-monospace { | |||
|
85 | font-family: @font-family-monospace; | |||
|
86 | } | |||
|
87 | ||||
84 | .fields { |
|
88 | .fields { | |
85 | label { |
|
89 | label { | |
86 | color: @grey2; |
|
90 | color: @grey2; | |
87 | } |
|
91 | } | |
88 |
|
92 | |||
89 | .field { |
|
93 | .field { | |
90 | clear: right; |
|
94 | clear: right; | |
91 | margin-bottom: @textmargin; |
|
95 | margin-bottom: @textmargin; | |
92 | width: 100%; |
|
96 | width: 100%; | |
93 |
|
97 | |||
94 | .label { |
|
98 | .label { | |
95 | float: left; |
|
99 | float: left; | |
96 | margin-right: @form-vertical-margin; |
|
100 | margin-right: @form-vertical-margin; | |
97 | margin-top: 0; |
|
101 | margin-top: 0; | |
98 | padding-top: @input-padding-px + @border-thickness-inputs; |
|
102 | padding-top: @input-padding-px + @border-thickness-inputs; | |
99 | width: @label-width - @form-vertical-margin; |
|
103 | width: @label-width - @form-vertical-margin; | |
100 | } |
|
104 | } | |
101 | // used in forms for fields that show just text |
|
105 | // used in forms for fields that show just text | |
102 | .label-text { |
|
106 | .label-text { | |
103 | .label; |
|
107 | .label; | |
104 | padding-top: 5px; |
|
108 | padding-top: 5px; | |
105 | } |
|
109 | } | |
106 | // Used to position content on the right side of a .label |
|
110 | // Used to position content on the right side of a .label | |
107 | .content, |
|
111 | .content, | |
108 | .side-by-side-selector { |
|
112 | .side-by-side-selector { | |
109 | padding-top: @input-padding-px + @input-border-thickness; |
|
113 | padding-top: @input-padding-px + @input-border-thickness; | |
110 | } |
|
114 | } | |
111 |
|
115 | |||
112 | .checkboxes, |
|
116 | .checkboxes, | |
113 | .input, |
|
117 | .input, | |
114 | .select, |
|
118 | .select, | |
115 | .textarea, |
|
119 | .textarea, | |
116 | .content { |
|
120 | .content { | |
117 | float: none; |
|
121 | float: none; | |
118 | margin-left: @label-width; |
|
122 | margin-left: @label-width; | |
119 |
|
123 | |||
120 | .help-block { |
|
124 | .help-block { | |
121 | margin-left: 0; |
|
125 | margin-left: 0; | |
122 | } |
|
126 | } | |
123 | } |
|
127 | } | |
124 |
|
128 | |||
125 | .checkboxes, |
|
129 | .checkboxes, | |
126 | .input, |
|
130 | .input, | |
127 | .select { |
|
131 | .select { | |
128 | .help-block { |
|
132 | .help-block { | |
129 | display: block; |
|
133 | display: block; | |
130 | } |
|
134 | } | |
131 | } |
|
135 | } | |
132 |
|
136 | |||
133 | .checkboxes, |
|
137 | .checkboxes, | |
134 | .radios { |
|
138 | .radios { | |
135 | // TODO: johbo: We get a 4px margin from the from-bootstrap, |
|
139 | // TODO: johbo: We get a 4px margin from the from-bootstrap, | |
136 | // compensating here to align well with labels on the left. |
|
140 | // compensating here to align well with labels on the left. | |
137 | padding-top: @input-padding-px + @input-border-thickness - 3px; |
|
141 | padding-top: @input-padding-px + @input-border-thickness - 3px; | |
138 | } |
|
142 | } | |
139 |
|
143 | |||
140 | .checkbox, |
|
144 | .checkbox, | |
141 | .radio { |
|
145 | .radio { | |
142 | display: block; |
|
146 | display: block; | |
143 | width: auto; |
|
147 | width: auto; | |
144 | } |
|
148 | } | |
145 |
|
149 | |||
146 | .checkbox + .checkbox { |
|
150 | .checkbox + .checkbox { | |
147 | display: block; |
|
151 | display: block; | |
148 | } |
|
152 | } | |
149 |
|
153 | |||
150 | .input, |
|
154 | .input, | |
151 | .select { |
|
155 | .select { | |
152 | .help-block, |
|
156 | .help-block, | |
153 | .info-block { |
|
157 | .info-block { | |
154 | margin-top: @form-vertical-margin / 2; |
|
158 | margin-top: @form-vertical-margin / 2; | |
155 | } |
|
159 | } | |
156 | } |
|
160 | } | |
157 |
|
161 | |||
158 | .input { |
|
162 | .input { | |
159 | .medium { |
|
163 | .medium { | |
160 | width: @fields-input-m; |
|
164 | width: @fields-input-m; | |
161 | } |
|
165 | } | |
162 | .large { |
|
166 | .large { | |
163 | width: @fields-input-l; |
|
167 | width: @fields-input-l; | |
164 | } |
|
168 | } | |
165 |
|
169 | |||
166 | .text-as-placeholder { |
|
170 | .text-as-placeholder { | |
167 | padding-top: @input-padding-px + @border-thickness-inputs; |
|
171 | padding-top: @input-padding-px + @border-thickness-inputs; | |
168 | } |
|
172 | } | |
169 | } |
|
173 | } | |
170 |
|
174 | |||
171 | // TODO: johbo: Try to find a better integration of this bit. |
|
175 | // TODO: johbo: Try to find a better integration of this bit. | |
172 | // When using a select2 inside of a field, it should not have the |
|
176 | // When using a select2 inside of a field, it should not have the | |
173 | // top margin. |
|
177 | // top margin. | |
174 | .select .drop-menu { |
|
178 | .select .drop-menu { | |
175 | margin-top: 0; |
|
179 | margin-top: 0; | |
176 | } |
|
180 | } | |
177 |
|
181 | |||
178 | .textarea { |
|
182 | .textarea { | |
179 | float: none; |
|
183 | float: none; | |
180 |
|
184 | |||
181 | textarea { |
|
185 | textarea { | |
182 | // TODO: johbo: From somewhere we get a clear which does |
|
186 | // TODO: johbo: From somewhere we get a clear which does | |
183 | // more harm than good here. |
|
187 | // more harm than good here. | |
184 | clear: none; |
|
188 | clear: none; | |
185 | } |
|
189 | } | |
186 |
|
190 | |||
187 | .CodeMirror { |
|
191 | .CodeMirror { | |
188 | // TODO: johbo: Tweak to position the .help-block nicer, |
|
192 | // TODO: johbo: Tweak to position the .help-block nicer, | |
189 | // figure out how to apply for .text-block instead. |
|
193 | // figure out how to apply for .text-block instead. | |
190 | margin-bottom: 10px; |
|
194 | margin-bottom: 10px; | |
191 | } |
|
195 | } | |
192 |
|
196 | |||
193 | // TODO: johbo: Check if we can remove the grey background on |
|
197 | // TODO: johbo: Check if we can remove the grey background on | |
194 | // the global level and remove this if possible. |
|
198 | // the global level and remove this if possible. | |
195 | .help-block { |
|
199 | .help-block { | |
196 | background: transparent; |
|
200 | background: transparent; | |
197 | padding: 0; |
|
201 | padding: 0; | |
198 | } |
|
202 | } | |
199 | } |
|
203 | } | |
200 |
|
204 | |||
201 | &.tag_patterns, |
|
205 | &.tag_patterns, | |
202 | &.branch_patterns { |
|
206 | &.branch_patterns { | |
203 |
|
207 | |||
204 | input { |
|
208 | input { | |
205 | max-width: 430px; |
|
209 | max-width: 430px; | |
206 | } |
|
210 | } | |
207 | } |
|
211 | } | |
208 | } |
|
212 | } | |
209 |
|
213 | |||
210 | .field-sm { |
|
214 | .field-sm { | |
211 | .label { |
|
215 | .label { | |
212 | padding-top: @input-padding-px / 2 + @input-border-thickness; |
|
216 | padding-top: @input-padding-px / 2 + @input-border-thickness; | |
213 | } |
|
217 | } | |
214 | .checkboxes, |
|
218 | .checkboxes, | |
215 | .radios { |
|
219 | .radios { | |
216 | // TODO: johbo: We get a 4px margin from the from-bootstrap, |
|
220 | // TODO: johbo: We get a 4px margin from the from-bootstrap, | |
217 | // compensating here to align well with labels on the left. |
|
221 | // compensating here to align well with labels on the left. | |
218 | padding-top: @input-padding-px / 2 + @input-border-thickness - 3px; |
|
222 | padding-top: @input-padding-px / 2 + @input-border-thickness - 3px; | |
219 | } |
|
223 | } | |
220 | } |
|
224 | } | |
221 |
|
225 | |||
222 | .field.customhooks { |
|
226 | .field.customhooks { | |
223 | .label { |
|
227 | .label { | |
224 | padding-top: 0; |
|
228 | padding-top: 0; | |
225 | } |
|
229 | } | |
226 | .input-wrapper { |
|
230 | .input-wrapper { | |
227 | padding-right: 25px; |
|
231 | padding-right: 25px; | |
228 |
|
232 | |||
229 | input { |
|
233 | input { | |
230 | width: 100%; |
|
234 | width: 100%; | |
231 | } |
|
235 | } | |
232 | } |
|
236 | } | |
233 | .input { |
|
237 | .input { | |
234 | padding-right: 25px; |
|
238 | padding-right: 25px; | |
235 | } |
|
239 | } | |
236 | } |
|
240 | } | |
237 |
|
241 | |||
238 | .buttons { |
|
242 | .buttons { | |
239 | // TODO: johbo: define variable for this value. |
|
243 | // TODO: johbo: define variable for this value. | |
240 | // Note that this should be 40px but since most elements add some |
|
244 | // Note that this should be 40px but since most elements add some | |
241 | // space in the bottom, we are with 20 closer to 40. |
|
245 | // space in the bottom, we are with 20 closer to 40. | |
242 | margin-top: 20px; |
|
246 | margin-top: 20px; | |
243 | clear: both; |
|
247 | clear: both; | |
244 | margin-bottom: @padding; |
|
248 | margin-bottom: @padding; | |
245 | } |
|
249 | } | |
246 |
|
250 | |||
247 | .desc{ |
|
251 | .desc{ | |
248 | margin-right: @textmargin; |
|
252 | margin-right: @textmargin; | |
249 | } |
|
253 | } | |
250 |
|
254 | |||
251 | input, |
|
255 | input, | |
252 | .drop-menu { |
|
256 | .drop-menu { | |
253 | margin-right: @padding/3; |
|
257 | margin-right: @padding/3; | |
254 | } |
|
258 | } | |
255 |
|
259 | |||
256 | } |
|
260 | } | |
257 |
|
261 | |||
258 | .form-vertical .fields .field { |
|
262 | .form-vertical .fields .field { | |
259 |
|
263 | |||
260 | .label { |
|
264 | .label { | |
261 | float: none; |
|
265 | float: none; | |
262 | width: auto; |
|
266 | width: auto; | |
263 | } |
|
267 | } | |
264 |
|
268 | |||
265 | .checkboxes, |
|
269 | .checkboxes, | |
266 | .input, |
|
270 | .input, | |
267 | .select, |
|
271 | .select, | |
268 | .textarea { |
|
272 | .textarea { | |
269 | margin-left: 0; |
|
273 | margin-left: 0; | |
270 | } |
|
274 | } | |
271 |
|
275 | |||
272 | // TODO: johbo: had to tweak the width here to make it big enough for |
|
276 | // TODO: johbo: had to tweak the width here to make it big enough for | |
273 | // the license. |
|
277 | // the license. | |
274 | .textarea.editor { |
|
278 | .textarea.editor { | |
275 | max-width: none; |
|
279 | max-width: none; | |
276 | } |
|
280 | } | |
277 |
|
281 | |||
278 | .textarea.large textarea { |
|
282 | .textarea.large textarea { | |
279 | min-height: 200px; |
|
283 | min-height: 200px; | |
280 | } |
|
284 | } | |
281 |
|
285 | |||
282 | .help-block { |
|
286 | .help-block { | |
283 | margin-left: 0; |
|
287 | margin-left: 0; | |
284 | } |
|
288 | } | |
285 | } |
|
289 | } | |
286 |
|
290 | |||
287 |
|
291 | |||
288 |
|
292 | |||
289 |
|
293 | |||
290 | .main-content { |
|
294 | .main-content { | |
291 | .block-left; |
|
295 | .block-left; | |
292 |
|
296 | |||
293 | .section { |
|
297 | .section { | |
294 | margin-bottom: @space; |
|
298 | margin-bottom: @space; | |
295 | } |
|
299 | } | |
296 |
|
300 | |||
297 |
|
301 | |||
298 | // Table aligning same way as forms in admin section, e.g. |
|
302 | // Table aligning same way as forms in admin section, e.g. | |
299 | // python packages table |
|
303 | // python packages table | |
300 | table.formalign { |
|
304 | table.formalign { | |
301 | float: left; |
|
305 | float: left; | |
302 | width: auto; |
|
306 | width: auto; | |
303 |
|
307 | |||
304 | .label { |
|
308 | .label { | |
305 | width: @label-width; |
|
309 | width: @label-width; | |
306 | } |
|
310 | } | |
307 |
|
311 | |||
308 | } |
|
312 | } | |
309 |
|
313 | |||
310 |
|
314 | |||
311 | table.issuetracker { |
|
315 | table.issuetracker { | |
312 |
|
316 | |||
313 | color: @text-color; |
|
317 | color: @text-color; | |
314 |
|
318 | |||
315 | .issue-tracker-example { |
|
319 | .issue-tracker-example { | |
316 | color: @grey4; |
|
320 | color: @grey4; | |
317 | } |
|
321 | } | |
318 | } |
|
322 | } | |
319 |
|
323 | |||
320 | .side-by-side-selector{ |
|
324 | .side-by-side-selector{ | |
321 | .left-group, |
|
325 | .left-group, | |
322 | .middle-group, |
|
326 | .middle-group, | |
323 | .right-group{ |
|
327 | .right-group{ | |
324 | float: left; |
|
328 | float: left; | |
325 | } |
|
329 | } | |
326 |
|
330 | |||
327 | .left-group, |
|
331 | .left-group, | |
328 | .right-group{ |
|
332 | .right-group{ | |
329 | width: 45%; |
|
333 | width: 45%; | |
330 | text-align: center; |
|
334 | text-align: center; | |
331 |
|
335 | |||
332 | label{ |
|
336 | label{ | |
333 | width: 100%; |
|
337 | width: 100%; | |
334 | text-align: left; |
|
338 | text-align: left; | |
335 | } |
|
339 | } | |
336 |
|
340 | |||
337 | select{ |
|
341 | select{ | |
338 | width: 100%; |
|
342 | width: 100%; | |
339 | background: none; |
|
343 | background: none; | |
340 | border-color: @border-highlight-color; |
|
344 | border-color: @border-highlight-color; | |
341 | color: @text-color; |
|
345 | color: @text-color; | |
342 | font-family: @text-light; |
|
346 | font-family: @text-light; | |
343 | font-size: @basefontsize; |
|
347 | font-size: @basefontsize; | |
344 | color: @grey1; |
|
348 | color: @grey1; | |
345 | padding: @textmargin/2; |
|
349 | padding: @textmargin/2; | |
346 | } |
|
350 | } | |
347 |
|
351 | |||
348 | select:after{ |
|
352 | select:after{ | |
349 | content: ""; |
|
353 | content: ""; | |
350 | } |
|
354 | } | |
351 |
|
355 | |||
352 | } |
|
356 | } | |
353 |
|
357 | |||
354 | .middle-group{ |
|
358 | .middle-group{ | |
355 | width: 10%; |
|
359 | width: 10%; | |
356 | text-align: center; |
|
360 | text-align: center; | |
357 | padding-top: 4em; |
|
361 | padding-top: 4em; | |
358 | i { |
|
362 | i { | |
359 | font-size: 18px; |
|
363 | font-size: 18px; | |
360 | cursor: pointer; |
|
364 | cursor: pointer; | |
361 | line-height: 2em; |
|
365 | line-height: 2em; | |
362 | } |
|
366 | } | |
363 | } |
|
367 | } | |
364 |
|
368 | |||
365 | } |
|
369 | } | |
366 |
|
370 | |||
367 | .permissions_boxes{ |
|
371 | .permissions_boxes{ | |
368 | label, .label{ |
|
372 | label, .label{ | |
369 | margin-right: @textmargin/2; |
|
373 | margin-right: @textmargin/2; | |
370 | } |
|
374 | } | |
371 | } |
|
375 | } | |
372 |
|
376 | |||
373 | .radios{ |
|
377 | .radios{ | |
374 | label{ |
|
378 | label{ | |
375 | margin-right: @textmargin; |
|
379 | margin-right: @textmargin; | |
376 | } |
|
380 | } | |
377 | } |
|
381 | } | |
378 | } |
|
382 | } | |
379 |
|
383 |
@@ -1,818 +1,818 b'' | |||||
1 | <%inherit file="/base/base.mako"/> |
|
1 | <%inherit file="/base/base.mako"/> | |
2 | <%namespace name="base" file="/base/base.mako"/> |
|
2 | <%namespace name="base" file="/base/base.mako"/> | |
3 |
|
3 | |||
4 | <%def name="title()"> |
|
4 | <%def name="title()"> | |
5 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} |
|
5 | ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} | |
6 | %if c.rhodecode_name: |
|
6 | %if c.rhodecode_name: | |
7 | · ${h.branding(c.rhodecode_name)} |
|
7 | · ${h.branding(c.rhodecode_name)} | |
8 | %endif |
|
8 | %endif | |
9 | </%def> |
|
9 | </%def> | |
10 |
|
10 | |||
11 | <%def name="breadcrumbs_links()"> |
|
11 | <%def name="breadcrumbs_links()"> | |
12 | <span id="pr-title"> |
|
12 | <span id="pr-title"> | |
13 | ${c.pull_request.title} |
|
13 | ${c.pull_request.title} | |
14 | %if c.pull_request.is_closed(): |
|
14 | %if c.pull_request.is_closed(): | |
15 | (${_('Closed')}) |
|
15 | (${_('Closed')}) | |
16 | %endif |
|
16 | %endif | |
17 | </span> |
|
17 | </span> | |
18 | <div id="pr-title-edit" class="input" style="display: none;"> |
|
18 | <div id="pr-title-edit" class="input" style="display: none;"> | |
19 | ${h.text('pullrequest_title', id_="pr-title-input", class_="large", value=c.pull_request.title)} |
|
19 | ${h.text('pullrequest_title', id_="pr-title-input", class_="large", value=c.pull_request.title)} | |
20 | </div> |
|
20 | </div> | |
21 | </%def> |
|
21 | </%def> | |
22 |
|
22 | |||
23 | <%def name="menu_bar_nav()"> |
|
23 | <%def name="menu_bar_nav()"> | |
24 | ${self.menu_items(active='repositories')} |
|
24 | ${self.menu_items(active='repositories')} | |
25 | </%def> |
|
25 | </%def> | |
26 |
|
26 | |||
27 | <%def name="menu_bar_subnav()"> |
|
27 | <%def name="menu_bar_subnav()"> | |
28 | ${self.repo_menu(active='showpullrequest')} |
|
28 | ${self.repo_menu(active='showpullrequest')} | |
29 | </%def> |
|
29 | </%def> | |
30 |
|
30 | |||
31 | <%def name="main()"> |
|
31 | <%def name="main()"> | |
32 |
|
32 | |||
33 | <script type="text/javascript"> |
|
33 | <script type="text/javascript"> | |
34 | // TODO: marcink switch this to pyroutes |
|
34 | // TODO: marcink switch this to pyroutes | |
35 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; |
|
35 | AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}"; | |
36 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; |
|
36 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; | |
37 | </script> |
|
37 | </script> | |
38 | <div class="box"> |
|
38 | <div class="box"> | |
39 |
|
39 | |||
40 | <div class="title"> |
|
40 | <div class="title"> | |
41 | ${self.repo_page_title(c.rhodecode_db_repo)} |
|
41 | ${self.repo_page_title(c.rhodecode_db_repo)} | |
42 | </div> |
|
42 | </div> | |
43 |
|
43 | |||
44 | ${self.breadcrumbs()} |
|
44 | ${self.breadcrumbs()} | |
45 |
|
45 | |||
46 | <div class="box pr-summary"> |
|
46 | <div class="box pr-summary"> | |
47 |
|
47 | |||
48 | <div class="summary-details block-left"> |
|
48 | <div class="summary-details block-left"> | |
49 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
49 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
50 | <div class="pr-details-title"> |
|
50 | <div class="pr-details-title"> | |
51 | <a href="${h.url('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)} |
|
51 | <a href="${h.url('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request #%s') % c.pull_request.pull_request_id}</a> ${_('From')} ${h.format_date(c.pull_request.created_on)} | |
52 | %if c.allowed_to_update: |
|
52 | %if c.allowed_to_update: | |
53 | <div id="delete_pullrequest" class="pull-right action_button ${'' if c.allowed_to_delete else 'disabled' }" style="clear:inherit;padding: 0"> |
|
53 | <div id="delete_pullrequest" class="pull-right action_button ${'' if c.allowed_to_delete else 'disabled' }" style="clear:inherit;padding: 0"> | |
54 | % if c.allowed_to_delete: |
|
54 | % if c.allowed_to_delete: | |
55 | ${h.secure_form(url('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id),method='delete')} |
|
55 | ${h.secure_form(url('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id),method='delete')} | |
56 | ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), |
|
56 | ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), | |
57 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} |
|
57 | class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} | |
58 | ${h.end_form()} |
|
58 | ${h.end_form()} | |
59 | % else: |
|
59 | % else: | |
60 | ${_('Delete')} |
|
60 | ${_('Delete')} | |
61 | % endif |
|
61 | % endif | |
62 | </div> |
|
62 | </div> | |
63 | <div id="open_edit_pullrequest" class="pull-right action_button">${_('Edit')}</div> |
|
63 | <div id="open_edit_pullrequest" class="pull-right action_button">${_('Edit')}</div> | |
64 | <div id="close_edit_pullrequest" class="pull-right action_button" style="display: none;padding: 0">${_('Cancel')}</div> |
|
64 | <div id="close_edit_pullrequest" class="pull-right action_button" style="display: none;padding: 0">${_('Cancel')}</div> | |
65 | %endif |
|
65 | %endif | |
66 | </div> |
|
66 | </div> | |
67 |
|
67 | |||
68 | <div id="summary" class="fields pr-details-content"> |
|
68 | <div id="summary" class="fields pr-details-content"> | |
69 | <div class="field"> |
|
69 | <div class="field"> | |
70 | <div class="label-summary"> |
|
70 | <div class="label-summary"> | |
71 | <label>${_('Origin')}:</label> |
|
71 | <label>${_('Origin')}:</label> | |
72 | </div> |
|
72 | </div> | |
73 | <div class="input"> |
|
73 | <div class="input"> | |
74 | <div class="pr-origininfo"> |
|
74 | <div class="pr-origininfo"> | |
75 | ## branch link is only valid if it is a branch |
|
75 | ## branch link is only valid if it is a branch | |
76 | <span class="tag"> |
|
76 | <span class="tag"> | |
77 | %if c.pull_request.source_ref_parts.type == 'branch': |
|
77 | %if c.pull_request.source_ref_parts.type == 'branch': | |
78 | <a href="${h.url('changelog_home', repo_name=c.pull_request.source_repo.repo_name, branch=c.pull_request.source_ref_parts.name)}">${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name}</a> |
|
78 | <a href="${h.url('changelog_home', repo_name=c.pull_request.source_repo.repo_name, branch=c.pull_request.source_ref_parts.name)}">${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name}</a> | |
79 | %else: |
|
79 | %else: | |
80 | ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} |
|
80 | ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} | |
81 | %endif |
|
81 | %endif | |
82 | </span> |
|
82 | </span> | |
83 | <span class="clone-url"> |
|
83 | <span class="clone-url"> | |
84 | <a href="${h.url('summary_home', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.clone_url()}</a> |
|
84 | <a href="${h.url('summary_home', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.clone_url()}</a> | |
85 | </span> |
|
85 | </span> | |
86 | </div> |
|
86 | </div> | |
87 | <div class="pr-pullinfo"> |
|
87 | <div class="pr-pullinfo"> | |
88 | %if h.is_hg(c.pull_request.source_repo): |
|
88 | %if h.is_hg(c.pull_request.source_repo): | |
89 | <input type="text" value="hg pull -r ${h.short_id(c.source_ref)} ${c.pull_request.source_repo.clone_url()}" readonly="readonly"> |
|
89 | <input type="text" class="input-monospace" value="hg pull -r ${h.short_id(c.source_ref)} ${c.pull_request.source_repo.clone_url()}" readonly="readonly"> | |
90 | %elif h.is_git(c.pull_request.source_repo): |
|
90 | %elif h.is_git(c.pull_request.source_repo): | |
91 | <input type="text" value="git pull ${c.pull_request.source_repo.clone_url()} ${c.pull_request.source_ref_parts.name}" readonly="readonly"> |
|
91 | <input type="text" class="input-monospace" value="git pull ${c.pull_request.source_repo.clone_url()} ${c.pull_request.source_ref_parts.name}" readonly="readonly"> | |
92 | %endif |
|
92 | %endif | |
93 | </div> |
|
93 | </div> | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 | <div class="field"> |
|
96 | <div class="field"> | |
97 | <div class="label-summary"> |
|
97 | <div class="label-summary"> | |
98 | <label>${_('Target')}:</label> |
|
98 | <label>${_('Target')}:</label> | |
99 | </div> |
|
99 | </div> | |
100 | <div class="input"> |
|
100 | <div class="input"> | |
101 | <div class="pr-targetinfo"> |
|
101 | <div class="pr-targetinfo"> | |
102 | ## branch link is only valid if it is a branch |
|
102 | ## branch link is only valid if it is a branch | |
103 | <span class="tag"> |
|
103 | <span class="tag"> | |
104 | %if c.pull_request.target_ref_parts.type == 'branch': |
|
104 | %if c.pull_request.target_ref_parts.type == 'branch': | |
105 | <a href="${h.url('changelog_home', repo_name=c.pull_request.target_repo.repo_name, branch=c.pull_request.target_ref_parts.name)}">${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name}</a> |
|
105 | <a href="${h.url('changelog_home', repo_name=c.pull_request.target_repo.repo_name, branch=c.pull_request.target_ref_parts.name)}">${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name}</a> | |
106 | %else: |
|
106 | %else: | |
107 | ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} |
|
107 | ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} | |
108 | %endif |
|
108 | %endif | |
109 | </span> |
|
109 | </span> | |
110 | <span class="clone-url"> |
|
110 | <span class="clone-url"> | |
111 | <a href="${h.url('summary_home', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.clone_url()}</a> |
|
111 | <a href="${h.url('summary_home', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.clone_url()}</a> | |
112 | </span> |
|
112 | </span> | |
113 | </div> |
|
113 | </div> | |
114 | </div> |
|
114 | </div> | |
115 | </div> |
|
115 | </div> | |
116 |
|
116 | |||
117 | ## Link to the shadow repository. |
|
117 | ## Link to the shadow repository. | |
118 | <div class="field"> |
|
118 | <div class="field"> | |
119 | <div class="label-summary"> |
|
119 | <div class="label-summary"> | |
120 | <label>${_('Merge')}:</label> |
|
120 | <label>${_('Merge')}:</label> | |
121 | </div> |
|
121 | </div> | |
122 | <div class="input"> |
|
122 | <div class="input"> | |
123 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: |
|
123 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: | |
124 | <div class="pr-mergeinfo"> |
|
124 | <div class="pr-mergeinfo"> | |
125 | %if h.is_hg(c.pull_request.target_repo): |
|
125 | %if h.is_hg(c.pull_request.target_repo): | |
126 | <input type="text" value="hg clone -u ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> |
|
126 | <input type="text" class="input-monospace" value="hg clone -u ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> | |
127 | %elif h.is_git(c.pull_request.target_repo): |
|
127 | %elif h.is_git(c.pull_request.target_repo): | |
128 | <input type="text" value="git clone --branch ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> |
|
128 | <input type="text" class="input-monospace" value="git clone --branch ${c.pull_request.shadow_merge_ref.name} ${c.shadow_clone_url} pull-request-${c.pull_request.pull_request_id}" readonly="readonly"> | |
129 | %endif |
|
129 | %endif | |
130 | </div> |
|
130 | </div> | |
131 | % else: |
|
131 | % else: | |
132 | <div class=""> |
|
132 | <div class=""> | |
133 | ${_('Shadow repository data not available')}. |
|
133 | ${_('Shadow repository data not available')}. | |
134 | </div> |
|
134 | </div> | |
135 | % endif |
|
135 | % endif | |
136 | </div> |
|
136 | </div> | |
137 | </div> |
|
137 | </div> | |
138 |
|
138 | |||
139 | <div class="field"> |
|
139 | <div class="field"> | |
140 | <div class="label-summary"> |
|
140 | <div class="label-summary"> | |
141 | <label>${_('Review')}:</label> |
|
141 | <label>${_('Review')}:</label> | |
142 | </div> |
|
142 | </div> | |
143 | <div class="input"> |
|
143 | <div class="input"> | |
144 | %if c.pull_request_review_status: |
|
144 | %if c.pull_request_review_status: | |
145 | <div class="${'flag_status %s' % c.pull_request_review_status} tooltip pull-left"></div> |
|
145 | <div class="${'flag_status %s' % c.pull_request_review_status} tooltip pull-left"></div> | |
146 | <span class="changeset-status-lbl tooltip"> |
|
146 | <span class="changeset-status-lbl tooltip"> | |
147 | %if c.pull_request.is_closed(): |
|
147 | %if c.pull_request.is_closed(): | |
148 | ${_('Closed')}, |
|
148 | ${_('Closed')}, | |
149 | %endif |
|
149 | %endif | |
150 | ${h.commit_status_lbl(c.pull_request_review_status)} |
|
150 | ${h.commit_status_lbl(c.pull_request_review_status)} | |
151 | </span> |
|
151 | </span> | |
152 | - ${ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} |
|
152 | - ${ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} | |
153 | %endif |
|
153 | %endif | |
154 | </div> |
|
154 | </div> | |
155 | </div> |
|
155 | </div> | |
156 | <div class="field"> |
|
156 | <div class="field"> | |
157 | <div class="pr-description-label label-summary"> |
|
157 | <div class="pr-description-label label-summary"> | |
158 | <label>${_('Description')}:</label> |
|
158 | <label>${_('Description')}:</label> | |
159 | </div> |
|
159 | </div> | |
160 | <div id="pr-desc" class="input"> |
|
160 | <div id="pr-desc" class="input"> | |
161 | <div class="pr-description">${h.urlify_commit_message(c.pull_request.description, c.repo_name)}</div> |
|
161 | <div class="pr-description">${h.urlify_commit_message(c.pull_request.description, c.repo_name)}</div> | |
162 | </div> |
|
162 | </div> | |
163 | <div id="pr-desc-edit" class="input textarea editor" style="display: none;"> |
|
163 | <div id="pr-desc-edit" class="input textarea editor" style="display: none;"> | |
164 | <textarea id="pr-description-input" size="30">${c.pull_request.description}</textarea> |
|
164 | <textarea id="pr-description-input" size="30">${c.pull_request.description}</textarea> | |
165 | </div> |
|
165 | </div> | |
166 | </div> |
|
166 | </div> | |
167 |
|
167 | |||
168 | <div class="field"> |
|
168 | <div class="field"> | |
169 | <div class="label-summary"> |
|
169 | <div class="label-summary"> | |
170 | <label>${_('Versions')}:</label> |
|
170 | <label>${_('Versions')}:</label> | |
171 | </div> |
|
171 | </div> | |
172 |
|
172 | |||
173 | <% outdated_comm_count_ver = len(c.inline_versions[None]['outdated']) %> |
|
173 | <% outdated_comm_count_ver = len(c.inline_versions[None]['outdated']) %> | |
174 | <% general_outdated_comm_count_ver = len(c.comment_versions[None]['outdated']) %> |
|
174 | <% general_outdated_comm_count_ver = len(c.comment_versions[None]['outdated']) %> | |
175 |
|
175 | |||
176 | <div class="pr-versions"> |
|
176 | <div class="pr-versions"> | |
177 | % if c.show_version_changes: |
|
177 | % if c.show_version_changes: | |
178 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> |
|
178 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> | |
179 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> |
|
179 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> | |
180 | <a id="show-pr-versions" class="input" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" |
|
180 | <a id="show-pr-versions" class="input" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" | |
181 | data-toggle-on="${ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))}" |
|
181 | data-toggle-on="${ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))}" | |
182 | data-toggle-off="${_('Hide all versions of this pull request')}"> |
|
182 | data-toggle-off="${_('Hide all versions of this pull request')}"> | |
183 | ${ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))} |
|
183 | ${ungettext('{} version available for this pull request, show it.', '{} versions available for this pull request, show them.', len(c.versions)).format(len(c.versions))} | |
184 | </a> |
|
184 | </a> | |
185 | <table> |
|
185 | <table> | |
186 | ## SHOW ALL VERSIONS OF PR |
|
186 | ## SHOW ALL VERSIONS OF PR | |
187 | <% ver_pr = None %> |
|
187 | <% ver_pr = None %> | |
188 |
|
188 | |||
189 | % for data in reversed(list(enumerate(c.versions, 1))): |
|
189 | % for data in reversed(list(enumerate(c.versions, 1))): | |
190 | <% ver_pos = data[0] %> |
|
190 | <% ver_pos = data[0] %> | |
191 | <% ver = data[1] %> |
|
191 | <% ver = data[1] %> | |
192 | <% ver_pr = ver.pull_request_version_id %> |
|
192 | <% ver_pr = ver.pull_request_version_id %> | |
193 | <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> |
|
193 | <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> | |
194 |
|
194 | |||
195 | <tr class="version-pr" style="display: ${display_row}"> |
|
195 | <tr class="version-pr" style="display: ${display_row}"> | |
196 | <td> |
|
196 | <td> | |
197 | <code> |
|
197 | <code> | |
198 | <a href="${h.url.current(version=ver_pr or 'latest')}">v${ver_pos}</a> |
|
198 | <a href="${h.url.current(version=ver_pr or 'latest')}">v${ver_pos}</a> | |
199 | </code> |
|
199 | </code> | |
200 | </td> |
|
200 | </td> | |
201 | <td> |
|
201 | <td> | |
202 | <input ${'checked="checked"' if c.from_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_source" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> |
|
202 | <input ${'checked="checked"' if c.from_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_source" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> | |
203 | <input ${'checked="checked"' if c.at_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_target" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> |
|
203 | <input ${'checked="checked"' if c.at_version_num == ver_pr else ''} class="compare-radio-button" type="radio" name="ver_target" value="${ver_pr or 'latest'}" data-ver-pos="${ver_pos}"/> | |
204 | </td> |
|
204 | </td> | |
205 | <td> |
|
205 | <td> | |
206 | <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> |
|
206 | <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> | |
207 | <div class="${'flag_status %s' % review_status} tooltip pull-left" title="${_('Your review status at this version')}"> |
|
207 | <div class="${'flag_status %s' % review_status} tooltip pull-left" title="${_('Your review status at this version')}"> | |
208 | </div> |
|
208 | </div> | |
209 | </td> |
|
209 | </td> | |
210 | <td> |
|
210 | <td> | |
211 | % if c.at_version_num != ver_pr: |
|
211 | % if c.at_version_num != ver_pr: | |
212 | <i class="icon-comment"></i> |
|
212 | <i class="icon-comment"></i> | |
213 | <code class="tooltip" title="${_('Comment from pull request version {0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}"> |
|
213 | <code class="tooltip" title="${_('Comment from pull request version {0}, general:{1} inline:{2}').format(ver_pos, len(c.comment_versions[ver_pr]['at']), len(c.inline_versions[ver_pr]['at']))}"> | |
214 | G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])} |
|
214 | G:${len(c.comment_versions[ver_pr]['at'])} / I:${len(c.inline_versions[ver_pr]['at'])} | |
215 | </code> |
|
215 | </code> | |
216 | % endif |
|
216 | % endif | |
217 | </td> |
|
217 | </td> | |
218 | <td> |
|
218 | <td> | |
219 | ##<code>${ver.source_ref_parts.commit_id[:6]}</code> |
|
219 | ##<code>${ver.source_ref_parts.commit_id[:6]}</code> | |
220 | </td> |
|
220 | </td> | |
221 | <td> |
|
221 | <td> | |
222 | ${h.age_component(ver.updated_on, time_is_local=True)} |
|
222 | ${h.age_component(ver.updated_on, time_is_local=True)} | |
223 | </td> |
|
223 | </td> | |
224 | </tr> |
|
224 | </tr> | |
225 | % endfor |
|
225 | % endfor | |
226 |
|
226 | |||
227 | <tr> |
|
227 | <tr> | |
228 | <td colspan="6"> |
|
228 | <td colspan="6"> | |
229 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" |
|
229 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" | |
230 | data-label-text-locked="${_('select versions to show changes')}" |
|
230 | data-label-text-locked="${_('select versions to show changes')}" | |
231 | data-label-text-diff="${_('show changes between versions')}" |
|
231 | data-label-text-diff="${_('show changes between versions')}" | |
232 | data-label-text-show="${_('show pull request for this version')}" |
|
232 | data-label-text-show="${_('show pull request for this version')}" | |
233 | > |
|
233 | > | |
234 | ${_('select versions to show changes')} |
|
234 | ${_('select versions to show changes')} | |
235 | </button> |
|
235 | </button> | |
236 | </td> |
|
236 | </td> | |
237 | </tr> |
|
237 | </tr> | |
238 |
|
238 | |||
239 | ## show comment/inline comments summary |
|
239 | ## show comment/inline comments summary | |
240 | <%def name="comments_summary()"> |
|
240 | <%def name="comments_summary()"> | |
241 | <tr> |
|
241 | <tr> | |
242 | <td colspan="6" class="comments-summary-td"> |
|
242 | <td colspan="6" class="comments-summary-td"> | |
243 |
|
243 | |||
244 | % if c.at_version: |
|
244 | % if c.at_version: | |
245 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['display']) %> |
|
245 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['display']) %> | |
246 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['display']) %> |
|
246 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['display']) %> | |
247 | ${_('Comments at this version')}: |
|
247 | ${_('Comments at this version')}: | |
248 | % else: |
|
248 | % else: | |
249 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['until']) %> |
|
249 | <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num]['until']) %> | |
250 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['until']) %> |
|
250 | <% general_comm_count_ver = len(c.comment_versions[c.at_version_num]['until']) %> | |
251 | ${_('Comments for this pull request')}: |
|
251 | ${_('Comments for this pull request')}: | |
252 | % endif |
|
252 | % endif | |
253 |
|
253 | |||
254 |
|
254 | |||
255 | %if general_comm_count_ver: |
|
255 | %if general_comm_count_ver: | |
256 | <a href="#comments">${_("%d General ") % general_comm_count_ver}</a> |
|
256 | <a href="#comments">${_("%d General ") % general_comm_count_ver}</a> | |
257 | %else: |
|
257 | %else: | |
258 | ${_("%d General ") % general_comm_count_ver} |
|
258 | ${_("%d General ") % general_comm_count_ver} | |
259 | %endif |
|
259 | %endif | |
260 |
|
260 | |||
261 | %if inline_comm_count_ver: |
|
261 | %if inline_comm_count_ver: | |
262 | , <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_("%d Inline") % inline_comm_count_ver}</a> |
|
262 | , <a href="#" onclick="return Rhodecode.comments.nextComment();" id="inline-comments-counter">${_("%d Inline") % inline_comm_count_ver}</a> | |
263 | %else: |
|
263 | %else: | |
264 | , ${_("%d Inline") % inline_comm_count_ver} |
|
264 | , ${_("%d Inline") % inline_comm_count_ver} | |
265 | %endif |
|
265 | %endif | |
266 |
|
266 | |||
267 | %if outdated_comm_count_ver: |
|
267 | %if outdated_comm_count_ver: | |
268 | , <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">${_("%d Outdated") % outdated_comm_count_ver}</a> |
|
268 | , <a href="#" onclick="showOutdated(); Rhodecode.comments.nextOutdatedComment(); return false;">${_("%d Outdated") % outdated_comm_count_ver}</a> | |
269 | <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated comments')}</a> |
|
269 | <a href="#" class="showOutdatedComments" onclick="showOutdated(this); return false;"> | ${_('show outdated comments')}</a> | |
270 | <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated comments')}</a> |
|
270 | <a href="#" class="hideOutdatedComments" style="display: none" onclick="hideOutdated(this); return false;"> | ${_('hide outdated comments')}</a> | |
271 | %else: |
|
271 | %else: | |
272 | , ${_("%d Outdated") % outdated_comm_count_ver} |
|
272 | , ${_("%d Outdated") % outdated_comm_count_ver} | |
273 | %endif |
|
273 | %endif | |
274 | </td> |
|
274 | </td> | |
275 | </tr> |
|
275 | </tr> | |
276 | </%def> |
|
276 | </%def> | |
277 | ${comments_summary()} |
|
277 | ${comments_summary()} | |
278 | </table> |
|
278 | </table> | |
279 | % else: |
|
279 | % else: | |
280 | <div class="input"> |
|
280 | <div class="input"> | |
281 | ${_('Pull request versions not available')}. |
|
281 | ${_('Pull request versions not available')}. | |
282 | </div> |
|
282 | </div> | |
283 | <div> |
|
283 | <div> | |
284 | <table> |
|
284 | <table> | |
285 | ${comments_summary()} |
|
285 | ${comments_summary()} | |
286 | </table> |
|
286 | </table> | |
287 | </div> |
|
287 | </div> | |
288 | % endif |
|
288 | % endif | |
289 | </div> |
|
289 | </div> | |
290 | </div> |
|
290 | </div> | |
291 |
|
291 | |||
292 | <div id="pr-save" class="field" style="display: none;"> |
|
292 | <div id="pr-save" class="field" style="display: none;"> | |
293 | <div class="label-summary"></div> |
|
293 | <div class="label-summary"></div> | |
294 | <div class="input"> |
|
294 | <div class="input"> | |
295 | <span id="edit_pull_request" class="btn btn-small">${_('Save Changes')}</span> |
|
295 | <span id="edit_pull_request" class="btn btn-small">${_('Save Changes')}</span> | |
296 | </div> |
|
296 | </div> | |
297 | </div> |
|
297 | </div> | |
298 | </div> |
|
298 | </div> | |
299 | </div> |
|
299 | </div> | |
300 | <div> |
|
300 | <div> | |
301 | ## AUTHOR |
|
301 | ## AUTHOR | |
302 | <div class="reviewers-title block-right"> |
|
302 | <div class="reviewers-title block-right"> | |
303 | <div class="pr-details-title"> |
|
303 | <div class="pr-details-title"> | |
304 | ${_('Author')} |
|
304 | ${_('Author')} | |
305 | </div> |
|
305 | </div> | |
306 | </div> |
|
306 | </div> | |
307 | <div class="block-right pr-details-content reviewers"> |
|
307 | <div class="block-right pr-details-content reviewers"> | |
308 | <ul class="group_members"> |
|
308 | <ul class="group_members"> | |
309 | <li> |
|
309 | <li> | |
310 | ${self.gravatar_with_user(c.pull_request.author.email, 16)} |
|
310 | ${self.gravatar_with_user(c.pull_request.author.email, 16)} | |
311 | </li> |
|
311 | </li> | |
312 | </ul> |
|
312 | </ul> | |
313 | </div> |
|
313 | </div> | |
314 | ## REVIEWERS |
|
314 | ## REVIEWERS | |
315 | <div class="reviewers-title block-right"> |
|
315 | <div class="reviewers-title block-right"> | |
316 | <div class="pr-details-title"> |
|
316 | <div class="pr-details-title"> | |
317 | ${_('Pull request reviewers')} |
|
317 | ${_('Pull request reviewers')} | |
318 | %if c.allowed_to_update: |
|
318 | %if c.allowed_to_update: | |
319 | <span id="open_edit_reviewers" class="block-right action_button">${_('Edit')}</span> |
|
319 | <span id="open_edit_reviewers" class="block-right action_button">${_('Edit')}</span> | |
320 | <span id="close_edit_reviewers" class="block-right action_button" style="display: none;">${_('Close')}</span> |
|
320 | <span id="close_edit_reviewers" class="block-right action_button" style="display: none;">${_('Close')}</span> | |
321 | %endif |
|
321 | %endif | |
322 | </div> |
|
322 | </div> | |
323 | </div> |
|
323 | </div> | |
324 | <div id="reviewers" class="block-right pr-details-content reviewers"> |
|
324 | <div id="reviewers" class="block-right pr-details-content reviewers"> | |
325 | ## members goes here ! |
|
325 | ## members goes here ! | |
326 | <input type="hidden" name="__start__" value="review_members:sequence"> |
|
326 | <input type="hidden" name="__start__" value="review_members:sequence"> | |
327 | <ul id="review_members" class="group_members"> |
|
327 | <ul id="review_members" class="group_members"> | |
328 | %for member,reasons,status in c.pull_request_reviewers: |
|
328 | %for member,reasons,status in c.pull_request_reviewers: | |
329 | <li id="reviewer_${member.user_id}"> |
|
329 | <li id="reviewer_${member.user_id}"> | |
330 | <div class="reviewers_member"> |
|
330 | <div class="reviewers_member"> | |
331 | <div class="reviewer_status tooltip" title="${h.tooltip(h.commit_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> |
|
331 | <div class="reviewer_status tooltip" title="${h.tooltip(h.commit_status_lbl(status[0][1].status if status else 'not_reviewed'))}"> | |
332 | <div class="${'flag_status %s' % (status[0][1].status if status else 'not_reviewed')} pull-left reviewer_member_status"></div> |
|
332 | <div class="${'flag_status %s' % (status[0][1].status if status else 'not_reviewed')} pull-left reviewer_member_status"></div> | |
333 | </div> |
|
333 | </div> | |
334 | <div id="reviewer_${member.user_id}_name" class="reviewer_name"> |
|
334 | <div id="reviewer_${member.user_id}_name" class="reviewer_name"> | |
335 | ${self.gravatar_with_user(member.email, 16)} |
|
335 | ${self.gravatar_with_user(member.email, 16)} | |
336 | </div> |
|
336 | </div> | |
337 | <input type="hidden" name="__start__" value="reviewer:mapping"> |
|
337 | <input type="hidden" name="__start__" value="reviewer:mapping"> | |
338 | <input type="hidden" name="__start__" value="reasons:sequence"> |
|
338 | <input type="hidden" name="__start__" value="reasons:sequence"> | |
339 | %for reason in reasons: |
|
339 | %for reason in reasons: | |
340 | <div class="reviewer_reason">- ${reason}</div> |
|
340 | <div class="reviewer_reason">- ${reason}</div> | |
341 | <input type="hidden" name="reason" value="${reason}"> |
|
341 | <input type="hidden" name="reason" value="${reason}"> | |
342 |
|
342 | |||
343 | %endfor |
|
343 | %endfor | |
344 | <input type="hidden" name="__end__" value="reasons:sequence"> |
|
344 | <input type="hidden" name="__end__" value="reasons:sequence"> | |
345 | <input id="reviewer_${member.user_id}_input" type="hidden" value="${member.user_id}" name="user_id" /> |
|
345 | <input id="reviewer_${member.user_id}_input" type="hidden" value="${member.user_id}" name="user_id" /> | |
346 | <input type="hidden" name="__end__" value="reviewer:mapping"> |
|
346 | <input type="hidden" name="__end__" value="reviewer:mapping"> | |
347 | %if c.allowed_to_update: |
|
347 | %if c.allowed_to_update: | |
348 | <div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id}, true)" style="visibility: hidden;"> |
|
348 | <div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id}, true)" style="visibility: hidden;"> | |
349 | <i class="icon-remove-sign" ></i> |
|
349 | <i class="icon-remove-sign" ></i> | |
350 | </div> |
|
350 | </div> | |
351 | %endif |
|
351 | %endif | |
352 | </div> |
|
352 | </div> | |
353 | </li> |
|
353 | </li> | |
354 | %endfor |
|
354 | %endfor | |
355 | </ul> |
|
355 | </ul> | |
356 | <input type="hidden" name="__end__" value="review_members:sequence"> |
|
356 | <input type="hidden" name="__end__" value="review_members:sequence"> | |
357 | %if not c.pull_request.is_closed(): |
|
357 | %if not c.pull_request.is_closed(): | |
358 | <div id="add_reviewer_input" class='ac' style="display: none;"> |
|
358 | <div id="add_reviewer_input" class='ac' style="display: none;"> | |
359 | %if c.allowed_to_update: |
|
359 | %if c.allowed_to_update: | |
360 | <div class="reviewer_ac"> |
|
360 | <div class="reviewer_ac"> | |
361 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer'))} |
|
361 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer'))} | |
362 | <div id="reviewers_container"></div> |
|
362 | <div id="reviewers_container"></div> | |
363 | </div> |
|
363 | </div> | |
364 | <div> |
|
364 | <div> | |
365 | <span id="update_pull_request" class="btn btn-small">${_('Save Changes')}</span> |
|
365 | <span id="update_pull_request" class="btn btn-small">${_('Save Changes')}</span> | |
366 | </div> |
|
366 | </div> | |
367 | %endif |
|
367 | %endif | |
368 | </div> |
|
368 | </div> | |
369 | %endif |
|
369 | %endif | |
370 | </div> |
|
370 | </div> | |
371 | </div> |
|
371 | </div> | |
372 | </div> |
|
372 | </div> | |
373 | <div class="box"> |
|
373 | <div class="box"> | |
374 | ##DIFF |
|
374 | ##DIFF | |
375 | <div class="table" > |
|
375 | <div class="table" > | |
376 | <div id="changeset_compare_view_content"> |
|
376 | <div id="changeset_compare_view_content"> | |
377 | ##CS |
|
377 | ##CS | |
378 | % if c.missing_requirements: |
|
378 | % if c.missing_requirements: | |
379 | <div class="box"> |
|
379 | <div class="box"> | |
380 | <div class="alert alert-warning"> |
|
380 | <div class="alert alert-warning"> | |
381 | <div> |
|
381 | <div> | |
382 | <strong>${_('Missing requirements:')}</strong> |
|
382 | <strong>${_('Missing requirements:')}</strong> | |
383 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} |
|
383 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} | |
384 | </div> |
|
384 | </div> | |
385 | </div> |
|
385 | </div> | |
386 | </div> |
|
386 | </div> | |
387 | % elif c.missing_commits: |
|
387 | % elif c.missing_commits: | |
388 | <div class="box"> |
|
388 | <div class="box"> | |
389 | <div class="alert alert-warning"> |
|
389 | <div class="alert alert-warning"> | |
390 | <div> |
|
390 | <div> | |
391 | <strong>${_('Missing commits')}:</strong> |
|
391 | <strong>${_('Missing commits')}:</strong> | |
392 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} |
|
392 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} | |
393 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} |
|
393 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} | |
394 | </div> |
|
394 | </div> | |
395 | </div> |
|
395 | </div> | |
396 | </div> |
|
396 | </div> | |
397 | % endif |
|
397 | % endif | |
398 |
|
398 | |||
399 | <div class="compare_view_commits_title"> |
|
399 | <div class="compare_view_commits_title"> | |
400 | % if not c.compare_mode: |
|
400 | % if not c.compare_mode: | |
401 |
|
401 | |||
402 | % if c.at_version_pos: |
|
402 | % if c.at_version_pos: | |
403 | <h4> |
|
403 | <h4> | |
404 | ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} |
|
404 | ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} | |
405 | </h4> |
|
405 | </h4> | |
406 | % endif |
|
406 | % endif | |
407 |
|
407 | |||
408 | <div class="pull-left"> |
|
408 | <div class="pull-left"> | |
409 | <div class="btn-group"> |
|
409 | <div class="btn-group"> | |
410 | <a |
|
410 | <a | |
411 | class="btn" |
|
411 | class="btn" | |
412 | href="#" |
|
412 | href="#" | |
413 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> |
|
413 | onclick="$('.compare_select').show();$('.compare_select_hidden').hide(); return false"> | |
414 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
414 | ${ungettext('Expand %s commit','Expand %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
415 | </a> |
|
415 | </a> | |
416 | <a |
|
416 | <a | |
417 | class="btn" |
|
417 | class="btn" | |
418 | href="#" |
|
418 | href="#" | |
419 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> |
|
419 | onclick="$('.compare_select').hide();$('.compare_select_hidden').show(); return false"> | |
420 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} |
|
420 | ${ungettext('Collapse %s commit','Collapse %s commits', len(c.commit_ranges)) % len(c.commit_ranges)} | |
421 | </a> |
|
421 | </a> | |
422 | </div> |
|
422 | </div> | |
423 | </div> |
|
423 | </div> | |
424 |
|
424 | |||
425 | <div class="pull-right"> |
|
425 | <div class="pull-right"> | |
426 | % if c.allowed_to_update and not c.pull_request.is_closed(): |
|
426 | % if c.allowed_to_update and not c.pull_request.is_closed(): | |
427 | <a id="update_commits" class="btn btn-primary pull-right">${_('Update commits')}</a> |
|
427 | <a id="update_commits" class="btn btn-primary pull-right">${_('Update commits')}</a> | |
428 | % else: |
|
428 | % else: | |
429 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> |
|
429 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> | |
430 | % endif |
|
430 | % endif | |
431 |
|
431 | |||
432 | </div> |
|
432 | </div> | |
433 | % endif |
|
433 | % endif | |
434 | </div> |
|
434 | </div> | |
435 |
|
435 | |||
436 | % if not c.missing_commits: |
|
436 | % if not c.missing_commits: | |
437 | % if c.compare_mode: |
|
437 | % if c.compare_mode: | |
438 | % if c.at_version: |
|
438 | % if c.at_version: | |
439 | <h4> |
|
439 | <h4> | |
440 | ${_('Commits and changes between v{ver_from} and {ver_to} of this pull request, commenting is disabled').format(ver_from=c.from_version_pos, ver_to=c.at_version_pos if c.at_version_pos else 'latest')}: |
|
440 | ${_('Commits and changes between v{ver_from} and {ver_to} of this pull request, commenting is disabled').format(ver_from=c.from_version_pos, ver_to=c.at_version_pos if c.at_version_pos else 'latest')}: | |
441 | </h4> |
|
441 | </h4> | |
442 |
|
442 | |||
443 | <div class="subtitle-compare"> |
|
443 | <div class="subtitle-compare"> | |
444 | ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} |
|
444 | ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} | |
445 | </div> |
|
445 | </div> | |
446 |
|
446 | |||
447 | <div class="container"> |
|
447 | <div class="container"> | |
448 | <table class="rctable compare_view_commits"> |
|
448 | <table class="rctable compare_view_commits"> | |
449 | <tr> |
|
449 | <tr> | |
450 | <th></th> |
|
450 | <th></th> | |
451 | <th>${_('Time')}</th> |
|
451 | <th>${_('Time')}</th> | |
452 | <th>${_('Author')}</th> |
|
452 | <th>${_('Author')}</th> | |
453 | <th>${_('Commit')}</th> |
|
453 | <th>${_('Commit')}</th> | |
454 | <th></th> |
|
454 | <th></th> | |
455 | <th>${_('Description')}</th> |
|
455 | <th>${_('Description')}</th> | |
456 | </tr> |
|
456 | </tr> | |
457 |
|
457 | |||
458 | % for c_type, commit in c.commit_changes: |
|
458 | % for c_type, commit in c.commit_changes: | |
459 | % if c_type in ['a', 'r']: |
|
459 | % if c_type in ['a', 'r']: | |
460 | <% |
|
460 | <% | |
461 | if c_type == 'a': |
|
461 | if c_type == 'a': | |
462 | cc_title = _('Commit added in displayed changes') |
|
462 | cc_title = _('Commit added in displayed changes') | |
463 | elif c_type == 'r': |
|
463 | elif c_type == 'r': | |
464 | cc_title = _('Commit removed in displayed changes') |
|
464 | cc_title = _('Commit removed in displayed changes') | |
465 | else: |
|
465 | else: | |
466 | cc_title = '' |
|
466 | cc_title = '' | |
467 | %> |
|
467 | %> | |
468 | <tr id="row-${commit.raw_id}" commit_id="${commit.raw_id}" class="compare_select"> |
|
468 | <tr id="row-${commit.raw_id}" commit_id="${commit.raw_id}" class="compare_select"> | |
469 | <td> |
|
469 | <td> | |
470 | <div class="commit-change-indicator color-${c_type}-border"> |
|
470 | <div class="commit-change-indicator color-${c_type}-border"> | |
471 | <div class="commit-change-content color-${c_type} tooltip" title="${cc_title}"> |
|
471 | <div class="commit-change-content color-${c_type} tooltip" title="${cc_title}"> | |
472 | ${c_type.upper()} |
|
472 | ${c_type.upper()} | |
473 | </div> |
|
473 | </div> | |
474 | </div> |
|
474 | </div> | |
475 | </td> |
|
475 | </td> | |
476 | <td class="td-time"> |
|
476 | <td class="td-time"> | |
477 | ${h.age_component(commit.date)} |
|
477 | ${h.age_component(commit.date)} | |
478 | </td> |
|
478 | </td> | |
479 | <td class="td-user"> |
|
479 | <td class="td-user"> | |
480 | ${base.gravatar_with_user(commit.author, 16)} |
|
480 | ${base.gravatar_with_user(commit.author, 16)} | |
481 | </td> |
|
481 | </td> | |
482 | <td class="td-hash"> |
|
482 | <td class="td-hash"> | |
483 | <code> |
|
483 | <code> | |
484 | <a href="${h.url('changeset_home', repo_name=c.target_repo.repo_name, revision=commit.raw_id)}"> |
|
484 | <a href="${h.url('changeset_home', repo_name=c.target_repo.repo_name, revision=commit.raw_id)}"> | |
485 | r${commit.revision}:${h.short_id(commit.raw_id)} |
|
485 | r${commit.revision}:${h.short_id(commit.raw_id)} | |
486 | </a> |
|
486 | </a> | |
487 | ${h.hidden('revisions', commit.raw_id)} |
|
487 | ${h.hidden('revisions', commit.raw_id)} | |
488 | </code> |
|
488 | </code> | |
489 | </td> |
|
489 | </td> | |
490 | <td class="expand_commit" data-commit-id="${commit.raw_id}" title="${_( 'Expand commit message')}"> |
|
490 | <td class="expand_commit" data-commit-id="${commit.raw_id}" title="${_( 'Expand commit message')}"> | |
491 | <div class="show_more_col"> |
|
491 | <div class="show_more_col"> | |
492 | <i class="show_more"></i> |
|
492 | <i class="show_more"></i> | |
493 | </div> |
|
493 | </div> | |
494 | </td> |
|
494 | </td> | |
495 | <td class="mid td-description"> |
|
495 | <td class="mid td-description"> | |
496 | <div class="log-container truncate-wrap"> |
|
496 | <div class="log-container truncate-wrap"> | |
497 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}"> |
|
497 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}"> | |
498 | ${h.urlify_commit_message(commit.message, c.repo_name)} |
|
498 | ${h.urlify_commit_message(commit.message, c.repo_name)} | |
499 | </div> |
|
499 | </div> | |
500 | </div> |
|
500 | </div> | |
501 | </td> |
|
501 | </td> | |
502 | </tr> |
|
502 | </tr> | |
503 | % endif |
|
503 | % endif | |
504 | % endfor |
|
504 | % endfor | |
505 | </table> |
|
505 | </table> | |
506 | </div> |
|
506 | </div> | |
507 |
|
507 | |||
508 | <script> |
|
508 | <script> | |
509 | $('.expand_commit').on('click',function(e){ |
|
509 | $('.expand_commit').on('click',function(e){ | |
510 | var target_expand = $(this); |
|
510 | var target_expand = $(this); | |
511 | var cid = target_expand.data('commitId'); |
|
511 | var cid = target_expand.data('commitId'); | |
512 |
|
512 | |||
513 | if (target_expand.hasClass('open')){ |
|
513 | if (target_expand.hasClass('open')){ | |
514 | $('#c-'+cid).css({ |
|
514 | $('#c-'+cid).css({ | |
515 | 'height': '1.5em', |
|
515 | 'height': '1.5em', | |
516 | 'white-space': 'nowrap', |
|
516 | 'white-space': 'nowrap', | |
517 | 'text-overflow': 'ellipsis', |
|
517 | 'text-overflow': 'ellipsis', | |
518 | 'overflow':'hidden' |
|
518 | 'overflow':'hidden' | |
519 | }); |
|
519 | }); | |
520 | target_expand.removeClass('open'); |
|
520 | target_expand.removeClass('open'); | |
521 | } |
|
521 | } | |
522 | else { |
|
522 | else { | |
523 | $('#c-'+cid).css({ |
|
523 | $('#c-'+cid).css({ | |
524 | 'height': 'auto', |
|
524 | 'height': 'auto', | |
525 | 'white-space': 'pre-line', |
|
525 | 'white-space': 'pre-line', | |
526 | 'text-overflow': 'initial', |
|
526 | 'text-overflow': 'initial', | |
527 | 'overflow':'visible' |
|
527 | 'overflow':'visible' | |
528 | }); |
|
528 | }); | |
529 | target_expand.addClass('open'); |
|
529 | target_expand.addClass('open'); | |
530 | } |
|
530 | } | |
531 | }); |
|
531 | }); | |
532 | </script> |
|
532 | </script> | |
533 |
|
533 | |||
534 | % endif |
|
534 | % endif | |
535 |
|
535 | |||
536 | % else: |
|
536 | % else: | |
537 | <%include file="/compare/compare_commits.mako" /> |
|
537 | <%include file="/compare/compare_commits.mako" /> | |
538 | % endif |
|
538 | % endif | |
539 |
|
539 | |||
540 | <div class="cs_files"> |
|
540 | <div class="cs_files"> | |
541 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
541 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> | |
542 | ${cbdiffs.render_diffset_menu()} |
|
542 | ${cbdiffs.render_diffset_menu()} | |
543 | ${cbdiffs.render_diffset( |
|
543 | ${cbdiffs.render_diffset( | |
544 | c.diffset, use_comments=True, |
|
544 | c.diffset, use_comments=True, | |
545 | collapse_when_files_over=30, |
|
545 | collapse_when_files_over=30, | |
546 | disable_new_comments=not c.allowed_to_comment, |
|
546 | disable_new_comments=not c.allowed_to_comment, | |
547 | deleted_files_comments=c.deleted_files_comments)} |
|
547 | deleted_files_comments=c.deleted_files_comments)} | |
548 | </div> |
|
548 | </div> | |
549 | % else: |
|
549 | % else: | |
550 | ## skipping commits we need to clear the view for missing commits |
|
550 | ## skipping commits we need to clear the view for missing commits | |
551 | <div style="clear:both;"></div> |
|
551 | <div style="clear:both;"></div> | |
552 | % endif |
|
552 | % endif | |
553 |
|
553 | |||
554 | </div> |
|
554 | </div> | |
555 | </div> |
|
555 | </div> | |
556 |
|
556 | |||
557 | ## template for inline comment form |
|
557 | ## template for inline comment form | |
558 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
558 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> | |
559 |
|
559 | |||
560 | ## render general comments |
|
560 | ## render general comments | |
561 |
|
561 | |||
562 | <div id="comment-tr-show"> |
|
562 | <div id="comment-tr-show"> | |
563 | <div class="comment"> |
|
563 | <div class="comment"> | |
564 | % if general_outdated_comm_count_ver: |
|
564 | % if general_outdated_comm_count_ver: | |
565 | <div class="meta"> |
|
565 | <div class="meta"> | |
566 | % if general_outdated_comm_count_ver == 1: |
|
566 | % if general_outdated_comm_count_ver == 1: | |
567 | ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, |
|
567 | ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, | |
568 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show it')}</a> |
|
568 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show it')}</a> | |
569 | % else: |
|
569 | % else: | |
570 | ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, |
|
570 | ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, | |
571 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show them')}</a> |
|
571 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show them')}</a> | |
572 | % endif |
|
572 | % endif | |
573 | </div> |
|
573 | </div> | |
574 | % endif |
|
574 | % endif | |
575 | </div> |
|
575 | </div> | |
576 | </div> |
|
576 | </div> | |
577 |
|
577 | |||
578 | ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} |
|
578 | ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} | |
579 |
|
579 | |||
580 | % if not c.pull_request.is_closed(): |
|
580 | % if not c.pull_request.is_closed(): | |
581 | ## merge status, and merge action |
|
581 | ## merge status, and merge action | |
582 | <div class="pull-request-merge"> |
|
582 | <div class="pull-request-merge"> | |
583 | <%include file="/pullrequests/pullrequest_merge_checks.mako"/> |
|
583 | <%include file="/pullrequests/pullrequest_merge_checks.mako"/> | |
584 | </div> |
|
584 | </div> | |
585 |
|
585 | |||
586 | ## main comment form and it status |
|
586 | ## main comment form and it status | |
587 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, |
|
587 | ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, | |
588 | pull_request_id=c.pull_request.pull_request_id), |
|
588 | pull_request_id=c.pull_request.pull_request_id), | |
589 | c.pull_request_review_status, |
|
589 | c.pull_request_review_status, | |
590 | is_pull_request=True, change_status=c.allowed_to_change_status)} |
|
590 | is_pull_request=True, change_status=c.allowed_to_change_status)} | |
591 | %endif |
|
591 | %endif | |
592 |
|
592 | |||
593 | <script type="text/javascript"> |
|
593 | <script type="text/javascript"> | |
594 | if (location.hash) { |
|
594 | if (location.hash) { | |
595 | var result = splitDelimitedHash(location.hash); |
|
595 | var result = splitDelimitedHash(location.hash); | |
596 | var line = $('html').find(result.loc); |
|
596 | var line = $('html').find(result.loc); | |
597 | // show hidden comments if we use location.hash |
|
597 | // show hidden comments if we use location.hash | |
598 | if (line.hasClass('comment-general')) { |
|
598 | if (line.hasClass('comment-general')) { | |
599 | $(line).show(); |
|
599 | $(line).show(); | |
600 | } else if (line.hasClass('comment-inline')) { |
|
600 | } else if (line.hasClass('comment-inline')) { | |
601 | $(line).show(); |
|
601 | $(line).show(); | |
602 | var $cb = $(line).closest('.cb'); |
|
602 | var $cb = $(line).closest('.cb'); | |
603 | $cb.removeClass('cb-collapsed') |
|
603 | $cb.removeClass('cb-collapsed') | |
604 | } |
|
604 | } | |
605 | if (line.length > 0){ |
|
605 | if (line.length > 0){ | |
606 | offsetScroll(line, 70); |
|
606 | offsetScroll(line, 70); | |
607 | } |
|
607 | } | |
608 | } |
|
608 | } | |
609 |
|
609 | |||
610 | versionController = new VersionController(); |
|
610 | versionController = new VersionController(); | |
611 | versionController.init(); |
|
611 | versionController.init(); | |
612 |
|
612 | |||
613 |
|
613 | |||
614 | $(function(){ |
|
614 | $(function(){ | |
615 | ReviewerAutoComplete('user'); |
|
615 | ReviewerAutoComplete('user'); | |
616 | // custom code mirror |
|
616 | // custom code mirror | |
617 | var codeMirrorInstance = initPullRequestsCodeMirror('#pr-description-input'); |
|
617 | var codeMirrorInstance = initPullRequestsCodeMirror('#pr-description-input'); | |
618 |
|
618 | |||
619 | var PRDetails = { |
|
619 | var PRDetails = { | |
620 | editButton: $('#open_edit_pullrequest'), |
|
620 | editButton: $('#open_edit_pullrequest'), | |
621 | closeButton: $('#close_edit_pullrequest'), |
|
621 | closeButton: $('#close_edit_pullrequest'), | |
622 | deleteButton: $('#delete_pullrequest'), |
|
622 | deleteButton: $('#delete_pullrequest'), | |
623 | viewFields: $('#pr-desc, #pr-title'), |
|
623 | viewFields: $('#pr-desc, #pr-title'), | |
624 | editFields: $('#pr-desc-edit, #pr-title-edit, #pr-save'), |
|
624 | editFields: $('#pr-desc-edit, #pr-title-edit, #pr-save'), | |
625 |
|
625 | |||
626 | init: function() { |
|
626 | init: function() { | |
627 | var that = this; |
|
627 | var that = this; | |
628 | this.editButton.on('click', function(e) { that.edit(); }); |
|
628 | this.editButton.on('click', function(e) { that.edit(); }); | |
629 | this.closeButton.on('click', function(e) { that.view(); }); |
|
629 | this.closeButton.on('click', function(e) { that.view(); }); | |
630 | }, |
|
630 | }, | |
631 |
|
631 | |||
632 | edit: function(event) { |
|
632 | edit: function(event) { | |
633 | this.viewFields.hide(); |
|
633 | this.viewFields.hide(); | |
634 | this.editButton.hide(); |
|
634 | this.editButton.hide(); | |
635 | this.deleteButton.hide(); |
|
635 | this.deleteButton.hide(); | |
636 | this.closeButton.show(); |
|
636 | this.closeButton.show(); | |
637 | this.editFields.show(); |
|
637 | this.editFields.show(); | |
638 | codeMirrorInstance.refresh(); |
|
638 | codeMirrorInstance.refresh(); | |
639 | }, |
|
639 | }, | |
640 |
|
640 | |||
641 | view: function(event) { |
|
641 | view: function(event) { | |
642 | this.editButton.show(); |
|
642 | this.editButton.show(); | |
643 | this.deleteButton.show(); |
|
643 | this.deleteButton.show(); | |
644 | this.editFields.hide(); |
|
644 | this.editFields.hide(); | |
645 | this.closeButton.hide(); |
|
645 | this.closeButton.hide(); | |
646 | this.viewFields.show(); |
|
646 | this.viewFields.show(); | |
647 | } |
|
647 | } | |
648 | }; |
|
648 | }; | |
649 |
|
649 | |||
650 | var ReviewersPanel = { |
|
650 | var ReviewersPanel = { | |
651 | editButton: $('#open_edit_reviewers'), |
|
651 | editButton: $('#open_edit_reviewers'), | |
652 | closeButton: $('#close_edit_reviewers'), |
|
652 | closeButton: $('#close_edit_reviewers'), | |
653 | addButton: $('#add_reviewer_input'), |
|
653 | addButton: $('#add_reviewer_input'), | |
654 | removeButtons: $('.reviewer_member_remove'), |
|
654 | removeButtons: $('.reviewer_member_remove'), | |
655 |
|
655 | |||
656 | init: function() { |
|
656 | init: function() { | |
657 | var that = this; |
|
657 | var that = this; | |
658 | this.editButton.on('click', function(e) { that.edit(); }); |
|
658 | this.editButton.on('click', function(e) { that.edit(); }); | |
659 | this.closeButton.on('click', function(e) { that.close(); }); |
|
659 | this.closeButton.on('click', function(e) { that.close(); }); | |
660 | }, |
|
660 | }, | |
661 |
|
661 | |||
662 | edit: function(event) { |
|
662 | edit: function(event) { | |
663 | this.editButton.hide(); |
|
663 | this.editButton.hide(); | |
664 | this.closeButton.show(); |
|
664 | this.closeButton.show(); | |
665 | this.addButton.show(); |
|
665 | this.addButton.show(); | |
666 | this.removeButtons.css('visibility', 'visible'); |
|
666 | this.removeButtons.css('visibility', 'visible'); | |
667 | }, |
|
667 | }, | |
668 |
|
668 | |||
669 | close: function(event) { |
|
669 | close: function(event) { | |
670 | this.editButton.show(); |
|
670 | this.editButton.show(); | |
671 | this.closeButton.hide(); |
|
671 | this.closeButton.hide(); | |
672 | this.addButton.hide(); |
|
672 | this.addButton.hide(); | |
673 | this.removeButtons.css('visibility', 'hidden'); |
|
673 | this.removeButtons.css('visibility', 'hidden'); | |
674 | } |
|
674 | } | |
675 | }; |
|
675 | }; | |
676 |
|
676 | |||
677 | PRDetails.init(); |
|
677 | PRDetails.init(); | |
678 | ReviewersPanel.init(); |
|
678 | ReviewersPanel.init(); | |
679 |
|
679 | |||
680 | showOutdated = function(self){ |
|
680 | showOutdated = function(self){ | |
681 | $('.comment-inline.comment-outdated').show(); |
|
681 | $('.comment-inline.comment-outdated').show(); | |
682 | $('.filediff-outdated').show(); |
|
682 | $('.filediff-outdated').show(); | |
683 | $('.showOutdatedComments').hide(); |
|
683 | $('.showOutdatedComments').hide(); | |
684 | $('.hideOutdatedComments').show(); |
|
684 | $('.hideOutdatedComments').show(); | |
685 | }; |
|
685 | }; | |
686 |
|
686 | |||
687 | hideOutdated = function(self){ |
|
687 | hideOutdated = function(self){ | |
688 | $('.comment-inline.comment-outdated').hide(); |
|
688 | $('.comment-inline.comment-outdated').hide(); | |
689 | $('.filediff-outdated').hide(); |
|
689 | $('.filediff-outdated').hide(); | |
690 | $('.hideOutdatedComments').hide(); |
|
690 | $('.hideOutdatedComments').hide(); | |
691 | $('.showOutdatedComments').show(); |
|
691 | $('.showOutdatedComments').show(); | |
692 | }; |
|
692 | }; | |
693 |
|
693 | |||
694 | refreshMergeChecks = function(){ |
|
694 | refreshMergeChecks = function(){ | |
695 | var loadUrl = "${h.url.current(merge_checks=1)}"; |
|
695 | var loadUrl = "${h.url.current(merge_checks=1)}"; | |
696 | $('.pull-request-merge').css('opacity', 0.3); |
|
696 | $('.pull-request-merge').css('opacity', 0.3); | |
697 | $('.action-buttons-extra').css('opacity', 0.3); |
|
697 | $('.action-buttons-extra').css('opacity', 0.3); | |
698 |
|
698 | |||
699 | $('.pull-request-merge').load( |
|
699 | $('.pull-request-merge').load( | |
700 | loadUrl, function() { |
|
700 | loadUrl, function() { | |
701 | $('.pull-request-merge').css('opacity', 1); |
|
701 | $('.pull-request-merge').css('opacity', 1); | |
702 |
|
702 | |||
703 | $('.action-buttons-extra').css('opacity', 1); |
|
703 | $('.action-buttons-extra').css('opacity', 1); | |
704 | injectCloseAction(); |
|
704 | injectCloseAction(); | |
705 | } |
|
705 | } | |
706 | ); |
|
706 | ); | |
707 | }; |
|
707 | }; | |
708 |
|
708 | |||
709 | injectCloseAction = function() { |
|
709 | injectCloseAction = function() { | |
710 | var closeAction = $('#close-pull-request-action').html(); |
|
710 | var closeAction = $('#close-pull-request-action').html(); | |
711 | var $actionButtons = $('.action-buttons-extra'); |
|
711 | var $actionButtons = $('.action-buttons-extra'); | |
712 | // clear the action before |
|
712 | // clear the action before | |
713 | $actionButtons.html(""); |
|
713 | $actionButtons.html(""); | |
714 | $actionButtons.html(closeAction); |
|
714 | $actionButtons.html(closeAction); | |
715 | }; |
|
715 | }; | |
716 |
|
716 | |||
717 | closePullRequest = function (status) { |
|
717 | closePullRequest = function (status) { | |
718 | // inject closing flag |
|
718 | // inject closing flag | |
719 | $('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">'); |
|
719 | $('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">'); | |
720 | $(generalCommentForm.statusChange).select2("val", status).trigger('change'); |
|
720 | $(generalCommentForm.statusChange).select2("val", status).trigger('change'); | |
721 | $(generalCommentForm.submitForm).submit(); |
|
721 | $(generalCommentForm.submitForm).submit(); | |
722 | }; |
|
722 | }; | |
723 |
|
723 | |||
724 | $('#show-outdated-comments').on('click', function(e){ |
|
724 | $('#show-outdated-comments').on('click', function(e){ | |
725 | var button = $(this); |
|
725 | var button = $(this); | |
726 | var outdated = $('.comment-outdated'); |
|
726 | var outdated = $('.comment-outdated'); | |
727 |
|
727 | |||
728 | if (button.html() === "(Show)") { |
|
728 | if (button.html() === "(Show)") { | |
729 | button.html("(Hide)"); |
|
729 | button.html("(Hide)"); | |
730 | outdated.show(); |
|
730 | outdated.show(); | |
731 | } else { |
|
731 | } else { | |
732 | button.html("(Show)"); |
|
732 | button.html("(Show)"); | |
733 | outdated.hide(); |
|
733 | outdated.hide(); | |
734 | } |
|
734 | } | |
735 | }); |
|
735 | }); | |
736 |
|
736 | |||
737 | $('.show-inline-comments').on('change', function(e){ |
|
737 | $('.show-inline-comments').on('change', function(e){ | |
738 | var show = 'none'; |
|
738 | var show = 'none'; | |
739 | var target = e.currentTarget; |
|
739 | var target = e.currentTarget; | |
740 | if(target.checked){ |
|
740 | if(target.checked){ | |
741 | show = '' |
|
741 | show = '' | |
742 | } |
|
742 | } | |
743 | var boxid = $(target).attr('id_for'); |
|
743 | var boxid = $(target).attr('id_for'); | |
744 | var comments = $('#{0} .inline-comments'.format(boxid)); |
|
744 | var comments = $('#{0} .inline-comments'.format(boxid)); | |
745 | var fn_display = function(idx){ |
|
745 | var fn_display = function(idx){ | |
746 | $(this).css('display', show); |
|
746 | $(this).css('display', show); | |
747 | }; |
|
747 | }; | |
748 | $(comments).each(fn_display); |
|
748 | $(comments).each(fn_display); | |
749 | var btns = $('#{0} .inline-comments-button'.format(boxid)); |
|
749 | var btns = $('#{0} .inline-comments-button'.format(boxid)); | |
750 | $(btns).each(fn_display); |
|
750 | $(btns).each(fn_display); | |
751 | }); |
|
751 | }); | |
752 |
|
752 | |||
753 | $('#merge_pull_request_form').submit(function() { |
|
753 | $('#merge_pull_request_form').submit(function() { | |
754 | if (!$('#merge_pull_request').attr('disabled')) { |
|
754 | if (!$('#merge_pull_request').attr('disabled')) { | |
755 | $('#merge_pull_request').attr('disabled', 'disabled'); |
|
755 | $('#merge_pull_request').attr('disabled', 'disabled'); | |
756 | } |
|
756 | } | |
757 | return true; |
|
757 | return true; | |
758 | }); |
|
758 | }); | |
759 |
|
759 | |||
760 | $('#edit_pull_request').on('click', function(e){ |
|
760 | $('#edit_pull_request').on('click', function(e){ | |
761 | var title = $('#pr-title-input').val(); |
|
761 | var title = $('#pr-title-input').val(); | |
762 | var description = codeMirrorInstance.getValue(); |
|
762 | var description = codeMirrorInstance.getValue(); | |
763 | editPullRequest( |
|
763 | editPullRequest( | |
764 | "${c.repo_name}", "${c.pull_request.pull_request_id}", |
|
764 | "${c.repo_name}", "${c.pull_request.pull_request_id}", | |
765 | title, description); |
|
765 | title, description); | |
766 | }); |
|
766 | }); | |
767 |
|
767 | |||
768 | $('#update_pull_request').on('click', function(e){ |
|
768 | $('#update_pull_request').on('click', function(e){ | |
769 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
769 | updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
770 | }); |
|
770 | }); | |
771 |
|
771 | |||
772 | $('#update_commits').on('click', function(e){ |
|
772 | $('#update_commits').on('click', function(e){ | |
773 | var isDisabled = !$(e.currentTarget).attr('disabled'); |
|
773 | var isDisabled = !$(e.currentTarget).attr('disabled'); | |
774 | $(e.currentTarget).text(_gettext('Updating...')); |
|
774 | $(e.currentTarget).text(_gettext('Updating...')); | |
775 | $(e.currentTarget).attr('disabled', 'disabled'); |
|
775 | $(e.currentTarget).attr('disabled', 'disabled'); | |
776 | if(isDisabled){ |
|
776 | if(isDisabled){ | |
777 | updateCommits("${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
777 | updateCommits("${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
778 | } |
|
778 | } | |
779 |
|
779 | |||
780 | }); |
|
780 | }); | |
781 | // fixing issue with caches on firefox |
|
781 | // fixing issue with caches on firefox | |
782 | $('#update_commits').removeAttr("disabled"); |
|
782 | $('#update_commits').removeAttr("disabled"); | |
783 |
|
783 | |||
784 | $('#close_pull_request').on('click', function(e){ |
|
784 | $('#close_pull_request').on('click', function(e){ | |
785 | closePullRequest("${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
785 | closePullRequest("${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
786 | }); |
|
786 | }); | |
787 |
|
787 | |||
788 | $('.show-inline-comments').on('click', function(e){ |
|
788 | $('.show-inline-comments').on('click', function(e){ | |
789 | var boxid = $(this).attr('data-comment-id'); |
|
789 | var boxid = $(this).attr('data-comment-id'); | |
790 | var button = $(this); |
|
790 | var button = $(this); | |
791 |
|
791 | |||
792 | if(button.hasClass("comments-visible")) { |
|
792 | if(button.hasClass("comments-visible")) { | |
793 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
793 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
794 | $(this).hide(); |
|
794 | $(this).hide(); | |
795 | }); |
|
795 | }); | |
796 | button.removeClass("comments-visible"); |
|
796 | button.removeClass("comments-visible"); | |
797 | } else { |
|
797 | } else { | |
798 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ |
|
798 | $('#{0} .inline-comments'.format(boxid)).each(function(index){ | |
799 | $(this).show(); |
|
799 | $(this).show(); | |
800 | }); |
|
800 | }); | |
801 | button.addClass("comments-visible"); |
|
801 | button.addClass("comments-visible"); | |
802 | } |
|
802 | } | |
803 | }); |
|
803 | }); | |
804 |
|
804 | |||
805 | // register submit callback on commentForm form to track TODOs |
|
805 | // register submit callback on commentForm form to track TODOs | |
806 | window.commentFormGlobalSubmitSuccessCallback = function(){ |
|
806 | window.commentFormGlobalSubmitSuccessCallback = function(){ | |
807 | refreshMergeChecks(); |
|
807 | refreshMergeChecks(); | |
808 | }; |
|
808 | }; | |
809 | // initial injection |
|
809 | // initial injection | |
810 | injectCloseAction(); |
|
810 | injectCloseAction(); | |
811 |
|
811 | |||
812 | }) |
|
812 | }) | |
813 | </script> |
|
813 | </script> | |
814 |
|
814 | |||
815 | </div> |
|
815 | </div> | |
816 | </div> |
|
816 | </div> | |
817 |
|
817 | |||
818 | </%def> |
|
818 | </%def> |
@@ -1,202 +1,202 b'' | |||||
1 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
1 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> | |
2 | <span class="branchtag tag"> |
|
2 | <span class="branchtag tag"> | |
3 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
3 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> | |
4 | <i class="icon-branch"></i>${ungettext( |
|
4 | <i class="icon-branch"></i>${ungettext( | |
5 | '%(num)s Branch','%(num)s Branches', len(branches)) % {'num': len(branches)}}</a> |
|
5 | '%(num)s Branch','%(num)s Branches', len(branches)) % {'num': len(branches)}}</a> | |
6 | </span> |
|
6 | </span> | |
7 |
|
7 | |||
8 | %if closed_branches: |
|
8 | %if closed_branches: | |
9 | <span class="branchtag tag"> |
|
9 | <span class="branchtag tag"> | |
10 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
10 | <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"> | |
11 | <i class="icon-branch"></i>${ungettext( |
|
11 | <i class="icon-branch"></i>${ungettext( | |
12 | '%(num)s Closed Branch', '%(num)s Closed Branches', len(closed_branches)) % {'num': len(closed_branches)}}</a> |
|
12 | '%(num)s Closed Branch', '%(num)s Closed Branches', len(closed_branches)) % {'num': len(closed_branches)}}</a> | |
13 | </span> |
|
13 | </span> | |
14 | %endif |
|
14 | %endif | |
15 |
|
15 | |||
16 | <span class="tagtag tag"> |
|
16 | <span class="tagtag tag"> | |
17 | <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"> |
|
17 | <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"> | |
18 | <i class="icon-tag"></i>${ungettext( |
|
18 | <i class="icon-tag"></i>${ungettext( | |
19 | '%(num)s Tag', '%(num)s Tags', len(tags)) % {'num': len(tags)}}</a> |
|
19 | '%(num)s Tag', '%(num)s Tags', len(tags)) % {'num': len(tags)}}</a> | |
20 | </span> |
|
20 | </span> | |
21 |
|
21 | |||
22 | %if bookmarks: |
|
22 | %if bookmarks: | |
23 | <span class="booktag tag"> |
|
23 | <span class="booktag tag"> | |
24 | <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"> |
|
24 | <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"> | |
25 | <i class="icon-bookmark"></i>${ungettext( |
|
25 | <i class="icon-bookmark"></i>${ungettext( | |
26 | '%(num)s Bookmark', '%(num)s Bookmarks', len(bookmarks)) % {'num': len(bookmarks)}}</a> |
|
26 | '%(num)s Bookmark', '%(num)s Bookmarks', len(bookmarks)) % {'num': len(bookmarks)}}</a> | |
27 | </span> |
|
27 | </span> | |
28 | %endif |
|
28 | %endif | |
29 | </%def> |
|
29 | </%def> | |
30 |
|
30 | |||
31 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> |
|
31 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> | |
32 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
32 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
33 |
|
33 | |||
34 | <div id="summary-menu-stats" class="summary-detail"> |
|
34 | <div id="summary-menu-stats" class="summary-detail"> | |
35 | <div class="summary-detail-header"> |
|
35 | <div class="summary-detail-header"> | |
36 | <div class="breadcrumbs files_location"> |
|
36 | <div class="breadcrumbs files_location"> | |
37 | <h4> |
|
37 | <h4> | |
38 | ${breadcrumbs_links} |
|
38 | ${breadcrumbs_links} | |
39 | </h4> |
|
39 | </h4> | |
40 | </div> |
|
40 | </div> | |
41 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
41 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> | |
42 | ${_('Show More')} |
|
42 | ${_('Show More')} | |
43 | </div> |
|
43 | </div> | |
44 | </div> |
|
44 | </div> | |
45 |
|
45 | |||
46 | <div class="fieldset"> |
|
46 | <div class="fieldset"> | |
47 | %if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
47 | %if h.is_svn_without_proxy(c.rhodecode_db_repo): | |
48 | <div class="left-label disabled"> |
|
48 | <div class="left-label disabled"> | |
49 | ${_('Read-only url')}: |
|
49 | ${_('Read-only url')}: | |
50 | </div> |
|
50 | </div> | |
51 | <div class="right-content disabled"> |
|
51 | <div class="right-content disabled"> | |
52 | <input type="text" id="clone_url" disabled value="${c.clone_repo_url}"/> |
|
52 | <input type="text" class="input-monospace" id="clone_url" disabled value="${c.clone_repo_url}"/> | |
53 | <input type="text" id="clone_url_id" disabled value="${c.clone_repo_url_id}" style="display: none;"/> |
|
53 | <input type="text" class="input-monospace" id="clone_url_id" disabled value="${c.clone_repo_url_id}" style="display: none;"/> | |
54 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> |
|
54 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> | |
55 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> |
|
55 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> | |
56 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> |
|
56 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> | |
57 | </div> |
|
57 | </div> | |
58 | %else: |
|
58 | %else: | |
59 | <div class="left-label"> |
|
59 | <div class="left-label"> | |
60 | ${_('Clone url')}: |
|
60 | ${_('Clone url')}: | |
61 | </div> |
|
61 | </div> | |
62 | <div class="right-content"> |
|
62 | <div class="right-content"> | |
63 | <input type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> |
|
63 | <input type="text" class="input-monospace" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/> | |
64 | <input type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}" style="display: none;"/> |
|
64 | <input type="text" class="input-monospace" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}" style="display: none;"/> | |
65 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> |
|
65 | <a id="clone_by_name" class="clone" style="display: none;">${_('Show by Name')}</a> | |
66 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> |
|
66 | <a id="clone_by_id" class="clone">${_('Show by ID')}</a> | |
67 | </div> |
|
67 | </div> | |
68 | %endif |
|
68 | %endif | |
69 | </div> |
|
69 | </div> | |
70 |
|
70 | |||
71 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
71 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
72 | <div class="left-label"> |
|
72 | <div class="left-label"> | |
73 | ${_('Description')}: |
|
73 | ${_('Description')}: | |
74 | </div> |
|
74 | </div> | |
75 | <div class="right-content"> |
|
75 | <div class="right-content"> | |
76 | %if c.visual.stylify_metatags: |
|
76 | %if c.visual.stylify_metatags: | |
77 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.escaped_stylize(c.rhodecode_db_repo.description))}</div> |
|
77 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.escaped_stylize(c.rhodecode_db_repo.description))}</div> | |
78 | %else: |
|
78 | %else: | |
79 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.html_escape(c.rhodecode_db_repo.description))}</div> |
|
79 | <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.html_escape(c.rhodecode_db_repo.description))}</div> | |
80 | %endif |
|
80 | %endif | |
81 | </div> |
|
81 | </div> | |
82 | </div> |
|
82 | </div> | |
83 |
|
83 | |||
84 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
84 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
85 | <div class="left-label"> |
|
85 | <div class="left-label"> | |
86 | ${_('Information')}: |
|
86 | ${_('Information')}: | |
87 | </div> |
|
87 | </div> | |
88 | <div class="right-content"> |
|
88 | <div class="right-content"> | |
89 |
|
89 | |||
90 | <div class="repo-size"> |
|
90 | <div class="repo-size"> | |
91 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> |
|
91 | <% commit_rev = c.rhodecode_db_repo.changeset_cache.get('revision') %> | |
92 |
|
92 | |||
93 | ## commits |
|
93 | ## commits | |
94 | % if commit_rev == -1: |
|
94 | % if commit_rev == -1: | |
95 | ${ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}}, |
|
95 | ${ungettext('%(num)s Commit', '%(num)s Commits', 0) % {'num': 0}}, | |
96 | % else: |
|
96 | % else: | |
97 | <a href="${h.url('changelog_home', repo_name=c.repo_name)}"> |
|
97 | <a href="${h.url('changelog_home', repo_name=c.repo_name)}"> | |
98 | ${ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a>, |
|
98 | ${ungettext('%(num)s Commit', '%(num)s Commits', commit_rev) % {'num': commit_rev}}</a>, | |
99 | % endif |
|
99 | % endif | |
100 |
|
100 | |||
101 | ## forks |
|
101 | ## forks | |
102 | <a title="${_('Number of Repository Forks')}" href="${h.url('repo_forks_home', repo_name=c.repo_name)}"> |
|
102 | <a title="${_('Number of Repository Forks')}" href="${h.url('repo_forks_home', repo_name=c.repo_name)}"> | |
103 | ${c.repository_forks} ${ungettext('Fork', 'Forks', c.repository_forks)}</a>, |
|
103 | ${c.repository_forks} ${ungettext('Fork', 'Forks', c.repository_forks)}</a>, | |
104 |
|
104 | |||
105 | ## repo size |
|
105 | ## repo size | |
106 | % if commit_rev == -1: |
|
106 | % if commit_rev == -1: | |
107 | <span class="stats-bullet">0 B</span> |
|
107 | <span class="stats-bullet">0 B</span> | |
108 | % else: |
|
108 | % else: | |
109 | <span class="stats-bullet" id="repo_size_container"> |
|
109 | <span class="stats-bullet" id="repo_size_container"> | |
110 | ${_('Calculating Repository Size...')} |
|
110 | ${_('Calculating Repository Size...')} | |
111 | </span> |
|
111 | </span> | |
112 | % endif |
|
112 | % endif | |
113 | </div> |
|
113 | </div> | |
114 |
|
114 | |||
115 | <div class="commit-info"> |
|
115 | <div class="commit-info"> | |
116 | <div class="tags"> |
|
116 | <div class="tags"> | |
117 | % if c.rhodecode_repo: |
|
117 | % if c.rhodecode_repo: | |
118 | ${refs_counters( |
|
118 | ${refs_counters( | |
119 | c.rhodecode_repo.branches, |
|
119 | c.rhodecode_repo.branches, | |
120 | c.rhodecode_repo.branches_closed, |
|
120 | c.rhodecode_repo.branches_closed, | |
121 | c.rhodecode_repo.tags, |
|
121 | c.rhodecode_repo.tags, | |
122 | c.rhodecode_repo.bookmarks)} |
|
122 | c.rhodecode_repo.bookmarks)} | |
123 | % else: |
|
123 | % else: | |
124 | ## missing requirements can make c.rhodecode_repo None |
|
124 | ## missing requirements can make c.rhodecode_repo None | |
125 | ${refs_counters([], [], [], [])} |
|
125 | ${refs_counters([], [], [], [])} | |
126 | % endif |
|
126 | % endif | |
127 | </div> |
|
127 | </div> | |
128 | </div> |
|
128 | </div> | |
129 |
|
129 | |||
130 | </div> |
|
130 | </div> | |
131 | </div> |
|
131 | </div> | |
132 |
|
132 | |||
133 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
133 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
134 | <div class="left-label"> |
|
134 | <div class="left-label"> | |
135 | ${_('Statistics')}: |
|
135 | ${_('Statistics')}: | |
136 | </div> |
|
136 | </div> | |
137 | <div class="right-content"> |
|
137 | <div class="right-content"> | |
138 | <div class="input ${summary(c.show_stats)} statistics"> |
|
138 | <div class="input ${summary(c.show_stats)} statistics"> | |
139 | % if c.show_stats: |
|
139 | % if c.show_stats: | |
140 | <div id="lang_stats" class="enabled"> |
|
140 | <div id="lang_stats" class="enabled"> | |
141 | ${_('Calculating Code Statistics...')} |
|
141 | ${_('Calculating Code Statistics...')} | |
142 | </div> |
|
142 | </div> | |
143 | % else: |
|
143 | % else: | |
144 | <span class="disabled"> |
|
144 | <span class="disabled"> | |
145 | ${_('Statistics are disabled for this repository')} |
|
145 | ${_('Statistics are disabled for this repository')} | |
146 | </span> |
|
146 | </span> | |
147 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): |
|
147 | % if h.HasPermissionAll('hg.admin')('enable stats on from summary'): | |
148 | , ${h.link_to(_('enable statistics'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'))} |
|
148 | , ${h.link_to(_('enable statistics'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'))} | |
149 | % endif |
|
149 | % endif | |
150 | % endif |
|
150 | % endif | |
151 | </div> |
|
151 | </div> | |
152 |
|
152 | |||
153 | </div> |
|
153 | </div> | |
154 | </div> |
|
154 | </div> | |
155 |
|
155 | |||
156 | % if show_downloads: |
|
156 | % if show_downloads: | |
157 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
157 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
158 | <div class="left-label"> |
|
158 | <div class="left-label"> | |
159 | ${_('Downloads')}: |
|
159 | ${_('Downloads')}: | |
160 | </div> |
|
160 | </div> | |
161 | <div class="right-content"> |
|
161 | <div class="right-content"> | |
162 | <div class="input ${summary(c.show_stats)} downloads"> |
|
162 | <div class="input ${summary(c.show_stats)} downloads"> | |
163 | % if c.rhodecode_repo and len(c.rhodecode_repo.revisions) == 0: |
|
163 | % if c.rhodecode_repo and len(c.rhodecode_repo.revisions) == 0: | |
164 | <span class="disabled"> |
|
164 | <span class="disabled"> | |
165 | ${_('There are no downloads yet')} |
|
165 | ${_('There are no downloads yet')} | |
166 | </span> |
|
166 | </span> | |
167 | % elif not c.enable_downloads: |
|
167 | % elif not c.enable_downloads: | |
168 | <span class="disabled"> |
|
168 | <span class="disabled"> | |
169 | ${_('Downloads are disabled for this repository')} |
|
169 | ${_('Downloads are disabled for this repository')} | |
170 | </span> |
|
170 | </span> | |
171 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): |
|
171 | % if h.HasPermissionAll('hg.admin')('enable downloads on from summary'): | |
172 | , ${h.link_to(_('enable downloads'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'))} |
|
172 | , ${h.link_to(_('enable downloads'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'))} | |
173 | % endif |
|
173 | % endif | |
174 | % else: |
|
174 | % else: | |
175 | <span class="enabled"> |
|
175 | <span class="enabled"> | |
176 | <a id="archive_link" class="btn btn-small" href="${h.url('files_archive_home',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}"> |
|
176 | <a id="archive_link" class="btn btn-small" href="${h.url('files_archive_home',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}"> | |
177 | <i class="icon-archive"></i> tip.zip |
|
177 | <i class="icon-archive"></i> tip.zip | |
178 | ## replaced by some JS on select |
|
178 | ## replaced by some JS on select | |
179 | </a> |
|
179 | </a> | |
180 | </span> |
|
180 | </span> | |
181 | ${h.hidden('download_options')} |
|
181 | ${h.hidden('download_options')} | |
182 | % endif |
|
182 | % endif | |
183 | </div> |
|
183 | </div> | |
184 | </div> |
|
184 | </div> | |
185 | </div> |
|
185 | </div> | |
186 | % endif |
|
186 | % endif | |
187 |
|
187 | |||
188 | </div><!--end summary-detail--> |
|
188 | </div><!--end summary-detail--> | |
189 | </%def> |
|
189 | </%def> | |
190 |
|
190 | |||
191 | <%def name="summary_stats(gravatar_function)"> |
|
191 | <%def name="summary_stats(gravatar_function)"> | |
192 | <div class="sidebar-right"> |
|
192 | <div class="sidebar-right"> | |
193 | <div class="summary-detail-header"> |
|
193 | <div class="summary-detail-header"> | |
194 | <h4 class="item"> |
|
194 | <h4 class="item"> | |
195 | ${_('Owner')} |
|
195 | ${_('Owner')} | |
196 | </h4> |
|
196 | </h4> | |
197 | </div> |
|
197 | </div> | |
198 | <div class="sidebar-right-content"> |
|
198 | <div class="sidebar-right-content"> | |
199 | ${gravatar_function(c.rhodecode_db_repo.user.email, 16)} |
|
199 | ${gravatar_function(c.rhodecode_db_repo.user.email, 16)} | |
200 | </div> |
|
200 | </div> | |
201 | </div><!--end sidebar-right--> |
|
201 | </div><!--end sidebar-right--> | |
202 | </%def> |
|
202 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now