Show More
@@ -1,534 +1,541 b'' | |||||
1 |
|
1 | |||
2 |
|
2 | |||
3 | //BUTTONS |
|
3 | //BUTTONS | |
4 | button, |
|
4 | button, | |
5 | .btn, |
|
5 | .btn, | |
6 | input[type="button"] { |
|
6 | input[type="button"] { | |
7 | -webkit-appearance: none; |
|
7 | -webkit-appearance: none; | |
8 | display: inline-block; |
|
8 | display: inline-block; | |
9 | margin: 0 @padding/3 0 0; |
|
9 | margin: 0 @padding/3 0 0; | |
10 | padding: @button-padding; |
|
10 | padding: @button-padding; | |
11 | text-align: center; |
|
11 | text-align: center; | |
12 | font-size: @basefontsize; |
|
12 | font-size: @basefontsize; | |
13 | line-height: 1em; |
|
13 | line-height: 1em; | |
14 | font-family: @text-light; |
|
14 | font-family: @text-light; | |
15 | text-decoration: none; |
|
15 | text-decoration: none; | |
16 | text-shadow: none; |
|
16 | text-shadow: none; | |
17 | color: @grey2; |
|
17 | color: @grey2; | |
18 | background-color: white; |
|
18 | background-color: white; | |
19 | background-image: none; |
|
19 | background-image: none; | |
20 | border: none; |
|
20 | border: none; | |
21 | .border ( @border-thickness-buttons, @grey5 ); |
|
21 | .border ( @border-thickness-buttons, @grey5 ); | |
22 | .border-radius (@border-radius); |
|
22 | .border-radius (@border-radius); | |
23 | cursor: pointer; |
|
23 | cursor: pointer; | |
24 | white-space: nowrap; |
|
24 | white-space: nowrap; | |
25 | -webkit-transition: background .3s,color .3s; |
|
25 | -webkit-transition: background .3s,color .3s; | |
26 | -moz-transition: background .3s,color .3s; |
|
26 | -moz-transition: background .3s,color .3s; | |
27 | -o-transition: background .3s,color .3s; |
|
27 | -o-transition: background .3s,color .3s; | |
28 | transition: background .3s,color .3s; |
|
28 | transition: background .3s,color .3s; | |
29 | box-shadow: @button-shadow; |
|
29 | box-shadow: @button-shadow; | |
30 | -webkit-box-shadow: @button-shadow; |
|
30 | -webkit-box-shadow: @button-shadow; | |
31 |
|
31 | |||
32 |
|
32 | |||
33 |
|
33 | |||
34 | a { |
|
34 | a { | |
35 | display: block; |
|
35 | display: block; | |
36 | margin: 0; |
|
36 | margin: 0; | |
37 | padding: 0; |
|
37 | padding: 0; | |
38 | color: inherit; |
|
38 | color: inherit; | |
39 | text-decoration: none; |
|
39 | text-decoration: none; | |
40 |
|
40 | |||
41 | &:hover { |
|
41 | &:hover { | |
42 | text-decoration: none; |
|
42 | text-decoration: none; | |
43 | } |
|
43 | } | |
44 | } |
|
44 | } | |
45 |
|
45 | |||
46 | &:focus, |
|
46 | &:focus, | |
47 | &:active { |
|
47 | &:active { | |
48 | outline:none; |
|
48 | outline:none; | |
49 | } |
|
49 | } | |
50 |
|
50 | |||
51 | &:hover { |
|
51 | &:hover { | |
52 | color: @rcdarkblue; |
|
52 | color: @rcdarkblue; | |
53 | background-color: @grey6; |
|
53 | background-color: @grey6; | |
54 |
|
54 | |||
55 | } |
|
55 | } | |
56 |
|
56 | |||
57 | &.btn-active { |
|
57 | &.btn-active { | |
58 | color: @rcdarkblue; |
|
58 | color: @rcdarkblue; | |
59 | background-color: @grey6; |
|
59 | background-color: @grey6; | |
60 | } |
|
60 | } | |
61 |
|
61 | |||
62 | .icon-remove { |
|
62 | .icon-remove { | |
63 | display: none; |
|
63 | display: none; | |
64 | } |
|
64 | } | |
65 |
|
65 | |||
66 | //disabled buttons |
|
66 | //disabled buttons | |
67 | //last; overrides any other styles |
|
67 | //last; overrides any other styles | |
68 | &:disabled { |
|
68 | &:disabled { | |
69 | opacity: .7; |
|
69 | opacity: .7; | |
70 | cursor: auto; |
|
70 | cursor: auto; | |
71 | background-color: white; |
|
71 | background-color: white; | |
72 | color: @grey4; |
|
72 | color: @grey4; | |
73 | text-shadow: none; |
|
73 | text-shadow: none; | |
74 | } |
|
74 | } | |
75 |
|
75 | |||
76 | &.no-margin { |
|
76 | &.no-margin { | |
77 | margin: 0 0 0 0; |
|
77 | margin: 0 0 0 0; | |
78 | } |
|
78 | } | |
79 |
|
79 | |||
80 |
|
80 | |||
81 |
|
81 | |||
82 | } |
|
82 | } | |
83 |
|
83 | |||
84 |
|
84 | |||
85 | .btn-default { |
|
85 | .btn-default { | |
86 | border: @border-thickness solid @grey5; |
|
86 | border: @border-thickness solid @grey5; | |
87 | background-image: none; |
|
87 | background-image: none; | |
88 | color: @grey2; |
|
88 | color: @grey2; | |
89 |
|
89 | |||
90 | a { |
|
90 | a { | |
91 | color: @grey2; |
|
91 | color: @grey2; | |
92 | } |
|
92 | } | |
93 |
|
93 | |||
94 | &:hover, |
|
94 | &:hover, | |
95 | &.active { |
|
95 | &.active { | |
96 | color: @rcdarkblue; |
|
96 | color: @rcdarkblue; | |
97 | background-color: @white; |
|
97 | background-color: @white; | |
98 | .border ( @border-thickness, @grey4 ); |
|
98 | .border ( @border-thickness, @grey4 ); | |
99 |
|
99 | |||
100 | a { |
|
100 | a { | |
101 | color: @grey2; |
|
101 | color: @grey2; | |
102 | } |
|
102 | } | |
103 | } |
|
103 | } | |
104 | &:disabled { |
|
104 | &:disabled { | |
105 | .border ( @border-thickness-buttons, @grey5 ); |
|
105 | .border ( @border-thickness-buttons, @grey5 ); | |
106 | background-color: transparent; |
|
106 | background-color: transparent; | |
107 | } |
|
107 | } | |
108 | &.btn-active { |
|
108 | &.btn-active { | |
109 | color: @rcdarkblue; |
|
109 | color: @rcdarkblue; | |
110 | background-color: @white; |
|
110 | background-color: @white; | |
111 | .border ( @border-thickness, @rcdarkblue ); |
|
111 | .border ( @border-thickness, @rcdarkblue ); | |
112 | } |
|
112 | } | |
113 | } |
|
113 | } | |
114 |
|
114 | |||
115 | .btn-primary, |
|
115 | .btn-primary, | |
116 | .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */ |
|
116 | .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */ | |
117 | .btn-success { |
|
117 | .btn-success { | |
118 | .border ( @border-thickness, @rcblue ); |
|
118 | .border ( @border-thickness, @rcblue ); | |
119 | background-color: @rcblue; |
|
119 | background-color: @rcblue; | |
120 | color: white; |
|
120 | color: white; | |
121 |
|
121 | |||
122 | a { |
|
122 | a { | |
123 | color: white; |
|
123 | color: white; | |
124 | } |
|
124 | } | |
125 |
|
125 | |||
126 | &:hover, |
|
126 | &:hover, | |
127 | &.active { |
|
127 | &.active { | |
128 | .border ( @border-thickness, @rcdarkblue ); |
|
128 | .border ( @border-thickness, @rcdarkblue ); | |
129 | color: white; |
|
129 | color: white; | |
130 | background-color: @rcdarkblue; |
|
130 | background-color: @rcdarkblue; | |
131 |
|
131 | |||
132 | a { |
|
132 | a { | |
133 | color: white; |
|
133 | color: white; | |
134 | } |
|
134 | } | |
135 | } |
|
135 | } | |
136 | &:disabled { |
|
136 | &:disabled { | |
137 | background-color: @rcblue; |
|
137 | background-color: @rcblue; | |
138 | } |
|
138 | } | |
139 | } |
|
139 | } | |
140 |
|
140 | |||
141 | .btn-secondary { |
|
141 | .btn-secondary { | |
142 | &:extend(.btn-default); |
|
142 | &:extend(.btn-default); | |
143 |
|
143 | |||
144 | background-color: white; |
|
144 | background-color: white; | |
145 |
|
145 | |||
146 | &:focus { |
|
146 | &:focus { | |
147 | outline: 0; |
|
147 | outline: 0; | |
148 | } |
|
148 | } | |
149 |
|
149 | |||
150 | &:hover { |
|
150 | &:hover { | |
151 | &:extend(.btn-default:hover); |
|
151 | &:extend(.btn-default:hover); | |
152 | } |
|
152 | } | |
153 |
|
153 | |||
154 | &.btn-link { |
|
154 | &.btn-link { | |
155 | &:extend(.btn-link); |
|
155 | &:extend(.btn-link); | |
156 | color: @rcblue; |
|
156 | color: @rcblue; | |
157 | } |
|
157 | } | |
158 |
|
158 | |||
159 | &:disabled { |
|
159 | &:disabled { | |
160 | color: @rcblue; |
|
160 | color: @rcblue; | |
161 | background-color: white; |
|
161 | background-color: white; | |
162 | } |
|
162 | } | |
163 | } |
|
163 | } | |
164 |
|
164 | |||
165 | .btn-warning, |
|
165 | .btn-warning, | |
166 | .btn-danger, |
|
166 | .btn-danger, | |
167 | .revoke_perm, |
|
167 | .revoke_perm, | |
168 | .btn-x, |
|
168 | .btn-x, | |
169 | .form .action_button.btn-x { |
|
169 | .form .action_button.btn-x { | |
170 | .border ( @border-thickness, @alert2 ); |
|
170 | .border ( @border-thickness, @alert2 ); | |
171 | background-color: white; |
|
171 | background-color: white; | |
172 | color: @alert2; |
|
172 | color: @alert2; | |
173 |
|
173 | |||
174 | a { |
|
174 | a { | |
175 | color: @alert2; |
|
175 | color: @alert2; | |
176 | } |
|
176 | } | |
177 |
|
177 | |||
178 | &:hover, |
|
178 | &:hover, | |
179 | &.active { |
|
179 | &.active { | |
180 | .border ( @border-thickness, @alert2 ); |
|
180 | .border ( @border-thickness, @alert2 ); | |
181 | color: white; |
|
181 | color: white; | |
182 | background-color: @alert2; |
|
182 | background-color: @alert2; | |
183 |
|
183 | |||
184 | a { |
|
184 | a { | |
185 | color: white; |
|
185 | color: white; | |
186 | } |
|
186 | } | |
187 | } |
|
187 | } | |
188 |
|
188 | |||
189 | i { |
|
189 | i { | |
190 | display:none; |
|
190 | display:none; | |
191 | } |
|
191 | } | |
192 |
|
192 | |||
193 | &:disabled { |
|
193 | &:disabled { | |
194 | background-color: white; |
|
194 | background-color: white; | |
195 | color: @alert2; |
|
195 | color: @alert2; | |
196 | } |
|
196 | } | |
197 | } |
|
197 | } | |
198 |
|
198 | |||
199 | .btn-approved-status { |
|
199 | .btn-approved-status { | |
200 | .border ( @border-thickness, @alert1 ); |
|
200 | .border ( @border-thickness, @alert1 ); | |
201 | background-color: white; |
|
201 | background-color: white; | |
202 | color: @alert1; |
|
202 | color: @alert1; | |
203 |
|
203 | |||
204 | } |
|
204 | } | |
205 |
|
205 | |||
206 | .btn-rejected-status { |
|
206 | .btn-rejected-status { | |
207 | .border ( @border-thickness, @alert2 ); |
|
207 | .border ( @border-thickness, @alert2 ); | |
208 | background-color: white; |
|
208 | background-color: white; | |
209 | color: @alert2; |
|
209 | color: @alert2; | |
210 | } |
|
210 | } | |
211 |
|
211 | |||
212 | .btn-sm, |
|
212 | .btn-sm, | |
213 | .btn-mini, |
|
213 | .btn-mini, | |
214 | .field-sm .btn { |
|
214 | .field-sm .btn { | |
215 | padding: @padding/3; |
|
215 | padding: @padding/3; | |
216 | } |
|
216 | } | |
217 |
|
217 | |||
218 | .btn-xs { |
|
218 | .btn-xs { | |
219 | padding: @padding/4; |
|
219 | padding: @padding/4; | |
220 | } |
|
220 | } | |
221 |
|
221 | |||
222 | .btn-lg { |
|
222 | .btn-lg { | |
223 | padding: @padding * 1.2; |
|
223 | padding: @padding * 1.2; | |
224 | } |
|
224 | } | |
225 |
|
225 | |||
226 | .btn-group { |
|
226 | .btn-group { | |
227 | display: inline-block; |
|
227 | display: inline-block; | |
228 | .btn { |
|
228 | .btn { | |
229 | float: left; |
|
229 | float: left; | |
230 | margin: 0 0 0 0; |
|
230 | margin: 0 0 0 0; | |
231 | // first item |
|
231 | // first item | |
232 | &:first-of-type:not(:last-of-type) { |
|
232 | &:first-of-type:not(:last-of-type) { | |
233 | border-radius: @border-radius 0 0 @border-radius; |
|
233 | border-radius: @border-radius 0 0 @border-radius; | |
234 |
|
234 | |||
235 | } |
|
235 | } | |
236 | // middle elements |
|
236 | // middle elements | |
237 | &:not(:first-of-type):not(:last-of-type) { |
|
237 | &:not(:first-of-type):not(:last-of-type) { | |
238 | border-radius: 0; |
|
238 | border-radius: 0; | |
239 | border-left-width: 0; |
|
239 | border-left-width: 0; | |
240 | border-right-width: 0; |
|
240 | border-right-width: 0; | |
241 | } |
|
241 | } | |
242 | // last item |
|
242 | // last item | |
243 | &:last-of-type:not(:first-of-type) { |
|
243 | &:last-of-type:not(:first-of-type) { | |
244 | border-radius: 0 @border-radius @border-radius 0; |
|
244 | border-radius: 0 @border-radius @border-radius 0; | |
245 | } |
|
245 | } | |
246 |
|
246 | |||
247 | &:only-child { |
|
247 | &:only-child { | |
248 | border-radius: @border-radius; |
|
248 | border-radius: @border-radius; | |
249 | } |
|
249 | } | |
250 | } |
|
250 | } | |
251 |
|
251 | |||
252 | } |
|
252 | } | |
253 |
|
253 | |||
254 |
|
254 | |||
255 | .btn-group-actions { |
|
255 | .btn-group-actions { | |
256 | position: relative; |
|
256 | position: relative; | |
257 | z-index: 100; |
|
257 | z-index: 100; | |
258 |
|
258 | |||
259 | &:not(.open) .btn-action-switcher-container { |
|
259 | &:not(.open) .btn-action-switcher-container { | |
260 | display: none; |
|
260 | display: none; | |
261 | } |
|
261 | } | |
|
262 | ||||
|
263 | .btn-more-option { | |||
|
264 | margin-left: -1px; | |||
|
265 | padding-left: 2px; | |||
|
266 | padding-right: 2px; | |||
|
267 | border-left: 1px solid @grey3; | |||
|
268 | } | |||
262 | } |
|
269 | } | |
263 |
|
270 | |||
264 |
|
271 | |||
265 | .btn-action-switcher-container { |
|
272 | .btn-action-switcher-container { | |
266 | position: absolute; |
|
273 | position: absolute; | |
267 | top: 100%; |
|
274 | top: 100%; | |
268 |
|
275 | |||
269 | &.left-align { |
|
276 | &.left-align { | |
270 | left: 0; |
|
277 | left: 0; | |
271 | } |
|
278 | } | |
272 | &.right-align { |
|
279 | &.right-align { | |
273 | right: 0; |
|
280 | right: 0; | |
274 | } |
|
281 | } | |
275 |
|
282 | |||
276 | } |
|
283 | } | |
277 |
|
284 | |||
278 | .btn-action-switcher { |
|
285 | .btn-action-switcher { | |
279 | display: block; |
|
286 | display: block; | |
280 | position: relative; |
|
287 | position: relative; | |
281 | z-index: 300; |
|
288 | z-index: 300; | |
282 | max-width: 600px; |
|
289 | max-width: 600px; | |
283 | margin-top: 4px; |
|
290 | margin-top: 4px; | |
284 | margin-bottom: 24px; |
|
291 | margin-bottom: 24px; | |
285 | font-size: 14px; |
|
292 | font-size: 14px; | |
286 | font-weight: 400; |
|
293 | font-weight: 400; | |
287 | padding: 8px 0; |
|
294 | padding: 8px 0; | |
288 | background-color: #fff; |
|
295 | background-color: #fff; | |
289 | border: 1px solid @grey4; |
|
296 | border: 1px solid @grey4; | |
290 | border-radius: 3px; |
|
297 | border-radius: 3px; | |
291 | box-shadow: @dropdown-shadow; |
|
298 | box-shadow: @dropdown-shadow; | |
292 | overflow: auto; |
|
299 | overflow: auto; | |
293 |
|
300 | |||
294 | li { |
|
301 | li { | |
295 | display: block; |
|
302 | display: block; | |
296 | text-align: left; |
|
303 | text-align: left; | |
297 | list-style: none; |
|
304 | list-style: none; | |
298 | padding: 5px 10px; |
|
305 | padding: 5px 10px; | |
299 | } |
|
306 | } | |
300 |
|
307 | |||
301 | li .action-help-block { |
|
308 | li .action-help-block { | |
302 | font-size: 10px; |
|
309 | font-size: 10px; | |
303 | line-height: normal; |
|
310 | line-height: normal; | |
304 | color: @grey4; |
|
311 | color: @grey4; | |
305 | } |
|
312 | } | |
306 |
|
313 | |||
307 | } |
|
314 | } | |
308 |
|
315 | |||
309 | .btn-link { |
|
316 | .btn-link { | |
310 | background: transparent; |
|
317 | background: transparent; | |
311 | border: none; |
|
318 | border: none; | |
312 | padding: 0; |
|
319 | padding: 0; | |
313 | color: @rcblue; |
|
320 | color: @rcblue; | |
314 |
|
321 | |||
315 | &:hover { |
|
322 | &:hover { | |
316 | background: transparent; |
|
323 | background: transparent; | |
317 | border: none; |
|
324 | border: none; | |
318 | color: @rcdarkblue; |
|
325 | color: @rcdarkblue; | |
319 | } |
|
326 | } | |
320 |
|
327 | |||
321 | //disabled buttons |
|
328 | //disabled buttons | |
322 | //last; overrides any other styles |
|
329 | //last; overrides any other styles | |
323 | &:disabled { |
|
330 | &:disabled { | |
324 | opacity: .7; |
|
331 | opacity: .7; | |
325 | cursor: auto; |
|
332 | cursor: auto; | |
326 | background-color: white; |
|
333 | background-color: white; | |
327 | color: @grey4; |
|
334 | color: @grey4; | |
328 | text-shadow: none; |
|
335 | text-shadow: none; | |
329 | } |
|
336 | } | |
330 |
|
337 | |||
331 | // TODO: johbo: Check if we can avoid this, indicates that the structure |
|
338 | // TODO: johbo: Check if we can avoid this, indicates that the structure | |
332 | // is not yet good. |
|
339 | // is not yet good. | |
333 | // lisa: The button CSS reflects the button HTML; both need a cleanup. |
|
340 | // lisa: The button CSS reflects the button HTML; both need a cleanup. | |
334 | &.btn-danger { |
|
341 | &.btn-danger { | |
335 | color: @alert2; |
|
342 | color: @alert2; | |
336 |
|
343 | |||
337 | &:hover { |
|
344 | &:hover { | |
338 | color: darken(@alert2,30%); |
|
345 | color: darken(@alert2,30%); | |
339 | } |
|
346 | } | |
340 |
|
347 | |||
341 | &:disabled { |
|
348 | &:disabled { | |
342 | color: @alert2; |
|
349 | color: @alert2; | |
343 | } |
|
350 | } | |
344 | } |
|
351 | } | |
345 | } |
|
352 | } | |
346 |
|
353 | |||
347 | .btn-social { |
|
354 | .btn-social { | |
348 | &:extend(.btn-default); |
|
355 | &:extend(.btn-default); | |
349 | margin: 5px 5px 5px 0px; |
|
356 | margin: 5px 5px 5px 0px; | |
350 | min-width: 160px; |
|
357 | min-width: 160px; | |
351 | } |
|
358 | } | |
352 |
|
359 | |||
353 | // TODO: johbo: check these exceptions |
|
360 | // TODO: johbo: check these exceptions | |
354 |
|
361 | |||
355 | .links { |
|
362 | .links { | |
356 |
|
363 | |||
357 | .btn + .btn { |
|
364 | .btn + .btn { | |
358 | margin-top: @padding; |
|
365 | margin-top: @padding; | |
359 | } |
|
366 | } | |
360 | } |
|
367 | } | |
361 |
|
368 | |||
362 |
|
369 | |||
363 | .action_button { |
|
370 | .action_button { | |
364 | display:inline; |
|
371 | display:inline; | |
365 | margin: 0; |
|
372 | margin: 0; | |
366 | padding: 0 1em 0 0; |
|
373 | padding: 0 1em 0 0; | |
367 | font-size: inherit; |
|
374 | font-size: inherit; | |
368 | color: @rcblue; |
|
375 | color: @rcblue; | |
369 | border: none; |
|
376 | border: none; | |
370 | border-radius: 0; |
|
377 | border-radius: 0; | |
371 | background-color: transparent; |
|
378 | background-color: transparent; | |
372 |
|
379 | |||
373 | &.last-item { |
|
380 | &.last-item { | |
374 | border: none; |
|
381 | border: none; | |
375 | padding: 0 0 0 0; |
|
382 | padding: 0 0 0 0; | |
376 | } |
|
383 | } | |
377 |
|
384 | |||
378 | &:last-child { |
|
385 | &:last-child { | |
379 | border: none; |
|
386 | border: none; | |
380 | padding: 0 0 0 0; |
|
387 | padding: 0 0 0 0; | |
381 | } |
|
388 | } | |
382 |
|
389 | |||
383 | &:hover { |
|
390 | &:hover { | |
384 | color: @rcdarkblue; |
|
391 | color: @rcdarkblue; | |
385 | background-color: transparent; |
|
392 | background-color: transparent; | |
386 | border: none; |
|
393 | border: none; | |
387 | } |
|
394 | } | |
388 | .noselect |
|
395 | .noselect | |
389 | } |
|
396 | } | |
390 |
|
397 | |||
391 | .grid_delete { |
|
398 | .grid_delete { | |
392 | .action_button { |
|
399 | .action_button { | |
393 | border: none; |
|
400 | border: none; | |
394 | } |
|
401 | } | |
395 | } |
|
402 | } | |
396 |
|
403 | |||
397 |
|
404 | |||
398 | // TODO: johbo: Form button tweaks, check if we can use the classes instead |
|
405 | // TODO: johbo: Form button tweaks, check if we can use the classes instead | |
399 | input[type="submit"] { |
|
406 | input[type="submit"] { | |
400 | &:extend(.btn-primary); |
|
407 | &:extend(.btn-primary); | |
401 |
|
408 | |||
402 | &:focus { |
|
409 | &:focus { | |
403 | outline: 0; |
|
410 | outline: 0; | |
404 | } |
|
411 | } | |
405 |
|
412 | |||
406 | &:hover { |
|
413 | &:hover { | |
407 | &:extend(.btn-primary:hover); |
|
414 | &:extend(.btn-primary:hover); | |
408 | } |
|
415 | } | |
409 |
|
416 | |||
410 | &.btn-link { |
|
417 | &.btn-link { | |
411 | &:extend(.btn-link); |
|
418 | &:extend(.btn-link); | |
412 | color: @rcblue; |
|
419 | color: @rcblue; | |
413 |
|
420 | |||
414 | &:disabled { |
|
421 | &:disabled { | |
415 | color: @rcblue; |
|
422 | color: @rcblue; | |
416 | background-color: transparent; |
|
423 | background-color: transparent; | |
417 | } |
|
424 | } | |
418 | } |
|
425 | } | |
419 |
|
426 | |||
420 | &:disabled { |
|
427 | &:disabled { | |
421 | .border ( @border-thickness-buttons, @rcblue ); |
|
428 | .border ( @border-thickness-buttons, @rcblue ); | |
422 | background-color: @rcblue; |
|
429 | background-color: @rcblue; | |
423 | color: white; |
|
430 | color: white; | |
424 | opacity: 0.5; |
|
431 | opacity: 0.5; | |
425 | } |
|
432 | } | |
426 | } |
|
433 | } | |
427 |
|
434 | |||
428 | input[type="reset"] { |
|
435 | input[type="reset"] { | |
429 | &:extend(.btn-default); |
|
436 | &:extend(.btn-default); | |
430 |
|
437 | |||
431 | // TODO: johbo: Check if this tweak can be avoided. |
|
438 | // TODO: johbo: Check if this tweak can be avoided. | |
432 | background: transparent; |
|
439 | background: transparent; | |
433 |
|
440 | |||
434 | &:focus { |
|
441 | &:focus { | |
435 | outline: 0; |
|
442 | outline: 0; | |
436 | } |
|
443 | } | |
437 |
|
444 | |||
438 | &:hover { |
|
445 | &:hover { | |
439 | &:extend(.btn-default:hover); |
|
446 | &:extend(.btn-default:hover); | |
440 | } |
|
447 | } | |
441 |
|
448 | |||
442 | &.btn-link { |
|
449 | &.btn-link { | |
443 | &:extend(.btn-link); |
|
450 | &:extend(.btn-link); | |
444 | color: @rcblue; |
|
451 | color: @rcblue; | |
445 |
|
452 | |||
446 | &:disabled { |
|
453 | &:disabled { | |
447 | border: none; |
|
454 | border: none; | |
448 | } |
|
455 | } | |
449 | } |
|
456 | } | |
450 |
|
457 | |||
451 | &:disabled { |
|
458 | &:disabled { | |
452 | .border ( @border-thickness-buttons, @rcblue ); |
|
459 | .border ( @border-thickness-buttons, @rcblue ); | |
453 | background-color: white; |
|
460 | background-color: white; | |
454 | color: @rcblue; |
|
461 | color: @rcblue; | |
455 | } |
|
462 | } | |
456 | } |
|
463 | } | |
457 |
|
464 | |||
458 | input[type="submit"], |
|
465 | input[type="submit"], | |
459 | input[type="reset"] { |
|
466 | input[type="reset"] { | |
460 | &.btn-danger { |
|
467 | &.btn-danger { | |
461 | &:extend(.btn-danger); |
|
468 | &:extend(.btn-danger); | |
462 |
|
469 | |||
463 | &:focus { |
|
470 | &:focus { | |
464 | outline: 0; |
|
471 | outline: 0; | |
465 | } |
|
472 | } | |
466 |
|
473 | |||
467 | &:hover { |
|
474 | &:hover { | |
468 | &:extend(.btn-danger:hover); |
|
475 | &:extend(.btn-danger:hover); | |
469 | } |
|
476 | } | |
470 |
|
477 | |||
471 | &.btn-link { |
|
478 | &.btn-link { | |
472 | &:extend(.btn-link); |
|
479 | &:extend(.btn-link); | |
473 | color: @alert2; |
|
480 | color: @alert2; | |
474 |
|
481 | |||
475 | &:hover { |
|
482 | &:hover { | |
476 | color: darken(@alert2,30%); |
|
483 | color: darken(@alert2,30%); | |
477 | } |
|
484 | } | |
478 | } |
|
485 | } | |
479 |
|
486 | |||
480 | &:disabled { |
|
487 | &:disabled { | |
481 | color: @alert2; |
|
488 | color: @alert2; | |
482 | background-color: white; |
|
489 | background-color: white; | |
483 | } |
|
490 | } | |
484 | } |
|
491 | } | |
485 | &.btn-danger-action { |
|
492 | &.btn-danger-action { | |
486 | .border ( @border-thickness, @alert2 ); |
|
493 | .border ( @border-thickness, @alert2 ); | |
487 | background-color: @alert2; |
|
494 | background-color: @alert2; | |
488 | color: white; |
|
495 | color: white; | |
489 |
|
496 | |||
490 | a { |
|
497 | a { | |
491 | color: white; |
|
498 | color: white; | |
492 | } |
|
499 | } | |
493 |
|
500 | |||
494 | &:hover { |
|
501 | &:hover { | |
495 | background-color: darken(@alert2,20%); |
|
502 | background-color: darken(@alert2,20%); | |
496 | } |
|
503 | } | |
497 |
|
504 | |||
498 | &.active { |
|
505 | &.active { | |
499 | .border ( @border-thickness, @alert2 ); |
|
506 | .border ( @border-thickness, @alert2 ); | |
500 | color: white; |
|
507 | color: white; | |
501 | background-color: @alert2; |
|
508 | background-color: @alert2; | |
502 |
|
509 | |||
503 | a { |
|
510 | a { | |
504 | color: white; |
|
511 | color: white; | |
505 | } |
|
512 | } | |
506 | } |
|
513 | } | |
507 |
|
514 | |||
508 | &:disabled { |
|
515 | &:disabled { | |
509 | background-color: white; |
|
516 | background-color: white; | |
510 | color: @alert2; |
|
517 | color: @alert2; | |
511 | } |
|
518 | } | |
512 | } |
|
519 | } | |
513 | } |
|
520 | } | |
514 |
|
521 | |||
515 |
|
522 | |||
516 | .button-links { |
|
523 | .button-links { | |
517 | float: left; |
|
524 | float: left; | |
518 | display: inline; |
|
525 | display: inline; | |
519 | margin: 0; |
|
526 | margin: 0; | |
520 | padding-left: 0; |
|
527 | padding-left: 0; | |
521 | list-style: none; |
|
528 | list-style: none; | |
522 | text-align: right; |
|
529 | text-align: right; | |
523 |
|
530 | |||
524 | li { |
|
531 | li { | |
525 |
|
532 | |||
526 |
|
533 | |||
527 | } |
|
534 | } | |
528 |
|
535 | |||
529 | li.active { |
|
536 | li.active { | |
530 | background-color: @grey6; |
|
537 | background-color: @grey6; | |
531 | .border ( @border-thickness, @grey4 ); |
|
538 | .border ( @border-thickness, @grey4 ); | |
532 | } |
|
539 | } | |
533 |
|
540 | |||
534 | } |
|
541 | } |
@@ -1,100 +1,100 b'' | |||||
1 |
|
1 | |||
2 | <div id="codeblock" class="browserblock"> |
|
2 | <div id="codeblock" class="browserblock"> | |
3 | <div class="browser-header"> |
|
3 | <div class="browser-header"> | |
4 | <div class="browser-nav"> |
|
4 | <div class="browser-nav"> | |
5 |
|
5 | |||
6 | <div class="info_box"> |
|
6 | <div class="info_box"> | |
7 |
|
7 | |||
8 | <div class="info_box_elem previous"> |
|
8 | <div class="info_box_elem previous"> | |
9 | <a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class=" ${('disabled' if c.url_prev == '#' else '')}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon-left"></i></a> |
|
9 | <a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class=" ${('disabled' if c.url_prev == '#' else '')}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon-left"></i></a> | |
10 | </div> |
|
10 | </div> | |
11 |
|
11 | |||
12 | ${h.hidden('refs_filter')} |
|
12 | ${h.hidden('refs_filter')} | |
13 |
|
13 | |||
14 | <div class="info_box_elem next"> |
|
14 | <div class="info_box_elem next"> | |
15 | <a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class=" ${('disabled' if c.url_next == '#' else '')}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon-right"></i></a> |
|
15 | <a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class=" ${('disabled' if c.url_next == '#' else '')}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon-right"></i></a> | |
16 | </div> |
|
16 | </div> | |
17 | </div> |
|
17 | </div> | |
18 |
|
18 | |||
19 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
19 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): | |
20 |
|
20 | |||
21 | <div class="new-file"> |
|
21 | <div class="new-file"> | |
22 | <div class="btn-group btn-group-actions"> |
|
22 | <div class="btn-group btn-group-actions"> | |
23 | <a class="btn btn-primary no-margin" href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
23 | <a class="btn btn-primary no-margin" href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> | |
24 | ${_('Add File')} |
|
24 | ${_('Add File')} | |
25 | </a> |
|
25 | </a> | |
26 |
|
26 | |||
27 |
<a class="tooltip btn btn-primary |
|
27 | <a class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more options')}"> | |
28 | <i class="icon-down"></i> |
|
28 | <i class="icon-down"></i> | |
29 | </a> |
|
29 | </a> | |
30 |
|
30 | |||
31 | <div class="btn-action-switcher-container right-align"> |
|
31 | <div class="btn-action-switcher-container right-align"> | |
32 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px"> |
|
32 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px"> | |
33 | <li> |
|
33 | <li> | |
34 | <a class="action_button" href="${h.route_path('repo_files_upload_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
34 | <a class="action_button" href="${h.route_path('repo_files_upload_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> | |
35 | <i class="icon-upload"></i> |
|
35 | <i class="icon-upload"></i> | |
36 | ${_('Upload File')} |
|
36 | ${_('Upload File')} | |
37 | </a> |
|
37 | </a> | |
38 | </li> |
|
38 | </li> | |
39 | </ul> |
|
39 | </ul> | |
40 | </div> |
|
40 | </div> | |
41 | </div> |
|
41 | </div> | |
42 | </div> |
|
42 | </div> | |
43 |
|
43 | |||
44 | % endif |
|
44 | % endif | |
45 |
|
45 | |||
46 | % if c.enable_downloads: |
|
46 | % if c.enable_downloads: | |
47 | <% at_path = '{}'.format(request.GET.get('at') or c.commit.raw_id[:6]) %> |
|
47 | <% at_path = '{}'.format(request.GET.get('at') or c.commit.raw_id[:6]) %> | |
48 | <div class="btn btn-default new-file"> |
|
48 | <div class="btn btn-default new-file"> | |
49 | % if c.f_path == '/': |
|
49 | % if c.f_path == '/': | |
50 | <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname='{}.zip'.format(c.commit.raw_id))}"> |
|
50 | <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname='{}.zip'.format(c.commit.raw_id))}"> | |
51 | ${_('Download full tree ZIP')} |
|
51 | ${_('Download full tree ZIP')} | |
52 | </a> |
|
52 | </a> | |
53 | % else: |
|
53 | % else: | |
54 | <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname='{}.zip'.format(c.commit.raw_id), _query={'at_path':c.f_path})}"> |
|
54 | <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname='{}.zip'.format(c.commit.raw_id), _query={'at_path':c.f_path})}"> | |
55 | ${_('Download this tree ZIP')} |
|
55 | ${_('Download this tree ZIP')} | |
56 | </a> |
|
56 | </a> | |
57 | % endif |
|
57 | % endif | |
58 | </div> |
|
58 | </div> | |
59 | % endif |
|
59 | % endif | |
60 |
|
60 | |||
61 | <div class="files-quick-filter"> |
|
61 | <div class="files-quick-filter"> | |
62 | <ul class="files-filter-box"> |
|
62 | <ul class="files-filter-box"> | |
63 | <li class="files-filter-box-path"> |
|
63 | <li class="files-filter-box-path"> | |
64 | <i class="icon-search"></i> |
|
64 | <i class="icon-search"></i> | |
65 | </li> |
|
65 | </li> | |
66 | <li class="files-filter-box-input"> |
|
66 | <li class="files-filter-box-input"> | |
67 | <input onkeydown="NodeFilter.initFilter(event)" class="init" type="text" placeholder="Quick filter" name="filter" size="25" id="node_filter" autocomplete="off"> |
|
67 | <input onkeydown="NodeFilter.initFilter(event)" class="init" type="text" placeholder="Quick filter" name="filter" size="25" id="node_filter" autocomplete="off"> | |
68 | </li> |
|
68 | </li> | |
69 | </ul> |
|
69 | </ul> | |
70 | </div> |
|
70 | </div> | |
71 | </div> |
|
71 | </div> | |
72 |
|
72 | |||
73 | </div> |
|
73 | </div> | |
74 |
|
74 | |||
75 | ## file tree is computed from caches, and filled in |
|
75 | ## file tree is computed from caches, and filled in | |
76 | <div id="file-tree"> |
|
76 | <div id="file-tree"> | |
77 | ${c.file_tree |n} |
|
77 | ${c.file_tree |n} | |
78 | </div> |
|
78 | </div> | |
79 |
|
79 | |||
80 | %if c.readme_data: |
|
80 | %if c.readme_data: | |
81 | <div id="readme" class="anchor"> |
|
81 | <div id="readme" class="anchor"> | |
82 | <div class="box"> |
|
82 | <div class="box"> | |
83 | <div class="readme-title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_ref_type, c.rhodecode_db_repo.landing_ref_name))}"> |
|
83 | <div class="readme-title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_ref_type, c.rhodecode_db_repo.landing_ref_name))}"> | |
84 | <div> |
|
84 | <div> | |
85 | <i class="icon-file-text"></i> |
|
85 | <i class="icon-file-text"></i> | |
86 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_ref_name,f_path=c.readme_file)}"> |
|
86 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_ref_name,f_path=c.readme_file)}"> | |
87 | ${c.readme_file} |
|
87 | ${c.readme_file} | |
88 | </a> |
|
88 | </a> | |
89 | </div> |
|
89 | </div> | |
90 | </div> |
|
90 | </div> | |
91 | <div class="readme codeblock"> |
|
91 | <div class="readme codeblock"> | |
92 | <div class="readme_box"> |
|
92 | <div class="readme_box"> | |
93 | ${c.readme_data|n} |
|
93 | ${c.readme_data|n} | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 | </div> |
|
96 | </div> | |
97 | </div> |
|
97 | </div> | |
98 | %endif |
|
98 | %endif | |
99 |
|
99 | |||
100 | </div> |
|
100 | </div> |
@@ -1,921 +1,921 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 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
3 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
4 |
|
4 | |||
5 | <%def name="title()"> |
|
5 | <%def name="title()"> | |
6 | ${_('{} Pull Request !{}').format(c.repo_name, c.pull_request.pull_request_id)} |
|
6 | ${_('{} Pull Request !{}').format(c.repo_name, c.pull_request.pull_request_id)} | |
7 | %if c.rhodecode_name: |
|
7 | %if c.rhodecode_name: | |
8 | · ${h.branding(c.rhodecode_name)} |
|
8 | · ${h.branding(c.rhodecode_name)} | |
9 | %endif |
|
9 | %endif | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <%def name="breadcrumbs_links()"> |
|
12 | <%def name="breadcrumbs_links()"> | |
13 |
|
13 | |||
14 | </%def> |
|
14 | </%def> | |
15 |
|
15 | |||
16 | <%def name="menu_bar_nav()"> |
|
16 | <%def name="menu_bar_nav()"> | |
17 | ${self.menu_items(active='repositories')} |
|
17 | ${self.menu_items(active='repositories')} | |
18 | </%def> |
|
18 | </%def> | |
19 |
|
19 | |||
20 | <%def name="menu_bar_subnav()"> |
|
20 | <%def name="menu_bar_subnav()"> | |
21 | ${self.repo_menu(active='showpullrequest')} |
|
21 | ${self.repo_menu(active='showpullrequest')} | |
22 | </%def> |
|
22 | </%def> | |
23 |
|
23 | |||
24 | <%def name="main()"> |
|
24 | <%def name="main()"> | |
25 |
|
25 | |||
26 | <script type="text/javascript"> |
|
26 | <script type="text/javascript"> | |
27 | // TODO: marcink switch this to pyroutes |
|
27 | // TODO: marcink switch this to pyroutes | |
28 | AJAX_COMMENT_DELETE_URL = "${h.route_path('pullrequest_comment_delete',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id,comment_id='__COMMENT_ID__')}"; |
|
28 | AJAX_COMMENT_DELETE_URL = "${h.route_path('pullrequest_comment_delete',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id,comment_id='__COMMENT_ID__')}"; | |
29 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; |
|
29 | templateContext.pull_request_data.pull_request_id = ${c.pull_request.pull_request_id}; | |
30 | </script> |
|
30 | </script> | |
31 |
|
31 | |||
32 | <div class="box"> |
|
32 | <div class="box"> | |
33 |
|
33 | |||
34 | <div class="box pr-summary"> |
|
34 | <div class="box pr-summary"> | |
35 |
|
35 | |||
36 | <div class="summary-details block-left"> |
|
36 | <div class="summary-details block-left"> | |
37 | <div id="pr-title"> |
|
37 | <div id="pr-title"> | |
38 | % if c.pull_request.is_closed(): |
|
38 | % if c.pull_request.is_closed(): | |
39 | <span class="pr-title-closed-tag tag">${_('Closed')}</span> |
|
39 | <span class="pr-title-closed-tag tag">${_('Closed')}</span> | |
40 | % endif |
|
40 | % endif | |
41 | <input class="pr-title-input large disabled" disabled="disabled" name="pullrequest_title" type="text" value="${c.pull_request.title}"> |
|
41 | <input class="pr-title-input large disabled" disabled="disabled" name="pullrequest_title" type="text" value="${c.pull_request.title}"> | |
42 | </div> |
|
42 | </div> | |
43 | <div id="pr-title-edit" class="input" style="display: none;"> |
|
43 | <div id="pr-title-edit" class="input" style="display: none;"> | |
44 | <input class="pr-title-input large" id="pr-title-input" name="pullrequest_title" type="text" value="${c.pull_request.title}"> |
|
44 | <input class="pr-title-input large" id="pr-title-input" name="pullrequest_title" type="text" value="${c.pull_request.title}"> | |
45 | </div> |
|
45 | </div> | |
46 |
|
46 | |||
47 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
47 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
48 | <div class="pr-details-title"> |
|
48 | <div class="pr-details-title"> | |
49 | <div class="pull-left"> |
|
49 | <div class="pull-left"> | |
50 | <a href="${h.route_path('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request !{}').format(c.pull_request.pull_request_id)}</a> |
|
50 | <a href="${h.route_path('pull_requests_global', pull_request_id=c.pull_request.pull_request_id)}">${_('Pull request !{}').format(c.pull_request.pull_request_id)}</a> | |
51 | ${_('Created on')} |
|
51 | ${_('Created on')} | |
52 | <span class="tooltip" title="${_('Last updated on')} ${h.format_date(c.pull_request.updated_on)}">${h.format_date(c.pull_request.created_on)},</span> |
|
52 | <span class="tooltip" title="${_('Last updated on')} ${h.format_date(c.pull_request.updated_on)}">${h.format_date(c.pull_request.created_on)},</span> | |
53 | <span class="pr-details-title-author-pref">${_('by')}</span> |
|
53 | <span class="pr-details-title-author-pref">${_('by')}</span> | |
54 | </div> |
|
54 | </div> | |
55 |
|
55 | |||
56 | <div class="pull-left"> |
|
56 | <div class="pull-left"> | |
57 | ${self.gravatar_with_user(c.pull_request.author.email, 16, tooltip=True)} |
|
57 | ${self.gravatar_with_user(c.pull_request.author.email, 16, tooltip=True)} | |
58 | </div> |
|
58 | </div> | |
59 |
|
59 | |||
60 | %if c.allowed_to_update: |
|
60 | %if c.allowed_to_update: | |
61 | <div class="pull-right"> |
|
61 | <div class="pull-right"> | |
62 | <div id="edit_pull_request" class="action_button pr-save" style="display: none;">${_('Update title & description')}</div> |
|
62 | <div id="edit_pull_request" class="action_button pr-save" style="display: none;">${_('Update title & description')}</div> | |
63 | <div id="delete_pullrequest" class="action_button pr-save ${('' if c.allowed_to_delete else 'disabled' )}" style="display: none;"> |
|
63 | <div id="delete_pullrequest" class="action_button pr-save ${('' if c.allowed_to_delete else 'disabled' )}" style="display: none;"> | |
64 | % if c.allowed_to_delete: |
|
64 | % if c.allowed_to_delete: | |
65 | ${h.secure_form(h.route_path('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id), request=request)} |
|
65 | ${h.secure_form(h.route_path('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id), request=request)} | |
66 | <input class="btn btn-link btn-danger no-margin" id="remove_${c.pull_request.pull_request_id}" name="remove_${c.pull_request.pull_request_id}" |
|
66 | <input class="btn btn-link btn-danger no-margin" id="remove_${c.pull_request.pull_request_id}" name="remove_${c.pull_request.pull_request_id}" | |
67 | onclick="submitConfirm(event, this, _gettext('Confirm to delete this pull request'), _gettext('Delete'), '${'!{}'.format(c.pull_request.pull_request_id)}')" |
|
67 | onclick="submitConfirm(event, this, _gettext('Confirm to delete this pull request'), _gettext('Delete'), '${'!{}'.format(c.pull_request.pull_request_id)}')" | |
68 | type="submit" value="${_('Delete pull request')}"> |
|
68 | type="submit" value="${_('Delete pull request')}"> | |
69 | ${h.end_form()} |
|
69 | ${h.end_form()} | |
70 | % else: |
|
70 | % else: | |
71 | <span class="tooltip" title="${_('Not allowed to delete this pull request')}">${_('Delete pull request')}</span> |
|
71 | <span class="tooltip" title="${_('Not allowed to delete this pull request')}">${_('Delete pull request')}</span> | |
72 | % endif |
|
72 | % endif | |
73 | </div> |
|
73 | </div> | |
74 | <div id="open_edit_pullrequest" class="action_button">${_('Edit')}</div> |
|
74 | <div id="open_edit_pullrequest" class="action_button">${_('Edit')}</div> | |
75 | <div id="close_edit_pullrequest" class="action_button" style="display: none;">${_('Cancel')}</div> |
|
75 | <div id="close_edit_pullrequest" class="action_button" style="display: none;">${_('Cancel')}</div> | |
76 | </div> |
|
76 | </div> | |
77 |
|
77 | |||
78 | %endif |
|
78 | %endif | |
79 | </div> |
|
79 | </div> | |
80 |
|
80 | |||
81 | <div id="pr-desc" class="input" title="${_('Rendered using {} renderer').format(c.renderer)}"> |
|
81 | <div id="pr-desc" class="input" title="${_('Rendered using {} renderer').format(c.renderer)}"> | |
82 | ${h.render(c.pull_request.description, renderer=c.renderer, repo_name=c.repo_name)} |
|
82 | ${h.render(c.pull_request.description, renderer=c.renderer, repo_name=c.repo_name)} | |
83 | </div> |
|
83 | </div> | |
84 |
|
84 | |||
85 | <div id="pr-desc-edit" class="input textarea" style="display: none;"> |
|
85 | <div id="pr-desc-edit" class="input textarea" style="display: none;"> | |
86 | <input id="pr-renderer-input" type="hidden" name="description_renderer" value="${c.visual.default_renderer}"> |
|
86 | <input id="pr-renderer-input" type="hidden" name="description_renderer" value="${c.visual.default_renderer}"> | |
87 | ${dt.markup_form('pr-description-input', form_text=c.pull_request.description)} |
|
87 | ${dt.markup_form('pr-description-input', form_text=c.pull_request.description)} | |
88 | </div> |
|
88 | </div> | |
89 |
|
89 | |||
90 | <div id="summary" class="fields pr-details-content"> |
|
90 | <div id="summary" class="fields pr-details-content"> | |
91 |
|
91 | |||
92 | ## review |
|
92 | ## review | |
93 | <div class="field"> |
|
93 | <div class="field"> | |
94 | <div class="label-pr-detail"> |
|
94 | <div class="label-pr-detail"> | |
95 | <label>${_('Review status')}:</label> |
|
95 | <label>${_('Review status')}:</label> | |
96 | </div> |
|
96 | </div> | |
97 | <div class="input"> |
|
97 | <div class="input"> | |
98 | %if c.pull_request_review_status: |
|
98 | %if c.pull_request_review_status: | |
99 | <div class="tag status-tag-${c.pull_request_review_status}"> |
|
99 | <div class="tag status-tag-${c.pull_request_review_status}"> | |
100 | <i class="icon-circle review-status-${c.pull_request_review_status}"></i> |
|
100 | <i class="icon-circle review-status-${c.pull_request_review_status}"></i> | |
101 | <span class="changeset-status-lbl"> |
|
101 | <span class="changeset-status-lbl"> | |
102 | %if c.pull_request.is_closed(): |
|
102 | %if c.pull_request.is_closed(): | |
103 | ${_('Closed')}, |
|
103 | ${_('Closed')}, | |
104 | %endif |
|
104 | %endif | |
105 |
|
105 | |||
106 | ${h.commit_status_lbl(c.pull_request_review_status)} |
|
106 | ${h.commit_status_lbl(c.pull_request_review_status)} | |
107 |
|
107 | |||
108 | </span> |
|
108 | </span> | |
109 | </div> |
|
109 | </div> | |
110 | - ${_ungettext('calculated based on {} reviewer vote', 'calculated based on {} reviewers votes', len(c.pull_request_reviewers)).format(len(c.pull_request_reviewers))} |
|
110 | - ${_ungettext('calculated based on {} reviewer vote', 'calculated based on {} reviewers votes', len(c.pull_request_reviewers)).format(len(c.pull_request_reviewers))} | |
111 | %endif |
|
111 | %endif | |
112 | </div> |
|
112 | </div> | |
113 | </div> |
|
113 | </div> | |
114 |
|
114 | |||
115 | ## source |
|
115 | ## source | |
116 | <div class="field"> |
|
116 | <div class="field"> | |
117 | <div class="label-pr-detail"> |
|
117 | <div class="label-pr-detail"> | |
118 | <label>${_('Commit flow')}:</label> |
|
118 | <label>${_('Commit flow')}:</label> | |
119 | </div> |
|
119 | </div> | |
120 | <div class="input"> |
|
120 | <div class="input"> | |
121 | <div class="pr-commit-flow"> |
|
121 | <div class="pr-commit-flow"> | |
122 | ## Source |
|
122 | ## Source | |
123 | %if c.pull_request.source_ref_parts.type == 'branch': |
|
123 | %if c.pull_request.source_ref_parts.type == 'branch': | |
124 | <a href="${h.route_path('repo_commits', repo_name=c.pull_request.source_repo.repo_name, _query=dict(branch=c.pull_request.source_ref_parts.name))}"><code class="pr-source-info">${c.pull_request.source_ref_parts.type}:${c.pull_request.source_ref_parts.name}</code></a> |
|
124 | <a href="${h.route_path('repo_commits', repo_name=c.pull_request.source_repo.repo_name, _query=dict(branch=c.pull_request.source_ref_parts.name))}"><code class="pr-source-info">${c.pull_request.source_ref_parts.type}:${c.pull_request.source_ref_parts.name}</code></a> | |
125 | %else: |
|
125 | %else: | |
126 | <code class="pr-source-info">${'{}:{}'.format(c.pull_request.source_ref_parts.type, c.pull_request.source_ref_parts.name)}</code> |
|
126 | <code class="pr-source-info">${'{}:{}'.format(c.pull_request.source_ref_parts.type, c.pull_request.source_ref_parts.name)}</code> | |
127 | %endif |
|
127 | %endif | |
128 | ${_('of')} <a href="${h.route_path('repo_summary', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.repo_name}</a> |
|
128 | ${_('of')} <a href="${h.route_path('repo_summary', repo_name=c.pull_request.source_repo.repo_name)}">${c.pull_request.source_repo.repo_name}</a> | |
129 | → |
|
129 | → | |
130 | ## Target |
|
130 | ## Target | |
131 | %if c.pull_request.target_ref_parts.type == 'branch': |
|
131 | %if c.pull_request.target_ref_parts.type == 'branch': | |
132 | <a href="${h.route_path('repo_commits', repo_name=c.pull_request.target_repo.repo_name, _query=dict(branch=c.pull_request.target_ref_parts.name))}"><code class="pr-target-info">${c.pull_request.target_ref_parts.type}:${c.pull_request.target_ref_parts.name}</code></a> |
|
132 | <a href="${h.route_path('repo_commits', repo_name=c.pull_request.target_repo.repo_name, _query=dict(branch=c.pull_request.target_ref_parts.name))}"><code class="pr-target-info">${c.pull_request.target_ref_parts.type}:${c.pull_request.target_ref_parts.name}</code></a> | |
133 | %else: |
|
133 | %else: | |
134 | <code class="pr-target-info">${'{}:{}'.format(c.pull_request.target_ref_parts.type, c.pull_request.target_ref_parts.name)}</code> |
|
134 | <code class="pr-target-info">${'{}:{}'.format(c.pull_request.target_ref_parts.type, c.pull_request.target_ref_parts.name)}</code> | |
135 | %endif |
|
135 | %endif | |
136 |
|
136 | |||
137 | ${_('of')} <a href="${h.route_path('repo_summary', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.repo_name}</a> |
|
137 | ${_('of')} <a href="${h.route_path('repo_summary', repo_name=c.pull_request.target_repo.repo_name)}">${c.pull_request.target_repo.repo_name}</a> | |
138 |
|
138 | |||
139 | <a class="source-details-action" href="#expand-source-details" onclick="return versionController.toggleElement(this, '.source-details')" data-toggle-on='<i class="icon-angle-down">more details</i>' data-toggle-off='<i class="icon-angle-up">less details</i>'> |
|
139 | <a class="source-details-action" href="#expand-source-details" onclick="return versionController.toggleElement(this, '.source-details')" data-toggle-on='<i class="icon-angle-down">more details</i>' data-toggle-off='<i class="icon-angle-up">less details</i>'> | |
140 | <i class="icon-angle-down">more details</i> |
|
140 | <i class="icon-angle-down">more details</i> | |
141 | </a> |
|
141 | </a> | |
142 |
|
142 | |||
143 | </div> |
|
143 | </div> | |
144 |
|
144 | |||
145 | <div class="source-details" style="display: none"> |
|
145 | <div class="source-details" style="display: none"> | |
146 |
|
146 | |||
147 | <ul> |
|
147 | <ul> | |
148 |
|
148 | |||
149 | ## common ancestor |
|
149 | ## common ancestor | |
150 | <li> |
|
150 | <li> | |
151 | ${_('Common ancestor')}: |
|
151 | ${_('Common ancestor')}: | |
152 | % if c.ancestor_commit: |
|
152 | % if c.ancestor_commit: | |
153 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=c.ancestor_commit.raw_id)}">${h.show_id(c.ancestor_commit)}</a> |
|
153 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=c.ancestor_commit.raw_id)}">${h.show_id(c.ancestor_commit)}</a> | |
154 | % else: |
|
154 | % else: | |
155 | ${_('not available')} |
|
155 | ${_('not available')} | |
156 | % endif |
|
156 | % endif | |
157 | </li> |
|
157 | </li> | |
158 |
|
158 | |||
159 | ## pull url |
|
159 | ## pull url | |
160 | <li> |
|
160 | <li> | |
161 | %if h.is_hg(c.pull_request.source_repo): |
|
161 | %if h.is_hg(c.pull_request.source_repo): | |
162 | <% clone_url = 'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %> |
|
162 | <% clone_url = 'hg pull -r {} {}'.format(h.short_id(c.source_ref), c.pull_request.source_repo.clone_url()) %> | |
163 | %elif h.is_git(c.pull_request.source_repo): |
|
163 | %elif h.is_git(c.pull_request.source_repo): | |
164 | <% clone_url = 'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %> |
|
164 | <% clone_url = 'git pull {} {}'.format(c.pull_request.source_repo.clone_url(), c.pull_request.source_ref_parts.name) %> | |
165 | %endif |
|
165 | %endif | |
166 |
|
166 | |||
167 | <span>${_('Pull changes from source')}</span>: <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly"> |
|
167 | <span>${_('Pull changes from source')}</span>: <input type="text" class="input-monospace pr-pullinfo" value="${clone_url}" readonly="readonly"> | |
168 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-pullinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the pull url')}"></i> |
|
168 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-pullinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the pull url')}"></i> | |
169 | </li> |
|
169 | </li> | |
170 |
|
170 | |||
171 | ## Shadow repo |
|
171 | ## Shadow repo | |
172 | <li> |
|
172 | <li> | |
173 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: |
|
173 | % if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref: | |
174 | %if h.is_hg(c.pull_request.target_repo): |
|
174 | %if h.is_hg(c.pull_request.target_repo): | |
175 | <% clone_url = 'hg clone --update {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> |
|
175 | <% clone_url = 'hg clone --update {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> | |
176 | %elif h.is_git(c.pull_request.target_repo): |
|
176 | %elif h.is_git(c.pull_request.target_repo): | |
177 | <% clone_url = 'git clone --branch {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> |
|
177 | <% clone_url = 'git clone --branch {} {} pull-request-{}'.format(c.pull_request.shadow_merge_ref.name, c.shadow_clone_url, c.pull_request.pull_request_id) %> | |
178 | %endif |
|
178 | %endif | |
179 |
|
179 | |||
180 | <span class="tooltip" title="${_('Clone repository in its merged state using shadow repository')}">${_('Clone from shadow repository')}</span>: <input type="text" class="input-monospace pr-mergeinfo" value="${clone_url}" readonly="readonly"> |
|
180 | <span class="tooltip" title="${_('Clone repository in its merged state using shadow repository')}">${_('Clone from shadow repository')}</span>: <input type="text" class="input-monospace pr-mergeinfo" value="${clone_url}" readonly="readonly"> | |
181 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-mergeinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the clone url')}"></i> |
|
181 | <i class="tooltip icon-clipboard clipboard-action pull-right pr-mergeinfo-copy" data-clipboard-text="${clone_url}" title="${_('Copy the clone url')}"></i> | |
182 |
|
182 | |||
183 | % else: |
|
183 | % else: | |
184 | <div class=""> |
|
184 | <div class=""> | |
185 | ${_('Shadow repository data not available')}. |
|
185 | ${_('Shadow repository data not available')}. | |
186 | </div> |
|
186 | </div> | |
187 | % endif |
|
187 | % endif | |
188 | </li> |
|
188 | </li> | |
189 |
|
189 | |||
190 | </ul> |
|
190 | </ul> | |
191 |
|
191 | |||
192 | </div> |
|
192 | </div> | |
193 |
|
193 | |||
194 | </div> |
|
194 | </div> | |
195 |
|
195 | |||
196 | </div> |
|
196 | </div> | |
197 |
|
197 | |||
198 | ## versions |
|
198 | ## versions | |
199 | <div class="field"> |
|
199 | <div class="field"> | |
200 | <div class="label-pr-detail"> |
|
200 | <div class="label-pr-detail"> | |
201 | <label>${_('Versions')}:</label> |
|
201 | <label>${_('Versions')}:</label> | |
202 | </div> |
|
202 | </div> | |
203 |
|
203 | |||
204 | <% outdated_comm_count_ver = len(c.inline_versions[None]['outdated']) %> |
|
204 | <% outdated_comm_count_ver = len(c.inline_versions[None]['outdated']) %> | |
205 | <% general_outdated_comm_count_ver = len(c.comment_versions[None]['outdated']) %> |
|
205 | <% general_outdated_comm_count_ver = len(c.comment_versions[None]['outdated']) %> | |
206 |
|
206 | |||
207 | <div class="pr-versions"> |
|
207 | <div class="pr-versions"> | |
208 | % if c.show_version_changes: |
|
208 | % if c.show_version_changes: | |
209 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> |
|
209 | <% outdated_comm_count_ver = len(c.inline_versions[c.at_version_num]['outdated']) %> | |
210 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> |
|
210 | <% general_outdated_comm_count_ver = len(c.comment_versions[c.at_version_num]['outdated']) %> | |
211 | ${_ungettext('{} version available for this pull request, ', '{} versions available for this pull request, ', len(c.versions)).format(len(c.versions))} |
|
211 | ${_ungettext('{} version available for this pull request, ', '{} versions available for this pull request, ', len(c.versions)).format(len(c.versions))} | |
212 | <a id="show-pr-versions" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" |
|
212 | <a id="show-pr-versions" onclick="return versionController.toggleVersionView(this)" href="#show-pr-versions" | |
213 | data-toggle-on="${_('show versions')}." |
|
213 | data-toggle-on="${_('show versions')}." | |
214 | data-toggle-off="${_('hide versions')}."> |
|
214 | data-toggle-off="${_('hide versions')}."> | |
215 | ${_('show versions')}. |
|
215 | ${_('show versions')}. | |
216 | </a> |
|
216 | </a> | |
217 | <table> |
|
217 | <table> | |
218 | ## SHOW ALL VERSIONS OF PR |
|
218 | ## SHOW ALL VERSIONS OF PR | |
219 | <% ver_pr = None %> |
|
219 | <% ver_pr = None %> | |
220 |
|
220 | |||
221 | % for data in reversed(list(enumerate(c.versions, 1))): |
|
221 | % for data in reversed(list(enumerate(c.versions, 1))): | |
222 | <% ver_pos = data[0] %> |
|
222 | <% ver_pos = data[0] %> | |
223 | <% ver = data[1] %> |
|
223 | <% ver = data[1] %> | |
224 | <% ver_pr = ver.pull_request_version_id %> |
|
224 | <% ver_pr = ver.pull_request_version_id %> | |
225 | <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> |
|
225 | <% display_row = '' if c.at_version and (c.at_version_num == ver_pr or c.from_version_num == ver_pr) else 'none' %> | |
226 |
|
226 | |||
227 | <tr class="version-pr" style="display: ${display_row}"> |
|
227 | <tr class="version-pr" style="display: ${display_row}"> | |
228 | <td> |
|
228 | <td> | |
229 | <code> |
|
229 | <code> | |
230 | <a href="${request.current_route_path(_query=dict(version=ver_pr or 'latest'))}">v${ver_pos}</a> |
|
230 | <a href="${request.current_route_path(_query=dict(version=ver_pr or 'latest'))}">v${ver_pos}</a> | |
231 | </code> |
|
231 | </code> | |
232 | </td> |
|
232 | </td> | |
233 | <td> |
|
233 | <td> | |
234 | <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}"/> |
|
234 | <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}"/> | |
235 | <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}"/> |
|
235 | <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}"/> | |
236 | </td> |
|
236 | </td> | |
237 | <td> |
|
237 | <td> | |
238 | <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> |
|
238 | <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> | |
239 | <i class="tooltip icon-circle review-status-${review_status}" title="${_('Your review status at this version')}"></i> |
|
239 | <i class="tooltip icon-circle review-status-${review_status}" title="${_('Your review status at this version')}"></i> | |
240 |
|
240 | |||
241 | </td> |
|
241 | </td> | |
242 | <td> |
|
242 | <td> | |
243 | % if c.at_version_num != ver_pr: |
|
243 | % if c.at_version_num != ver_pr: | |
244 | <i class="tooltip icon-comment" title="${_('Comments from pull request version v{0}').format(ver_pos)}"></i> |
|
244 | <i class="tooltip icon-comment" title="${_('Comments from pull request version v{0}').format(ver_pos)}"></i> | |
245 | <code> |
|
245 | <code> | |
246 | General:${len(c.comment_versions[ver_pr]['at'])} / Inline:${len(c.inline_versions[ver_pr]['at'])} |
|
246 | General:${len(c.comment_versions[ver_pr]['at'])} / Inline:${len(c.inline_versions[ver_pr]['at'])} | |
247 | </code> |
|
247 | </code> | |
248 | % endif |
|
248 | % endif | |
249 | </td> |
|
249 | </td> | |
250 | <td> |
|
250 | <td> | |
251 | ##<code>${ver.source_ref_parts.commit_id[:6]}</code> |
|
251 | ##<code>${ver.source_ref_parts.commit_id[:6]}</code> | |
252 | </td> |
|
252 | </td> | |
253 | <td> |
|
253 | <td> | |
254 | <code>${h.age_component(ver.updated_on, time_is_local=True, tooltip=False)}</code> |
|
254 | <code>${h.age_component(ver.updated_on, time_is_local=True, tooltip=False)}</code> | |
255 | </td> |
|
255 | </td> | |
256 | </tr> |
|
256 | </tr> | |
257 | % endfor |
|
257 | % endfor | |
258 |
|
258 | |||
259 | <tr> |
|
259 | <tr> | |
260 | <td colspan="6"> |
|
260 | <td colspan="6"> | |
261 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" |
|
261 | <button id="show-version-diff" onclick="return versionController.showVersionDiff()" class="btn btn-sm" style="display: none" | |
262 | data-label-text-locked="${_('select versions to show changes')}" |
|
262 | data-label-text-locked="${_('select versions to show changes')}" | |
263 | data-label-text-diff="${_('show changes between versions')}" |
|
263 | data-label-text-diff="${_('show changes between versions')}" | |
264 | data-label-text-show="${_('show pull request for this version')}" |
|
264 | data-label-text-show="${_('show pull request for this version')}" | |
265 | > |
|
265 | > | |
266 | ${_('select versions to show changes')} |
|
266 | ${_('select versions to show changes')} | |
267 | </button> |
|
267 | </button> | |
268 | </td> |
|
268 | </td> | |
269 | </tr> |
|
269 | </tr> | |
270 | </table> |
|
270 | </table> | |
271 | % else: |
|
271 | % else: | |
272 | <div> |
|
272 | <div> | |
273 | ${_('Pull request versions not available')}. |
|
273 | ${_('Pull request versions not available')}. | |
274 | </div> |
|
274 | </div> | |
275 | % endif |
|
275 | % endif | |
276 | </div> |
|
276 | </div> | |
277 | </div> |
|
277 | </div> | |
278 |
|
278 | |||
279 | </div> |
|
279 | </div> | |
280 |
|
280 | |||
281 | </div> |
|
281 | </div> | |
282 |
|
282 | |||
283 | ## REVIEW RULES |
|
283 | ## REVIEW RULES | |
284 | <div id="review_rules" style="display: none" class="reviewers-title block-right"> |
|
284 | <div id="review_rules" style="display: none" class="reviewers-title block-right"> | |
285 | <div class="pr-details-title"> |
|
285 | <div class="pr-details-title"> | |
286 | ${_('Reviewer rules')} |
|
286 | ${_('Reviewer rules')} | |
287 | %if c.allowed_to_update: |
|
287 | %if c.allowed_to_update: | |
288 | <span id="close_edit_reviewers" class="block-right action_button last-item" style="display: none;">${_('Close')}</span> |
|
288 | <span id="close_edit_reviewers" class="block-right action_button last-item" style="display: none;">${_('Close')}</span> | |
289 | %endif |
|
289 | %endif | |
290 | </div> |
|
290 | </div> | |
291 | <div class="pr-reviewer-rules"> |
|
291 | <div class="pr-reviewer-rules"> | |
292 | ## review rules will be appended here, by default reviewers logic |
|
292 | ## review rules will be appended here, by default reviewers logic | |
293 | </div> |
|
293 | </div> | |
294 | <input id="review_data" type="hidden" name="review_data" value=""> |
|
294 | <input id="review_data" type="hidden" name="review_data" value=""> | |
295 | </div> |
|
295 | </div> | |
296 |
|
296 | |||
297 | ## REVIEWERS |
|
297 | ## REVIEWERS | |
298 | <div class="reviewers-title first-panel block-right"> |
|
298 | <div class="reviewers-title first-panel block-right"> | |
299 | <div class="pr-details-title"> |
|
299 | <div class="pr-details-title"> | |
300 | ${_('Pull request reviewers')} |
|
300 | ${_('Pull request reviewers')} | |
301 | %if c.allowed_to_update: |
|
301 | %if c.allowed_to_update: | |
302 | <span id="open_edit_reviewers" class="block-right action_button last-item">${_('Edit')}</span> |
|
302 | <span id="open_edit_reviewers" class="block-right action_button last-item">${_('Edit')}</span> | |
303 | %endif |
|
303 | %endif | |
304 | </div> |
|
304 | </div> | |
305 | </div> |
|
305 | </div> | |
306 | <div id="reviewers" class="block-right pr-details-content reviewers"> |
|
306 | <div id="reviewers" class="block-right pr-details-content reviewers"> | |
307 |
|
307 | |||
308 | ## members redering block |
|
308 | ## members redering block | |
309 | <input type="hidden" name="__start__" value="review_members:sequence"> |
|
309 | <input type="hidden" name="__start__" value="review_members:sequence"> | |
310 | <ul id="review_members" class="group_members"> |
|
310 | <ul id="review_members" class="group_members"> | |
311 |
|
311 | |||
312 | % for review_obj, member, reasons, mandatory, status in c.pull_request_reviewers: |
|
312 | % for review_obj, member, reasons, mandatory, status in c.pull_request_reviewers: | |
313 | <script> |
|
313 | <script> | |
314 | var member = ${h.json.dumps(h.reviewer_as_json(member, reasons=reasons, mandatory=mandatory, user_group=review_obj.rule_user_group_data()))|n}; |
|
314 | var member = ${h.json.dumps(h.reviewer_as_json(member, reasons=reasons, mandatory=mandatory, user_group=review_obj.rule_user_group_data()))|n}; | |
315 | var status = "${(status[0][1].status if status else 'not_reviewed')}"; |
|
315 | var status = "${(status[0][1].status if status else 'not_reviewed')}"; | |
316 | var status_lbl = "${h.commit_status_lbl(status[0][1].status if status else 'not_reviewed')}"; |
|
316 | var status_lbl = "${h.commit_status_lbl(status[0][1].status if status else 'not_reviewed')}"; | |
317 | var allowed_to_update = ${h.json.dumps(c.allowed_to_update)}; |
|
317 | var allowed_to_update = ${h.json.dumps(c.allowed_to_update)}; | |
318 |
|
318 | |||
319 | var entry = renderTemplate('reviewMemberEntry', { |
|
319 | var entry = renderTemplate('reviewMemberEntry', { | |
320 | 'member': member, |
|
320 | 'member': member, | |
321 | 'mandatory': member.mandatory, |
|
321 | 'mandatory': member.mandatory, | |
322 | 'reasons': member.reasons, |
|
322 | 'reasons': member.reasons, | |
323 | 'allowed_to_update': allowed_to_update, |
|
323 | 'allowed_to_update': allowed_to_update, | |
324 | 'review_status': status, |
|
324 | 'review_status': status, | |
325 | 'review_status_label': status_lbl, |
|
325 | 'review_status_label': status_lbl, | |
326 | 'user_group': member.user_group, |
|
326 | 'user_group': member.user_group, | |
327 | 'create': false |
|
327 | 'create': false | |
328 | }); |
|
328 | }); | |
329 | $('#review_members').append(entry) |
|
329 | $('#review_members').append(entry) | |
330 | </script> |
|
330 | </script> | |
331 |
|
331 | |||
332 | % endfor |
|
332 | % endfor | |
333 |
|
333 | |||
334 | </ul> |
|
334 | </ul> | |
335 |
|
335 | |||
336 | <input type="hidden" name="__end__" value="review_members:sequence"> |
|
336 | <input type="hidden" name="__end__" value="review_members:sequence"> | |
337 | ## end members redering block |
|
337 | ## end members redering block | |
338 |
|
338 | |||
339 | %if not c.pull_request.is_closed(): |
|
339 | %if not c.pull_request.is_closed(): | |
340 | <div id="add_reviewer" class="ac" style="display: none;"> |
|
340 | <div id="add_reviewer" class="ac" style="display: none;"> | |
341 | %if c.allowed_to_update: |
|
341 | %if c.allowed_to_update: | |
342 | % if not c.forbid_adding_reviewers: |
|
342 | % if not c.forbid_adding_reviewers: | |
343 | <div id="add_reviewer_input" class="reviewer_ac"> |
|
343 | <div id="add_reviewer_input" class="reviewer_ac"> | |
344 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer or reviewer group'))} |
|
344 | ${h.text('user', class_='ac-input', placeholder=_('Add reviewer or reviewer group'))} | |
345 | <div id="reviewers_container"></div> |
|
345 | <div id="reviewers_container"></div> | |
346 | </div> |
|
346 | </div> | |
347 | % endif |
|
347 | % endif | |
348 | <div class="pull-right"> |
|
348 | <div class="pull-right"> | |
349 | <button id="update_pull_request" class="btn btn-small no-margin">${_('Save Changes')}</button> |
|
349 | <button id="update_pull_request" class="btn btn-small no-margin">${_('Save Changes')}</button> | |
350 | </div> |
|
350 | </div> | |
351 | %endif |
|
351 | %endif | |
352 | </div> |
|
352 | </div> | |
353 | %endif |
|
353 | %endif | |
354 | </div> |
|
354 | </div> | |
355 |
|
355 | |||
356 | ## TODOs will be listed here |
|
356 | ## TODOs will be listed here | |
357 | <div class="reviewers-title block-right"> |
|
357 | <div class="reviewers-title block-right"> | |
358 | <div class="pr-details-title"> |
|
358 | <div class="pr-details-title"> | |
359 | ## Only show unresolved, that is only what matters |
|
359 | ## Only show unresolved, that is only what matters | |
360 | TODO Comments - ${len(c.unresolved_comments)} / ${(len(c.unresolved_comments) + len(c.resolved_comments))} |
|
360 | TODO Comments - ${len(c.unresolved_comments)} / ${(len(c.unresolved_comments) + len(c.resolved_comments))} | |
361 |
|
361 | |||
362 | % if not c.at_version: |
|
362 | % if not c.at_version: | |
363 | % if c.resolved_comments: |
|
363 | % if c.resolved_comments: | |
364 | <span class="block-right action_button last-item noselect" onclick="$('.unresolved-todo-text').toggle(); return versionController.toggleElement(this, '.unresolved-todo');" data-toggle-on="Show resolved" data-toggle-off="Hide resolved">Show resolved</span> |
|
364 | <span class="block-right action_button last-item noselect" onclick="$('.unresolved-todo-text').toggle(); return versionController.toggleElement(this, '.unresolved-todo');" data-toggle-on="Show resolved" data-toggle-off="Hide resolved">Show resolved</span> | |
365 | % else: |
|
365 | % else: | |
366 | <span class="block-right last-item noselect">Show resolved</span> |
|
366 | <span class="block-right last-item noselect">Show resolved</span> | |
367 | % endif |
|
367 | % endif | |
368 | % endif |
|
368 | % endif | |
369 | </div> |
|
369 | </div> | |
370 | </div> |
|
370 | </div> | |
371 | <div class="block-right pr-details-content reviewers"> |
|
371 | <div class="block-right pr-details-content reviewers"> | |
372 |
|
372 | |||
373 | <table class="todo-table"> |
|
373 | <table class="todo-table"> | |
374 | <% |
|
374 | <% | |
375 | def sorter(entry): |
|
375 | def sorter(entry): | |
376 | user_id = entry.author.user_id |
|
376 | user_id = entry.author.user_id | |
377 | resolved = '1' if entry.resolved else '0' |
|
377 | resolved = '1' if entry.resolved else '0' | |
378 | if user_id == c.rhodecode_user.user_id: |
|
378 | if user_id == c.rhodecode_user.user_id: | |
379 | # own comments first |
|
379 | # own comments first | |
380 | user_id = 0 |
|
380 | user_id = 0 | |
381 | return '{}_{}_{}'.format(resolved, user_id, str(entry.comment_id).zfill(100)) |
|
381 | return '{}_{}_{}'.format(resolved, user_id, str(entry.comment_id).zfill(100)) | |
382 | %> |
|
382 | %> | |
383 |
|
383 | |||
384 | % if c.at_version: |
|
384 | % if c.at_version: | |
385 | <tr> |
|
385 | <tr> | |
386 | <td class="unresolved-todo-text">${_('unresolved TODOs unavailable in this view')}.</td> |
|
386 | <td class="unresolved-todo-text">${_('unresolved TODOs unavailable in this view')}.</td> | |
387 | </tr> |
|
387 | </tr> | |
388 | % else: |
|
388 | % else: | |
389 | % for todo_comment in sorted(c.unresolved_comments + c.resolved_comments, key=sorter): |
|
389 | % for todo_comment in sorted(c.unresolved_comments + c.resolved_comments, key=sorter): | |
390 | <% resolved = todo_comment.resolved %> |
|
390 | <% resolved = todo_comment.resolved %> | |
391 | % if inline: |
|
391 | % if inline: | |
392 | <% outdated_at_ver = todo_comment.outdated_at_version(getattr(c, 'at_version_num', None)) %> |
|
392 | <% outdated_at_ver = todo_comment.outdated_at_version(getattr(c, 'at_version_num', None)) %> | |
393 | % else: |
|
393 | % else: | |
394 | <% outdated_at_ver = todo_comment.older_than_version(getattr(c, 'at_version_num', None)) %> |
|
394 | <% outdated_at_ver = todo_comment.older_than_version(getattr(c, 'at_version_num', None)) %> | |
395 | % endif |
|
395 | % endif | |
396 |
|
396 | |||
397 | <tr ${('class="unresolved-todo" style="display: none"' if resolved else '') |n}> |
|
397 | <tr ${('class="unresolved-todo" style="display: none"' if resolved else '') |n}> | |
398 |
|
398 | |||
399 | <td class="td-todo-number"> |
|
399 | <td class="td-todo-number"> | |
400 | % if resolved: |
|
400 | % if resolved: | |
401 | <a class="permalink todo-resolved tooltip" title="${_('Resolved by comment #{}').format(todo_comment.resolved.comment_id)}" href="#comment-${todo_comment.comment_id}" onclick="return Rhodecode.comments.scrollToComment($('#comment-${todo_comment.comment_id}'), 0, ${h.json.dumps(outdated_at_ver)})"> |
|
401 | <a class="permalink todo-resolved tooltip" title="${_('Resolved by comment #{}').format(todo_comment.resolved.comment_id)}" href="#comment-${todo_comment.comment_id}" onclick="return Rhodecode.comments.scrollToComment($('#comment-${todo_comment.comment_id}'), 0, ${h.json.dumps(outdated_at_ver)})"> | |
402 | <i class="icon-flag-filled"></i> ${todo_comment.comment_id}</a> |
|
402 | <i class="icon-flag-filled"></i> ${todo_comment.comment_id}</a> | |
403 | % else: |
|
403 | % else: | |
404 | <a class="permalink" href="#comment-${todo_comment.comment_id}" onclick="return Rhodecode.comments.scrollToComment($('#comment-${todo_comment.comment_id}'), 0, ${h.json.dumps(outdated_at_ver)})"> |
|
404 | <a class="permalink" href="#comment-${todo_comment.comment_id}" onclick="return Rhodecode.comments.scrollToComment($('#comment-${todo_comment.comment_id}'), 0, ${h.json.dumps(outdated_at_ver)})"> | |
405 | <i class="icon-flag-filled"></i> ${todo_comment.comment_id}</a> |
|
405 | <i class="icon-flag-filled"></i> ${todo_comment.comment_id}</a> | |
406 | % endif |
|
406 | % endif | |
407 | </td> |
|
407 | </td> | |
408 | <td class="td-todo-gravatar"> |
|
408 | <td class="td-todo-gravatar"> | |
409 | ${base.gravatar(todo_comment.author.email, 16, user=todo_comment.author, tooltip=True, extra_class=['no-margin'])} |
|
409 | ${base.gravatar(todo_comment.author.email, 16, user=todo_comment.author, tooltip=True, extra_class=['no-margin'])} | |
410 | </td> |
|
410 | </td> | |
411 | <td class="todo-comment-text-wrapper"> |
|
411 | <td class="todo-comment-text-wrapper"> | |
412 | <div class="todo-comment-text"> |
|
412 | <div class="todo-comment-text"> | |
413 | <code>${h.chop_at_smart(todo_comment.text, '\n', suffix_if_chopped='...')}</code> |
|
413 | <code>${h.chop_at_smart(todo_comment.text, '\n', suffix_if_chopped='...')}</code> | |
414 | </div> |
|
414 | </div> | |
415 | </td> |
|
415 | </td> | |
416 |
|
416 | |||
417 | </tr> |
|
417 | </tr> | |
418 | % endfor |
|
418 | % endfor | |
419 |
|
419 | |||
420 | % if len(c.unresolved_comments) == 0: |
|
420 | % if len(c.unresolved_comments) == 0: | |
421 | <tr> |
|
421 | <tr> | |
422 | <td class="unresolved-todo-text">${_('No unresolved TODOs')}.</td> |
|
422 | <td class="unresolved-todo-text">${_('No unresolved TODOs')}.</td> | |
423 | </tr> |
|
423 | </tr> | |
424 | % endif |
|
424 | % endif | |
425 |
|
425 | |||
426 | % endif |
|
426 | % endif | |
427 |
|
427 | |||
428 | </table> |
|
428 | </table> | |
429 |
|
429 | |||
430 | </div> |
|
430 | </div> | |
431 | </div> |
|
431 | </div> | |
432 |
|
432 | |||
433 | </div> |
|
433 | </div> | |
434 |
|
434 | |||
435 | <div class="box"> |
|
435 | <div class="box"> | |
436 |
|
436 | |||
437 | % if c.state_progressing: |
|
437 | % if c.state_progressing: | |
438 |
|
438 | |||
439 | <h2 style="text-align: center"> |
|
439 | <h2 style="text-align: center"> | |
440 | ${_('Cannot show diff when pull request state is changing. Current progress state')}: <span class="tag tag-merge-state-${c.pull_request.state}">${c.pull_request.state}</span> |
|
440 | ${_('Cannot show diff when pull request state is changing. Current progress state')}: <span class="tag tag-merge-state-${c.pull_request.state}">${c.pull_request.state}</span> | |
441 |
|
441 | |||
442 | % if c.is_super_admin: |
|
442 | % if c.is_super_admin: | |
443 | <br/> |
|
443 | <br/> | |
444 | If you think this is an error try <a href="${h.current_route_path(request, force_state='created')}">forced state reset</a> to <span class="tag tag-merge-state-created">created</span> state. |
|
444 | If you think this is an error try <a href="${h.current_route_path(request, force_state='created')}">forced state reset</a> to <span class="tag tag-merge-state-created">created</span> state. | |
445 | % endif |
|
445 | % endif | |
446 | </h2> |
|
446 | </h2> | |
447 |
|
447 | |||
448 | % else: |
|
448 | % else: | |
449 |
|
449 | |||
450 | ## Diffs rendered here |
|
450 | ## Diffs rendered here | |
451 | <div class="table" > |
|
451 | <div class="table" > | |
452 | <div id="changeset_compare_view_content"> |
|
452 | <div id="changeset_compare_view_content"> | |
453 | ##CS |
|
453 | ##CS | |
454 | % if c.missing_requirements: |
|
454 | % if c.missing_requirements: | |
455 | <div class="box"> |
|
455 | <div class="box"> | |
456 | <div class="alert alert-warning"> |
|
456 | <div class="alert alert-warning"> | |
457 | <div> |
|
457 | <div> | |
458 | <strong>${_('Missing requirements:')}</strong> |
|
458 | <strong>${_('Missing requirements:')}</strong> | |
459 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} |
|
459 | ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')} | |
460 | </div> |
|
460 | </div> | |
461 | </div> |
|
461 | </div> | |
462 | </div> |
|
462 | </div> | |
463 | % elif c.missing_commits: |
|
463 | % elif c.missing_commits: | |
464 | <div class="box"> |
|
464 | <div class="box"> | |
465 | <div class="alert alert-warning"> |
|
465 | <div class="alert alert-warning"> | |
466 | <div> |
|
466 | <div> | |
467 | <strong>${_('Missing commits')}:</strong> |
|
467 | <strong>${_('Missing commits')}:</strong> | |
468 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} |
|
468 | ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} | |
469 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} |
|
469 | ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')} | |
470 | ${_('Consider doing a {force_refresh_url} in case you think this is an error.').format(force_refresh_url=h.link_to('force refresh', h.current_route_path(request, force_refresh='1')))|n} |
|
470 | ${_('Consider doing a {force_refresh_url} in case you think this is an error.').format(force_refresh_url=h.link_to('force refresh', h.current_route_path(request, force_refresh='1')))|n} | |
471 | </div> |
|
471 | </div> | |
472 | </div> |
|
472 | </div> | |
473 | </div> |
|
473 | </div> | |
474 | % elif c.pr_merge_source_commit.changed and not c.pull_request.is_closed(): |
|
474 | % elif c.pr_merge_source_commit.changed and not c.pull_request.is_closed(): | |
475 | <div class="box"> |
|
475 | <div class="box"> | |
476 | <div class="alert alert-info"> |
|
476 | <div class="alert alert-info"> | |
477 | <div> |
|
477 | <div> | |
478 | <strong>${_('There are new changes for `{}:{}` in source repository, please consider updating this pull request.').format(c.pr_merge_source_commit.ref_spec.type, c.pr_merge_source_commit.ref_spec.name)}</strong> |
|
478 | <strong>${_('There are new changes for `{}:{}` in source repository, please consider updating this pull request.').format(c.pr_merge_source_commit.ref_spec.type, c.pr_merge_source_commit.ref_spec.name)}</strong> | |
479 | </div> |
|
479 | </div> | |
480 | </div> |
|
480 | </div> | |
481 | </div> |
|
481 | </div> | |
482 | % endif |
|
482 | % endif | |
483 |
|
483 | |||
484 | <div class="compare_view_commits_title"> |
|
484 | <div class="compare_view_commits_title"> | |
485 | % if not c.compare_mode: |
|
485 | % if not c.compare_mode: | |
486 |
|
486 | |||
487 | % if c.at_version_pos: |
|
487 | % if c.at_version_pos: | |
488 | <h4> |
|
488 | <h4> | |
489 | ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} |
|
489 | ${_('Showing changes at v%d, commenting is disabled.') % c.at_version_pos} | |
490 | </h4> |
|
490 | </h4> | |
491 | % endif |
|
491 | % endif | |
492 |
|
492 | |||
493 | <div class="pull-left"> |
|
493 | <div class="pull-left"> | |
494 | <div class="btn-group"> |
|
494 | <div class="btn-group"> | |
495 | <a class="${('collapsed' if c.collapse_all_commits else '')}" href="#expand-commits" onclick="toggleCommitExpand(this); return false" data-toggle-commits-cnt=${len(c.commit_ranges)} > |
|
495 | <a class="${('collapsed' if c.collapse_all_commits else '')}" href="#expand-commits" onclick="toggleCommitExpand(this); return false" data-toggle-commits-cnt=${len(c.commit_ranges)} > | |
496 | % if c.collapse_all_commits: |
|
496 | % if c.collapse_all_commits: | |
497 | <i class="icon-plus-squared-alt icon-no-margin"></i> |
|
497 | <i class="icon-plus-squared-alt icon-no-margin"></i> | |
498 | ${_ungettext('Expand {} commit', 'Expand {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))} |
|
498 | ${_ungettext('Expand {} commit', 'Expand {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))} | |
499 | % else: |
|
499 | % else: | |
500 | <i class="icon-minus-squared-alt icon-no-margin"></i> |
|
500 | <i class="icon-minus-squared-alt icon-no-margin"></i> | |
501 | ${_ungettext('Collapse {} commit', 'Collapse {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))} |
|
501 | ${_ungettext('Collapse {} commit', 'Collapse {} commits', len(c.commit_ranges)).format(len(c.commit_ranges))} | |
502 | % endif |
|
502 | % endif | |
503 | </a> |
|
503 | </a> | |
504 | </div> |
|
504 | </div> | |
505 | </div> |
|
505 | </div> | |
506 |
|
506 | |||
507 | <div class="pull-right"> |
|
507 | <div class="pull-right"> | |
508 | % if c.allowed_to_update and not c.pull_request.is_closed(): |
|
508 | % if c.allowed_to_update and not c.pull_request.is_closed(): | |
509 |
|
509 | |||
510 | <div class="btn-group btn-group-actions"> |
|
510 | <div class="btn-group btn-group-actions"> | |
511 | <a id="update_commits" class="btn btn-primary no-margin" onclick="updateController.updateCommits(this); return false"> |
|
511 | <a id="update_commits" class="btn btn-primary no-margin" onclick="updateController.updateCommits(this); return false"> | |
512 | ${_('Update commits')} |
|
512 | ${_('Update commits')} | |
513 | </a> |
|
513 | </a> | |
514 |
|
514 | |||
515 |
<a id="update_commits_switcher" class="tooltip btn btn-primary |
|
515 | <a id="update_commits_switcher" class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more update options')}"> | |
516 | <i class="icon-down"></i> |
|
516 | <i class="icon-down"></i> | |
517 | </a> |
|
517 | </a> | |
518 |
|
518 | |||
519 | <div class="btn-action-switcher-container right-align" id="update-commits-switcher"> |
|
519 | <div class="btn-action-switcher-container right-align" id="update-commits-switcher"> | |
520 | <ul class="btn-action-switcher" role="menu" style="min-width: 300px;"> |
|
520 | <ul class="btn-action-switcher" role="menu" style="min-width: 300px;"> | |
521 | <li> |
|
521 | <li> | |
522 | <a href="#forceUpdate" onclick="updateController.forceUpdateCommits(this); return false"> |
|
522 | <a href="#forceUpdate" onclick="updateController.forceUpdateCommits(this); return false"> | |
523 | ${_('Force update commits')} |
|
523 | ${_('Force update commits')} | |
524 | </a> |
|
524 | </a> | |
525 | <div class="action-help-block"> |
|
525 | <div class="action-help-block"> | |
526 | ${_('Update commits and force refresh this pull request.')} |
|
526 | ${_('Update commits and force refresh this pull request.')} | |
527 | </div> |
|
527 | </div> | |
528 | </li> |
|
528 | </li> | |
529 | </ul> |
|
529 | </ul> | |
530 | </div> |
|
530 | </div> | |
531 | </div> |
|
531 | </div> | |
532 |
|
532 | |||
533 | % else: |
|
533 | % else: | |
534 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> |
|
534 | <a class="tooltip btn disabled pull-right" disabled="disabled" title="${_('Update is disabled for current view')}">${_('Update commits')}</a> | |
535 | % endif |
|
535 | % endif | |
536 |
|
536 | |||
537 | </div> |
|
537 | </div> | |
538 | % endif |
|
538 | % endif | |
539 | </div> |
|
539 | </div> | |
540 |
|
540 | |||
541 | % if not c.missing_commits: |
|
541 | % if not c.missing_commits: | |
542 | % if c.compare_mode: |
|
542 | % if c.compare_mode: | |
543 | % if c.at_version: |
|
543 | % if c.at_version: | |
544 | <h4> |
|
544 | <h4> | |
545 | ${_('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')}: |
|
545 | ${_('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')}: | |
546 | </h4> |
|
546 | </h4> | |
547 |
|
547 | |||
548 | <div class="subtitle-compare"> |
|
548 | <div class="subtitle-compare"> | |
549 | ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} |
|
549 | ${_('commits added: {}, removed: {}').format(len(c.commit_changes_summary.added), len(c.commit_changes_summary.removed))} | |
550 | </div> |
|
550 | </div> | |
551 |
|
551 | |||
552 | <div class="container"> |
|
552 | <div class="container"> | |
553 | <table class="rctable compare_view_commits"> |
|
553 | <table class="rctable compare_view_commits"> | |
554 | <tr> |
|
554 | <tr> | |
555 | <th></th> |
|
555 | <th></th> | |
556 | <th>${_('Time')}</th> |
|
556 | <th>${_('Time')}</th> | |
557 | <th>${_('Author')}</th> |
|
557 | <th>${_('Author')}</th> | |
558 | <th>${_('Commit')}</th> |
|
558 | <th>${_('Commit')}</th> | |
559 | <th></th> |
|
559 | <th></th> | |
560 | <th>${_('Description')}</th> |
|
560 | <th>${_('Description')}</th> | |
561 | </tr> |
|
561 | </tr> | |
562 |
|
562 | |||
563 | % for c_type, commit in c.commit_changes: |
|
563 | % for c_type, commit in c.commit_changes: | |
564 | % if c_type in ['a', 'r']: |
|
564 | % if c_type in ['a', 'r']: | |
565 | <% |
|
565 | <% | |
566 | if c_type == 'a': |
|
566 | if c_type == 'a': | |
567 | cc_title = _('Commit added in displayed changes') |
|
567 | cc_title = _('Commit added in displayed changes') | |
568 | elif c_type == 'r': |
|
568 | elif c_type == 'r': | |
569 | cc_title = _('Commit removed in displayed changes') |
|
569 | cc_title = _('Commit removed in displayed changes') | |
570 | else: |
|
570 | else: | |
571 | cc_title = '' |
|
571 | cc_title = '' | |
572 | %> |
|
572 | %> | |
573 | <tr id="row-${commit.raw_id}" commit_id="${commit.raw_id}" class="compare_select"> |
|
573 | <tr id="row-${commit.raw_id}" commit_id="${commit.raw_id}" class="compare_select"> | |
574 | <td> |
|
574 | <td> | |
575 | <div class="commit-change-indicator color-${c_type}-border"> |
|
575 | <div class="commit-change-indicator color-${c_type}-border"> | |
576 | <div class="commit-change-content color-${c_type} tooltip" title="${h.tooltip(cc_title)}"> |
|
576 | <div class="commit-change-content color-${c_type} tooltip" title="${h.tooltip(cc_title)}"> | |
577 | ${c_type.upper()} |
|
577 | ${c_type.upper()} | |
578 | </div> |
|
578 | </div> | |
579 | </div> |
|
579 | </div> | |
580 | </td> |
|
580 | </td> | |
581 | <td class="td-time"> |
|
581 | <td class="td-time"> | |
582 | ${h.age_component(commit.date)} |
|
582 | ${h.age_component(commit.date)} | |
583 | </td> |
|
583 | </td> | |
584 | <td class="td-user"> |
|
584 | <td class="td-user"> | |
585 | ${base.gravatar_with_user(commit.author, 16, tooltip=True)} |
|
585 | ${base.gravatar_with_user(commit.author, 16, tooltip=True)} | |
586 | </td> |
|
586 | </td> | |
587 | <td class="td-hash"> |
|
587 | <td class="td-hash"> | |
588 | <code> |
|
588 | <code> | |
589 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> |
|
589 | <a href="${h.route_path('repo_commit', repo_name=c.target_repo.repo_name, commit_id=commit.raw_id)}"> | |
590 | r${commit.idx}:${h.short_id(commit.raw_id)} |
|
590 | r${commit.idx}:${h.short_id(commit.raw_id)} | |
591 | </a> |
|
591 | </a> | |
592 | ${h.hidden('revisions', commit.raw_id)} |
|
592 | ${h.hidden('revisions', commit.raw_id)} | |
593 | </code> |
|
593 | </code> | |
594 | </td> |
|
594 | </td> | |
595 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_( 'Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> |
|
595 | <td class="td-message expand_commit" data-commit-id="${commit.raw_id}" title="${_( 'Expand commit message')}" onclick="commitsController.expandCommit(this); return false"> | |
596 | <i class="icon-expand-linked"></i> |
|
596 | <i class="icon-expand-linked"></i> | |
597 | </td> |
|
597 | </td> | |
598 | <td class="mid td-description"> |
|
598 | <td class="mid td-description"> | |
599 | <div class="log-container truncate-wrap"> |
|
599 | <div class="log-container truncate-wrap"> | |
600 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> |
|
600 | <div class="message truncate" id="c-${commit.raw_id}" data-message-raw="${commit.message}">${h.urlify_commit_message(commit.message, c.repo_name)}</div> | |
601 | </div> |
|
601 | </div> | |
602 | </td> |
|
602 | </td> | |
603 | </tr> |
|
603 | </tr> | |
604 | % endif |
|
604 | % endif | |
605 | % endfor |
|
605 | % endfor | |
606 | </table> |
|
606 | </table> | |
607 | </div> |
|
607 | </div> | |
608 |
|
608 | |||
609 | % endif |
|
609 | % endif | |
610 |
|
610 | |||
611 | % else: |
|
611 | % else: | |
612 | <%include file="/compare/compare_commits.mako" /> |
|
612 | <%include file="/compare/compare_commits.mako" /> | |
613 | % endif |
|
613 | % endif | |
614 |
|
614 | |||
615 | <div class="cs_files"> |
|
615 | <div class="cs_files"> | |
616 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> |
|
616 | <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> | |
617 | % if c.at_version: |
|
617 | % if c.at_version: | |
618 | <% c.inline_cnt = len(c.inline_versions[c.at_version_num]['display']) %> |
|
618 | <% c.inline_cnt = len(c.inline_versions[c.at_version_num]['display']) %> | |
619 | <% c.comments = c.comment_versions[c.at_version_num]['display'] %> |
|
619 | <% c.comments = c.comment_versions[c.at_version_num]['display'] %> | |
620 | % else: |
|
620 | % else: | |
621 | <% c.inline_cnt = len(c.inline_versions[c.at_version_num]['until']) %> |
|
621 | <% c.inline_cnt = len(c.inline_versions[c.at_version_num]['until']) %> | |
622 | <% c.comments = c.comment_versions[c.at_version_num]['until'] %> |
|
622 | <% c.comments = c.comment_versions[c.at_version_num]['until'] %> | |
623 | % endif |
|
623 | % endif | |
624 |
|
624 | |||
625 | <% |
|
625 | <% | |
626 | pr_menu_data = { |
|
626 | pr_menu_data = { | |
627 | 'outdated_comm_count_ver': outdated_comm_count_ver, |
|
627 | 'outdated_comm_count_ver': outdated_comm_count_ver, | |
628 | 'pull_request': c.pull_request |
|
628 | 'pull_request': c.pull_request | |
629 | } |
|
629 | } | |
630 | %> |
|
630 | %> | |
631 |
|
631 | |||
632 | ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on, pull_request_menu=pr_menu_data)} |
|
632 | ${cbdiffs.render_diffset_menu(c.diffset, range_diff_on=c.range_diff_on, pull_request_menu=pr_menu_data)} | |
633 |
|
633 | |||
634 | % if c.range_diff_on: |
|
634 | % if c.range_diff_on: | |
635 | % for commit in c.commit_ranges: |
|
635 | % for commit in c.commit_ranges: | |
636 | ${cbdiffs.render_diffset( |
|
636 | ${cbdiffs.render_diffset( | |
637 | c.changes[commit.raw_id], |
|
637 | c.changes[commit.raw_id], | |
638 | commit=commit, use_comments=True, |
|
638 | commit=commit, use_comments=True, | |
639 | collapse_when_files_over=5, |
|
639 | collapse_when_files_over=5, | |
640 | disable_new_comments=True, |
|
640 | disable_new_comments=True, | |
641 | deleted_files_comments=c.deleted_files_comments, |
|
641 | deleted_files_comments=c.deleted_files_comments, | |
642 | inline_comments=c.inline_comments, |
|
642 | inline_comments=c.inline_comments, | |
643 | pull_request_menu=pr_menu_data, show_todos=False)} |
|
643 | pull_request_menu=pr_menu_data, show_todos=False)} | |
644 | % endfor |
|
644 | % endfor | |
645 | % else: |
|
645 | % else: | |
646 | ${cbdiffs.render_diffset( |
|
646 | ${cbdiffs.render_diffset( | |
647 | c.diffset, use_comments=True, |
|
647 | c.diffset, use_comments=True, | |
648 | collapse_when_files_over=30, |
|
648 | collapse_when_files_over=30, | |
649 | disable_new_comments=not c.allowed_to_comment, |
|
649 | disable_new_comments=not c.allowed_to_comment, | |
650 | deleted_files_comments=c.deleted_files_comments, |
|
650 | deleted_files_comments=c.deleted_files_comments, | |
651 | inline_comments=c.inline_comments, |
|
651 | inline_comments=c.inline_comments, | |
652 | pull_request_menu=pr_menu_data, show_todos=False)} |
|
652 | pull_request_menu=pr_menu_data, show_todos=False)} | |
653 | % endif |
|
653 | % endif | |
654 |
|
654 | |||
655 | </div> |
|
655 | </div> | |
656 | % else: |
|
656 | % else: | |
657 | ## skipping commits we need to clear the view for missing commits |
|
657 | ## skipping commits we need to clear the view for missing commits | |
658 | <div style="clear:both;"></div> |
|
658 | <div style="clear:both;"></div> | |
659 | % endif |
|
659 | % endif | |
660 |
|
660 | |||
661 | </div> |
|
661 | </div> | |
662 | </div> |
|
662 | </div> | |
663 |
|
663 | |||
664 | ## template for inline comment form |
|
664 | ## template for inline comment form | |
665 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> |
|
665 | <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> | |
666 |
|
666 | |||
667 | ## comments heading with count |
|
667 | ## comments heading with count | |
668 | <div class="comments-heading"> |
|
668 | <div class="comments-heading"> | |
669 | <i class="icon-comment"></i> |
|
669 | <i class="icon-comment"></i> | |
670 | ${_('Comments')} ${len(c.comments)} |
|
670 | ${_('Comments')} ${len(c.comments)} | |
671 | </div> |
|
671 | </div> | |
672 |
|
672 | |||
673 | ## render general comments |
|
673 | ## render general comments | |
674 | <div id="comment-tr-show"> |
|
674 | <div id="comment-tr-show"> | |
675 | % if general_outdated_comm_count_ver: |
|
675 | % if general_outdated_comm_count_ver: | |
676 | <div class="info-box"> |
|
676 | <div class="info-box"> | |
677 | % if general_outdated_comm_count_ver == 1: |
|
677 | % if general_outdated_comm_count_ver == 1: | |
678 | ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, |
|
678 | ${_('there is {num} general comment from older versions').format(num=general_outdated_comm_count_ver)}, | |
679 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show it')}</a> |
|
679 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show it')}</a> | |
680 | % else: |
|
680 | % else: | |
681 | ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, |
|
681 | ${_('there are {num} general comments from older versions').format(num=general_outdated_comm_count_ver)}, | |
682 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show them')}</a> |
|
682 | <a href="#show-hidden-comments" onclick="$('.comment-general.comment-outdated').show(); $(this).parent().hide(); return false;">${_('show them')}</a> | |
683 | % endif |
|
683 | % endif | |
684 | </div> |
|
684 | </div> | |
685 | % endif |
|
685 | % endif | |
686 | </div> |
|
686 | </div> | |
687 |
|
687 | |||
688 | ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} |
|
688 | ${comment.generate_comments(c.comments, include_pull_request=True, is_pull_request=True)} | |
689 |
|
689 | |||
690 | % if not c.pull_request.is_closed(): |
|
690 | % if not c.pull_request.is_closed(): | |
691 | ## main comment form and it status |
|
691 | ## main comment form and it status | |
692 | ${comment.comments(h.route_path('pullrequest_comment_create', repo_name=c.repo_name, |
|
692 | ${comment.comments(h.route_path('pullrequest_comment_create', repo_name=c.repo_name, | |
693 | pull_request_id=c.pull_request.pull_request_id), |
|
693 | pull_request_id=c.pull_request.pull_request_id), | |
694 | c.pull_request_review_status, |
|
694 | c.pull_request_review_status, | |
695 | is_pull_request=True, change_status=c.allowed_to_change_status)} |
|
695 | is_pull_request=True, change_status=c.allowed_to_change_status)} | |
696 |
|
696 | |||
697 | ## merge status, and merge action |
|
697 | ## merge status, and merge action | |
698 | <div class="pull-request-merge"> |
|
698 | <div class="pull-request-merge"> | |
699 | <%include file="/pullrequests/pullrequest_merge_checks.mako"/> |
|
699 | <%include file="/pullrequests/pullrequest_merge_checks.mako"/> | |
700 | </div> |
|
700 | </div> | |
701 |
|
701 | |||
702 | %endif |
|
702 | %endif | |
703 |
|
703 | |||
704 | % endif |
|
704 | % endif | |
705 | </div> |
|
705 | </div> | |
706 |
|
706 | |||
707 | <script type="text/javascript"> |
|
707 | <script type="text/javascript"> | |
708 |
|
708 | |||
709 | versionController = new VersionController(); |
|
709 | versionController = new VersionController(); | |
710 | versionController.init(); |
|
710 | versionController.init(); | |
711 |
|
711 | |||
712 | reviewersController = new ReviewersController(); |
|
712 | reviewersController = new ReviewersController(); | |
713 | commitsController = new CommitsController(); |
|
713 | commitsController = new CommitsController(); | |
714 |
|
714 | |||
715 | updateController = new UpdatePrController(); |
|
715 | updateController = new UpdatePrController(); | |
716 |
|
716 | |||
717 | $(function () { |
|
717 | $(function () { | |
718 |
|
718 | |||
719 | // custom code mirror |
|
719 | // custom code mirror | |
720 | var codeMirrorInstance = $('#pr-description-input').get(0).MarkupForm.cm; |
|
720 | var codeMirrorInstance = $('#pr-description-input').get(0).MarkupForm.cm; | |
721 |
|
721 | |||
722 | var PRDetails = { |
|
722 | var PRDetails = { | |
723 | editButton: $('#open_edit_pullrequest'), |
|
723 | editButton: $('#open_edit_pullrequest'), | |
724 | closeButton: $('#close_edit_pullrequest'), |
|
724 | closeButton: $('#close_edit_pullrequest'), | |
725 | deleteButton: $('#delete_pullrequest'), |
|
725 | deleteButton: $('#delete_pullrequest'), | |
726 | viewFields: $('#pr-desc, #pr-title'), |
|
726 | viewFields: $('#pr-desc, #pr-title'), | |
727 | editFields: $('#pr-desc-edit, #pr-title-edit, .pr-save'), |
|
727 | editFields: $('#pr-desc-edit, #pr-title-edit, .pr-save'), | |
728 |
|
728 | |||
729 | init: function () { |
|
729 | init: function () { | |
730 | var that = this; |
|
730 | var that = this; | |
731 | this.editButton.on('click', function (e) { |
|
731 | this.editButton.on('click', function (e) { | |
732 | that.edit(); |
|
732 | that.edit(); | |
733 | }); |
|
733 | }); | |
734 | this.closeButton.on('click', function (e) { |
|
734 | this.closeButton.on('click', function (e) { | |
735 | that.view(); |
|
735 | that.view(); | |
736 | }); |
|
736 | }); | |
737 | }, |
|
737 | }, | |
738 |
|
738 | |||
739 | edit: function (event) { |
|
739 | edit: function (event) { | |
740 | this.viewFields.hide(); |
|
740 | this.viewFields.hide(); | |
741 | this.editButton.hide(); |
|
741 | this.editButton.hide(); | |
742 | this.deleteButton.hide(); |
|
742 | this.deleteButton.hide(); | |
743 | this.closeButton.show(); |
|
743 | this.closeButton.show(); | |
744 | this.editFields.show(); |
|
744 | this.editFields.show(); | |
745 | codeMirrorInstance.refresh(); |
|
745 | codeMirrorInstance.refresh(); | |
746 | }, |
|
746 | }, | |
747 |
|
747 | |||
748 | view: function (event) { |
|
748 | view: function (event) { | |
749 | this.editButton.show(); |
|
749 | this.editButton.show(); | |
750 | this.deleteButton.show(); |
|
750 | this.deleteButton.show(); | |
751 | this.editFields.hide(); |
|
751 | this.editFields.hide(); | |
752 | this.closeButton.hide(); |
|
752 | this.closeButton.hide(); | |
753 | this.viewFields.show(); |
|
753 | this.viewFields.show(); | |
754 | } |
|
754 | } | |
755 | }; |
|
755 | }; | |
756 |
|
756 | |||
757 | var ReviewersPanel = { |
|
757 | var ReviewersPanel = { | |
758 | editButton: $('#open_edit_reviewers'), |
|
758 | editButton: $('#open_edit_reviewers'), | |
759 | closeButton: $('#close_edit_reviewers'), |
|
759 | closeButton: $('#close_edit_reviewers'), | |
760 | addButton: $('#add_reviewer'), |
|
760 | addButton: $('#add_reviewer'), | |
761 | removeButtons: $('.reviewer_member_remove,.reviewer_member_mandatory_remove'), |
|
761 | removeButtons: $('.reviewer_member_remove,.reviewer_member_mandatory_remove'), | |
762 |
|
762 | |||
763 | init: function () { |
|
763 | init: function () { | |
764 | var self = this; |
|
764 | var self = this; | |
765 | this.editButton.on('click', function (e) { |
|
765 | this.editButton.on('click', function (e) { | |
766 | self.edit(); |
|
766 | self.edit(); | |
767 | }); |
|
767 | }); | |
768 | this.closeButton.on('click', function (e) { |
|
768 | this.closeButton.on('click', function (e) { | |
769 | self.close(); |
|
769 | self.close(); | |
770 | }); |
|
770 | }); | |
771 | }, |
|
771 | }, | |
772 |
|
772 | |||
773 | edit: function (event) { |
|
773 | edit: function (event) { | |
774 | this.editButton.hide(); |
|
774 | this.editButton.hide(); | |
775 | this.closeButton.show(); |
|
775 | this.closeButton.show(); | |
776 | this.addButton.show(); |
|
776 | this.addButton.show(); | |
777 | this.removeButtons.css('visibility', 'visible'); |
|
777 | this.removeButtons.css('visibility', 'visible'); | |
778 | // review rules |
|
778 | // review rules | |
779 | reviewersController.loadReviewRules( |
|
779 | reviewersController.loadReviewRules( | |
780 | ${c.pull_request.reviewer_data_json | n}); |
|
780 | ${c.pull_request.reviewer_data_json | n}); | |
781 | }, |
|
781 | }, | |
782 |
|
782 | |||
783 | close: function (event) { |
|
783 | close: function (event) { | |
784 | this.editButton.show(); |
|
784 | this.editButton.show(); | |
785 | this.closeButton.hide(); |
|
785 | this.closeButton.hide(); | |
786 | this.addButton.hide(); |
|
786 | this.addButton.hide(); | |
787 | this.removeButtons.css('visibility', 'hidden'); |
|
787 | this.removeButtons.css('visibility', 'hidden'); | |
788 | // hide review rules |
|
788 | // hide review rules | |
789 | reviewersController.hideReviewRules() |
|
789 | reviewersController.hideReviewRules() | |
790 | } |
|
790 | } | |
791 | }; |
|
791 | }; | |
792 |
|
792 | |||
793 | PRDetails.init(); |
|
793 | PRDetails.init(); | |
794 | ReviewersPanel.init(); |
|
794 | ReviewersPanel.init(); | |
795 |
|
795 | |||
796 | showOutdated = function (self) { |
|
796 | showOutdated = function (self) { | |
797 | $('.comment-inline.comment-outdated').show(); |
|
797 | $('.comment-inline.comment-outdated').show(); | |
798 | $('.filediff-outdated').show(); |
|
798 | $('.filediff-outdated').show(); | |
799 | $('.showOutdatedComments').hide(); |
|
799 | $('.showOutdatedComments').hide(); | |
800 | $('.hideOutdatedComments').show(); |
|
800 | $('.hideOutdatedComments').show(); | |
801 | }; |
|
801 | }; | |
802 |
|
802 | |||
803 | hideOutdated = function (self) { |
|
803 | hideOutdated = function (self) { | |
804 | $('.comment-inline.comment-outdated').hide(); |
|
804 | $('.comment-inline.comment-outdated').hide(); | |
805 | $('.filediff-outdated').hide(); |
|
805 | $('.filediff-outdated').hide(); | |
806 | $('.hideOutdatedComments').hide(); |
|
806 | $('.hideOutdatedComments').hide(); | |
807 | $('.showOutdatedComments').show(); |
|
807 | $('.showOutdatedComments').show(); | |
808 | }; |
|
808 | }; | |
809 |
|
809 | |||
810 | refreshMergeChecks = function () { |
|
810 | refreshMergeChecks = function () { | |
811 | var loadUrl = "${request.current_route_path(_query=dict(merge_checks=1))}"; |
|
811 | var loadUrl = "${request.current_route_path(_query=dict(merge_checks=1))}"; | |
812 | $('.pull-request-merge').css('opacity', 0.3); |
|
812 | $('.pull-request-merge').css('opacity', 0.3); | |
813 | $('.action-buttons-extra').css('opacity', 0.3); |
|
813 | $('.action-buttons-extra').css('opacity', 0.3); | |
814 |
|
814 | |||
815 | $('.pull-request-merge').load( |
|
815 | $('.pull-request-merge').load( | |
816 | loadUrl, function () { |
|
816 | loadUrl, function () { | |
817 | $('.pull-request-merge').css('opacity', 1); |
|
817 | $('.pull-request-merge').css('opacity', 1); | |
818 |
|
818 | |||
819 | $('.action-buttons-extra').css('opacity', 1); |
|
819 | $('.action-buttons-extra').css('opacity', 1); | |
820 | } |
|
820 | } | |
821 | ); |
|
821 | ); | |
822 | }; |
|
822 | }; | |
823 |
|
823 | |||
824 | closePullRequest = function (status) { |
|
824 | closePullRequest = function (status) { | |
825 | if (!confirm(_gettext('Are you sure to close this pull request without merging?'))) { |
|
825 | if (!confirm(_gettext('Are you sure to close this pull request without merging?'))) { | |
826 | return false; |
|
826 | return false; | |
827 | } |
|
827 | } | |
828 | // inject closing flag |
|
828 | // inject closing flag | |
829 | $('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">'); |
|
829 | $('.action-buttons-extra').append('<input type="hidden" class="close-pr-input" id="close_pull_request" value="1">'); | |
830 | $(generalCommentForm.statusChange).select2("val", status).trigger('change'); |
|
830 | $(generalCommentForm.statusChange).select2("val", status).trigger('change'); | |
831 | $(generalCommentForm.submitForm).submit(); |
|
831 | $(generalCommentForm.submitForm).submit(); | |
832 | }; |
|
832 | }; | |
833 |
|
833 | |||
834 | $('#show-outdated-comments').on('click', function (e) { |
|
834 | $('#show-outdated-comments').on('click', function (e) { | |
835 | var button = $(this); |
|
835 | var button = $(this); | |
836 | var outdated = $('.comment-outdated'); |
|
836 | var outdated = $('.comment-outdated'); | |
837 |
|
837 | |||
838 | if (button.html() === "(Show)") { |
|
838 | if (button.html() === "(Show)") { | |
839 | button.html("(Hide)"); |
|
839 | button.html("(Hide)"); | |
840 | outdated.show(); |
|
840 | outdated.show(); | |
841 | } else { |
|
841 | } else { | |
842 | button.html("(Show)"); |
|
842 | button.html("(Show)"); | |
843 | outdated.hide(); |
|
843 | outdated.hide(); | |
844 | } |
|
844 | } | |
845 | }); |
|
845 | }); | |
846 |
|
846 | |||
847 | $('.show-inline-comments').on('change', function (e) { |
|
847 | $('.show-inline-comments').on('change', function (e) { | |
848 | var show = 'none'; |
|
848 | var show = 'none'; | |
849 | var target = e.currentTarget; |
|
849 | var target = e.currentTarget; | |
850 | if (target.checked) { |
|
850 | if (target.checked) { | |
851 | show = '' |
|
851 | show = '' | |
852 | } |
|
852 | } | |
853 | var boxid = $(target).attr('id_for'); |
|
853 | var boxid = $(target).attr('id_for'); | |
854 | var comments = $('#{0} .inline-comments'.format(boxid)); |
|
854 | var comments = $('#{0} .inline-comments'.format(boxid)); | |
855 | var fn_display = function (idx) { |
|
855 | var fn_display = function (idx) { | |
856 | $(this).css('display', show); |
|
856 | $(this).css('display', show); | |
857 | }; |
|
857 | }; | |
858 | $(comments).each(fn_display); |
|
858 | $(comments).each(fn_display); | |
859 | var btns = $('#{0} .inline-comments-button'.format(boxid)); |
|
859 | var btns = $('#{0} .inline-comments-button'.format(boxid)); | |
860 | $(btns).each(fn_display); |
|
860 | $(btns).each(fn_display); | |
861 | }); |
|
861 | }); | |
862 |
|
862 | |||
863 | $('#merge_pull_request_form').submit(function () { |
|
863 | $('#merge_pull_request_form').submit(function () { | |
864 | if (!$('#merge_pull_request').attr('disabled')) { |
|
864 | if (!$('#merge_pull_request').attr('disabled')) { | |
865 | $('#merge_pull_request').attr('disabled', 'disabled'); |
|
865 | $('#merge_pull_request').attr('disabled', 'disabled'); | |
866 | } |
|
866 | } | |
867 | return true; |
|
867 | return true; | |
868 | }); |
|
868 | }); | |
869 |
|
869 | |||
870 | $('#edit_pull_request').on('click', function (e) { |
|
870 | $('#edit_pull_request').on('click', function (e) { | |
871 | var title = $('#pr-title-input').val(); |
|
871 | var title = $('#pr-title-input').val(); | |
872 | var description = codeMirrorInstance.getValue(); |
|
872 | var description = codeMirrorInstance.getValue(); | |
873 | var renderer = $('#pr-renderer-input').val(); |
|
873 | var renderer = $('#pr-renderer-input').val(); | |
874 | editPullRequest( |
|
874 | editPullRequest( | |
875 | "${c.repo_name}", "${c.pull_request.pull_request_id}", |
|
875 | "${c.repo_name}", "${c.pull_request.pull_request_id}", | |
876 | title, description, renderer); |
|
876 | title, description, renderer); | |
877 | }); |
|
877 | }); | |
878 |
|
878 | |||
879 | $('#update_pull_request').on('click', function (e) { |
|
879 | $('#update_pull_request').on('click', function (e) { | |
880 | $(this).attr('disabled', 'disabled'); |
|
880 | $(this).attr('disabled', 'disabled'); | |
881 | $(this).addClass('disabled'); |
|
881 | $(this).addClass('disabled'); | |
882 | $(this).html(_gettext('Saving...')); |
|
882 | $(this).html(_gettext('Saving...')); | |
883 | reviewersController.updateReviewers( |
|
883 | reviewersController.updateReviewers( | |
884 | "${c.repo_name}", "${c.pull_request.pull_request_id}"); |
|
884 | "${c.repo_name}", "${c.pull_request.pull_request_id}"); | |
885 | }); |
|
885 | }); | |
886 |
|
886 | |||
887 |
|
887 | |||
888 | // fixing issue with caches on firefox |
|
888 | // fixing issue with caches on firefox | |
889 | $('#update_commits').removeAttr("disabled"); |
|
889 | $('#update_commits').removeAttr("disabled"); | |
890 |
|
890 | |||
891 | $('.show-inline-comments').on('click', function (e) { |
|
891 | $('.show-inline-comments').on('click', function (e) { | |
892 | var boxid = $(this).attr('data-comment-id'); |
|
892 | var boxid = $(this).attr('data-comment-id'); | |
893 | var button = $(this); |
|
893 | var button = $(this); | |
894 |
|
894 | |||
895 | if (button.hasClass("comments-visible")) { |
|
895 | if (button.hasClass("comments-visible")) { | |
896 | $('#{0} .inline-comments'.format(boxid)).each(function (index) { |
|
896 | $('#{0} .inline-comments'.format(boxid)).each(function (index) { | |
897 | $(this).hide(); |
|
897 | $(this).hide(); | |
898 | }); |
|
898 | }); | |
899 | button.removeClass("comments-visible"); |
|
899 | button.removeClass("comments-visible"); | |
900 | } else { |
|
900 | } else { | |
901 | $('#{0} .inline-comments'.format(boxid)).each(function (index) { |
|
901 | $('#{0} .inline-comments'.format(boxid)).each(function (index) { | |
902 | $(this).show(); |
|
902 | $(this).show(); | |
903 | }); |
|
903 | }); | |
904 | button.addClass("comments-visible"); |
|
904 | button.addClass("comments-visible"); | |
905 | } |
|
905 | } | |
906 | }); |
|
906 | }); | |
907 |
|
907 | |||
908 | // register submit callback on commentForm form to track TODOs |
|
908 | // register submit callback on commentForm form to track TODOs | |
909 | window.commentFormGlobalSubmitSuccessCallback = function () { |
|
909 | window.commentFormGlobalSubmitSuccessCallback = function () { | |
910 | refreshMergeChecks(); |
|
910 | refreshMergeChecks(); | |
911 | }; |
|
911 | }; | |
912 |
|
912 | |||
913 | ReviewerAutoComplete('#user'); |
|
913 | ReviewerAutoComplete('#user'); | |
914 |
|
914 | |||
915 | }) |
|
915 | }) | |
916 |
|
916 | |||
917 | </script> |
|
917 | </script> | |
918 |
|
918 | |||
919 | </div> |
|
919 | </div> | |
920 |
|
920 | |||
921 | </%def> |
|
921 | </%def> |
@@ -1,277 +1,277 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> |
|
3 | <%def name="refs_counters(branches, closed_branches, tags, bookmarks)"> | |
4 | <span class="summary-branchtag summary-tag"> |
|
4 | <span class="summary-branchtag summary-tag"> | |
5 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
5 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> | |
6 | <i class="icon-branch"></i> |
|
6 | <i class="icon-branch"></i> | |
7 | % if len(branches) == 1: |
|
7 | % if len(branches) == 1: | |
8 | <span>${len(branches)}</span> ${_('Branch')} |
|
8 | <span>${len(branches)}</span> ${_('Branch')} | |
9 | % else: |
|
9 | % else: | |
10 | <span>${len(branches)}</span> ${_('Branches')} |
|
10 | <span>${len(branches)}</span> ${_('Branches')} | |
11 | % endif |
|
11 | % endif | |
12 | </a> |
|
12 | </a> | |
13 | </span> |
|
13 | </span> | |
14 |
|
14 | |||
15 | %if closed_branches: |
|
15 | %if closed_branches: | |
16 | <span class="summary-branchtag summary-tag"> |
|
16 | <span class="summary-branchtag summary-tag"> | |
17 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> |
|
17 | <a href="${h.route_path('branches_home',repo_name=c.repo_name)}" class="childs"> | |
18 | <i class="icon-branch"></i> |
|
18 | <i class="icon-branch"></i> | |
19 | % if len(closed_branches) == 1: |
|
19 | % if len(closed_branches) == 1: | |
20 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} |
|
20 | <span>${len(closed_branches)}</span> ${_('Closed Branch')} | |
21 | % else: |
|
21 | % else: | |
22 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} |
|
22 | <span>${len(closed_branches)}</span> ${_('Closed Branches')} | |
23 | % endif |
|
23 | % endif | |
24 | </a> |
|
24 | </a> | |
25 | </span> |
|
25 | </span> | |
26 | %endif |
|
26 | %endif | |
27 |
|
27 | |||
28 | <span class="summary-tagtag summary-tag"> |
|
28 | <span class="summary-tagtag summary-tag"> | |
29 | <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs"> |
|
29 | <a href="${h.route_path('tags_home',repo_name=c.repo_name)}" class="childs"> | |
30 | <i class="icon-tag"></i> |
|
30 | <i class="icon-tag"></i> | |
31 | % if len(tags) == 1: |
|
31 | % if len(tags) == 1: | |
32 | <span>${len(tags)}</span> ${_('Tag')} |
|
32 | <span>${len(tags)}</span> ${_('Tag')} | |
33 | % else: |
|
33 | % else: | |
34 | <span>${len(tags)}</span> ${_('Tags')} |
|
34 | <span>${len(tags)}</span> ${_('Tags')} | |
35 | % endif |
|
35 | % endif | |
36 | </a> |
|
36 | </a> | |
37 | </span> |
|
37 | </span> | |
38 |
|
38 | |||
39 | %if bookmarks: |
|
39 | %if bookmarks: | |
40 | <span class="summary-booktag summary-tag"> |
|
40 | <span class="summary-booktag summary-tag"> | |
41 | <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs"> |
|
41 | <a href="${h.route_path('bookmarks_home',repo_name=c.repo_name)}" class="childs"> | |
42 | <i class="icon-bookmark"></i> |
|
42 | <i class="icon-bookmark"></i> | |
43 | % if len(bookmarks) == 1: |
|
43 | % if len(bookmarks) == 1: | |
44 | <span>${len(bookmarks)}</span> ${_('Bookmark')} |
|
44 | <span>${len(bookmarks)}</span> ${_('Bookmark')} | |
45 | % else: |
|
45 | % else: | |
46 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} |
|
46 | <span>${len(bookmarks)}</span> ${_('Bookmarks')} | |
47 | % endif |
|
47 | % endif | |
48 | </a> |
|
48 | </a> | |
49 | </span> |
|
49 | </span> | |
50 | %endif |
|
50 | %endif | |
51 | </%def> |
|
51 | </%def> | |
52 |
|
52 | |||
53 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> |
|
53 | <%def name="summary_detail(breadcrumbs_links, show_downloads=True)"> | |
54 | <% summary = lambda n:{False:'summary-short'}.get(n) %> |
|
54 | <% summary = lambda n:{False:'summary-short'}.get(n) %> | |
55 |
|
55 | |||
56 | <div id="summary-menu-stats" class="summary-detail"> |
|
56 | <div id="summary-menu-stats" class="summary-detail"> | |
57 | <div class="fieldset"> |
|
57 | <div class="fieldset"> | |
58 | <div class="left-content"> |
|
58 | <div class="left-content"> | |
59 | <div class="left-clone"> |
|
59 | <div class="left-clone"> | |
60 | <select id="clone_option" name="clone_option"> |
|
60 | <select id="clone_option" name="clone_option"> | |
61 | <option value="http" selected="selected">HTTP</option> |
|
61 | <option value="http" selected="selected">HTTP</option> | |
62 | <option value="http_id">HTTP UID</option> |
|
62 | <option value="http_id">HTTP UID</option> | |
63 | % if c.ssh_enabled: |
|
63 | % if c.ssh_enabled: | |
64 | <option value="ssh">SSH</option> |
|
64 | <option value="ssh">SSH</option> | |
65 | % endif |
|
65 | % endif | |
66 | </select> |
|
66 | </select> | |
67 | </div> |
|
67 | </div> | |
68 |
|
68 | |||
69 | <div class="right-clone"> |
|
69 | <div class="right-clone"> | |
70 | <% |
|
70 | <% | |
71 | maybe_disabled = '' |
|
71 | maybe_disabled = '' | |
72 | if h.is_svn_without_proxy(c.rhodecode_db_repo): |
|
72 | if h.is_svn_without_proxy(c.rhodecode_db_repo): | |
73 | maybe_disabled = 'disabled' |
|
73 | maybe_disabled = 'disabled' | |
74 | %> |
|
74 | %> | |
75 |
|
75 | |||
76 | <span id="clone_option_http"> |
|
76 | <span id="clone_option_http"> | |
77 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/> |
|
77 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url}"/> | |
78 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i> |
|
78 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url}" title="${_('Copy the clone url')}"></i> | |
79 | </span> |
|
79 | </span> | |
80 |
|
80 | |||
81 | <span style="display: none;" id="clone_option_http_id"> |
|
81 | <span style="display: none;" id="clone_option_http_id"> | |
82 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/> |
|
82 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_id}"/> | |
83 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i> |
|
83 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_id}" title="${_('Copy the clone by id url')}"></i> | |
84 | </span> |
|
84 | </span> | |
85 |
|
85 | |||
86 | <span style="display: none;" id="clone_option_ssh"> |
|
86 | <span style="display: none;" id="clone_option_ssh"> | |
87 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/> |
|
87 | <input type="text" class="input-monospace clone_url_input" ${maybe_disabled} readonly="readonly" value="${c.clone_repo_url_ssh}"/> | |
88 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i> |
|
88 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${c.clone_repo_url_ssh}" title="${_('Copy the clone by ssh url')}"></i> | |
89 | </span> |
|
89 | </span> | |
90 |
|
90 | |||
91 | % if maybe_disabled: |
|
91 | % if maybe_disabled: | |
92 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> |
|
92 | <p class="help-block">${_('SVN Protocol is disabled. To enable it, see the')} <a href="${h.route_url('enterprise_svn_setup')}" target="_blank">${_('documentation here')}</a>.</p> | |
93 | % endif |
|
93 | % endif | |
94 | </div> |
|
94 | </div> | |
95 | </div> |
|
95 | </div> | |
96 |
|
96 | |||
97 | <div class="right-content"> |
|
97 | <div class="right-content"> | |
98 | <div class="commit-info"> |
|
98 | <div class="commit-info"> | |
99 | <div class="tags"> |
|
99 | <div class="tags"> | |
100 | <% commit_rev = h.safe_int(c.rhodecode_db_repo.changeset_cache.get('revision'), 0) + 1 %> |
|
100 | <% commit_rev = h.safe_int(c.rhodecode_db_repo.changeset_cache.get('revision'), 0) + 1 %> | |
101 | % if c.rhodecode_repo: |
|
101 | % if c.rhodecode_repo: | |
102 | ${refs_counters( |
|
102 | ${refs_counters( | |
103 | c.rhodecode_repo.branches, |
|
103 | c.rhodecode_repo.branches, | |
104 | c.rhodecode_repo.branches_closed, |
|
104 | c.rhodecode_repo.branches_closed, | |
105 | c.rhodecode_repo.tags, |
|
105 | c.rhodecode_repo.tags, | |
106 | c.rhodecode_repo.bookmarks)} |
|
106 | c.rhodecode_repo.bookmarks)} | |
107 | % else: |
|
107 | % else: | |
108 | ## missing requirements can make c.rhodecode_repo None |
|
108 | ## missing requirements can make c.rhodecode_repo None | |
109 | ${refs_counters([], [], [], [])} |
|
109 | ${refs_counters([], [], [], [])} | |
110 | % endif |
|
110 | % endif | |
111 |
|
111 | |||
112 | ## commits |
|
112 | ## commits | |
113 | <span class="summary-tag"> |
|
113 | <span class="summary-tag"> | |
114 | % if commit_rev == -1: |
|
114 | % if commit_rev == -1: | |
115 | <i class="icon-history"></i> |
|
115 | <i class="icon-history"></i> | |
116 | % if commit_rev == -1: |
|
116 | % if commit_rev == -1: | |
117 | <span>0</span> ${_('Commit')} |
|
117 | <span>0</span> ${_('Commit')} | |
118 | % else: |
|
118 | % else: | |
119 | <span>0</span> ${_('Commits')} |
|
119 | <span>0</span> ${_('Commits')} | |
120 | % endif |
|
120 | % endif | |
121 | % else: |
|
121 | % else: | |
122 | <a href="${h.route_path('repo_commits', repo_name=c.repo_name)}"> |
|
122 | <a href="${h.route_path('repo_commits', repo_name=c.repo_name)}"> | |
123 | <i class="icon-history"></i> |
|
123 | <i class="icon-history"></i> | |
124 | % if commit_rev == 1: |
|
124 | % if commit_rev == 1: | |
125 | <span>${commit_rev}</span> ${_('Commit')} |
|
125 | <span>${commit_rev}</span> ${_('Commit')} | |
126 | % else: |
|
126 | % else: | |
127 | <span>${commit_rev}</span> ${_('Commits')} |
|
127 | <span>${commit_rev}</span> ${_('Commits')} | |
128 | % endif |
|
128 | % endif | |
129 | </a> |
|
129 | </a> | |
130 | % endif |
|
130 | % endif | |
131 | </span> |
|
131 | </span> | |
132 |
|
132 | |||
133 | ## forks |
|
133 | ## forks | |
134 | <span class="summary-tag"> |
|
134 | <span class="summary-tag"> | |
135 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> |
|
135 | <a title="${_('Number of Repository Forks')}" href="${h.route_path('repo_forks_show_all', repo_name=c.repo_name)}"> | |
136 | <i class="icon-code-fork"></i> |
|
136 | <i class="icon-code-fork"></i> | |
137 | <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> |
|
137 | <span>${c.repository_forks}</span> ${_ungettext('Fork', 'Forks', c.repository_forks)}</a> | |
138 | </span> |
|
138 | </span> | |
139 | </div> |
|
139 | </div> | |
140 | </div> |
|
140 | </div> | |
141 | </div> |
|
141 | </div> | |
142 | </div> |
|
142 | </div> | |
143 | ## owner, description, downloads, statistics |
|
143 | ## owner, description, downloads, statistics | |
144 |
|
144 | |||
145 | ## Owner |
|
145 | ## Owner | |
146 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
146 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
147 | <div class="left-label-summary"> |
|
147 | <div class="left-label-summary"> | |
148 | <p>${_('Owner')}</p> |
|
148 | <p>${_('Owner')}</p> | |
149 | <div class="right-label-summary"> |
|
149 | <div class="right-label-summary"> | |
150 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16, tooltip=True)} |
|
150 | ${base.gravatar_with_user(c.rhodecode_db_repo.user.email, 16, tooltip=True)} | |
151 | </div> |
|
151 | </div> | |
152 |
|
152 | |||
153 | </div> |
|
153 | </div> | |
154 | </div> |
|
154 | </div> | |
155 |
|
155 | |||
156 | ## Description |
|
156 | ## Description | |
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-summary"> |
|
158 | <div class="left-label-summary"> | |
159 | <p>${_('Description')}</p> |
|
159 | <p>${_('Description')}</p> | |
160 |
|
160 | |||
161 | <div class="right-label-summary input ${summary(c.show_stats)}"> |
|
161 | <div class="right-label-summary input ${summary(c.show_stats)}"> | |
162 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
162 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
163 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} |
|
163 | ${dt.repo_desc(c.rhodecode_db_repo.description_safe, c.visual.stylify_metatags)} | |
164 | </div> |
|
164 | </div> | |
165 | </div> |
|
165 | </div> | |
166 | </div> |
|
166 | </div> | |
167 |
|
167 | |||
168 | ## Downloads |
|
168 | ## Downloads | |
169 | % if show_downloads: |
|
169 | % if show_downloads: | |
170 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
170 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
171 | <div class="left-label-summary"> |
|
171 | <div class="left-label-summary"> | |
172 | <p>${_('Downloads')}</p> |
|
172 | <p>${_('Downloads')}</p> | |
173 |
|
173 | |||
174 | <div class="right-label-summary input ${summary(c.show_stats)} downloads"> |
|
174 | <div class="right-label-summary input ${summary(c.show_stats)} downloads"> | |
175 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: |
|
175 | % if c.rhodecode_repo and len(c.rhodecode_repo.commit_ids) == 0: | |
176 | <span class="disabled"> |
|
176 | <span class="disabled"> | |
177 | ${_('There are no downloads yet')} |
|
177 | ${_('There are no downloads yet')} | |
178 | </span> |
|
178 | </span> | |
179 | % elif not c.enable_downloads: |
|
179 | % elif not c.enable_downloads: | |
180 | <span class="disabled"> |
|
180 | <span class="disabled"> | |
181 | ${_('Downloads are disabled for this repository')}. |
|
181 | ${_('Downloads are disabled for this repository')}. | |
182 | </span> |
|
182 | </span> | |
183 | % if c.is_super_admin: |
|
183 | % if c.is_super_admin: | |
184 | ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} |
|
184 | ${h.link_to(_('Enable downloads'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_downloads'))} | |
185 | % endif |
|
185 | % endif | |
186 | % else: |
|
186 | % else: | |
187 | <div class="enabled pull-left" style="margin-right: 10px"> |
|
187 | <div class="enabled pull-left" style="margin-right: 10px"> | |
188 |
|
188 | |||
189 | <div class="btn-group btn-group-actions"> |
|
189 | <div class="btn-group btn-group-actions"> | |
190 | <a class="archive_link btn btn-small" data-ext=".zip" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+'.zip')}"> |
|
190 | <a class="archive_link btn btn-small" data-ext=".zip" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+'.zip')}"> | |
191 | <i class="icon-download"></i> |
|
191 | <i class="icon-download"></i> | |
192 | ${c.rhodecode_db_repo.landing_ref_name}.zip |
|
192 | ${c.rhodecode_db_repo.landing_ref_name}.zip | |
193 | ## replaced by some JS on select |
|
193 | ## replaced by some JS on select | |
194 | </a> |
|
194 | </a> | |
195 |
|
195 | |||
196 |
<a class="tooltip btn btn-primary |
|
196 | <a class="tooltip btn btn-primary btn-more-option" data-toggle="dropdown" aria-pressed="false" role="button" title="${_('more download options')}"> | |
197 | <i class="icon-down"></i> |
|
197 | <i class="icon-down"></i> | |
198 | </a> |
|
198 | </a> | |
199 |
|
199 | |||
200 | <div class="btn-action-switcher-container left-align"> |
|
200 | <div class="btn-action-switcher-container left-align"> | |
201 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px"> |
|
201 | <ul class="btn-action-switcher" role="menu" style="min-width: 200px"> | |
202 | % for a_type, content_type, extension in h.ARCHIVE_SPECS: |
|
202 | % for a_type, content_type, extension in h.ARCHIVE_SPECS: | |
203 | % if extension not in ['.zip']: |
|
203 | % if extension not in ['.zip']: | |
204 | <li> |
|
204 | <li> | |
205 |
|
205 | |||
206 | <a class="archive_link" data-ext="${extension}" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+extension)}"> |
|
206 | <a class="archive_link" data-ext="${extension}" href="${h.route_path('repo_archivefile',repo_name=c.rhodecode_db_repo.repo_name, fname=c.rhodecode_db_repo.landing_ref_name+extension)}"> | |
207 | <i class="icon-download"></i> |
|
207 | <i class="icon-download"></i> | |
208 | ${c.rhodecode_db_repo.landing_ref_name+extension} |
|
208 | ${c.rhodecode_db_repo.landing_ref_name+extension} | |
209 | </a> |
|
209 | </a> | |
210 | </li> |
|
210 | </li> | |
211 | % endif |
|
211 | % endif | |
212 | % endfor |
|
212 | % endfor | |
213 | </ul> |
|
213 | </ul> | |
214 | </div> |
|
214 | </div> | |
215 | </div> |
|
215 | </div> | |
216 |
|
216 | |||
217 | </div> |
|
217 | </div> | |
218 | ${h.hidden('download_options')} |
|
218 | ${h.hidden('download_options')} | |
219 | % endif |
|
219 | % endif | |
220 | </div> |
|
220 | </div> | |
221 | </div> |
|
221 | </div> | |
222 | </div> |
|
222 | </div> | |
223 | % endif |
|
223 | % endif | |
224 |
|
224 | |||
225 | ## Repo size |
|
225 | ## Repo size | |
226 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
226 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
227 | <div class="left-label-summary"> |
|
227 | <div class="left-label-summary"> | |
228 | <p>${_('Repository size')}</p> |
|
228 | <p>${_('Repository size')}</p> | |
229 |
|
229 | |||
230 | <div class="right-label-summary"> |
|
230 | <div class="right-label-summary"> | |
231 | <div class="tags"> |
|
231 | <div class="tags"> | |
232 | ## repo size |
|
232 | ## repo size | |
233 | % if commit_rev == -1: |
|
233 | % if commit_rev == -1: | |
234 | <span class="stats-bullet">0 B</span> |
|
234 | <span class="stats-bullet">0 B</span> | |
235 | % else: |
|
235 | % else: | |
236 | <span> |
|
236 | <span> | |
237 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> |
|
237 | <a href="#showSize" onclick="calculateSize(); $(this).hide(); return false" id="show-repo-size">Show repository size</a> | |
238 | </span> |
|
238 | </span> | |
239 | <span class="stats-bullet" id="repo_size_container" style="display:none"> |
|
239 | <span class="stats-bullet" id="repo_size_container" style="display:none"> | |
240 | ${_('Calculating Repository Size...')} |
|
240 | ${_('Calculating Repository Size...')} | |
241 | </span> |
|
241 | </span> | |
242 | % endif |
|
242 | % endif | |
243 | </div> |
|
243 | </div> | |
244 | </div> |
|
244 | </div> | |
245 | </div> |
|
245 | </div> | |
246 | </div> |
|
246 | </div> | |
247 |
|
247 | |||
248 | ## Statistics |
|
248 | ## Statistics | |
249 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
249 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
250 | <div class="left-label-summary"> |
|
250 | <div class="left-label-summary"> | |
251 | <p>${_('Code Statistics')}</p> |
|
251 | <p>${_('Code Statistics')}</p> | |
252 |
|
252 | |||
253 | <div class="right-label-summary input ${summary(c.show_stats)} statistics"> |
|
253 | <div class="right-label-summary input ${summary(c.show_stats)} statistics"> | |
254 | % if c.show_stats: |
|
254 | % if c.show_stats: | |
255 | <div id="lang_stats" class="enabled"> |
|
255 | <div id="lang_stats" class="enabled"> | |
256 | <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a> |
|
256 | <a href="#showSize" onclick="calculateSize(); $('#show-repo-size').hide(); $(this).hide(); return false" id="show-repo-size">Show code statistics</a> | |
257 | </div> |
|
257 | </div> | |
258 | % else: |
|
258 | % else: | |
259 | <span class="disabled"> |
|
259 | <span class="disabled"> | |
260 | ${_('Statistics are disabled for this repository')}. |
|
260 | ${_('Statistics are disabled for this repository')}. | |
261 | </span> |
|
261 | </span> | |
262 | % if c.is_super_admin: |
|
262 | % if c.is_super_admin: | |
263 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} |
|
263 | ${h.link_to(_('Enable statistics'),h.route_path('edit_repo',repo_name=c.repo_name, _anchor='repo_enable_statistics'))} | |
264 | % endif |
|
264 | % endif | |
265 | % endif |
|
265 | % endif | |
266 | </div> |
|
266 | </div> | |
267 |
|
267 | |||
268 | </div> |
|
268 | </div> | |
269 | </div> |
|
269 | </div> | |
270 |
|
270 | |||
271 |
|
271 | |||
272 | </div><!--end summary-detail--> |
|
272 | </div><!--end summary-detail--> | |
273 |
|
273 | |||
274 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> |
|
274 | <div id="summary_details_expand" class="btn-collapse" data-toggle="summary-details"> | |
275 | ${_('Show More')} |
|
275 | ${_('Show More')} | |
276 | </div> |
|
276 | </div> | |
277 | </%def> |
|
277 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now