Show More
@@ -1,424 +1,444 b'' | |||
|
1 | 1 | |
|
2 | 2 | |
|
3 | 3 | //BUTTONS |
|
4 | 4 | button, |
|
5 | 5 | .btn, |
|
6 | 6 | input[type="button"] { |
|
7 | 7 | -webkit-appearance: none; |
|
8 | 8 | display: inline-block; |
|
9 | 9 | margin: 0 @padding/3 0 0; |
|
10 | 10 | padding: @button-padding; |
|
11 | 11 | text-align: center; |
|
12 | 12 | font-size: @basefontsize; |
|
13 | 13 | line-height: 1em; |
|
14 | 14 | font-family: @text-light; |
|
15 | 15 | text-decoration: none; |
|
16 | 16 | text-shadow: none; |
|
17 | 17 | color: @grey2; |
|
18 | 18 | background-color: white; |
|
19 | 19 | background-image: none; |
|
20 | 20 | border: none; |
|
21 | 21 | .border ( @border-thickness-buttons, @grey5 ); |
|
22 | 22 | .border-radius (@border-radius); |
|
23 | 23 | cursor: pointer; |
|
24 | 24 | white-space: nowrap; |
|
25 | 25 | -webkit-transition: background .3s,color .3s; |
|
26 | 26 | -moz-transition: background .3s,color .3s; |
|
27 | 27 | -o-transition: background .3s,color .3s; |
|
28 | 28 | transition: background .3s,color .3s; |
|
29 | 29 | box-shadow: @button-shadow; |
|
30 | 30 | -webkit-box-shadow: @button-shadow; |
|
31 | 31 | |
|
32 | 32 | |
|
33 | 33 | |
|
34 | 34 | a { |
|
35 | 35 | display: block; |
|
36 | 36 | margin: 0; |
|
37 | 37 | padding: 0; |
|
38 | 38 | color: inherit; |
|
39 | 39 | text-decoration: none; |
|
40 | 40 | |
|
41 | 41 | &:hover { |
|
42 | 42 | text-decoration: none; |
|
43 | 43 | } |
|
44 | 44 | } |
|
45 | 45 | |
|
46 | 46 | &:focus, |
|
47 | 47 | &:active { |
|
48 | 48 | outline:none; |
|
49 | 49 | } |
|
50 | 50 | &:hover { |
|
51 | 51 | color: @rcdarkblue; |
|
52 | 52 | background-color: @white; |
|
53 | 53 | .border ( @border-thickness, @grey4 ); |
|
54 | 54 | } |
|
55 | 55 | |
|
56 | 56 | .icon-remove-sign { |
|
57 | 57 | display: none; |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | //disabled buttons |
|
61 | 61 | //last; overrides any other styles |
|
62 | 62 | &:disabled { |
|
63 | 63 | opacity: .7; |
|
64 | 64 | cursor: auto; |
|
65 | 65 | background-color: white; |
|
66 | 66 | color: @grey4; |
|
67 | 67 | text-shadow: none; |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | 70 | &.no-margin { |
|
71 | 71 | margin: 0 0 0 0; |
|
72 | 72 | } |
|
73 | 73 | |
|
74 | 74 | } |
|
75 | 75 | |
|
76 | 76 | |
|
77 | 77 | .btn-default { |
|
78 | 78 | border: @border-thickness solid @grey5; |
|
79 | 79 | background-image: none; |
|
80 | 80 | color: @grey2; |
|
81 | 81 | |
|
82 | 82 | a { |
|
83 | 83 | color: @grey2; |
|
84 | 84 | } |
|
85 | 85 | |
|
86 | 86 | &:hover, |
|
87 | 87 | &.active { |
|
88 | 88 | color: @rcdarkblue; |
|
89 | 89 | background-color: @white; |
|
90 | 90 | .border ( @border-thickness, @grey4 ); |
|
91 | 91 | |
|
92 | 92 | a { |
|
93 | 93 | color: @grey2; |
|
94 | 94 | } |
|
95 | 95 | } |
|
96 | 96 | &:disabled { |
|
97 | 97 | .border ( @border-thickness-buttons, @grey5 ); |
|
98 | 98 | background-color: transparent; |
|
99 | 99 | } |
|
100 | 100 | } |
|
101 | 101 | |
|
102 | 102 | .btn-primary, |
|
103 | 103 | .btn-small, /* TODO: anderson: remove .btn-small to not mix with the new btn-sm */ |
|
104 | 104 | .btn-success { |
|
105 | 105 | .border ( @border-thickness, @rcblue ); |
|
106 | 106 | background-color: @rcblue; |
|
107 | 107 | color: white; |
|
108 | 108 | |
|
109 | 109 | a { |
|
110 | 110 | color: white; |
|
111 | 111 | } |
|
112 | 112 | |
|
113 | 113 | &:hover, |
|
114 | 114 | &.active { |
|
115 | 115 | .border ( @border-thickness, @rcdarkblue ); |
|
116 | 116 | color: white; |
|
117 | 117 | background-color: @rcdarkblue; |
|
118 | 118 | |
|
119 | 119 | a { |
|
120 | 120 | color: white; |
|
121 | 121 | } |
|
122 | 122 | } |
|
123 | 123 | &:disabled { |
|
124 | 124 | background-color: @rcblue; |
|
125 | 125 | } |
|
126 | 126 | } |
|
127 | 127 | |
|
128 | 128 | .btn-secondary { |
|
129 | 129 | &:extend(.btn-default); |
|
130 | 130 | |
|
131 | 131 | background-color: white; |
|
132 | 132 | |
|
133 | 133 | &:focus { |
|
134 | 134 | outline: 0; |
|
135 | 135 | } |
|
136 | 136 | |
|
137 | 137 | &:hover { |
|
138 | 138 | &:extend(.btn-default:hover); |
|
139 | 139 | } |
|
140 | 140 | |
|
141 | 141 | &.btn-link { |
|
142 | 142 | &:extend(.btn-link); |
|
143 | 143 | color: @rcblue; |
|
144 | 144 | } |
|
145 | 145 | |
|
146 | 146 | &:disabled { |
|
147 | 147 | color: @rcblue; |
|
148 | 148 | background-color: white; |
|
149 | 149 | } |
|
150 | 150 | } |
|
151 | 151 | |
|
152 | 152 | .btn-warning, |
|
153 | 153 | .btn-danger, |
|
154 | 154 | .revoke_perm, |
|
155 | 155 | .btn-x, |
|
156 | 156 | .form .action_button.btn-x { |
|
157 | 157 | .border ( @border-thickness, @alert2 ); |
|
158 | 158 | background-color: white; |
|
159 | 159 | color: @alert2; |
|
160 | 160 | |
|
161 | 161 | a { |
|
162 | 162 | color: @alert2; |
|
163 | 163 | } |
|
164 | 164 | |
|
165 | 165 | &:hover, |
|
166 | 166 | &.active { |
|
167 | 167 | .border ( @border-thickness, @alert2 ); |
|
168 | 168 | color: white; |
|
169 | 169 | background-color: @alert2; |
|
170 | 170 | |
|
171 | 171 | a { |
|
172 | 172 | color: white; |
|
173 | 173 | } |
|
174 | 174 | } |
|
175 | 175 | |
|
176 | 176 | i { |
|
177 | 177 | display:none; |
|
178 | 178 | } |
|
179 | 179 | |
|
180 | 180 | &:disabled { |
|
181 | 181 | background-color: white; |
|
182 | 182 | color: @alert2; |
|
183 | 183 | } |
|
184 | 184 | } |
|
185 | 185 | |
|
186 | 186 | .btn-approved-status { |
|
187 | 187 | .border ( @border-thickness, @alert1 ); |
|
188 | 188 | background-color: white; |
|
189 | 189 | color: @alert1; |
|
190 | 190 | |
|
191 | 191 | } |
|
192 | 192 | |
|
193 | 193 | .btn-rejected-status { |
|
194 | 194 | .border ( @border-thickness, @alert2 ); |
|
195 | 195 | background-color: white; |
|
196 | 196 | color: @alert2; |
|
197 | 197 | } |
|
198 | 198 | |
|
199 | 199 | .btn-sm, |
|
200 | 200 | .btn-mini, |
|
201 | 201 | .field-sm .btn { |
|
202 | 202 | padding: @padding/3; |
|
203 | 203 | } |
|
204 | 204 | |
|
205 | 205 | .btn-xs { |
|
206 | 206 | padding: @padding/4; |
|
207 | 207 | } |
|
208 | 208 | |
|
209 | 209 | .btn-lg { |
|
210 | 210 | padding: @padding * 1.2; |
|
211 | 211 | } |
|
212 | 212 | |
|
213 | 213 | .btn-group { |
|
214 | 214 | display: inline-block; |
|
215 | 215 | .btn { |
|
216 | 216 | float: left; |
|
217 | 217 | margin: 0 0 0 -1px; |
|
218 | 218 | } |
|
219 | 219 | } |
|
220 | 220 | |
|
221 | 221 | .btn-link { |
|
222 | 222 | background: transparent; |
|
223 | 223 | border: none; |
|
224 | 224 | padding: 0; |
|
225 | 225 | color: @rcblue; |
|
226 | 226 | |
|
227 | 227 | &:hover { |
|
228 | 228 | background: transparent; |
|
229 | 229 | border: none; |
|
230 | 230 | color: @rcdarkblue; |
|
231 | 231 | } |
|
232 | 232 | |
|
233 | 233 | //disabled buttons |
|
234 | 234 | //last; overrides any other styles |
|
235 | 235 | &:disabled { |
|
236 | 236 | opacity: .7; |
|
237 | 237 | cursor: auto; |
|
238 | 238 | background-color: white; |
|
239 | 239 | color: @grey4; |
|
240 | 240 | text-shadow: none; |
|
241 | 241 | } |
|
242 | 242 | |
|
243 | 243 | // TODO: johbo: Check if we can avoid this, indicates that the structure |
|
244 | 244 | // is not yet good. |
|
245 | 245 | // lisa: The button CSS reflects the button HTML; both need a cleanup. |
|
246 | 246 | &.btn-danger { |
|
247 | 247 | color: @alert2; |
|
248 | 248 | |
|
249 | 249 | &:hover { |
|
250 | 250 | color: darken(@alert2,30%); |
|
251 | 251 | } |
|
252 | 252 | |
|
253 | 253 | &:disabled { |
|
254 | 254 | color: @alert2; |
|
255 | 255 | } |
|
256 | 256 | } |
|
257 | 257 | } |
|
258 | 258 | |
|
259 | 259 | .btn-social { |
|
260 | 260 | &:extend(.btn-default); |
|
261 | 261 | margin: 5px 5px 5px 0px; |
|
262 | 262 | min-width: 160px; |
|
263 | 263 | } |
|
264 | 264 | |
|
265 | 265 | // TODO: johbo: check these exceptions |
|
266 | 266 | |
|
267 | 267 | .links { |
|
268 | 268 | |
|
269 | 269 | .btn + .btn { |
|
270 | 270 | margin-top: @padding; |
|
271 | 271 | } |
|
272 | 272 | } |
|
273 | 273 | |
|
274 | 274 | |
|
275 | 275 | .action_button { |
|
276 | 276 | display:inline; |
|
277 | 277 | margin: 0; |
|
278 | 278 | padding: 0 1em 0 0; |
|
279 | 279 | font-size: inherit; |
|
280 | 280 | color: @rcblue; |
|
281 | 281 | border: none; |
|
282 | 282 | border-radius: 0; |
|
283 | 283 | background-color: transparent; |
|
284 | 284 | |
|
285 | 285 | &.last-item { |
|
286 | 286 | border: none; |
|
287 | 287 | padding: 0 0 0 0; |
|
288 | 288 | } |
|
289 | 289 | |
|
290 | 290 | &:last-child { |
|
291 | 291 | border: none; |
|
292 | 292 | padding: 0 0 0 0; |
|
293 | 293 | } |
|
294 | 294 | |
|
295 | 295 | &:hover { |
|
296 | 296 | color: @rcdarkblue; |
|
297 | 297 | background-color: transparent; |
|
298 | 298 | border: none; |
|
299 | 299 | } |
|
300 | 300 | } |
|
301 | 301 | .grid_delete { |
|
302 | 302 | .action_button { |
|
303 | 303 | border: none; |
|
304 | 304 | } |
|
305 | 305 | } |
|
306 | 306 | |
|
307 | 307 | |
|
308 | 308 | // TODO: johbo: Form button tweaks, check if we can use the classes instead |
|
309 | 309 | input[type="submit"] { |
|
310 | 310 | &:extend(.btn-primary); |
|
311 | 311 | |
|
312 | 312 | &:focus { |
|
313 | 313 | outline: 0; |
|
314 | 314 | } |
|
315 | 315 | |
|
316 | 316 | &:hover { |
|
317 | 317 | &:extend(.btn-primary:hover); |
|
318 | 318 | } |
|
319 | 319 | |
|
320 | 320 | &.btn-link { |
|
321 | 321 | &:extend(.btn-link); |
|
322 | 322 | color: @rcblue; |
|
323 | 323 | |
|
324 | 324 | &:disabled { |
|
325 | 325 | color: @rcblue; |
|
326 | 326 | background-color: transparent; |
|
327 | 327 | } |
|
328 | 328 | } |
|
329 | 329 | |
|
330 | 330 | &:disabled { |
|
331 | 331 | .border ( @border-thickness-buttons, @rcblue ); |
|
332 | 332 | background-color: @rcblue; |
|
333 | 333 | color: white; |
|
334 | 334 | opacity: 0.5; |
|
335 | 335 | } |
|
336 | 336 | } |
|
337 | 337 | |
|
338 | 338 | input[type="reset"] { |
|
339 | 339 | &:extend(.btn-default); |
|
340 | 340 | |
|
341 | 341 | // TODO: johbo: Check if this tweak can be avoided. |
|
342 | 342 | background: transparent; |
|
343 | 343 | |
|
344 | 344 | &:focus { |
|
345 | 345 | outline: 0; |
|
346 | 346 | } |
|
347 | 347 | |
|
348 | 348 | &:hover { |
|
349 | 349 | &:extend(.btn-default:hover); |
|
350 | 350 | } |
|
351 | 351 | |
|
352 | 352 | &.btn-link { |
|
353 | 353 | &:extend(.btn-link); |
|
354 | 354 | color: @rcblue; |
|
355 | 355 | |
|
356 | 356 | &:disabled { |
|
357 | 357 | border: none; |
|
358 | 358 | } |
|
359 | 359 | } |
|
360 | 360 | |
|
361 | 361 | &:disabled { |
|
362 | 362 | .border ( @border-thickness-buttons, @rcblue ); |
|
363 | 363 | background-color: white; |
|
364 | 364 | color: @rcblue; |
|
365 | 365 | } |
|
366 | 366 | } |
|
367 | 367 | |
|
368 | 368 | input[type="submit"], |
|
369 | 369 | input[type="reset"] { |
|
370 | 370 | &.btn-danger { |
|
371 | 371 | &:extend(.btn-danger); |
|
372 | 372 | |
|
373 | 373 | &:focus { |
|
374 | 374 | outline: 0; |
|
375 | 375 | } |
|
376 | 376 | |
|
377 | 377 | &:hover { |
|
378 | 378 | &:extend(.btn-danger:hover); |
|
379 | 379 | } |
|
380 | 380 | |
|
381 | 381 | &.btn-link { |
|
382 | 382 | &:extend(.btn-link); |
|
383 | 383 | color: @alert2; |
|
384 | 384 | |
|
385 | 385 | &:hover { |
|
386 | 386 | color: darken(@alert2,30%); |
|
387 | 387 | } |
|
388 | 388 | } |
|
389 | 389 | |
|
390 | 390 | &:disabled { |
|
391 | 391 | color: @alert2; |
|
392 | 392 | background-color: white; |
|
393 | 393 | } |
|
394 | 394 | } |
|
395 | 395 | &.btn-danger-action { |
|
396 | 396 | .border ( @border-thickness, @alert2 ); |
|
397 | 397 | background-color: @alert2; |
|
398 | 398 | color: white; |
|
399 | 399 | |
|
400 | 400 | a { |
|
401 | 401 | color: white; |
|
402 | 402 | } |
|
403 | 403 | |
|
404 | 404 | &:hover { |
|
405 | 405 | background-color: darken(@alert2,20%); |
|
406 | 406 | } |
|
407 | 407 | |
|
408 | 408 | &.active { |
|
409 | 409 | .border ( @border-thickness, @alert2 ); |
|
410 | 410 | color: white; |
|
411 | 411 | background-color: @alert2; |
|
412 | 412 | |
|
413 | 413 | a { |
|
414 | 414 | color: white; |
|
415 | 415 | } |
|
416 | 416 | } |
|
417 | 417 | |
|
418 | 418 | &:disabled { |
|
419 | 419 | background-color: white; |
|
420 | 420 | color: @alert2; |
|
421 | 421 | } |
|
422 | 422 | } |
|
423 | 423 | } |
|
424 | 424 | |
|
425 | ||
|
426 | .button-links { | |
|
427 | float: left; | |
|
428 | display: inline; | |
|
429 | margin: 0; | |
|
430 | padding-left: 0; | |
|
431 | list-style: none; | |
|
432 | text-align: right; | |
|
433 | ||
|
434 | li { | |
|
435 | ||
|
436 | ||
|
437 | } | |
|
438 | ||
|
439 | li.active { | |
|
440 | background-color: @grey6; | |
|
441 | .border ( @border-thickness, @grey4 ); | |
|
442 | } | |
|
443 | ||
|
444 | } |
@@ -1,142 +1,142 b'' | |||
|
1 | 1 | <%inherit file="/base/base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <%def name="title()"> |
|
4 | 4 | ${_('%s Pull Requests') % c.repo_name} |
|
5 | 5 | %if c.rhodecode_name: |
|
6 | 6 | · ${h.branding(c.rhodecode_name)} |
|
7 | 7 | %endif |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | <%def name="breadcrumbs_links()"></%def> |
|
11 | 11 | |
|
12 | 12 | <%def name="menu_bar_nav()"> |
|
13 | 13 | ${self.menu_items(active='repositories')} |
|
14 | 14 | </%def> |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | <%def name="menu_bar_subnav()"> |
|
18 | 18 | ${self.repo_menu(active='showpullrequest')} |
|
19 | 19 | </%def> |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | <%def name="main()"> |
|
23 | <style> | |
|
24 | ||
|
25 | </style> | |
|
26 | ||
|
23 | 27 | <div class="box"> |
|
24 | <div class="title"> | |
|
25 |
|
|
|
28 | <div class="title"> | |
|
29 | <ul class="button-links"> | |
|
30 | <li class="btn ${('active' if c.active=='open' else '')}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0})}">${_('Opened')}</a></li> | |
|
31 | <li class="btn ${('active' if c.active=='my' else '')}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'my':1})}">${_('Opened by me')}</a></li> | |
|
32 | <li class="btn ${('active' if c.active=='awaiting' else '')}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_review':1})}">${_('Awaiting review')}</a></li> | |
|
33 | <li class="btn ${('active' if c.active=='awaiting_my' else '')}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_my_review':1})}">${_('Awaiting my review')}</a></li> | |
|
34 | <li class="btn ${('active' if c.active=='closed' else '')}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'closed':1})}">${_('Closed')}</a></li> | |
|
35 | <li class="btn ${('active' if c.active=='source' else '')}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':1})}">${_('From this repo')}</a></li> | |
|
36 | </ul> | |
|
37 | ||
|
38 | <ul class="links"> | |
|
39 | % if c.rhodecode_user.username != h.DEFAULT_USER: | |
|
26 | 40 | <li> |
|
27 | %if c.rhodecode_user.username != h.DEFAULT_USER: | |
|
28 | 41 | <span> |
|
29 | 42 | <a id="open_new_pull_request" class="btn btn-small btn-success" href="${h.route_path('pullrequest_new',repo_name=c.repo_name)}"> |
|
30 | 43 | ${_('Open new Pull Request')} |
|
31 | 44 | </a> |
|
32 | 45 | </span> |
|
33 | %endif | |
|
34 | 46 | </li> |
|
35 | </ul> | |
|
47 | % endif | |
|
48 | </ul> | |
|
36 | 49 | |
|
37 | 50 | ${self.breadcrumbs()} |
|
38 | </div> | |
|
39 | ||
|
40 | <div class="sidebar-col-wrapper"> | |
|
41 | ##main | |
|
42 | <div class="sidebar"> | |
|
43 | <ul class="nav nav-pills nav-stacked"> | |
|
44 | <li class="${'active' if c.active=='open' else ''}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0})}">${_('Opened')}</a></li> | |
|
45 | <li class="${'active' if c.active=='my' else ''}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'my':1})}">${_('Opened by me')}</a></li> | |
|
46 | <li class="${'active' if c.active=='awaiting' else ''}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_review':1})}">${_('Awaiting review')}</a></li> | |
|
47 | <li class="${'active' if c.active=='awaiting_my' else ''}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'awaiting_my_review':1})}">${_('Awaiting my review')}</a></li> | |
|
48 | <li class="${'active' if c.active=='closed' else ''}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':0,'closed':1})}">${_('Closed')}</a></li> | |
|
49 | <li class="${'active' if c.active=='source' else ''}"><a href="${h.route_path('pullrequest_show_all',repo_name=c.repo_name, _query={'source':1})}">${_('From this repo')}</a></li> | |
|
50 | </ul> | |
|
51 | 51 | </div> |
|
52 | 52 | |
|
53 | 53 | <div class="main-content-full-width"> |
|
54 | 54 | <div class="panel panel-default"> |
|
55 | 55 | <div class="panel-heading"> |
|
56 | 56 | <h3 class="panel-title"> |
|
57 | 57 | %if c.source: |
|
58 | 58 | ${_('Pull Requests from %(repo_name)s repository') % {'repo_name': c.repo_name}} |
|
59 | 59 | %elif c.closed: |
|
60 | 60 | ${_('Closed Pull Requests to repository %(repo_name)s') % {'repo_name': c.repo_name}} |
|
61 | 61 | %elif c.my: |
|
62 | 62 | ${_('Pull Requests to %(repo_name)s repository opened by me') % {'repo_name': c.repo_name}} |
|
63 | 63 | %elif c.awaiting_review: |
|
64 | 64 | ${_('Pull Requests to %(repo_name)s repository awaiting review') % {'repo_name': c.repo_name}} |
|
65 | 65 | %elif c.awaiting_my_review: |
|
66 | 66 | ${_('Pull Requests to %(repo_name)s repository awaiting my review') % {'repo_name': c.repo_name}} |
|
67 | 67 | %else: |
|
68 | 68 | ${_('Pull Requests to %(repo_name)s repository') % {'repo_name': c.repo_name}} |
|
69 | 69 | %endif |
|
70 | 70 | </h3> |
|
71 | 71 | </div> |
|
72 | 72 | <div class="panel-body panel-body-min-height"> |
|
73 | 73 | <table id="pull_request_list_table" class="display"></table> |
|
74 | 74 | </div> |
|
75 | 75 | </div> |
|
76 | 76 | </div> |
|
77 | </div> | |
|
77 | ||
|
78 | 78 | </div> |
|
79 | 79 | |
|
80 | 80 | <script type="text/javascript"> |
|
81 | 81 | $(document).ready(function() { |
|
82 | 82 | |
|
83 | 83 | var $pullRequestListTable = $('#pull_request_list_table'); |
|
84 | 84 | |
|
85 | 85 | // object list |
|
86 | 86 | $pullRequestListTable.DataTable({ |
|
87 | 87 | processing: true, |
|
88 | 88 | serverSide: true, |
|
89 | 89 | ajax: { |
|
90 | 90 | "url": "${h.route_path('pullrequest_show_all_data', repo_name=c.repo_name)}", |
|
91 | 91 | "data": function (d) { |
|
92 | 92 | d.source = "${c.source}"; |
|
93 | 93 | d.closed = "${c.closed}"; |
|
94 | 94 | d.my = "${c.my}"; |
|
95 | 95 | d.awaiting_review = "${c.awaiting_review}"; |
|
96 | 96 | d.awaiting_my_review = "${c.awaiting_my_review}"; |
|
97 | 97 | } |
|
98 | 98 | }, |
|
99 | 99 | dom: 'rtp', |
|
100 | 100 | pageLength: ${c.visual.dashboard_items}, |
|
101 | 101 | order: [[ 1, "desc" ]], |
|
102 | 102 | columns: [ |
|
103 | 103 | { data: {"_": "status", |
|
104 | 104 | "sort": "status"}, title: "", className: "td-status", orderable: false}, |
|
105 | 105 | { data: {"_": "name", |
|
106 | 106 | "sort": "name_raw"}, title: "${_('Name')}", className: "td-componentname", "type": "num" }, |
|
107 | 107 | { data: {"_": "author", |
|
108 | 108 | "sort": "author_raw"}, title: "${_('Author')}", className: "td-user", orderable: false }, |
|
109 | 109 | { data: {"_": "title", |
|
110 | 110 | "sort": "title"}, title: "${_('Title')}", className: "td-description" }, |
|
111 | 111 | { data: {"_": "comments", |
|
112 | 112 | "sort": "comments_raw"}, title: "", className: "td-comments", orderable: false}, |
|
113 | 113 | { data: {"_": "updated_on", |
|
114 | 114 | "sort": "updated_on_raw"}, title: "${_('Last Update')}", className: "td-time" } |
|
115 | 115 | ], |
|
116 | 116 | language: { |
|
117 | 117 | paginate: DEFAULT_GRID_PAGINATION, |
|
118 | 118 | sProcessing: _gettext('loading...'), |
|
119 | 119 | emptyTable: _gettext("No pull requests available yet.") |
|
120 | 120 | }, |
|
121 | 121 | "drawCallback": function( settings, json ) { |
|
122 | 122 | timeagoActivate(); |
|
123 | 123 | }, |
|
124 | 124 | "createdRow": function ( row, data, index ) { |
|
125 | 125 | if (data['closed']) { |
|
126 | 126 | $(row).addClass('closed'); |
|
127 | 127 | } |
|
128 | 128 | } |
|
129 | 129 | }); |
|
130 | 130 | |
|
131 | 131 | $pullRequestListTable.on('xhr.dt', function(e, settings, json, xhr){ |
|
132 | 132 | $pullRequestListTable.css('opacity', 1); |
|
133 | 133 | }); |
|
134 | 134 | |
|
135 | 135 | $pullRequestListTable.on('preXhr.dt', function(e, settings, data){ |
|
136 | 136 | $pullRequestListTable.css('opacity', 0.3); |
|
137 | 137 | }); |
|
138 | 138 | |
|
139 | 139 | }); |
|
140 | 140 | |
|
141 | 141 | </script> |
|
142 | 142 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now