##// END OF EJS Templates
auth-plugins: indicate activate and not-enabled plugin with gre6;
marcink -
r3285:1b64f905 default
parent child Browse files
Show More
@@ -1,505 +1,507 b''
1
1
2 // tables.less
2 // tables.less
3 // For use in RhodeCode application tables;
3 // For use in RhodeCode application tables;
4 // see style guide documentation for guidelines.
4 // see style guide documentation for guidelines.
5
5
6 // TABLES
6 // TABLES
7
7
8 .rctable,
8 .rctable,
9 table.rctable,
9 table.rctable,
10 table.dataTable {
10 table.dataTable {
11 clear:both;
11 clear:both;
12 width: 100%;
12 width: 100%;
13 margin: 0 auto @padding;
13 margin: 0 auto @padding;
14 padding: 0;
14 padding: 0;
15 vertical-align: baseline;
15 vertical-align: baseline;
16 line-height:1.5em;
16 line-height:1.5em;
17 border: none;
17 border: none;
18 outline: none;
18 outline: none;
19 border-collapse: collapse;
19 border-collapse: collapse;
20 border-spacing: 0;
20 border-spacing: 0;
21 color: @grey2;
21 color: @grey2;
22
22
23 b {
23 b {
24 font-weight: normal;
24 font-weight: normal;
25 }
25 }
26
26
27 em {
27 em {
28 font-weight: bold;
28 font-weight: bold;
29 font-style: normal;
29 font-style: normal;
30 }
30 }
31
31
32 th,
32 th,
33 td {
33 td {
34 height: auto;
34 height: auto;
35 max-width: 20%;
35 max-width: 20%;
36 padding: .65em 1em .65em 0;
36 padding: .65em 1em .65em 0;
37 vertical-align: middle;
37 vertical-align: middle;
38 border-bottom: @border-thickness solid @grey5;
38 border-bottom: @border-thickness solid @grey5;
39 white-space: normal;
39 white-space: normal;
40
40
41 &.td-radio,
41 &.td-radio,
42 &.td-checkbox {
42 &.td-checkbox {
43 padding-right: 0;
43 padding-right: 0;
44 text-align: center;
44 text-align: center;
45
45
46 input {
46 input {
47 margin: 0 1em;
47 margin: 0 1em;
48 }
48 }
49 }
49 }
50
50
51 &.truncate-wrap {
51 &.truncate-wrap {
52 white-space: nowrap !important;
52 white-space: nowrap !important;
53 }
53 }
54
54
55 pre {
55 pre {
56 margin: 0;
56 margin: 0;
57 }
57 }
58
58
59 .show_more {
59 .show_more {
60 height: inherit;
60 height: inherit;
61 }
61 }
62 }
62 }
63
63
64 .expired td {
64 .expired td {
65 background-color: @grey7;
65 background-color: @grey7;
66 }
66 }
67
67 .inactive td {
68 background-color: @grey6;
69 }
68 th {
70 th {
69 text-align: left;
71 text-align: left;
70 font-weight: @text-semibold-weight;
72 font-weight: @text-semibold-weight;
71 font-family: @text-semibold;
73 font-family: @text-semibold;
72 }
74 }
73
75
74 .hl {
76 .hl {
75 td {
77 td {
76 background-color: lighten(@alert4,25%);
78 background-color: lighten(@alert4,25%);
77 }
79 }
78 }
80 }
79
81
80 // Special Data Cell Types
82 // Special Data Cell Types
81 // See style guide for desciptions and examples.
83 // See style guide for desciptions and examples.
82
84
83 td {
85 td {
84
86
85 &.user {
87 &.user {
86 padding-left: 1em;
88 padding-left: 1em;
87 }
89 }
88
90
89 &.td-rss {
91 &.td-rss {
90 width: 20px;
92 width: 20px;
91 min-width: 0;
93 min-width: 0;
92 margin: 0;
94 margin: 0;
93 }
95 }
94
96
95 &.quick_repo_menu {
97 &.quick_repo_menu {
96 width: 15px;
98 width: 15px;
97 text-align: center;
99 text-align: center;
98
100
99 &:hover {
101 &:hover {
100 background-color: @grey5;
102 background-color: @grey5;
101 }
103 }
102 }
104 }
103
105
104 &.td-hash {
106 &.td-hash {
105 min-width: 80px;
107 min-width: 80px;
106 width: 200px;
108 width: 200px;
107
109
108 .obsolete {
110 .obsolete {
109 text-decoration: line-through;
111 text-decoration: line-through;
110 color: lighten(@grey2,25%);
112 color: lighten(@grey2,25%);
111 }
113 }
112 }
114 }
113
115
114 &.td-time {
116 &.td-time {
115 width: 160px;
117 width: 160px;
116 white-space: nowrap;
118 white-space: nowrap;
117 }
119 }
118
120
119 &.annotate{
121 &.annotate{
120 padding-right: 0;
122 padding-right: 0;
121
123
122 div.annotatediv{
124 div.annotatediv{
123 margin: 0 0.7em;
125 margin: 0 0.7em;
124 }
126 }
125 }
127 }
126
128
127 &.tags-col {
129 &.tags-col {
128 padding-right: 0;
130 padding-right: 0;
129 }
131 }
130
132
131 &.td-description {
133 &.td-description {
132 min-width: 350px;
134 min-width: 350px;
133
135
134 &.truncate, .truncate-wrap {
136 &.truncate, .truncate-wrap {
135 white-space: nowrap;
137 white-space: nowrap;
136 overflow: hidden;
138 overflow: hidden;
137 text-overflow: ellipsis;
139 text-overflow: ellipsis;
138 max-width: 350px;
140 max-width: 350px;
139 }
141 }
140 }
142 }
141
143
142 &.td-componentname {
144 &.td-componentname {
143 white-space: nowrap;
145 white-space: nowrap;
144 }
146 }
145
147
146 &.td-name {
148 &.td-name {
147
149
148 }
150 }
149
151
150 &.td-journalaction {
152 &.td-journalaction {
151 min-width: 300px;
153 min-width: 300px;
152
154
153 .journal_action_params {
155 .journal_action_params {
154 // waiting for feedback
156 // waiting for feedback
155 }
157 }
156 }
158 }
157
159
158 &.td-active {
160 &.td-active {
159 padding-left: .65em;
161 padding-left: .65em;
160 }
162 }
161
163
162 &.td-url {
164 &.td-url {
163 white-space: nowrap;
165 white-space: nowrap;
164 }
166 }
165
167
166 &.td-comments {
168 &.td-comments {
167 min-width: 3em;
169 min-width: 3em;
168 }
170 }
169
171
170 &.td-buttons {
172 &.td-buttons {
171 padding: .3em 0;
173 padding: .3em 0;
172 }
174 }
173
175
174 &.td-action {
176 &.td-action {
175 // this is for the remove/delete/edit buttons
177 // this is for the remove/delete/edit buttons
176 padding-right: 0;
178 padding-right: 0;
177 min-width: 95px;
179 min-width: 95px;
178 text-transform: capitalize;
180 text-transform: capitalize;
179
181
180 i {
182 i {
181 display: none;
183 display: none;
182 }
184 }
183 }
185 }
184
186
185 // TODO: lisa: this needs to be cleaned up with the buttons
187 // TODO: lisa: this needs to be cleaned up with the buttons
186 .grid_edit,
188 .grid_edit,
187 .grid_delete {
189 .grid_delete {
188 display: inline-block;
190 display: inline-block;
189 margin: 0 @padding/3 0 0;
191 margin: 0 @padding/3 0 0;
190 font-family: @text-light;
192 font-family: @text-light;
191
193
192 i {
194 i {
193 display: none;
195 display: none;
194 }
196 }
195 }
197 }
196
198
197 .grid_edit + .grid_delete {
199 .grid_edit + .grid_delete {
198 border-left: @border-thickness solid @grey5;
200 border-left: @border-thickness solid @grey5;
199 padding-left: @padding/2;
201 padding-left: @padding/2;
200 }
202 }
201
203
202 &.td-compare {
204 &.td-compare {
203
205
204 input {
206 input {
205 margin-right: 1em;
207 margin-right: 1em;
206 }
208 }
207
209
208 .compare-radio-button {
210 .compare-radio-button {
209 margin: 0 1em 0 0;
211 margin: 0 1em 0 0;
210 }
212 }
211
213
212
214
213 }
215 }
214
216
215 &.td-tags {
217 &.td-tags {
216 padding: .5em 1em .5em 0;
218 padding: .5em 1em .5em 0;
217 width: 140px;
219 width: 140px;
218
220
219 .tag {
221 .tag {
220 margin: 1px;
222 margin: 1px;
221 float: left;
223 float: left;
222 }
224 }
223 }
225 }
224
226
225 .icon-svn, .icon-hg, .icon-git {
227 .icon-svn, .icon-hg, .icon-git {
226 font-size: 1.4em;
228 font-size: 1.4em;
227 }
229 }
228
230
229 &.collapse_commit,
231 &.collapse_commit,
230 &.expand_commit {
232 &.expand_commit {
231 padding-right: 0;
233 padding-right: 0;
232 padding-left: 1em;
234 padding-left: 1em;
233 cursor: pointer;
235 cursor: pointer;
234 width: 20px;
236 width: 20px;
235 }
237 }
236 }
238 }
237
239
238 .perm_admin_row {
240 .perm_admin_row {
239 color: @grey4;
241 color: @grey4;
240 background-color: @grey6;
242 background-color: @grey6;
241 }
243 }
242
244
243 .noborder {
245 .noborder {
244 border: none;
246 border: none;
245
247
246 td {
248 td {
247 border: none;
249 border: none;
248 }
250 }
249 }
251 }
250 }
252 }
251 .rctable.audit-log {
253 .rctable.audit-log {
252 td {
254 td {
253 vertical-align: top;
255 vertical-align: top;
254 }
256 }
255 }
257 }
256
258
257 // TRUNCATING
259 // TRUNCATING
258 // TODO: lisaq: should this possibly be moved out of tables.less?
260 // TODO: lisaq: should this possibly be moved out of tables.less?
259 // for truncated text
261 // for truncated text
260 // used inside of table cells and in code block headers
262 // used inside of table cells and in code block headers
261 .truncate-wrap {
263 .truncate-wrap {
262 white-space: nowrap !important;
264 white-space: nowrap !important;
263
265
264 //truncated text
266 //truncated text
265 .truncate {
267 .truncate {
266 max-width: 450px;
268 max-width: 450px;
267 width: 300px;
269 width: 300px;
268 overflow: hidden;
270 overflow: hidden;
269 text-overflow: ellipsis;
271 text-overflow: ellipsis;
270 -o-text-overflow: ellipsis;
272 -o-text-overflow: ellipsis;
271 -ms-text-overflow: ellipsis;
273 -ms-text-overflow: ellipsis;
272
274
273 &.autoexpand {
275 &.autoexpand {
274 width: 120px;
276 width: 120px;
275 margin-right: 200px;
277 margin-right: 200px;
276 }
278 }
277 }
279 }
278 &:hover .truncate.autoexpand {
280 &:hover .truncate.autoexpand {
279 overflow: visible;
281 overflow: visible;
280 }
282 }
281
283
282 .tags-truncate {
284 .tags-truncate {
283 width: 150px;
285 width: 150px;
284 height: 22px;
286 height: 22px;
285 overflow: hidden;
287 overflow: hidden;
286
288
287 .tag {
289 .tag {
288 display: inline-block;
290 display: inline-block;
289 }
291 }
290
292
291 &.truncate {
293 &.truncate {
292 height: 22px;
294 height: 22px;
293 max-height:2em;
295 max-height:2em;
294 width: 140px;
296 width: 140px;
295 }
297 }
296 }
298 }
297 }
299 }
298
300
299 .apikeys_wrap {
301 .apikeys_wrap {
300 margin-bottom: @padding;
302 margin-bottom: @padding;
301
303
302 table.rctable td:first-child {
304 table.rctable td:first-child {
303 width: 340px;
305 width: 340px;
304 }
306 }
305 }
307 }
306
308
307
309
308
310
309 // SPECIAL CASES
311 // SPECIAL CASES
310
312
311 // Repository Followers
313 // Repository Followers
312 table.rctable.followers_data {
314 table.rctable.followers_data {
313 width: 75%;
315 width: 75%;
314 margin: 0;
316 margin: 0;
315 }
317 }
316
318
317 // Repository List
319 // Repository List
318 // Group Members List
320 // Group Members List
319 table.rctable.group_members,
321 table.rctable.group_members,
320 table#repo_list_table {
322 table#repo_list_table {
321 min-width: 600px;
323 min-width: 600px;
322 }
324 }
323
325
324 // Keyboard mappings
326 // Keyboard mappings
325 table.keyboard-mappings {
327 table.keyboard-mappings {
326 th {
328 th {
327 text-align: left;
329 text-align: left;
328 font-weight: @text-semibold-weight;
330 font-weight: @text-semibold-weight;
329 font-family: @text-semibold;
331 font-family: @text-semibold;
330 }
332 }
331 }
333 }
332
334
333 // Branches, Tags, and Bookmarks
335 // Branches, Tags, and Bookmarks
334 #obj_list_table.dataTable {
336 #obj_list_table.dataTable {
335 td.td-time {
337 td.td-time {
336 padding-right: 1em;
338 padding-right: 1em;
337 }
339 }
338 }
340 }
339
341
340 // User Admin
342 // User Admin
341 .rctable.useremails,
343 .rctable.useremails,
342 .rctable.account_emails {
344 .rctable.account_emails {
343 .tag,
345 .tag,
344 .btn {
346 .btn {
345 float: right;
347 float: right;
346 }
348 }
347 .btn { //to line up with tags
349 .btn { //to line up with tags
348 margin-right: 1.65em;
350 margin-right: 1.65em;
349 }
351 }
350 }
352 }
351
353
352 // User List
354 // User List
353 #user_list_table {
355 #user_list_table {
354
356
355 td.td-user {
357 td.td-user {
356 min-width: 100px;
358 min-width: 100px;
357 }
359 }
358 }
360 }
359
361
360 // Pull Request List Table
362 // Pull Request List Table
361 #pull_request_list_table.dataTable {
363 #pull_request_list_table.dataTable {
362
364
363 //TODO: lisa: This needs to be removed once the description is adjusted
365 //TODO: lisa: This needs to be removed once the description is adjusted
364 // for using an expand_commit button (see issue 765)
366 // for using an expand_commit button (see issue 765)
365 td {
367 td {
366 vertical-align: middle;
368 vertical-align: middle;
367 }
369 }
368 }
370 }
369
371
370 // Settings (no border)
372 // Settings (no border)
371 table.rctable.dl-settings {
373 table.rctable.dl-settings {
372 td {
374 td {
373 border: none;
375 border: none;
374 vertical-align: baseline;
376 vertical-align: baseline;
375 }
377 }
376 }
378 }
377
379
378
380
379 // Statistics
381 // Statistics
380 table.trending_language_tbl {
382 table.trending_language_tbl {
381 width: 100%;
383 width: 100%;
382 line-height: 1em;
384 line-height: 1em;
383
385
384 td div {
386 td div {
385 overflow: visible;
387 overflow: visible;
386 }
388 }
387 }
389 }
388
390
389 .trending_language_tbl, .trending_language_tbl td {
391 .trending_language_tbl, .trending_language_tbl td {
390 border: 0;
392 border: 0;
391 margin: 0;
393 margin: 0;
392 padding: 0;
394 padding: 0;
393 background: transparent;
395 background: transparent;
394 }
396 }
395
397
396 .trending_language_tbl, .trending_language_tbl tr {
398 .trending_language_tbl, .trending_language_tbl tr {
397 border-spacing: 0 3px;
399 border-spacing: 0 3px;
398 }
400 }
399
401
400 .trending_language {
402 .trending_language {
401 position: relative;
403 position: relative;
402 width: 100%;
404 width: 100%;
403 height: 19px;
405 height: 19px;
404 overflow: hidden;
406 overflow: hidden;
405 background-color: @grey6;
407 background-color: @grey6;
406
408
407 span, b{
409 span, b{
408 position: absolute;
410 position: absolute;
409 display: block;
411 display: block;
410 height: 12px;
412 height: 12px;
411 margin-bottom: 0px;
413 margin-bottom: 0px;
412 white-space: pre;
414 white-space: pre;
413 padding: floor(@basefontsize/4);
415 padding: floor(@basefontsize/4);
414 top: 0;
416 top: 0;
415 left: 0;
417 left: 0;
416 }
418 }
417
419
418 span{
420 span{
419 color: @text-color;
421 color: @text-color;
420 z-index: 0;
422 z-index: 0;
421 min-width: 20px;
423 min-width: 20px;
422 }
424 }
423
425
424 b {
426 b {
425 z-index: 1;
427 z-index: 1;
426 overflow: hidden;
428 overflow: hidden;
427 background-color: @rcblue;
429 background-color: @rcblue;
428 color: #FFF;
430 color: #FFF;
429 text-decoration: none;
431 text-decoration: none;
430 }
432 }
431
433
432 }
434 }
433
435
434 // Changesets
436 // Changesets
435 #changesets.rctable {
437 #changesets.rctable {
436
438
437 // td must be fixed height for graph
439 // td must be fixed height for graph
438 td {
440 td {
439 height: 32px;
441 height: 32px;
440 padding: 0 1em 0 0;
442 padding: 0 1em 0 0;
441 vertical-align: middle;
443 vertical-align: middle;
442 white-space: nowrap;
444 white-space: nowrap;
443
445
444 &.td-description {
446 &.td-description {
445 white-space: normal;
447 white-space: normal;
446 }
448 }
447
449
448 &.expand_commit {
450 &.expand_commit {
449 padding-right: 0;
451 padding-right: 0;
450 cursor: pointer;
452 cursor: pointer;
451 width: 20px;
453 width: 20px;
452 }
454 }
453 }
455 }
454 }
456 }
455
457
456 // Compare
458 // Compare
457 table.compare_view_commits {
459 table.compare_view_commits {
458 margin-top: @space;
460 margin-top: @space;
459
461
460 td.td-time {
462 td.td-time {
461 padding-left: .5em;
463 padding-left: .5em;
462 }
464 }
463
465
464 // special case to not show hover actions on hidden indicator
466 // special case to not show hover actions on hidden indicator
465 tr.compare_select_hidden:hover {
467 tr.compare_select_hidden:hover {
466 cursor: inherit;
468 cursor: inherit;
467
469
468 td {
470 td {
469 background-color: inherit;
471 background-color: inherit;
470 }
472 }
471 }
473 }
472
474
473 tr:hover {
475 tr:hover {
474 cursor: pointer;
476 cursor: pointer;
475
477
476 td {
478 td {
477 background-color: lighten(@alert4,25%);
479 background-color: lighten(@alert4,25%);
478 }
480 }
479 }
481 }
480
482
481
483
482 }
484 }
483
485
484 .file_history {
486 .file_history {
485 td.td-actions {
487 td.td-actions {
486 text-align: right;
488 text-align: right;
487 }
489 }
488 }
490 }
489
491
490
492
491 // Gist List
493 // Gist List
492 #gist_list_table {
494 #gist_list_table {
493 td {
495 td {
494 vertical-align: middle;
496 vertical-align: middle;
495
497
496 div{
498 div{
497 display: inline-block;
499 display: inline-block;
498 vertical-align: middle;
500 vertical-align: middle;
499 }
501 }
500
502
501 img{
503 img{
502 vertical-align: middle;
504 vertical-align: middle;
503 }
505 }
504 }
506 }
505 }
507 }
@@ -1,126 +1,126 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Authentication Settings')}
5 ${_('Authentication Settings')}
6 %if c.rhodecode_name:
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}}
7 &middot; ${h.branding(c.rhodecode_name)}}
8 %endif
8 %endif
9 </%def>
9 </%def>
10
10
11 <%def name="breadcrumbs_links()">
11 <%def name="breadcrumbs_links()">
12 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
12 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
13 &raquo;
13 &raquo;
14 ${_('Authentication Plugins')}
14 ${_('Authentication Plugins')}
15 </%def>
15 </%def>
16
16
17 <%def name="menu_bar_nav()">
17 <%def name="menu_bar_nav()">
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="main()">
21 <%def name="main()">
22
22
23 <div class="box">
23 <div class="box">
24 <div class="title">
24 <div class="title">
25 ${self.breadcrumbs()}
25 ${self.breadcrumbs()}
26 </div>
26 </div>
27
27
28 <div class='sidebar-col-wrapper'>
28 <div class='sidebar-col-wrapper'>
29
29
30 <div class="sidebar">
30 <div class="sidebar">
31 <ul class="nav nav-pills nav-stacked">
31 <ul class="nav nav-pills nav-stacked">
32 % for item in resource.get_root().get_nav_list():
32 % for item in resource.get_root().get_nav_list():
33 <li ${'class=active' if item == resource else ''}>
33 <li ${'class=active' if item == resource else ''}>
34 <a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a>
34 <a href="${request.resource_path(item, route_name='auth_home')}">${item.display_name}</a>
35 </li>
35 </li>
36 % endfor
36 % endfor
37 </ul>
37 </ul>
38 </div>
38 </div>
39
39
40 <div class="main-content-full-width">
40 <div class="main-content-full-width">
41 ${h.secure_form(request.resource_path(resource, route_name='auth_home'), request=request)}
41 ${h.secure_form(request.resource_path(resource, route_name='auth_home'), request=request)}
42 <div class="panel panel-default">
42 <div class="panel panel-default">
43
43
44 <div class="panel-heading">
44 <div class="panel-heading">
45 <h3 class="panel-title">${_("Enabled and Available Plugins")}</h3>
45 <h3 class="panel-title">${_("Enabled and Available Plugins")}</h3>
46 </div>
46 </div>
47
47
48 <div class="panel-body">
48 <div class="panel-body">
49
49
50
50
51 <div class="label">${_("Ordered Activated Plugins")}</div>
51 <div class="label">${_("Ordered Activated Plugins")}</div>
52 <div class="textarea text-area editor">
52 <div class="textarea text-area editor">
53 ${h.textarea('auth_plugins',cols=120,rows=20,class_="medium")}
53 ${h.textarea('auth_plugins',cols=120,rows=20,class_="medium")}
54 </div>
54 </div>
55 <div class="field">
55 <div class="field">
56 <p class="help-block pre-formatting">${_('List of plugins, separated by commas.'
56 <p class="help-block pre-formatting">${_('List of plugins, separated by commas.'
57 '\nThe order of the plugins is also the order in which '
57 '\nThe order of the plugins is also the order in which '
58 'RhodeCode Enterprise will try to authenticate a user.')}
58 'RhodeCode Enterprise will try to authenticate a user.')}
59 </p>
59 </p>
60 </div>
60 </div>
61
61
62 <table class="rctable">
62 <table class="rctable">
63 <th>${_('Activate')}</th>
63 <th>${_('Activate')}</th>
64 <th>${_('Plugin Name')}</th>
64 <th>${_('Plugin Name')}</th>
65 <th>${_('Documentation')}</th>
65 <th>${_('Documentation')}</th>
66 <th>${_('Plugin ID')}</th>
66 <th>${_('Plugin ID')}</th>
67 <th>${_('Enabled')}</th>
67 <th>${_('Enabled')}</th>
68 %for plugin in available_plugins:
68 %for plugin in available_plugins:
69 <tr>
69 <tr class="${'inactive' if (not plugin.is_active() and plugin.get_id() in enabled_plugins) else ''}">
70 <td>
70 <td>
71 <span plugin_id="${plugin.get_id()}" class="toggle-plugin btn ${'btn-success' if plugin.get_id() in enabled_plugins else ''}">
71 <span plugin_id="${plugin.get_id()}" class="toggle-plugin btn ${'btn-success' if plugin.get_id() in enabled_plugins else ''}">
72 ${_('activated') if plugin.get_id() in enabled_plugins else _('not active')}
72 ${_('activated') if plugin.get_id() in enabled_plugins else _('not active')}
73 </span>
73 </span>
74 </td>
74 </td>
75 <td>${plugin.get_display_name()}</td>
75 <td>${plugin.get_display_name()}</td>
76 <td>
76 <td>
77 % if plugin.docs():
77 % if plugin.docs():
78 <a href="${plugin.docs()}">docs</a>
78 <a href="${plugin.docs()}">docs</a>
79 % endif
79 % endif
80 </td>
80 </td>
81 <td>${plugin.get_id()}</td>
81 <td>${plugin.get_id()}</td>
82 <td>${plugin.is_active()}</td>
82 <td>${plugin.is_active()}</td>
83 </tr>
83 </tr>
84 %endfor
84 %endfor
85 </table>
85 </table>
86
86
87 <div class="buttons">
87 <div class="buttons">
88 ${h.submit('save',_('Save'),class_="btn")}
88 ${h.submit('save',_('Save'),class_="btn")}
89 </div>
89 </div>
90 </div>
90 </div>
91 </div>
91 </div>
92 ${h.end_form()}
92 ${h.end_form()}
93 </div>
93 </div>
94 </div>
94 </div>
95 </div>
95 </div>
96
96
97 <script>
97 <script>
98 $('.toggle-plugin').click(function(e){
98 $('.toggle-plugin').click(function(e){
99 var auth_plugins_input = $('#auth_plugins');
99 var auth_plugins_input = $('#auth_plugins');
100 var elems = [];
100 var elems = [];
101
101
102 $.each(auth_plugins_input.val().split(',') , function (index, element) {
102 $.each(auth_plugins_input.val().split(',') , function (index, element) {
103 if (element !== "") {
103 if (element !== "") {
104 elems.push(element.strip())
104 elems.push(element.strip())
105 }
105 }
106 });
106 });
107
107
108 var cur_button = e.currentTarget;
108 var cur_button = e.currentTarget;
109 var plugin_id = $(cur_button).attr('plugin_id');
109 var plugin_id = $(cur_button).attr('plugin_id');
110 if($(cur_button).hasClass('btn-success')){
110 if($(cur_button).hasClass('btn-success')){
111 elems.splice(elems.indexOf(plugin_id), 1);
111 elems.splice(elems.indexOf(plugin_id), 1);
112 auth_plugins_input.val(elems.join(',\n'));
112 auth_plugins_input.val(elems.join(',\n'));
113 $(cur_button).removeClass('btn-success');
113 $(cur_button).removeClass('btn-success');
114 cur_button.innerHTML = _gettext('not active');
114 cur_button.innerHTML = _gettext('not active');
115 }
115 }
116 else{
116 else{
117 if(elems.indexOf(plugin_id) == -1){
117 if (elems.indexOf(plugin_id) === -1) {
118 elems.push(plugin_id);
118 elems.push(plugin_id);
119 }
119 }
120 auth_plugins_input.val(elems.join(',\n'));
120 auth_plugins_input.val(elems.join(',\n'));
121 $(cur_button).addClass('btn-success');
121 $(cur_button).addClass('btn-success');
122 cur_button.innerHTML = _gettext('activated');
122 cur_button.innerHTML = _gettext('activated');
123 }
123 }
124 });
124 });
125 </script>
125 </script>
126 </%def>
126 </%def>
General Comments 0
You need to be logged in to leave comments. Login now