##// END OF EJS Templates
datagrid: fix some styling and processing text.
marcink -
r1541:5bd4fc3b default
parent child Browse files
Show More
@@ -1,628 +1,642 b''
1 1 // navigation.less
2 2 // For use in RhodeCode applications;
3 3 // see style guide documentation for guidelines.
4 4
5 5 // HEADER NAVIGATION
6 6
7 7 .horizontal-list {
8 8 float: right;
9 9 display: block;
10 10 margin: 0;
11 11 padding: 0;
12 12 -webkit-padding-start: 0;
13 13 text-align: left;
14 14 font-size: @navigation-fontsize;
15 15 color: @grey6;
16 16 z-index:10;
17 17
18 18 li {
19 19 line-height: 1em;
20 20 list-style-type: none;
21 21
22 22 a {
23 23 padding: 0 .5em;
24 24
25 25 &.menu_link_notifications {
26 26 .pill(7px,@rcblue);
27 27 display: inline;
28 28 margin: 0 7px 0 .7em;
29 29 font-size: @basefontsize;
30 30 color: white;
31 31
32 32 &.empty {
33 33 background-color: @grey4;
34 34 }
35 35
36 36 &:hover {
37 37 background-color: @rcdarkblue;
38 38 }
39 39 }
40 40 }
41 41 .pill_container {
42 42 margin: 1.25em 0px 0px 0px;
43 43 float: right;
44 44 }
45 45
46 46 &#quick_login_li {
47 47 &:hover {
48 48 color: @grey5;
49 49 }
50 50
51 51 a.menu_link_notifications {
52 52 color: white;
53 53 }
54 54
55 55 .user {
56 56 padding-bottom: 10px;
57 57 }
58 58
59 59 &.open {
60 60 .user {
61 61 border-bottom: 5px solid @rcblue;
62 62 }
63 63 }
64 64 }
65 65
66 66 &:before { content: none; }
67 67
68 68 &:last-child {
69 69 .menulabel {
70 70 padding-right: 0;
71 71 border-right: none;
72 72
73 73 .show_more {
74 74 padding-right: 0;
75 75 }
76 76 }
77 77
78 78 &> a {
79 79 border-bottom: none;
80 80 }
81 81 }
82 82
83 83 &.active {
84 84 border-bottom: 5px solid @rcblue;
85 85 }
86 86
87 87 &.open {
88 88
89 89 a {
90 90 color: white;
91 91 }
92 92 }
93 93
94 94 &:focus {
95 95 outline: none;
96 96 }
97 97
98 98 ul li {
99 99 display: block;
100 100
101 101 &:last-child> a {
102 102 border-bottom: none;
103 103 }
104 104
105 105 ul li:last-child a {
106 106 /* we don't expect more then 3 levels of submenu and the third
107 107 level can have different html structure */
108 108 border-bottom: none;
109 109 }
110 110 }
111 111 }
112 112
113 113 > li {
114 114 float: left;
115 115 display: block;
116 116 padding: 0;
117 117
118 118 > a,
119 119 &.has_select2 a {
120 120 display: block;
121 121 padding: 10px 0 2px;
122 122
123 123 .show_more {
124 124 margin-top: -4px;
125 125 padding-right: .5em;
126 126 }
127 127 }
128 128
129 129 .menulabel {
130 130 padding: 0 .5em;
131 131 line-height: 1em;
132 132 // for this specifically we do not use a variable
133 133 border-right: 1px solid @grey4;
134 134 }
135 135
136 136 .pr_notifications {
137 137 padding-left: .5em;
138 138 }
139 139
140 140 .pr_notifications + .menulabel {
141 141 display:inline;
142 142 padding-left: 0;
143 143 }
144 144
145 145 &:hover,
146 146 &.open,
147 147 &.active {
148 148 a {
149 149 color: @grey1;
150 150 }
151 151 }
152 152 }
153 153
154 154 pre {
155 155 margin: 0;
156 156 padding: 0;
157 157 }
158 158
159 159 .select2-container,
160 160 .menulink.childs {
161 161 position: relative;
162 162 }
163 163
164 164 #quick_login {
165 165
166 166 li a {
167 167 padding: .5em 0;
168 168 border-bottom: none;
169 169 color: @grey2;
170 170
171 171 &:hover { color: @grey1; }
172 172 }
173 173
174 174 .show_more {
175 175 padding-left: .5em;
176 176 }
177 177 }
178 178
179 179 #quick_login_link {
180 180 display: inline-block;
181 181
182 182 .gravatar {
183 183 border: 1px solid @grey2;
184 184 }
185 185
186 186 .gravatar-login {
187 187 height: 20px;
188 188 width: 20px;
189 189 margin: -8px 0;
190 190 padding: 0;
191 191 }
192 192
193 193 &:hover .user {
194 194 color: @grey6;
195 195 }
196 196 }
197 197 }
198 198 .header .horizontal-list {
199 199
200 200 li {
201 201
202 202 &#quick_login_li {
203 203 padding-left: .5em;
204 204
205 205 &:hover #quick_login_link {
206 206 color: inherit;
207 207 }
208 208 }
209 209
210 210 &:before { content: none; }
211 211 }
212 212
213 213 > li {
214 214
215 215 a {
216 216 padding: 18px 0 12px 0;
217 217 color: @nav-grey;
218 218
219 219 &.menu_link_notifications {
220 220 padding: 1px 8px;
221 221 }
222 222 }
223 223
224 224 &:hover,
225 225 &.open,
226 226 &.active {
227 227 .pill_container a {
228 228 // don't select text for the pill container, it has it' own
229 229 // hover behaviour
230 230 color: @nav-grey;
231 231 }
232 232 }
233 233
234 234 &:hover,
235 235 &.open,
236 236 &.active {
237 237 a {
238 238 color: @grey6;
239 239 }
240 240 }
241 241
242 242 .select2-dropdown-open a {
243 243 color: @grey6;
244 244 }
245 245
246 246 .repo-switcher {
247 247 padding-left: 0;
248 248
249 249 .menulabel {
250 250 padding-left: 0;
251 251 }
252 252 }
253 253 }
254 254
255 255 li ul li {
256 256 background-color:@grey2;
257 257
258 258 a {
259 259 padding: .5em 0;
260 260 border-bottom: @border-thickness solid @border-default-color;
261 261 color: @grey6;
262 262 }
263 263
264 264 &:last-child a, &.last a{
265 265 border-bottom: none;
266 266 }
267 267
268 268 &:hover {
269 269 background-color: @grey3;
270 270 }
271 271 }
272 272
273 273 .submenu {
274 274 margin-top: 5px;
275 275 }
276 276 }
277 277
278 278 // SUBMENUS
279 279 .navigation .submenu {
280 280 display: none;
281 281 }
282 282
283 283 .navigation li.open {
284 284
285 285 .submenu,
286 286 .repo_switcher {
287 287 display: block;
288 288 }
289 289 }
290 290
291 291 .navigation li:last-child .submenu {
292 292 right: -20px;
293 293 left: auto;
294 294 }
295 295
296 296 .submenu {
297 297 position: absolute;
298 298 top: 100%;
299 299 left: 0;
300 300 min-width: 150px;
301 301 margin: 6px 0 0;
302 302 padding: 0;
303 303 text-align: left;
304 304 font-family: @text-light;
305 305 border-radius: @border-radius;
306 306 z-index: 20;
307 307
308 308 li {
309 309 display: block;
310 310 margin: 0;
311 311 padding: 0 .5em;
312 312 line-height: 1em;
313 313 color: @grey3;
314 314 background-color: @grey6;
315 315
316 316 &:before { content: none; }
317 317
318 318 a {
319 319 display: block;
320 320 width: 100%;
321 321 padding: .5em 0;
322 322 border-right: none;
323 323 border-bottom: @border-thickness solid white;
324 324 color: @grey3;
325 325 }
326 326
327 327 ul {
328 328 display: none;
329 329 position: absolute;
330 330 top: 0;
331 331 right: 100%;
332 332 padding: 0;
333 333 z-index: 30;
334 334 }
335 335 &:hover {
336 336 background-color: @grey5;
337 337 -webkit-transition: background .3s;
338 338 -moz-transition: background .3s;
339 339 -o-transition: background .3s;
340 340 transition: background .3s;
341 341
342 342 ul {
343 343 display: block;
344 344 }
345 345 }
346 346 }
347 347 }
348 348
349 349
350 350
351 351
352 352 // repo dropdown
353 353 .quick_repo_menu {
354 354 width: 15px;
355 355 text-align: center;
356 356 position: relative;
357 357 cursor: pointer;
358 358
359 359 div {
360 360 overflow: visible !important;
361 361 }
362 362
363 363 &.sorting {
364 364 cursor: auto;
365 365 }
366 366
367 367 &:hover {
368 368 .menu_items_container {
369 369 position: absolute;
370 370 display: block;
371 371 }
372 372 .menu_items {
373 373 display: block;
374 374 }
375 375 }
376 376
377 377 i {
378 378 margin: 0;
379 379 color: @grey4;
380 380 }
381 381
382 382 .menu_items_container {
383 383 position: absolute;
384 384 top: 0;
385 385 left: 100%;
386 386 margin: 0;
387 387 padding: 0;
388 388 list-style: none;
389 389 background-color: @grey6;
390 390 z-index: 999;
391 391 text-align: left;
392 392
393 393 a {
394 394 color: @grey2;
395 395 }
396 396
397 397 ul.menu_items {
398 398 margin: 0;
399 399 padding: 0;
400 400 }
401 401
402 402 li {
403 403 margin: 0;
404 404 padding: 0;
405 405 line-height: 1em;
406 406 list-style-type: none;
407 407
408 408 &:before { content: none; }
409 409
410 410 a {
411 411 display: block;
412 412 height: 16px;
413 413 padding: 8px; //must add up to td height (28px)
414 414
415 415 &:hover {
416 416 background-color: @grey5;
417 417 -webkit-transition: background .3s;
418 418 -moz-transition: background .3s;
419 419 -o-transition: background .3s;
420 420 transition: background .3s;
421 421 }
422 422 }
423 423 }
424 424 }
425 425 }
426 426
427 427 // Header Repository Switcher
428 428 // Select2 Dropdown
429 429 #select2-drop.select2-drop.repo-switcher-dropdown {
430 430 width: auto !important;
431 431 margin-top: 5px;
432 432 padding: 1em 0;
433 433 text-align: left;
434 434 .border-radius-bottom(@border-radius);
435 435 border-color: transparent;
436 436 color: @grey6;
437 437 background-color: @grey2;
438 438
439 439 input {
440 440 min-width: 90%;
441 441 }
442 442
443 443 ul.select2-result-sub {
444 444
445 445 li {
446 446 line-height: 1em;
447 447
448 448 &:hover,
449 449 &.select2-highlighted {
450 450 background-color: @grey3;
451 451 }
452 452 }
453 453
454 454 &:before { content: none; }
455 455 }
456 456
457 457 ul.select2-results {
458 458 min-width: 200px;
459 459 margin: 0;
460 460 padding: 0;
461 461 list-style-type: none;
462 462 overflow-x: visible;
463 463 overflow-y: scroll;
464 464
465 465 li {
466 466 padding: 0 8px;
467 467 line-height: 1em;
468 468 color: @grey6;
469 469
470 470 &:before { content: none; }
471 471
472 472 &>.select2-result-label {
473 473 padding: 8px 0;
474 474 border-bottom: @border-thickness solid @grey3;
475 475 white-space: nowrap;
476 476 color: @grey5;
477 477 cursor: pointer;
478 478 }
479 479
480 480 &.select2-result-with-children {
481 481 margin: 0;
482 482 padding: 0;
483 483 }
484 484
485 485 &.select2-result-unselectable > .select2-result-label {
486 486 margin: 0 8px;
487 487 }
488 488
489 489 }
490 490 }
491 491
492 492 ul.select2-result-sub {
493 493 margin: 0;
494 494 padding: 0;
495 495
496 496 li {
497 497 display: block;
498 498 margin: 0;
499 499 border-right: none;
500 500 line-height: 1em;
501 501 font-family: @text-light;
502 502 color: @grey2;
503 503
504 504 &:before { content: none; }
505 505
506 506 &:hover {
507 507 background-color: @grey3;
508 508 }
509 509 }
510 510 }
511 511 }
512 512
513 513
514 514 #context-bar {
515 515 display: block;
516 516 margin: 0 auto;
517 517 padding: 0 @header-padding;
518 518 background-color: @grey6;
519 519 border-bottom: @border-thickness solid @grey5;
520 520
521 521 .clear {
522 522 clear: both;
523 523 }
524 524 }
525 525
526 526 ul#context-pages {
527 527 li {
528 528 line-height: 1em;
529 529
530 530 &:before { content: none; }
531 531
532 532 a {
533 533 color: @grey3;
534 534 }
535 535
536 536 &.active {
537 537 // special case, non-variable color
538 538 border-bottom: 4px solid @nav-grey;
539 539
540 540 a {
541 541 color: @grey1;
542 542 }
543 543 }
544 544 }
545 545 }
546 546
547 547 // PAGINATION
548 548
549 549 .pagination {
550 550 border: @border-thickness solid @rcblue;
551 551 color: @rcblue;
552 552
553 553 .current {
554 554 color: @grey4;
555 555 }
556 556 }
557 557
558 .dataTables_processing {
559 text-align: center;
560 font-size: 1.1em;
561 }
562
558 563 .dataTables_paginate, .pagination-wh {
559 564 text-align: left;
560 565 display: inline-block;
561 566 border-left: 1px solid @rcblue;
562 567 float: none;
563 568 overflow: hidden;
564 569
565 570 .paginate_button, .pager_curpage,
566 571 .pager_link, .pg-previous, .pg-next, .pager_dotdot {
567 572 display: inline-block;
568 573 padding: @menupadding/4 @menupadding;
569 574 border: 1px solid @rcblue;
570 575 border-left: 0;
571 576 color: @rcblue;
572 577 cursor: pointer;
573 578 float: left;
574 579 }
575 580
576 581 .pager_curpage, .pager_dotdot,
577 582 .paginate_button.current, .paginate_button.disabled,
578 583 .disabled {
579 584 color: @grey3;
580 585 cursor: default;
581 586 }
587
588 .ellipsis {
589 display: inline-block;
590 text-align: left;
591 padding: @menupadding/4 @menupadding;
592 border: 1px solid @rcblue;
593 border-left: 0;
594 float: left;
595 }
582 596 }
583 597
584 598 // SIDEBAR
585 599
586 600 .sidebar {
587 601 .block-left;
588 602 clear: left;
589 603 max-width: @sidebar-width;
590 604 margin-right: @sidebarpadding;
591 605 padding-right: @sidebarpadding;
592 606 font-family: @text-regular;
593 607 color: @grey1;
594 608
595 609 &#graph_nodes {
596 610 clear:both;
597 611 width: auto;
598 612 margin-left: -100px;
599 613 padding: 0;
600 614 border: none;
601 615 }
602 616
603 617 .nav-pills {
604 618 margin: 0;
605 619 }
606 620
607 621 .nav {
608 622 list-style: none;
609 623 padding: 0;
610 624
611 625 li {
612 626 padding-bottom: @menupadding;
613 627 line-height: 1em;
614 628 color: @grey4;
615 629
616 630 &.active a {
617 631 color: @grey2;
618 632 }
619 633
620 634 a {
621 635 color: @grey4;
622 636 }
623 637
624 638 &:before { content: none; }
625 639 }
626 640
627 641 }
628 642 }
@@ -1,117 +1,119 b''
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="/base/base.mako"/>
3 3
4 4 <%def name="title()">
5 5 ${_('Users administration')}
6 6 %if c.rhodecode_name:
7 7 &middot; ${h.branding(c.rhodecode_name)}
8 8 %endif
9 9 </%def>
10 10
11 11 <%def name="breadcrumbs_links()">
12 12 <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
13 13 ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span>
14 14 </%def>
15 15
16 16 <%def name="menu_bar_nav()">
17 17 ${self.menu_items(active='admin')}
18 18 </%def>
19 19
20 20 <%def name="main()">
21
21 22 <div class="box">
22 23
23 24 <div class="title">
24 25 ${self.breadcrumbs()}
25 26 <ul class="links">
26 27 <li>
27 28 <a href="${h.url('new_user')}" class="btn btn-small btn-success">${_(u'Add User')}</a>
28 29 </li>
29 30 </ul>
30 31 </div>
31 32
32 33 <div id="repos_list_wrap">
33 34 <table id="user_list_table" class="display"></table>
34 35 </div>
35 36 </div>
36 37
37 38 <script type="text/javascript">
38 39
39 40 $(document).ready(function() {
40 41
41 42 var getDatatableCount = function(){
42 43 var table = $('#user_list_table').dataTable();
43 44 var page = table.api().page.info();
44 45 var active = page.recordsDisplay;
45 46 var total = page.recordsTotal;
46 47
47 48 var _text = _gettext("{0} out of {1} users").format(active, total);
48 49 $('#user_count').text(_text);
49 50 };
50 51
51 52 // user list
52 53 $('#user_list_table').DataTable({
53 processing: false,
54 processing: true,
54 55 serverSide: true,
55 56 ajax: "${h.route_path('users_data')}",
56 57 dom: 'rtp',
57 58 pageLength: ${c.visual.admin_grid_items},
58 59 order: [[ 0, "asc" ]],
59 60 columns: [
60 61 { data: {"_": "username",
61 62 "sort": "username"}, title: "${_('Username')}", className: "td-user" },
62 63 { data: {"_": "email",
63 64 "sort": "email"}, title: "${_('Email')}", className: "td-email" },
64 65 { data: {"_": "first_name",
65 66 "sort": "first_name"}, title: "${_('First Name')}", className: "td-user" },
66 67 { data: {"_": "last_name",
67 68 "sort": "last_name"}, title: "${_('Last Name')}", className: "td-user" },
68 69 { data: {"_": "last_activity",
69 70 "sort": "last_activity",
70 71 "type": Number}, title: "${_('Last activity')}", className: "td-time", orderable: false },
71 72 { data: {"_": "active",
72 73 "sort": "active"}, title: "${_('Active')}", className: "td-active" },
73 74 { data: {"_": "admin",
74 75 "sort": "admin"}, title: "${_('Admin')}", className: "td-admin" },
75 76 { data: {"_": "extern_type",
76 77 "sort": "extern_type"}, title: "${_('Auth type')}", className: "td-type" },
77 78 { data: {"_": "action",
78 79 "sort": "action"}, title: "${_('Action')}", className: "td-action" }
79 80 ],
80 81 language: {
81 82 paginate: DEFAULT_GRID_PAGINATION,
83 sProcessing: _gettext('loading...'),
82 84 emptyTable: _gettext("No users available yet.")
83 85 },
84 86
85 87 "createdRow": function ( row, data, index ) {
86 88 if (!data['active_raw']){
87 89 $(row).addClass('closed')
88 90 }
89 91 }
90 92 });
91 93
92 94 $('#user_list_table').on('xhr.dt', function(e, settings, json, xhr){
93 95 $('#user_list_table').css('opacity', 1);
94 96 });
95 97
96 98 $('#user_list_table').on('preXhr.dt', function(e, settings, data){
97 99 $('#user_list_table').css('opacity', 0.3);
98 100 });
99 101
100 102 // refresh counters on draw
101 103 $('#user_list_table').on('draw.dt', function(){
102 104 getDatatableCount();
103 105 });
104 106
105 107 // filter
106 108 $('#q_filter').on('keyup',
107 109 $.debounce(250, function() {
108 110 $('#user_list_table').DataTable().search(
109 111 $('#q_filter').val()
110 112 ).draw();
111 113 })
112 114 );
113 115
114 116 });
115 117 </script>
116 118
117 119 </%def>
General Comments 0
You need to be logged in to leave comments. Login now