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