##// END OF EJS Templates
permissions: unified looks and buttons on permission pages....
dan -
r2980:5cb2321a default
parent child Browse files
Show More
@@ -1,695 +1,696 b''
1 // navigation.less
1 // navigation.less
2 // For use in RhodeCode applications;
2 // For use in RhodeCode applications;
3 // see style guide documentation for guidelines.
3 // see style guide documentation for guidelines.
4
4
5 // HEADER NAVIGATION
5 // HEADER NAVIGATION
6
6
7 .horizontal-list {
7 .horizontal-list {
8 float: right;
8 float: right;
9 display: block;
9 display: block;
10 margin: 0;
10 margin: 0;
11 padding: 0;
11 padding: 0;
12 -webkit-padding-start: 0;
12 -webkit-padding-start: 0;
13 text-align: left;
13 text-align: left;
14 font-size: @navigation-fontsize;
14 font-size: @navigation-fontsize;
15 color: @grey6;
15 color: @grey6;
16 z-index:10;
16 z-index:10;
17
17
18 li {
18 li {
19 line-height: 1em;
19 line-height: 1em;
20 list-style-type: none;
20 list-style-type: none;
21
21
22 a {
22 a {
23 padding: 0 .5em;
23 padding: 0 .5em;
24
24
25 &.menu_link_notifications {
25 &.menu_link_notifications {
26 .pill(7px,@rcblue);
26 .pill(7px,@rcblue);
27 display: inline;
27 display: inline;
28 margin: 0 7px 0 .7em;
28 margin: 0 7px 0 .7em;
29 font-size: @basefontsize;
29 font-size: @basefontsize;
30 color: white;
30 color: white;
31
31
32 &.empty {
32 &.empty {
33 background-color: @grey4;
33 background-color: @grey4;
34 }
34 }
35
35
36 &:hover {
36 &:hover {
37 background-color: @rcdarkblue;
37 background-color: @rcdarkblue;
38 }
38 }
39 }
39 }
40 }
40 }
41 .pill_container {
41 .pill_container {
42 margin: 1.25em 0px 0px 0px;
42 margin: 1.25em 0px 0px 0px;
43 float: right;
43 float: right;
44 }
44 }
45
45
46 &#quick_login_li {
46 &#quick_login_li {
47 &:hover {
47 &:hover {
48 color: @grey5;
48 color: @grey5;
49 }
49 }
50
50
51 a.menu_link_notifications {
51 a.menu_link_notifications {
52 color: white;
52 color: white;
53 }
53 }
54
54
55 .user {
55 .user {
56 padding-bottom: 10px;
56 padding-bottom: 10px;
57 }
57 }
58
58
59 &.open {
59 &.open {
60 .user {
60 .user {
61 border-bottom: 5px solid @rcblue;
61 border-bottom: 5px solid @rcblue;
62 }
62 }
63 }
63 }
64 }
64 }
65
65
66 &:before { content: none; }
66 &:before { content: none; }
67
67
68 &:last-child {
68 &:last-child {
69 .menulabel {
69 .menulabel {
70 padding-right: 0;
70 padding-right: 0;
71 border-right: none;
71 border-right: none;
72
72
73 .show_more {
73 .show_more {
74 padding-right: 0;
74 padding-right: 0;
75 }
75 }
76 }
76 }
77
77
78 &> a {
78 &> a {
79 border-bottom: none;
79 border-bottom: none;
80 }
80 }
81 }
81 }
82
82
83 &.active {
83 &.active {
84 border-bottom: 5px solid @rcblue;
84 border-bottom: 5px solid @rcblue;
85 }
85 }
86
86
87 &.open {
87 &.open {
88
88
89 a {
89 a {
90 color: white;
90 color: white;
91 }
91 }
92 }
92 }
93
93
94 &:focus {
94 &:focus {
95 outline: none;
95 outline: none;
96 }
96 }
97
97
98 ul li {
98 ul li {
99 display: block;
99 display: block;
100
100
101 &:last-child> a {
101 &:last-child> a {
102 border-bottom: none;
102 border-bottom: none;
103 }
103 }
104
104
105 ul li:last-child a {
105 ul li:last-child a {
106 /* we don't expect more then 3 levels of submenu and the third
106 /* we don't expect more then 3 levels of submenu and the third
107 level can have different html structure */
107 level can have different html structure */
108 border-bottom: none;
108 border-bottom: none;
109 }
109 }
110 }
110 }
111 }
111 }
112
112
113 > li {
113 > li {
114 float: left;
114 float: left;
115 display: block;
115 display: block;
116 padding: 0;
116 padding: 0;
117
117
118 > a,
118 > a,
119 &.has_select2 a {
119 &.has_select2 a {
120 display: block;
120 display: block;
121 padding: 10px 0 2px;
121 padding: 10px 0 2px;
122
122
123 .show_more {
123 .show_more {
124 margin-top: -4px;
124 margin-top: -4px;
125 padding-right: .5em;
125 padding-right: .5em;
126 }
126 }
127 }
127 }
128
128
129 .menulabel {
129 .menulabel {
130 padding: 0 .5em;
130 padding: 0 .5em;
131 line-height: 1em;
131 line-height: 1em;
132 // for this specifically we do not use a variable
132 // for this specifically we do not use a variable
133 border-right: 1px solid @grey4;
133 border-right: 1px solid @grey4;
134 }
134 }
135
135
136 .pr_notifications {
136 .pr_notifications {
137 padding-left: .5em;
137 padding-left: .5em;
138 }
138 }
139
139
140 .pr_notifications + .menulabel {
140 .pr_notifications + .menulabel {
141 display:inline;
141 display:inline;
142 padding-left: 0;
142 padding-left: 0;
143 }
143 }
144
144
145 &:hover,
145 &:hover,
146 &.open,
146 &.open,
147 &.active {
147 &.active {
148 a {
148 a {
149 color: @grey1;
149 color: @grey1;
150 }
150 }
151 }
151 }
152 }
152 }
153
153
154 pre {
154 pre {
155 margin: 0;
155 margin: 0;
156 padding: 0;
156 padding: 0;
157 }
157 }
158
158
159 .select2-container,
159 .select2-container,
160 .menulink.childs {
160 .menulink.childs {
161 position: relative;
161 position: relative;
162 }
162 }
163
163
164 #quick_login {
164 #quick_login {
165
165
166 li a {
166 li a {
167 padding: .5em 0;
167 padding: .5em 0;
168 border-bottom: none;
168 border-bottom: none;
169 color: @grey2;
169 color: @grey2;
170
170
171 &:hover { color: @grey1; }
171 &:hover { color: @grey1; }
172 }
172 }
173
173
174 .show_more {
174 .show_more {
175 padding-left: .5em;
175 padding-left: .5em;
176 }
176 }
177 }
177 }
178
178
179 #quick_login_link {
179 #quick_login_link {
180 display: inline-block;
180 display: inline-block;
181
181
182 .gravatar {
182 .gravatar {
183 border: 1px solid @grey2;
183 border: 1px solid @grey2;
184 }
184 }
185
185
186 .gravatar-login {
186 .gravatar-login {
187 height: 20px;
187 height: 20px;
188 width: 20px;
188 width: 20px;
189 margin: -8px 0;
189 margin: -8px 0;
190 padding: 0;
190 padding: 0;
191 }
191 }
192
192
193 &:hover .user {
193 &:hover .user {
194 color: @grey6;
194 color: @grey6;
195 }
195 }
196 }
196 }
197 }
197 }
198 .header .horizontal-list {
198 .header .horizontal-list {
199
199
200 li {
200 li {
201
201
202 &#quick_login_li {
202 &#quick_login_li {
203 padding-left: .5em;
203 padding-left: .5em;
204
204
205 &:hover #quick_login_link {
205 &:hover #quick_login_link {
206 color: inherit;
206 color: inherit;
207 }
207 }
208 }
208 }
209
209
210 &:before { content: none; }
210 &:before { content: none; }
211 }
211 }
212
212
213 > li {
213 > li {
214
214
215 a {
215 a {
216 padding: 18px 0 12px 0;
216 padding: 18px 0 12px 0;
217 color: @nav-grey;
217 color: @nav-grey;
218
218
219 &.menu_link_notifications {
219 &.menu_link_notifications {
220 padding: 1px 8px;
220 padding: 1px 8px;
221 }
221 }
222 }
222 }
223
223
224 &:hover,
224 &:hover,
225 &.open,
225 &.open,
226 &.active {
226 &.active {
227 .pill_container a {
227 .pill_container a {
228 // don't select text for the pill container, it has it' own
228 // don't select text for the pill container, it has it' own
229 // hover behaviour
229 // hover behaviour
230 color: @nav-grey;
230 color: @nav-grey;
231 }
231 }
232 }
232 }
233
233
234 &:hover,
234 &:hover,
235 &.open,
235 &.open,
236 &.active {
236 &.active {
237 a {
237 a {
238 color: @grey6;
238 color: @grey6;
239 }
239 }
240 }
240 }
241
241
242 .select2-dropdown-open a {
242 .select2-dropdown-open a {
243 color: @grey6;
243 color: @grey6;
244 }
244 }
245
245
246 .repo-switcher {
246 .repo-switcher {
247 padding-left: 0;
247 padding-left: 0;
248
248
249 .menulabel {
249 .menulabel {
250 padding-left: 0;
250 padding-left: 0;
251 }
251 }
252 }
252 }
253 }
253 }
254
254
255 li ul li {
255 li ul li {
256 background-color:@grey2;
256 background-color:@grey2;
257
257
258 a {
258 a {
259 padding: .5em 0;
259 padding: .5em 0;
260 border-bottom: @border-thickness solid @border-default-color;
260 border-bottom: @border-thickness solid @border-default-color;
261 color: @grey6;
261 color: @grey6;
262 }
262 }
263
263
264 &:last-child a, &.last a{
264 &:last-child a, &.last a{
265 border-bottom: none;
265 border-bottom: none;
266 }
266 }
267
267
268 &:hover {
268 &:hover {
269 background-color: @grey3;
269 background-color: @grey3;
270 }
270 }
271 }
271 }
272
272
273 .submenu {
273 .submenu {
274 margin-top: 5px;
274 margin-top: 5px;
275 }
275 }
276 }
276 }
277
277
278 // SUBMENUS
278 // SUBMENUS
279 .navigation .submenu {
279 .navigation .submenu {
280 display: none;
280 display: none;
281 }
281 }
282
282
283 .navigation li.open {
283 .navigation li.open {
284 .submenu {
284 .submenu {
285 display: block;
285 display: block;
286 }
286 }
287 }
287 }
288
288
289 .navigation li:last-child .submenu {
289 .navigation li:last-child .submenu {
290 right: -20px;
290 right: -20px;
291 left: auto;
291 left: auto;
292 }
292 }
293
293
294 .submenu {
294 .submenu {
295 position: absolute;
295 position: absolute;
296 top: 100%;
296 top: 100%;
297 left: 0;
297 left: 0;
298 min-width: 150px;
298 min-width: 150px;
299 margin: 6px 0 0;
299 margin: 6px 0 0;
300 padding: 0;
300 padding: 0;
301 text-align: left;
301 text-align: left;
302 font-family: @text-light;
302 font-family: @text-light;
303 border-radius: @border-radius;
303 border-radius: @border-radius;
304 z-index: 20;
304 z-index: 20;
305
305
306 li {
306 li {
307 display: block;
307 display: block;
308 margin: 0;
308 margin: 0;
309 padding: 0 .5em;
309 padding: 0 .5em;
310 line-height: 1em;
310 line-height: 1em;
311 color: @grey3;
311 color: @grey3;
312 background-color: @grey6;
312 background-color: @grey6;
313
313
314 &:before { content: none; }
314 &:before { content: none; }
315
315
316 a {
316 a {
317 display: block;
317 display: block;
318 width: 100%;
318 width: 100%;
319 padding: .5em 0;
319 padding: .5em 0;
320 border-right: none;
320 border-right: none;
321 border-bottom: @border-thickness solid white;
321 border-bottom: @border-thickness solid white;
322 color: @grey3;
322 color: @grey3;
323 }
323 }
324
324
325 ul {
325 ul {
326 display: none;
326 display: none;
327 position: absolute;
327 position: absolute;
328 top: 0;
328 top: 0;
329 right: 100%;
329 right: 100%;
330 padding: 0;
330 padding: 0;
331 z-index: 30;
331 z-index: 30;
332 }
332 }
333 &:hover {
333 &:hover {
334 background-color: @grey5;
334 background-color: @grey5;
335 -webkit-transition: background .3s;
335 -webkit-transition: background .3s;
336 -moz-transition: background .3s;
336 -moz-transition: background .3s;
337 -o-transition: background .3s;
337 -o-transition: background .3s;
338 transition: background .3s;
338 transition: background .3s;
339
339
340 ul {
340 ul {
341 display: block;
341 display: block;
342 }
342 }
343 }
343 }
344 }
344 }
345 }
345 }
346
346
347
347
348
348
349
349
350 // repo dropdown
350 // repo dropdown
351 .quick_repo_menu {
351 .quick_repo_menu {
352 width: 15px;
352 width: 15px;
353 text-align: center;
353 text-align: center;
354 position: relative;
354 position: relative;
355 cursor: pointer;
355 cursor: pointer;
356
356
357 div {
357 div {
358 overflow: visible !important;
358 overflow: visible !important;
359 }
359 }
360
360
361 &.sorting {
361 &.sorting {
362 cursor: auto;
362 cursor: auto;
363 }
363 }
364
364
365 &:hover {
365 &:hover {
366 .menu_items_container {
366 .menu_items_container {
367 position: absolute;
367 position: absolute;
368 display: block;
368 display: block;
369 }
369 }
370 .menu_items {
370 .menu_items {
371 display: block;
371 display: block;
372 }
372 }
373 }
373 }
374
374
375 i {
375 i {
376 margin: 0;
376 margin: 0;
377 color: @grey4;
377 color: @grey4;
378 }
378 }
379
379
380 .menu_items_container {
380 .menu_items_container {
381 position: absolute;
381 position: absolute;
382 top: 0;
382 top: 0;
383 left: 100%;
383 left: 100%;
384 margin: 0;
384 margin: 0;
385 padding: 0;
385 padding: 0;
386 list-style: none;
386 list-style: none;
387 background-color: @grey6;
387 background-color: @grey6;
388 z-index: 999;
388 z-index: 999;
389 text-align: left;
389 text-align: left;
390
390
391 a {
391 a {
392 color: @grey2;
392 color: @grey2;
393 }
393 }
394
394
395 ul.menu_items {
395 ul.menu_items {
396 margin: 0;
396 margin: 0;
397 padding: 0;
397 padding: 0;
398 }
398 }
399
399
400 li {
400 li {
401 margin: 0;
401 margin: 0;
402 padding: 0;
402 padding: 0;
403 line-height: 1em;
403 line-height: 1em;
404 list-style-type: none;
404 list-style-type: none;
405
405
406 &:before { content: none; }
406 &:before { content: none; }
407
407
408 a {
408 a {
409 display: block;
409 display: block;
410 height: 16px;
410 height: 16px;
411 padding: 8px; //must add up to td height (28px)
411 padding: 8px; //must add up to td height (28px)
412 width: 120px; // set width
412
413
413 &:hover {
414 &:hover {
414 background-color: @grey5;
415 background-color: @grey5;
415 -webkit-transition: background .3s;
416 -webkit-transition: background .3s;
416 -moz-transition: background .3s;
417 -moz-transition: background .3s;
417 -o-transition: background .3s;
418 -o-transition: background .3s;
418 transition: background .3s;
419 transition: background .3s;
419 }
420 }
420 }
421 }
421 }
422 }
422 }
423 }
423 }
424 }
424
425
425 // Header Repository Switcher
426 // Header Repository Switcher
426 // Select2 Dropdown
427 // Select2 Dropdown
427 #select2-drop.select2-drop.repo-switcher-dropdown {
428 #select2-drop.select2-drop.repo-switcher-dropdown {
428 width: auto !important;
429 width: auto !important;
429 margin-top: 5px;
430 margin-top: 5px;
430 padding: 1em 0;
431 padding: 1em 0;
431 text-align: left;
432 text-align: left;
432 .border-radius-bottom(@border-radius);
433 .border-radius-bottom(@border-radius);
433 border-color: transparent;
434 border-color: transparent;
434 color: @grey6;
435 color: @grey6;
435 background-color: @grey2;
436 background-color: @grey2;
436
437
437 input {
438 input {
438 min-width: 90%;
439 min-width: 90%;
439 }
440 }
440
441
441 ul.select2-result-sub {
442 ul.select2-result-sub {
442
443
443 li {
444 li {
444 line-height: 1em;
445 line-height: 1em;
445
446
446 &:hover,
447 &:hover,
447 &.select2-highlighted {
448 &.select2-highlighted {
448 background-color: @grey3;
449 background-color: @grey3;
449 }
450 }
450 }
451 }
451
452
452 &:before { content: none; }
453 &:before { content: none; }
453 }
454 }
454
455
455 ul.select2-results {
456 ul.select2-results {
456 min-width: 200px;
457 min-width: 200px;
457 margin: 0;
458 margin: 0;
458 padding: 0;
459 padding: 0;
459 list-style-type: none;
460 list-style-type: none;
460 overflow-x: visible;
461 overflow-x: visible;
461 overflow-y: scroll;
462 overflow-y: scroll;
462
463
463 li {
464 li {
464 padding: 0 8px;
465 padding: 0 8px;
465 line-height: 1em;
466 line-height: 1em;
466 color: @grey6;
467 color: @grey6;
467
468
468 &:before { content: none; }
469 &:before { content: none; }
469
470
470 &>.select2-result-label {
471 &>.select2-result-label {
471 padding: 8px 0;
472 padding: 8px 0;
472 border-bottom: @border-thickness solid @grey3;
473 border-bottom: @border-thickness solid @grey3;
473 white-space: nowrap;
474 white-space: nowrap;
474 color: @grey5;
475 color: @grey5;
475 cursor: pointer;
476 cursor: pointer;
476 }
477 }
477
478
478 &.select2-result-with-children {
479 &.select2-result-with-children {
479 margin: 0;
480 margin: 0;
480 padding: 0;
481 padding: 0;
481 }
482 }
482
483
483 &.select2-result-unselectable > .select2-result-label {
484 &.select2-result-unselectable > .select2-result-label {
484 margin: 0 8px;
485 margin: 0 8px;
485 }
486 }
486
487
487 }
488 }
488 }
489 }
489
490
490 ul.select2-result-sub {
491 ul.select2-result-sub {
491 margin: 0;
492 margin: 0;
492 padding: 0;
493 padding: 0;
493
494
494 li {
495 li {
495 display: block;
496 display: block;
496 margin: 0;
497 margin: 0;
497 border-right: none;
498 border-right: none;
498 line-height: 1em;
499 line-height: 1em;
499 font-family: @text-light;
500 font-family: @text-light;
500 color: @grey2;
501 color: @grey2;
501
502
502 &:before { content: none; }
503 &:before { content: none; }
503
504
504 &:hover {
505 &:hover {
505 background-color: @grey3;
506 background-color: @grey3;
506 }
507 }
507 }
508 }
508 }
509 }
509 }
510 }
510
511
511
512
512 #context-bar {
513 #context-bar {
513 display: block;
514 display: block;
514 margin: 0 auto;
515 margin: 0 auto;
515 padding: 0 @header-padding;
516 padding: 0 @header-padding;
516 background-color: @grey6;
517 background-color: @grey6;
517 border-bottom: @border-thickness solid @grey5;
518 border-bottom: @border-thickness solid @grey5;
518
519
519 .clear {
520 .clear {
520 clear: both;
521 clear: both;
521 }
522 }
522 }
523 }
523
524
524 ul#context-pages {
525 ul#context-pages {
525 li {
526 li {
526 line-height: 1em;
527 line-height: 1em;
527
528
528 &:before { content: none; }
529 &:before { content: none; }
529
530
530 a {
531 a {
531 color: @grey3;
532 color: @grey3;
532 }
533 }
533
534
534 &.active {
535 &.active {
535 // special case, non-variable color
536 // special case, non-variable color
536 border-bottom: 4px solid @nav-grey;
537 border-bottom: 4px solid @nav-grey;
537
538
538 a {
539 a {
539 color: @grey1;
540 color: @grey1;
540 }
541 }
541 }
542 }
542 }
543 }
543 }
544 }
544
545
545 // PAGINATION
546 // PAGINATION
546
547
547 .pagination {
548 .pagination {
548 border: @border-thickness solid @rcblue;
549 border: @border-thickness solid @rcblue;
549 color: @rcblue;
550 color: @rcblue;
550
551
551 .current {
552 .current {
552 color: @grey4;
553 color: @grey4;
553 }
554 }
554 }
555 }
555
556
556 .dataTables_processing {
557 .dataTables_processing {
557 text-align: center;
558 text-align: center;
558 font-size: 1.1em;
559 font-size: 1.1em;
559 position: relative;
560 position: relative;
560 top: 95px;
561 top: 95px;
561 }
562 }
562
563
563 .dataTables_paginate, .pagination-wh {
564 .dataTables_paginate, .pagination-wh {
564 text-align: left;
565 text-align: left;
565 display: inline-block;
566 display: inline-block;
566 border-left: 1px solid @rcblue;
567 border-left: 1px solid @rcblue;
567 float: none;
568 float: none;
568 overflow: hidden;
569 overflow: hidden;
569
570
570 .paginate_button, .pager_curpage,
571 .paginate_button, .pager_curpage,
571 .pager_link, .pg-previous, .pg-next, .pager_dotdot {
572 .pager_link, .pg-previous, .pg-next, .pager_dotdot {
572 display: inline-block;
573 display: inline-block;
573 padding: @menupadding/4 @menupadding;
574 padding: @menupadding/4 @menupadding;
574 border: 1px solid @rcblue;
575 border: 1px solid @rcblue;
575 border-left: 0;
576 border-left: 0;
576 color: @rcblue;
577 color: @rcblue;
577 cursor: pointer;
578 cursor: pointer;
578 float: left;
579 float: left;
579 }
580 }
580
581
581 .pager_curpage, .pager_dotdot,
582 .pager_curpage, .pager_dotdot,
582 .paginate_button.current, .paginate_button.disabled,
583 .paginate_button.current, .paginate_button.disabled,
583 .disabled {
584 .disabled {
584 color: @grey3;
585 color: @grey3;
585 cursor: default;
586 cursor: default;
586 }
587 }
587
588
588 .ellipsis {
589 .ellipsis {
589 display: inline-block;
590 display: inline-block;
590 text-align: left;
591 text-align: left;
591 padding: @menupadding/4 @menupadding;
592 padding: @menupadding/4 @menupadding;
592 border: 1px solid @rcblue;
593 border: 1px solid @rcblue;
593 border-left: 0;
594 border-left: 0;
594 float: left;
595 float: left;
595 }
596 }
596 }
597 }
597
598
598 // SIDEBAR
599 // SIDEBAR
599
600
600 .sidebar {
601 .sidebar {
601 .block-left;
602 .block-left;
602 clear: left;
603 clear: left;
603 max-width: @sidebar-width;
604 max-width: @sidebar-width;
604 margin-right: @sidebarpadding;
605 margin-right: @sidebarpadding;
605 padding-right: @sidebarpadding;
606 padding-right: @sidebarpadding;
606 font-family: @text-regular;
607 font-family: @text-regular;
607 color: @grey1;
608 color: @grey1;
608
609
609 &#graph_nodes {
610 &#graph_nodes {
610 clear:both;
611 clear:both;
611 width: auto;
612 width: auto;
612 margin-left: -100px;
613 margin-left: -100px;
613 padding: 0;
614 padding: 0;
614 border: none;
615 border: none;
615 }
616 }
616
617
617 .nav-pills {
618 .nav-pills {
618 margin: 0;
619 margin: 0;
619 }
620 }
620
621
621 .nav {
622 .nav {
622 list-style: none;
623 list-style: none;
623 padding: 0;
624 padding: 0;
624
625
625 li {
626 li {
626 padding-bottom: @menupadding;
627 padding-bottom: @menupadding;
627 line-height: 1em;
628 line-height: 1em;
628 color: @grey4;
629 color: @grey4;
629
630
630 &.active a {
631 &.active a {
631 color: @grey2;
632 color: @grey2;
632 }
633 }
633
634
634 a {
635 a {
635 color: @grey4;
636 color: @grey4;
636 }
637 }
637
638
638 &:before { content: none; }
639 &:before { content: none; }
639 }
640 }
640
641
641 }
642 }
642 }
643 }
643
644
644 .main_filter_help_box {
645 .main_filter_help_box {
645 padding: 7px 7px;
646 padding: 7px 7px;
646 border-top: 1px solid @grey4;
647 border-top: 1px solid @grey4;
647 border-right: 1px solid @grey4;
648 border-right: 1px solid @grey4;
648 border-bottom: 1px solid @grey4;
649 border-bottom: 1px solid @grey4;
649 display: inline-block;
650 display: inline-block;
650 vertical-align: top;
651 vertical-align: top;
651 margin-left: -5px;
652 margin-left: -5px;
652 background: @grey3;
653 background: @grey3;
653 }
654 }
654
655
655 .main_filter_input_box {
656 .main_filter_input_box {
656 display: inline-block;
657 display: inline-block;
657 }
658 }
658
659
659 .main_filter_box {
660 .main_filter_box {
660 margin: 9px 0 0 0;
661 margin: 9px 0 0 0;
661 }
662 }
662
663
663 #main_filter_help {
664 #main_filter_help {
664 background: @grey3;
665 background: @grey3;
665 border: 1px solid black;
666 border: 1px solid black;
666 position: absolute;
667 position: absolute;
667 white-space: pre-wrap;
668 white-space: pre-wrap;
668 z-index: 9999;
669 z-index: 9999;
669 color: @nav-grey;
670 color: @nav-grey;
670 margin: 1px 7px;
671 margin: 1px 7px;
671 padding: 0 2px;
672 padding: 0 2px;
672 }
673 }
673
674
674 .main_filter_input {
675 .main_filter_input {
675 padding: 6px;
676 padding: 6px;
676 min-width: 220px;
677 min-width: 220px;
677 color: @nav-grey;
678 color: @nav-grey;
678 background: @grey3;
679 background: @grey3;
679 }
680 }
680
681
681 .main_filter_input::placeholder {
682 .main_filter_input::placeholder {
682 color: @nav-grey;
683 color: @nav-grey;
683 opacity: 1;
684 opacity: 1;
684 }
685 }
685
686
686 .notice-box {
687 .notice-box {
687 display:block !important;
688 display:block !important;
688 padding: 9px 0 !important;
689 padding: 9px 0 !important;
689 }
690 }
690
691
691 .menulabel-notice {
692 .menulabel-notice {
692 border: 1px solid @color5;
693 border: 1px solid @color5;
693 padding:7px 10px;
694 padding:7px 10px;
694 color: @color5;
695 color: @color5;
695 }
696 }
@@ -1,189 +1,218 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <div class="panel panel-default">
3 <div class="panel panel-default">
4 <div class="panel-heading">
4 <div class="panel-heading">
5 <h3 class="panel-title">${_('Repository Group Permissions')}</h3>
5 <h3 class="panel-title">${_('Repository Group Permissions')}</h3>
6 </div>
6 </div>
7 <div class="panel-body">
7 <div class="panel-body">
8 ${h.secure_form(h.route_path('edit_repo_group_perms_update', repo_group_name=c.repo_group.group_name), request=request)}
8 ${h.secure_form(h.route_path('edit_repo_group_perms_update', repo_group_name=c.repo_group.group_name), request=request)}
9 <table id="permissions_manage" class="rctable permissions">
9 <table id="permissions_manage" class="rctable permissions">
10 <tr>
10 <tr>
11 <th class="td-radio">${_('None')}</th>
11 <th class="td-radio">${_('None')}</th>
12 <th class="td-radio">${_('Read')}</th>
12 <th class="td-radio">${_('Read')}</th>
13 <th class="td-radio">${_('Write')}</th>
13 <th class="td-radio">${_('Write')}</th>
14 <th class="td-radio">${_('Admin')}</th>
14 <th class="td-radio">${_('Admin')}</th>
15 <th class="td-owner">${_('User/User Group')}</th>
15 <th class="td-owner">${_('User/User Group')}</th>
16 <th></th>
16 <th class="td-action"></th>
17 <th></th>
17 <th class="td-action"></th>
18 </tr>
18 </tr>
19 ## USERS
19 ## USERS
20 %for _user in c.repo_group.permissions():
20 %for _user in c.repo_group.permissions():
21 ## super admin/owner row
21 ## super admin/owner row
22 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
22 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
23 <tr class="perm_admin_row">
23 <tr class="perm_admin_row">
24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
27 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
27 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
28 <td class="td-user">
28 <td class="td-user">
29 ${base.gravatar(_user.email, 16)}
29 ${base.gravatar(_user.email, 16)}
30 ${h.link_to_user(_user.username)}
30 ${h.link_to_user(_user.username)}
31 %if getattr(_user, 'admin_row', None):
31 %if getattr(_user, 'admin_row', None):
32 (${_('super admin')})
32 (${_('super admin')})
33 %endif
33 %endif
34 %if getattr(_user, 'owner_row', None):
34 %if getattr(_user, 'owner_row', None):
35 (${_('owner')})
35 (${_('owner')})
36 %endif
36 %endif
37 </td>
37 </td>
38 <td></td>
38 <td></td>
39 <td>
39 <td class="quick_repo_menu">
40 % if c.rhodecode_user.is_admin:
40 % if c.rhodecode_user.is_admin:
41 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
41 <i class="icon-more"></i>
42 <div class="menu_items_container" style="display: none;">
43 <ul class="menu_items">
44 <li>
45 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))}
46 </li>
47 </ul>
48 </div>
42 % endif
49 % endif
43 </td>
50 </td>
44 </tr>
51 </tr>
45 %else:
52 %else:
46 <tr>
53 <tr>
47 ##forbid revoking permission from yourself, except if you're an super admin
54 ##forbid revoking permission from yourself, except if you're an super admin
48 %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin:
55 %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin:
49 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', checked=_user.permission=='group.none')}</td>
56 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', checked=_user.permission=='group.none')}</td>
50 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', checked=_user.permission=='group.read')}</td>
57 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', checked=_user.permission=='group.read')}</td>
51 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', checked=_user.permission=='group.write')}</td>
58 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', checked=_user.permission=='group.write')}</td>
52 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', checked=_user.permission=='group.admin')}</td>
59 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', checked=_user.permission=='group.admin')}</td>
53 <td class="td-user">
60 <td class="td-user">
54 ${base.gravatar(_user.email, 16)}
61 ${base.gravatar(_user.email, 16)}
55 <span class="user">
62 <span class="user">
56 % if _user.username == h.DEFAULT_USER:
63 % if _user.username == h.DEFAULT_USER:
57 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
64 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
58 % else:
65 % else:
59 ${h.link_to_user(_user.username)}
66 ${h.link_to_user(_user.username)}
60 %if getattr(_user, 'duplicate_perm', None):
67 %if getattr(_user, 'duplicate_perm', None):
61 (${_('inactive duplicate')})
68 (${_('inactive duplicate')})
62 %endif
69 %endif
63 % endif
70 % endif
64 </span>
71 </span>
65 </td>
72 </td>
66 <td class="td-action">
73 <td class="td-action">
67 %if _user.username != h.DEFAULT_USER:
74 %if _user.username != h.DEFAULT_USER:
68 <span class="btn btn-link btn-danger revoke_perm"
75 <span class="btn btn-link btn-danger revoke_perm"
69 member="${_user.user_id}" member_type="user">
76 member="${_user.user_id}" member_type="user">
70 ${_('Revoke')}
77 ${_('Remove')}
71 </span>
78 </span>
72 %endif
79 %endif
73 </td>
80 </td>
74 <td>
81 <td class="quick_repo_menu">
75 % if c.rhodecode_user.is_admin:
82 % if c.rhodecode_user.is_admin:
76 % if _user.username == h.DEFAULT_USER:
83 <i class="icon-more"></i>
77 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
84 <div class="menu_items_container" style="display: none;">
78 % else:
85 <ul class="menu_items">
79 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
86 <li>
80 % endif
87 % if _user.username == h.DEFAULT_USER:
88 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-groups-permissions'))}
89 % else:
90 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))}
91 % endif
92 </li>
93 </ul>
94 </div>
81 % endif
95 % endif
82 </td>
96 </td>
83 %else:
97 %else:
84 ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions
98 ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions
85 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', disabled="disabled")}</td>
99 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.none', disabled="disabled")}</td>
86 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', disabled="disabled")}</td>
100 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.read', disabled="disabled")}</td>
87 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', disabled="disabled")}</td>
101 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.write', disabled="disabled")}</td>
88 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', disabled="disabled")}</td>
102 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'group.admin', disabled="disabled")}</td>
89 <td class="td-user">
103 <td class="td-user">
90 ${base.gravatar(_user.email, 16)}
104 ${base.gravatar(_user.email, 16)}
91 <span class="user">
105 <span class="user">
92 % if _user.username == h.DEFAULT_USER:
106 % if _user.username == h.DEFAULT_USER:
93 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
107 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
94 % else:
108 % else:
95 ${h.link_to_user(_user.username)}
109 ${h.link_to_user(_user.username)}
96 %if getattr(_user, 'duplicate_perm', None):
110 %if getattr(_user, 'duplicate_perm', None):
97 (${_('inactive duplicate')})
111 (${_('inactive duplicate')})
98 %endif
112 %endif
99 % endif
113 % endif
100 <span class="user-perm-help-text">(${_('delegated admin')})</span>
114 <span class="user-perm-help-text">(${_('delegated admin')})</span>
101 </span>
115 </span>
102 </td>
116 </td>
103 <td></td>
117 <td></td>
104 <td>
118 <td class="quick_repo_menu">
105 % if c.rhodecode_user.is_admin:
119 % if c.rhodecode_user.is_admin:
106 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
120 <i class="icon-more"></i>
121 <div class="menu_items_container" style="display: none;">
122 <ul class="menu_items">
123 <li>
124 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-groups-permissions'))}
125 </li>
126 </ul>
127 </div>
107 % endif
128 % endif
108 </td>
129 </td>
109 %endif
130 %endif
110 </tr>
131 </tr>
111 %endif
132 %endif
112 %endfor
133 %endfor
113
134
114 ## USER GROUPS
135 ## USER GROUPS
115 %for _user_group in c.repo_group.permission_user_groups():
136 %for _user_group in c.repo_group.permission_user_groups():
116 <tr id="id${id(_user_group.users_group_name)}">
137 <tr id="id${id(_user_group.users_group_name)}">
117 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none', checked=_user_group.permission=='group.none')}</td>
138 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.none', checked=_user_group.permission=='group.none')}</td>
118 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read', checked=_user_group.permission=='group.read')}</td>
139 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.read', checked=_user_group.permission=='group.read')}</td>
119 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.write', checked=_user_group.permission=='group.write')}</td>
140 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.write', checked=_user_group.permission=='group.write')}</td>
120 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.admin', checked=_user_group.permission=='group.admin')}</td>
141 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'group.admin', checked=_user_group.permission=='group.admin')}</td>
121 <td class="td-componentname">
142 <td class="td-componentname">
122 <i class="icon-user-group"></i>
143 <i class="icon-user-group"></i>
123 %if h.HasPermissionAny('hg.admin')():
144 %if h.HasPermissionAny('hg.admin')():
124 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
145 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
125 ${_user_group.users_group_name}
146 ${_user_group.users_group_name}
126 </a>
147 </a>
127 %else:
148 %else:
128 ${h.link_to_group(_user_group.users_group_name)}
149 ${h.link_to_group(_user_group.users_group_name)}
129 %endif
150 %endif
130 </td>
151 </td>
131 <td class="td-action">
152 <td class="td-action">
132 <span class="btn btn-link btn-danger revoke_perm"
153 <span class="btn btn-link btn-danger revoke_perm"
133 member="${_user_group.users_group_id}" member_type="user_group">
154 member="${_user_group.users_group_id}" member_type="user_group">
134 ${_('Revoke')}
155 ${_('Remove')}
135 </span>
156 </span>
136 </td>
157 </td>
137 <td>
158 <td class="quick_repo_menu">
138 % if c.rhodecode_user.is_admin:
159 % if c.rhodecode_user.is_admin:
139 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))}
160 <i class="icon-more"></i>
161 <div class="menu_items_container" style="display: none;">
162 <ul class="menu_items">
163 <li>
164 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-groups-permissions'))}
165 </li>
166 </ul>
167 </div>
140 % endif
168 % endif
141 </td>
169 </td>
142 </tr>
170 </tr>
143 %endfor
171 %endfor
144
172
145 <tr class="new_members" id="add_perm_input"></tr>
173 <tr class="new_members" id="add_perm_input"></tr>
146 <tr>
174 <tr>
147 <td></td>
175 <td></td>
148 <td></td>
176 <td></td>
149 <td></td>
177 <td></td>
150 <td></td>
178 <td></td>
151 <td></td>
179 <td></td>
152 <td>
180 <td>
153 <span id="add_perm" class="link">
181 <span id="add_perm" class="link">
154 ${_('Add user/user group')}
182 ${_('Add user/user group')}
155 </span>
183 </span>
156 </td>
184 </td>
157 <td></td>
185 <td></td>
158 </tr>
186 </tr>
159 </table>
187 </table>
160
188
161 <div class="fields">
189 <div class="fields">
162 <div class="field">
190 <div class="field">
163 <div class="label label-radio">
191 <div class="label label-radio">
164 ${_('Apply to children')}:
192 ${_('Apply to children')}:
165 </div>
193 </div>
166 <div class="radios">
194 <div class="radios">
167 ${h.radio('recursive', 'none', label=_('None'), checked="checked")}
195 ${h.radio('recursive', 'none', label=_('None'), checked="checked")}
168 ${h.radio('recursive', 'groups', label=_('Repository Groups'))}
196 ${h.radio('recursive', 'groups', label=_('Repository Groups'))}
169 ${h.radio('recursive', 'repos', label=_('Repositories'))}
197 ${h.radio('recursive', 'repos', label=_('Repositories'))}
170 ${h.radio('recursive', 'all', label=_('Both'))}
198 ${h.radio('recursive', 'all', label=_('Both'))}
171 <span class="help-block">${_('Set or revoke permissions to selected types of children of this group, including non-private repositories and other groups if chosen.')}</span>
199 <span class="help-block">${_('Set or revoke permissions to selected types of children of this group, including non-private repositories and other groups if chosen.')}</span>
172 </div>
200 </div>
173 </div>
201 </div>
174 </div>
202 </div>
175 <div class="buttons">
203 <div class="buttons">
176 ${h.submit('save',_('Save'),class_="btn btn-primary")}
204 ${h.submit('save',_('Save'),class_="btn btn-primary")}
177 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
205 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
178 </div>
206 </div>
179 ${h.end_form()}
207 ${h.end_form()}
180 </div>
208 </div>
181 </div>
209 </div>
182 <script type="text/javascript">
210 <script type="text/javascript">
183 $('#add_perm').on('click', function(e){
211 $('#add_perm').on('click', function(e){
184 addNewPermInput($(this), 'group');
212 addNewPermInput($(this), 'group');
185 });
213 });
186 $('.revoke_perm').on('click', function(e){
214 $('.revoke_perm').on('click', function(e){
187 markRevokePermInput($(this), 'group');
215 markRevokePermInput($(this), 'group');
188 })
216 });
217 quick_repo_menu();
189 </script>
218 </script>
@@ -1,172 +1,201 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <div class="panel panel-default">
3 <div class="panel panel-default">
4 <div class="panel-heading">
4 <div class="panel-heading">
5 <h3 class="panel-title">${_('Repository Permissions')}</h3>
5 <h3 class="panel-title">${_('Repository Permissions')}</h3>
6 </div>
6 </div>
7 <div class="panel-body">
7 <div class="panel-body">
8 ${h.secure_form(h.route_path('edit_repo_perms', repo_name=c.repo_name), request=request)}
8 ${h.secure_form(h.route_path('edit_repo_perms', repo_name=c.repo_name), request=request)}
9 <table id="permissions_manage" class="rctable permissions">
9 <table id="permissions_manage" class="rctable permissions">
10 <tr>
10 <tr>
11 <th class="td-radio">${_('None')}</th>
11 <th class="td-radio">${_('None')}</th>
12 <th class="td-radio">${_('Read')}</th>
12 <th class="td-radio">${_('Read')}</th>
13 <th class="td-radio">${_('Write')}</th>
13 <th class="td-radio">${_('Write')}</th>
14 <th class="td-radio">${_('Admin')}</th>
14 <th class="td-radio">${_('Admin')}</th>
15 <th class="td-owner">${_('User/User Group')}</th>
15 <th class="td-owner">${_('User/User Group')}</th>
16 <th></th>
16 <th class="td-action"></th>
17 <th></th>
17 <th class="td-action"></th>
18 </tr>
18 </tr>
19 ## USERS
19 ## USERS
20 %for _user in c.rhodecode_db_repo.permissions():
20 %for _user in c.rhodecode_db_repo.permissions():
21 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
21 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
22 <tr class="perm_admin_row">
22 <tr class="perm_admin_row">
23 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
23 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
27 <td class="td-user">
27 <td class="td-user">
28 ${base.gravatar(_user.email, 16)}
28 ${base.gravatar(_user.email, 16)}
29 ${h.link_to_user(_user.username)}
29 ${h.link_to_user(_user.username)}
30 %if getattr(_user, 'admin_row', None):
30 %if getattr(_user, 'admin_row', None):
31 (${_('super admin')})
31 (${_('super admin')})
32 %endif
32 %endif
33 %if getattr(_user, 'owner_row', None):
33 %if getattr(_user, 'owner_row', None):
34 (${_('owner')})
34 (${_('owner')})
35 %endif
35 %endif
36 </td>
36 </td>
37 <td></td>
37 <td></td>
38 <td>
38 <td class="quick_repo_menu">
39 % if c.rhodecode_user.is_admin:
39 % if c.rhodecode_user.is_admin:
40 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
40 <i class="icon-more"></i>
41 <div class="menu_items_container" style="display: none;">
42 <ul class="menu_items">
43 <li>
44 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
45 </li>
46 </ul>
47 </div>
41 % endif
48 % endif
42 </td>
49 </td>
43 </tr>
50 </tr>
44 %elif _user.username == h.DEFAULT_USER and c.rhodecode_db_repo.private:
51 %elif _user.username == h.DEFAULT_USER and c.rhodecode_db_repo.private:
45 <tr>
52 <tr>
46 <td colspan="4">
53 <td colspan="4">
47 <span class="private_repo_msg">
54 <span class="private_repo_msg">
48 <strong title="${h.tooltip(_user.permission)}">${_('private repository')}</strong>
55 <strong title="${h.tooltip(_user.permission)}">${_('private repository')}</strong>
49 </span>
56 </span>
50 </td>
57 </td>
51 <td class="private_repo_msg">
58 <td class="private_repo_msg">
52 ${base.gravatar(h.DEFAULT_USER_EMAIL, 16)}
59 ${base.gravatar(h.DEFAULT_USER_EMAIL, 16)}
53 ${h.DEFAULT_USER} - ${_('only users/user groups explicitly added here will have access')}</td>
60 ${h.DEFAULT_USER} - ${_('only users/user groups explicitly added here will have access')}</td>
54 <td></td>
61 <td></td>
55 <td>
62 <td class="quick_repo_menu">
56 % if c.rhodecode_user.is_admin:
63 % if c.rhodecode_user.is_admin:
57 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
64 <i class="icon-more"></i>
65 <div class="menu_items_container" style="display: none;">
66 <ul class="menu_items">
67 <li>
68 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
69 </li>
70 </ul>
71 </div>
58 % endif
72 % endif
59 </td>
73 </td>
60 </tr>
74 </tr>
61 %else:
75 %else:
62 <tr>
76 <tr>
63 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.none', checked=_user.permission=='repository.none')}</td>
77 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.none', checked=_user.permission=='repository.none')}</td>
64 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.read', checked=_user.permission=='repository.read')}</td>
78 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.read', checked=_user.permission=='repository.read')}</td>
65 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.write', checked=_user.permission=='repository.write')}</td>
79 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.write', checked=_user.permission=='repository.write')}</td>
66 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.admin', checked=_user.permission=='repository.admin')}</td>
80 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'repository.admin', checked=_user.permission=='repository.admin')}</td>
67 <td class="td-user">
81 <td class="td-user">
68 ${base.gravatar(_user.email, 16)}
82 ${base.gravatar(_user.email, 16)}
69 <span class="user">
83 <span class="user">
70 % if _user.username == h.DEFAULT_USER:
84 % if _user.username == h.DEFAULT_USER:
71 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
85 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
72 % else:
86 % else:
73 ${h.link_to_user(_user.username)}
87 ${h.link_to_user(_user.username)}
74 %if getattr(_user, 'duplicate_perm', None):
88 %if getattr(_user, 'duplicate_perm', None):
75 (${_('inactive duplicate')})
89 (${_('inactive duplicate')})
76 %endif
90 %endif
77 %if getattr(_user, 'branch_rules', None):
91 %if getattr(_user, 'branch_rules', None):
78 <% used_by_n_rules = len(_user.branch_rules) %>
92 <% used_by_n_rules = len(_user.branch_rules) %>
79 % if used_by_n_rules == 1:
93 % if used_by_n_rules == 1:
80 (${_('used by {} branch rule').format(used_by_n_rules)})
94 (${_('used by {} branch rule').format(used_by_n_rules)})
81 % else:
95 % else:
82 (${_('used by {} branch rules').format(used_by_n_rules)})
96 (${_('used by {} branch rules').format(used_by_n_rules)})
83 % endif
97 % endif
84 %endif
98 %endif
85 % endif
99 % endif
86 </span>
100 </span>
87 </td>
101 </td>
88 <td class="td-action">
102 <td class="td-action">
89 %if _user.username != h.DEFAULT_USER and getattr(_user, 'branch_rules', None) is None:
103 %if _user.username != h.DEFAULT_USER and getattr(_user, 'branch_rules', None) is None:
90 <span class="btn btn-link btn-danger revoke_perm"
104 <span class="btn btn-link btn-danger revoke_perm"
91 member="${_user.user_id}" member_type="user">
105 member="${_user.user_id}" member_type="user">
92 ${_('Revoke')}
106 ${_('Remove')}
93 </span>
107 </span>
94 %endif
108 %endif
95 </td>
109 </td>
96 <td>
110 <td class="quick_repo_menu">
97 % if c.rhodecode_user.is_admin:
111 % if c.rhodecode_user.is_admin:
98 % if _user.username == h.DEFAULT_USER:
112 <i class="icon-more"></i>
99 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
113 <div class="menu_items_container" style="display: none;">
100 % else:
114 <ul class="menu_items">
101 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
115 <li>
102 % endif
116 % if _user.username == h.DEFAULT_USER:
117 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
118 % else:
119 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
120 % endif
121 </li>
122 </ul>
123 </div>
103 % endif
124 % endif
104 </td>
125 </td>
105 </tr>
126 </tr>
106 %endif
127 %endif
107 %endfor
128 %endfor
108
129
109 ## USER GROUPS
130 ## USER GROUPS
110 %for _user_group in c.rhodecode_db_repo.permission_user_groups():
131 %for _user_group in c.rhodecode_db_repo.permission_user_groups():
111 <tr>
132 <tr>
112 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td>
133 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.none', checked=_user_group.permission=='repository.none')}</td>
113 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td>
134 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.read', checked=_user_group.permission=='repository.read')}</td>
114 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.write', checked=_user_group.permission=='repository.write')}</td>
135 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.write', checked=_user_group.permission=='repository.write')}</td>
115 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.admin', checked=_user_group.permission=='repository.admin')}</td>
136 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'repository.admin', checked=_user_group.permission=='repository.admin')}</td>
116 <td class="td-componentname">
137 <td class="td-componentname">
117 <i class="icon-user-group"></i>
138 <i class="icon-user-group"></i>
118 %if h.HasPermissionAny('hg.admin')():
139 %if h.HasPermissionAny('hg.admin')():
119 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
140 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
120 ${_user_group.users_group_name}
141 ${_user_group.users_group_name}
121 </a>
142 </a>
122 %else:
143 %else:
123 ${h.link_to_group(_user_group.users_group_name)}
144 ${h.link_to_group(_user_group.users_group_name)}
124 %endif
145 %endif
125 </td>
146 </td>
126 <td class="td-action">
147 <td class="td-action">
127 <span class="btn btn-link btn-danger revoke_perm"
148 <span class="btn btn-link btn-danger revoke_perm"
128 member="${_user_group.users_group_id}" member_type="user_group">
149 member="${_user_group.users_group_id}" member_type="user_group">
129 ${_('Revoke')}
150 ${_('Remove')}
130 </span>
151 </span>
131 </td>
152 </td>
132 <td>
153 <td class="quick_repo_menu">
133 % if c.rhodecode_user.is_admin:
154 % if c.rhodecode_user.is_admin:
134 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))}
155 <i class="icon-more"></i>
156 <div class="menu_items_container" style="display: none;">
157 <ul class="menu_items">
158 <li>
159 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))}
160 </li>
161 </ul>
162 </div>
135 % endif
163 % endif
136 </td>
164 </td>
137 </tr>
165 </tr>
138 %endfor
166 %endfor
139 <tr class="new_members" id="add_perm_input"></tr>
167 <tr class="new_members" id="add_perm_input"></tr>
140
168
141 <tr>
169 <tr>
142 <td></td>
170 <td></td>
143 <td></td>
171 <td></td>
144 <td></td>
172 <td></td>
145 <td></td>
173 <td></td>
146 <td></td>
174 <td></td>
147 <td>
175 <td>
148 <span id="add_perm" class="link">
176 <span id="add_perm" class="link">
149 ${_('Add user/user group')}
177 ${_('Add user/user group')}
150 </span>
178 </span>
151 </td>
179 </td>
152 <td></td>
180 <td></td>
153 </tr>
181 </tr>
154
182
155 </table>
183 </table>
156
184
157 <div class="buttons">
185 <div class="buttons">
158 ${h.submit('save',_('Save'),class_="btn btn-primary")}
186 ${h.submit('save',_('Save'),class_="btn btn-primary")}
159 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
187 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
160 </div>
188 </div>
161 ${h.end_form()}
189 ${h.end_form()}
162 </div>
190 </div>
163 </div>
191 </div>
164
192
165 <script type="text/javascript">
193 <script type="text/javascript">
166 $('#add_perm').on('click', function(e){
194 $('#add_perm').on('click', function(e){
167 addNewPermInput($(this), 'repository');
195 addNewPermInput($(this), 'repository');
168 });
196 });
169 $('.revoke_perm').on('click', function(e){
197 $('.revoke_perm').on('click', function(e){
170 markRevokePermInput($(this), 'repository');
198 markRevokePermInput($(this), 'repository');
171 });
199 });
200 quick_repo_menu();
172 </script>
201 </script>
@@ -1,177 +1,206 b''
1 <%namespace name="base" file="/base/base.mako"/>
1 <%namespace name="base" file="/base/base.mako"/>
2
2
3 <div class="panel panel-default">
3 <div class="panel panel-default">
4 <div class="panel-heading">
4 <div class="panel-heading">
5 <h3 class="panel-title">${_('User Group Permissions')}</h3>
5 <h3 class="panel-title">${_('User Group Permissions')}</h3>
6 </div>
6 </div>
7 <div class="panel-body">
7 <div class="panel-body">
8 ${h.secure_form(h.route_path('edit_user_group_perms_update', user_group_id=c.user_group.users_group_id), request=request)}
8 ${h.secure_form(h.route_path('edit_user_group_perms_update', user_group_id=c.user_group.users_group_id), request=request)}
9 <table id="permissions_manage" class="rctable permissions">
9 <table id="permissions_manage" class="rctable permissions">
10 <tr>
10 <tr>
11 <th class="td-radio">${_('None')}</th>
11 <th class="td-radio">${_('None')}</th>
12 <th class="td-radio">${_('Read')}</th>
12 <th class="td-radio">${_('Read')}</th>
13 <th class="td-radio">${_('Write')}</th>
13 <th class="td-radio">${_('Write')}</th>
14 <th class="td-radio">${_('Admin')}</th>
14 <th class="td-radio">${_('Admin')}</th>
15 <th>${_('User/User Group')}</th>
15 <th>${_('User/User Group')}</th>
16 <th></th>
16 <th class="td-action"></th>
17 <th></th>
17 <th class="td-action"></th>
18 </tr>
18 </tr>
19 ## USERS
19 ## USERS
20 %for _user in c.user_group.permissions():
20 %for _user in c.user_group.permissions():
21 ## super admin/owner row
21 ## super admin/owner row
22 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
22 %if getattr(_user, 'admin_row', None) or getattr(_user, 'owner_row', None):
23 <tr class="perm_admin_row">
23 <tr class="perm_admin_row">
24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
24 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.none', disabled="disabled")}</td>
25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
25 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.read', disabled="disabled")}</td>
26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
26 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.write', disabled="disabled")}</td>
27 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
27 <td class="td-radio">${h.radio('admin_perm_%s' % _user.user_id,'repository.admin', 'repository.admin', disabled="disabled")}</td>
28 <td class="td-user">
28 <td class="td-user">
29 ${base.gravatar(_user.email, 16)}
29 ${base.gravatar(_user.email, 16)}
30 <span class="user">
30 <span class="user">
31 ${h.link_to_user(_user.username)}
31 ${h.link_to_user(_user.username)}
32 %if getattr(_user, 'admin_row', None):
32 %if getattr(_user, 'admin_row', None):
33 (${_('super admin')})
33 (${_('super admin')})
34 %endif
34 %endif
35 %if getattr(_user, 'owner_row', None):
35 %if getattr(_user, 'owner_row', None):
36 (${_('owner')})
36 (${_('owner')})
37 %endif
37 %endif
38 </span>
38 </span>
39 </td>
39 </td>
40 <td></td>
40 <td></td>
41 <td>
41 <td class="quick_repo_menu">
42 % if c.rhodecode_user.is_admin:
42 % if c.rhodecode_user.is_admin:
43 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
43 <i class="icon-more"></i>
44 <div class="menu_items_container" style="display: none;">
45 <ul class="menu_items">
46 <li>
47 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))}
48 </li>
49 </ul>
50 </div>
44 % endif
51 % endif
45 </td>
52 </td>
46 </tr>
53 </tr>
47 %else:
54 %else:
48 ##forbid revoking permission from yourself, except if you're an super admin
55 ##forbid revoking permission from yourself, except if you're an super admin
49 <tr>
56 <tr>
50 %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin:
57 %if c.rhodecode_user.user_id != _user.user_id or c.rhodecode_user.is_admin:
51 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none')}</td>
58 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none')}</td>
52 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read')}</td>
59 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read')}</td>
53 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write')}</td>
60 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write')}</td>
54 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin')}</td>
61 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin')}</td>
55 <td class="td-user">
62 <td class="td-user">
56 ${base.gravatar(_user.email, 16)}
63 ${base.gravatar(_user.email, 16)}
57 <span class="user">
64 <span class="user">
58 % if _user.username == h.DEFAULT_USER:
65 % if _user.username == h.DEFAULT_USER:
59 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
66 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
60 % else:
67 % else:
61 ${h.link_to_user(_user.username)}
68 ${h.link_to_user(_user.username)}
62 %if getattr(_user, 'duplicate_perm', None):
69 %if getattr(_user, 'duplicate_perm', None):
63 (${_('inactive duplicate')})
70 (${_('inactive duplicate')})
64 %endif
71 %endif
65 % endif
72 % endif
66 </span>
73 </span>
67 </td>
74 </td>
68 <td class="td-action">
75 <td class="td-action">
69 %if _user.username != h.DEFAULT_USER:
76 %if _user.username != h.DEFAULT_USER:
70 <span class="btn btn-link btn-danger revoke_perm"
77 <span class="btn btn-link btn-danger revoke_perm"
71 member="${_user.user_id}" member_type="user">
78 member="${_user.user_id}" member_type="user">
72 ${_('Revoke')}
79 ${_('Remove')}
73 </span>
80 </span>
74 %endif
81 %endif
75 </td>
82 </td>
76 <td>
83 <td class="quick_repo_menu">
77 % if c.rhodecode_user.is_admin:
84 % if c.rhodecode_user.is_admin:
78 % if _user.username == h.DEFAULT_USER:
85 <i class="icon-more"></i>
79 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='repositories-permissions'))}
86 <div class="menu_items_container" style="display: none;">
80 % else:
87 <ul class="menu_items">
81 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
88 <li>
82 % endif
89 % if _user.username == h.DEFAULT_USER:
90 ${h.link_to('show permissions', h.route_path('admin_permissions_overview', _anchor='user-groups-permissions'))}
91 % else:
92 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))}
93 % endif
94 </li>
95 </ul>
96 </div>
83 % endif
97 % endif
84 </td>
98 </td>
85 %else:
99 %else:
86 ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions
100 ## special case for currently logged-in user permissions, we make sure he cannot take his own permissions
87 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none', disabled="disabled")}</td>
101 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.none', disabled="disabled")}</td>
88 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read', disabled="disabled")}</td>
102 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.read', disabled="disabled")}</td>
89 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write', disabled="disabled")}</td>
103 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.write', disabled="disabled")}</td>
90 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin', disabled="disabled")}</td>
104 <td class="td-radio">${h.radio('u_perm_%s' % _user.user_id,'usergroup.admin', disabled="disabled")}</td>
91 <td class="td-user">
105 <td class="td-user">
92 ${base.gravatar(_user.email, 16)}
106 ${base.gravatar(_user.email, 16)}
93 <span class="user">
107 <span class="user">
94 % if _user.username == h.DEFAULT_USER:
108 % if _user.username == h.DEFAULT_USER:
95 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
109 ${h.DEFAULT_USER} <span class="user-perm-help-text"> - ${_('permission for all other users')}</span>
96 % else:
110 % else:
97 ${h.link_to_user(_user.username)}
111 ${h.link_to_user(_user.username)}
98 %if getattr(_user, 'duplicate_perm', None):
112 %if getattr(_user, 'duplicate_perm', None):
99 (${_('inactive duplicate')})
113 (${_('inactive duplicate')})
100 %endif
114 %endif
101 % endif
115 % endif
102 <span class="user-perm-help-text">(${_('delegated admin')})</span>
116 <span class="user-perm-help-text">(${_('delegated admin')})</span>
103 </span>
117 </span>
104 </td>
118 </td>
105 <td></td>
119 <td></td>
106 <td>
120 <td class="quick_repo_menu">
107 % if c.rhodecode_user.is_admin:
121 % if c.rhodecode_user.is_admin:
108 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='repositories-permissions'))}
122 <i class="icon-more"></i>
123 <div class="menu_items_container" style="display: none;">
124 <ul class="menu_items">
125 <li>
126 ${h.link_to('show permissions', h.route_path('edit_user_perms_summary', user_id=_user.user_id, _anchor='user-groups-permissions'))}
127 </li>
128 </ul>
129 </div>
109 % endif
130 % endif
110 </td>
131 </td>
111 %endif
132 %endif
112 </tr>
133 </tr>
113 %endif
134 %endif
114 %endfor
135 %endfor
115
136
116 ## USER GROUPS
137 ## USER GROUPS
117 %for _user_group in c.user_group.permission_user_groups():
138 %for _user_group in c.user_group.permission_user_groups():
118 <tr>
139 <tr>
119 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.none')}</td>
140 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.none')}</td>
120 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.read')}</td>
141 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.read')}</td>
121 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.write')}</td>
142 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.write')}</td>
122 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.admin')}</td>
143 <td class="td-radio">${h.radio('g_perm_%s' % _user_group.users_group_id,'usergroup.admin')}</td>
123 <td class="td-user">
144 <td class="td-user">
124 <i class="icon-user-group"></i>
145 <i class="icon-user-group"></i>
125 %if h.HasPermissionAny('hg.admin')():
146 %if h.HasPermissionAny('hg.admin')():
126 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
147 <a href="${h.route_path('edit_user_group',user_group_id=_user_group.users_group_id)}">
127 ${_user_group.users_group_name}
148 ${_user_group.users_group_name}
128 </a>
149 </a>
129 %else:
150 %else:
130 ${h.link_to_group(_user_group.users_group_name)}
151 ${h.link_to_group(_user_group.users_group_name)}
131 %endif
152 %endif
132 </td>
153 </td>
133 <td class="td-action">
154 <td class="td-action">
134 <span class="btn btn-link btn-danger revoke_perm"
155 <span class="btn btn-link btn-danger revoke_perm"
135 member="${_user_group.users_group_id}" member_type="user_group">
156 member="${_user_group.users_group_id}" member_type="user_group">
136 ${_('Revoke')}
157 ${_('Remove')}
137 </span>
158 </span>
138 </td>
159 </td>
139 <td>
160 <td class="quick_repo_menu">
140 % if c.rhodecode_user.is_admin:
161 % if c.rhodecode_user.is_admin:
141 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='repositories-permissions'))}
162 <i class="icon-more"></i>
163 <div class="menu_items_container" style="display: none;">
164 <ul class="menu_items">
165 <li>
166 ${h.link_to('show permissions', h.route_path('edit_user_group_perms_summary', user_group_id=_user_group.users_group_id, _anchor='user-groups-permissions'))}
167 </li>
168 </ul>
169 </div>
142 % endif
170 % endif
143 </td>
171 </td>
144 </tr>
172 </tr>
145 %endfor
173 %endfor
146 <tr class="new_members" id="add_perm_input"></tr>
174 <tr class="new_members" id="add_perm_input"></tr>
147 <tr>
175 <tr>
148 <td></td>
176 <td></td>
149 <td></td>
177 <td></td>
150 <td></td>
178 <td></td>
151 <td></td>
179 <td></td>
152 <td></td>
180 <td></td>
153 <td>
181 <td>
154 <span id="add_perm" class="link">
182 <span id="add_perm" class="link">
155 ${_('Add user/user group')}
183 ${_('Add user/user group')}
156 </span>
184 </span>
157 </td>
185 </td>
158 <td></td>
186 <td></td>
159 </tr>
187 </tr>
160 </table>
188 </table>
161
189
162 <div class="buttons">
190 <div class="buttons">
163 ${h.submit('save',_('Save'),class_="btn btn-primary")}
191 ${h.submit('save',_('Save'),class_="btn btn-primary")}
164 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
192 ${h.reset('reset',_('Reset'),class_="btn btn-danger")}
165 </div>
193 </div>
166 ${h.end_form()}
194 ${h.end_form()}
167 </div>
195 </div>
168 </div>
196 </div>
169
197
170 <script type="text/javascript">
198 <script type="text/javascript">
171 $('#add_perm').on('click', function(e){
199 $('#add_perm').on('click', function(e){
172 addNewPermInput($(this), 'usergroup');
200 addNewPermInput($(this), 'usergroup');
173 });
201 });
174 $('.revoke_perm').on('click', function(e){
202 $('.revoke_perm').on('click', function(e){
175 markRevokePermInput($(this), 'usergroup');
203 markRevokePermInput($(this), 'usergroup');
176 });
204 });
205 quick_repo_menu()
177 </script>
206 </script>
General Comments 0
You need to be logged in to leave comments. Login now