##// END OF EJS Templates
datagrids: don't expand over the site width.
marcink -
r3166:fff406e2 default
parent child Browse files
Show More
@@ -1,504 +1,504 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
68 .td-radio + .td-owner {
68 .td-radio + .td-owner {
69 padding-left: 1em;
69 padding-left: 1em;
70 }
70 }
71
71
72
72
73 th {
73 th {
74 text-align: left;
74 text-align: left;
75 font-family: @text-semibold;
75 font-family: @text-semibold;
76 }
76 }
77
77
78 .hl {
78 .hl {
79 td {
79 td {
80 background-color: lighten(@alert4,25%);
80 background-color: lighten(@alert4,25%);
81 }
81 }
82 }
82 }
83
83
84 // Special Data Cell Types
84 // Special Data Cell Types
85 // See style guide for desciptions and examples.
85 // See style guide for desciptions and examples.
86
86
87 td {
87 td {
88
88
89 &.user {
89 &.user {
90 padding-left: 1em;
90 padding-left: 1em;
91 }
91 }
92
92
93 &.td-rss {
93 &.td-rss {
94 width: 20px;
94 width: 20px;
95 min-width: 0;
95 min-width: 0;
96 margin: 0;
96 margin: 0;
97 }
97 }
98
98
99 &.quick_repo_menu {
99 &.quick_repo_menu {
100 width: 15px;
100 width: 15px;
101 text-align: center;
101 text-align: center;
102
102
103 &:hover {
103 &:hover {
104 background-color: @grey5;
104 background-color: @grey5;
105 }
105 }
106 }
106 }
107
107
108 &.td-hash {
108 &.td-hash {
109 min-width: 80px;
109 min-width: 80px;
110 width: 200px;
110 width: 200px;
111
111
112 .obsolete {
112 .obsolete {
113 text-decoration: line-through;
113 text-decoration: line-through;
114 color: lighten(@grey2,25%);
114 color: lighten(@grey2,25%);
115 }
115 }
116 }
116 }
117
117
118 &.td-time {
118 &.td-time {
119 width: 160px;
119 width: 160px;
120 white-space: nowrap;
120 white-space: nowrap;
121 }
121 }
122
122
123 &.annotate{
123 &.annotate{
124 padding-right: 0;
124 padding-right: 0;
125
125
126 div.annotatediv{
126 div.annotatediv{
127 margin: 0 0.7em;
127 margin: 0 0.7em;
128 }
128 }
129 }
129 }
130
130
131 &.tags-col {
131 &.tags-col {
132 padding-right: 0;
132 padding-right: 0;
133 }
133 }
134
134
135 &.td-description {
135 &.td-description {
136 min-width: 350px;
136 min-width: 350px;
137
137
138 &.truncate, .truncate-wrap {
138 &.truncate, .truncate-wrap {
139 white-space: nowrap;
139 white-space: nowrap;
140 overflow: hidden;
140 overflow: hidden;
141 text-overflow: ellipsis;
141 text-overflow: ellipsis;
142 max-width: 450px;
142 max-width: 350px;
143 }
143 }
144 }
144 }
145
145
146 &.td-componentname {
146 &.td-componentname {
147 white-space: nowrap;
147 white-space: nowrap;
148 }
148 }
149
149
150 &.td-name {
150 &.td-name {
151
151
152 }
152 }
153
153
154 &.td-journalaction {
154 &.td-journalaction {
155 min-width: 300px;
155 min-width: 300px;
156
156
157 .journal_action_params {
157 .journal_action_params {
158 // waiting for feedback
158 // waiting for feedback
159 }
159 }
160 }
160 }
161
161
162 &.td-active {
162 &.td-active {
163 padding-left: .65em;
163 padding-left: .65em;
164 }
164 }
165
165
166 &.td-url {
166 &.td-url {
167 white-space: nowrap;
167 white-space: nowrap;
168 }
168 }
169
169
170 &.td-comments {
170 &.td-comments {
171 min-width: 3em;
171 min-width: 3em;
172 }
172 }
173
173
174 &.td-buttons {
174 &.td-buttons {
175 padding: .3em 0;
175 padding: .3em 0;
176 }
176 }
177
177
178 &.td-action {
178 &.td-action {
179 // this is for the remove/delete/edit buttons
179 // this is for the remove/delete/edit buttons
180 padding-right: 0;
180 padding-right: 0;
181 min-width: 95px;
181 min-width: 95px;
182 text-transform: capitalize;
182 text-transform: capitalize;
183
183
184 i {
184 i {
185 display: none;
185 display: none;
186 }
186 }
187 }
187 }
188
188
189 // TODO: lisa: this needs to be cleaned up with the buttons
189 // TODO: lisa: this needs to be cleaned up with the buttons
190 .grid_edit,
190 .grid_edit,
191 .grid_delete {
191 .grid_delete {
192 display: inline-block;
192 display: inline-block;
193 margin: 0 @padding/3 0 0;
193 margin: 0 @padding/3 0 0;
194 font-family: @text-light;
194 font-family: @text-light;
195
195
196 i {
196 i {
197 display: none;
197 display: none;
198 }
198 }
199 }
199 }
200
200
201 .grid_edit + .grid_delete {
201 .grid_edit + .grid_delete {
202 border-left: @border-thickness solid @grey5;
202 border-left: @border-thickness solid @grey5;
203 padding-left: @padding/2;
203 padding-left: @padding/2;
204 }
204 }
205
205
206 &.td-compare {
206 &.td-compare {
207
207
208 input {
208 input {
209 margin-right: 1em;
209 margin-right: 1em;
210 }
210 }
211
211
212 .compare-radio-button {
212 .compare-radio-button {
213 margin: 0 1em 0 0;
213 margin: 0 1em 0 0;
214 }
214 }
215
215
216
216
217 }
217 }
218
218
219 &.td-tags {
219 &.td-tags {
220 padding: .5em 1em .5em 0;
220 padding: .5em 1em .5em 0;
221 width: 140px;
221 width: 140px;
222
222
223 .tag {
223 .tag {
224 margin: 1px;
224 margin: 1px;
225 float: left;
225 float: left;
226 }
226 }
227 }
227 }
228
228
229 .icon-svn, .icon-hg, .icon-git {
229 .icon-svn, .icon-hg, .icon-git {
230 font-size: 1.4em;
230 font-size: 1.4em;
231 }
231 }
232
232
233 &.collapse_commit,
233 &.collapse_commit,
234 &.expand_commit {
234 &.expand_commit {
235 padding-right: 0;
235 padding-right: 0;
236 padding-left: 1em;
236 padding-left: 1em;
237 }
237 }
238 }
238 }
239
239
240 .perm_admin_row {
240 .perm_admin_row {
241 color: @grey4;
241 color: @grey4;
242 background-color: @grey6;
242 background-color: @grey6;
243 }
243 }
244
244
245 .noborder {
245 .noborder {
246 border: none;
246 border: none;
247
247
248 td {
248 td {
249 border: none;
249 border: none;
250 }
250 }
251 }
251 }
252 }
252 }
253 .rctable.audit-log {
253 .rctable.audit-log {
254 td {
254 td {
255 vertical-align: top;
255 vertical-align: top;
256 }
256 }
257 }
257 }
258
258
259 // TRUNCATING
259 // TRUNCATING
260 // TODO: lisaq: should this possibly be moved out of tables.less?
260 // TODO: lisaq: should this possibly be moved out of tables.less?
261 // for truncated text
261 // for truncated text
262 // used inside of table cells and in code block headers
262 // used inside of table cells and in code block headers
263 .truncate-wrap {
263 .truncate-wrap {
264 white-space: nowrap !important;
264 white-space: nowrap !important;
265
265
266 //truncated text
266 //truncated text
267 .truncate {
267 .truncate {
268 max-width: 450px;
268 max-width: 450px;
269 width: 300px;
269 width: 300px;
270 overflow: hidden;
270 overflow: hidden;
271 text-overflow: ellipsis;
271 text-overflow: ellipsis;
272 -o-text-overflow: ellipsis;
272 -o-text-overflow: ellipsis;
273 -ms-text-overflow: ellipsis;
273 -ms-text-overflow: ellipsis;
274
274
275 &.autoexpand {
275 &.autoexpand {
276 width: 120px;
276 width: 120px;
277 margin-right: 200px;
277 margin-right: 200px;
278 }
278 }
279 }
279 }
280 &:hover .truncate.autoexpand {
280 &:hover .truncate.autoexpand {
281 overflow: visible;
281 overflow: visible;
282 }
282 }
283
283
284 .tags-truncate {
284 .tags-truncate {
285 width: 150px;
285 width: 150px;
286 height: 22px;
286 height: 22px;
287 overflow: hidden;
287 overflow: hidden;
288
288
289 .tag {
289 .tag {
290 display: inline-block;
290 display: inline-block;
291 }
291 }
292
292
293 &.truncate {
293 &.truncate {
294 height: 22px;
294 height: 22px;
295 max-height:2em;
295 max-height:2em;
296 width: 140px;
296 width: 140px;
297 }
297 }
298 }
298 }
299 }
299 }
300
300
301 .apikeys_wrap {
301 .apikeys_wrap {
302 margin-bottom: @padding;
302 margin-bottom: @padding;
303
303
304 table.rctable td:first-child {
304 table.rctable td:first-child {
305 width: 340px;
305 width: 340px;
306 }
306 }
307 }
307 }
308
308
309
309
310
310
311 // SPECIAL CASES
311 // SPECIAL CASES
312
312
313 // Repository Followers
313 // Repository Followers
314 table.rctable.followers_data {
314 table.rctable.followers_data {
315 width: 75%;
315 width: 75%;
316 margin: 0;
316 margin: 0;
317 }
317 }
318
318
319 // Repository List
319 // Repository List
320 // Group Members List
320 // Group Members List
321 table.rctable.group_members,
321 table.rctable.group_members,
322 table#repo_list_table {
322 table#repo_list_table {
323 min-width: 600px;
323 min-width: 600px;
324 }
324 }
325
325
326 // Keyboard mappings
326 // Keyboard mappings
327 table.keyboard-mappings {
327 table.keyboard-mappings {
328 th {
328 th {
329 text-align: left;
329 text-align: left;
330 font-family: @text-semibold;
330 font-family: @text-semibold;
331 }
331 }
332 }
332 }
333
333
334 // Branches, Tags, and Bookmarks
334 // Branches, Tags, and Bookmarks
335 #obj_list_table.dataTable {
335 #obj_list_table.dataTable {
336 td.td-time {
336 td.td-time {
337 padding-right: 1em;
337 padding-right: 1em;
338 }
338 }
339 }
339 }
340
340
341 // User Admin
341 // User Admin
342 .rctable.useremails,
342 .rctable.useremails,
343 .rctable.account_emails {
343 .rctable.account_emails {
344 .tag,
344 .tag,
345 .btn {
345 .btn {
346 float: right;
346 float: right;
347 }
347 }
348 .btn { //to line up with tags
348 .btn { //to line up with tags
349 margin-right: 1.65em;
349 margin-right: 1.65em;
350 }
350 }
351 }
351 }
352
352
353 // User List
353 // User List
354 #user_list_table {
354 #user_list_table {
355
355
356 td.td-user {
356 td.td-user {
357 min-width: 100px;
357 min-width: 100px;
358 }
358 }
359 }
359 }
360
360
361 // Pull Request List Table
361 // Pull Request List Table
362 #pull_request_list_table.dataTable {
362 #pull_request_list_table.dataTable {
363
363
364 //TODO: lisa: This needs to be removed once the description is adjusted
364 //TODO: lisa: This needs to be removed once the description is adjusted
365 // for using an expand_commit button (see issue 765)
365 // for using an expand_commit button (see issue 765)
366 td {
366 td {
367 vertical-align: middle;
367 vertical-align: middle;
368 }
368 }
369 }
369 }
370
370
371 // Settings (no border)
371 // Settings (no border)
372 table.rctable.dl-settings {
372 table.rctable.dl-settings {
373 td {
373 td {
374 border: none;
374 border: none;
375 vertical-align: baseline;
375 vertical-align: baseline;
376 }
376 }
377 }
377 }
378
378
379
379
380 // Statistics
380 // Statistics
381 table.trending_language_tbl {
381 table.trending_language_tbl {
382 width: 100%;
382 width: 100%;
383 line-height: 1em;
383 line-height: 1em;
384
384
385 td div {
385 td div {
386 overflow: visible;
386 overflow: visible;
387 }
387 }
388 }
388 }
389
389
390 .trending_language_tbl, .trending_language_tbl td {
390 .trending_language_tbl, .trending_language_tbl td {
391 border: 0;
391 border: 0;
392 margin: 0;
392 margin: 0;
393 padding: 0;
393 padding: 0;
394 background: transparent;
394 background: transparent;
395 }
395 }
396
396
397 .trending_language_tbl, .trending_language_tbl tr {
397 .trending_language_tbl, .trending_language_tbl tr {
398 border-spacing: 0 3px;
398 border-spacing: 0 3px;
399 }
399 }
400
400
401 .trending_language {
401 .trending_language {
402 position: relative;
402 position: relative;
403 width: 100%;
403 width: 100%;
404 height: 19px;
404 height: 19px;
405 overflow: hidden;
405 overflow: hidden;
406 background-color: @grey6;
406 background-color: @grey6;
407
407
408 span, b{
408 span, b{
409 position: absolute;
409 position: absolute;
410 display: block;
410 display: block;
411 height: 12px;
411 height: 12px;
412 margin-bottom: 0px;
412 margin-bottom: 0px;
413 white-space: pre;
413 white-space: pre;
414 padding: floor(@basefontsize/4);
414 padding: floor(@basefontsize/4);
415 top: 0;
415 top: 0;
416 left: 0;
416 left: 0;
417 }
417 }
418
418
419 span{
419 span{
420 color: @text-color;
420 color: @text-color;
421 z-index: 0;
421 z-index: 0;
422 min-width: 20px;
422 min-width: 20px;
423 }
423 }
424
424
425 b {
425 b {
426 z-index: 1;
426 z-index: 1;
427 overflow: hidden;
427 overflow: hidden;
428 background-color: @rcblue;
428 background-color: @rcblue;
429 color: #FFF;
429 color: #FFF;
430 text-decoration: none;
430 text-decoration: none;
431 }
431 }
432
432
433 }
433 }
434
434
435 // Changesets
435 // Changesets
436 #changesets.rctable {
436 #changesets.rctable {
437
437
438 // td must be fixed height for graph
438 // td must be fixed height for graph
439 td {
439 td {
440 height: 32px;
440 height: 32px;
441 padding: 0 1em 0 0;
441 padding: 0 1em 0 0;
442 vertical-align: middle;
442 vertical-align: middle;
443 white-space: nowrap;
443 white-space: nowrap;
444
444
445 &.td-description {
445 &.td-description {
446 white-space: normal;
446 white-space: normal;
447 }
447 }
448
448
449 &.expand_commit {
449 &.expand_commit {
450 padding-right: 0;
450 padding-right: 0;
451 }
451 }
452 }
452 }
453 }
453 }
454
454
455 // Compare
455 // Compare
456 table.compare_view_commits {
456 table.compare_view_commits {
457 margin-top: @space;
457 margin-top: @space;
458
458
459 td.td-time {
459 td.td-time {
460 padding-left: .5em;
460 padding-left: .5em;
461 }
461 }
462
462
463 // special case to not show hover actions on hidden indicator
463 // special case to not show hover actions on hidden indicator
464 tr.compare_select_hidden:hover {
464 tr.compare_select_hidden:hover {
465 cursor: inherit;
465 cursor: inherit;
466
466
467 td {
467 td {
468 background-color: inherit;
468 background-color: inherit;
469 }
469 }
470 }
470 }
471
471
472 tr:hover {
472 tr:hover {
473 cursor: pointer;
473 cursor: pointer;
474
474
475 td {
475 td {
476 background-color: lighten(@alert4,25%);
476 background-color: lighten(@alert4,25%);
477 }
477 }
478 }
478 }
479
479
480
480
481 }
481 }
482
482
483 .file_history {
483 .file_history {
484 td.td-actions {
484 td.td-actions {
485 text-align: right;
485 text-align: right;
486 }
486 }
487 }
487 }
488
488
489
489
490 // Gist List
490 // Gist List
491 #gist_list_table {
491 #gist_list_table {
492 td {
492 td {
493 vertical-align: middle;
493 vertical-align: middle;
494
494
495 div{
495 div{
496 display: inline-block;
496 display: inline-block;
497 vertical-align: middle;
497 vertical-align: middle;
498 }
498 }
499
499
500 img{
500 img{
501 vertical-align: middle;
501 vertical-align: middle;
502 }
502 }
503 }
503 }
504 }
504 }
@@ -1,141 +1,141 b''
1 <%inherit file="/base/base.mako"/>
1 <%inherit file="/base/base.mako"/>
2
2
3 <%def name="main()">
3 <%def name="main()">
4 <div class="box">
4 <div class="box">
5 <!-- box / title -->
5 <!-- box / title -->
6 <div class="title">
6 <div class="title">
7 <div class="block-left breadcrumbs">
7 <div class="block-left breadcrumbs">
8 ${self.breadcrumbs()}
8 ${self.breadcrumbs()}
9 <span id="match_container" style="display:none"><span id="match_count">0</span> ${_('matches')}</span>
9 <span id="match_container" style="display:none"><span id="match_count">0</span> ${_('matches')}</span>
10 </div>
10 </div>
11 %if c.rhodecode_user.username != h.DEFAULT_USER:
11 %if c.rhodecode_user.username != h.DEFAULT_USER:
12 <div class="block-right">
12 <div class="block-right">
13 <%
13 <%
14 is_admin = h.HasPermissionAny('hg.admin')('can create repos index page')
14 is_admin = h.HasPermissionAny('hg.admin')('can create repos index page')
15 create_repo = h.HasPermissionAny('hg.create.repository')('can create repository index page')
15 create_repo = h.HasPermissionAny('hg.create.repository')('can create repository index page')
16 create_repo_group = h.HasPermissionAny('hg.repogroup.create.true')('can create repository groups index page')
16 create_repo_group = h.HasPermissionAny('hg.repogroup.create.true')('can create repository groups index page')
17 create_user_group = h.HasPermissionAny('hg.usergroup.create.true')('can create user groups index page')
17 create_user_group = h.HasPermissionAny('hg.usergroup.create.true')('can create user groups index page')
18
18
19 gr_name = c.repo_group.group_name if c.repo_group else None
19 gr_name = c.repo_group.group_name if c.repo_group else None
20 # create repositories with write permission on group is set to true
20 # create repositories with write permission on group is set to true
21 create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
21 create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
22 group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page')
22 group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'group admin index page')
23 group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
23 group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
24 %>
24 %>
25
25
26 %if not c.repo_group:
26 %if not c.repo_group:
27 ## no repository group context here
27 ## no repository group context here
28 %if is_admin or create_repo:
28 %if is_admin or create_repo:
29 <a href="${h.route_path('repo_new')}" class="btn btn-small btn-success btn-primary">${_('Add Repository')}</a>
29 <a href="${h.route_path('repo_new')}" class="btn btn-small btn-success btn-primary">${_('Add Repository')}</a>
30 %endif
30 %endif
31
31
32 %if is_admin or create_repo_group:
32 %if is_admin or create_repo_group:
33 <a href="${h.route_path('repo_group_new')}" class="btn btn-small btn-default">${_(u'Add Repository Group')}</a>
33 <a href="${h.route_path('repo_group_new')}" class="btn btn-small btn-default">${_(u'Add Repository Group')}</a>
34 %endif
34 %endif
35 %else:
35 %else:
36 ##we're inside other repository group other terms apply
36 ##we're inside other repository group other terms apply
37 %if is_admin or group_admin or (group_write and create_on_write):
37 %if is_admin or group_admin or (group_write and create_on_write):
38 <a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}" class="btn btn-small btn-success btn-primary">${_('Add Repository')}</a>
38 <a href="${h.route_path('repo_new',_query=dict(parent_group=c.repo_group.group_id))}" class="btn btn-small btn-success btn-primary">${_('Add Repository')}</a>
39 %endif
39 %endif
40 %if is_admin or group_admin:
40 %if is_admin or group_admin:
41 <a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}" class="btn btn-small btn-default">${_(u'Add Repository Group')}</a>
41 <a href="${h.route_path('repo_group_new',_query=dict(parent_group=c.repo_group.group_id))}" class="btn btn-small btn-default">${_(u'Add Repository Group')}</a>
42 %endif
42 %endif
43 %if is_admin or group_admin:
43 %if is_admin or group_admin:
44 <a href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}" class="btn btn-small btn-primary">${_('Edit Repository Group')}</a>
44 <a href="${h.route_path('edit_repo_group',repo_group_name=c.repo_group.group_name)}" title="${_('You have admin right to this group, and can edit it')}" class="btn btn-small btn-primary">${_('Edit Repository Group')}</a>
45 %endif
45 %endif
46 %endif
46 %endif
47 </div>
47 </div>
48 %endif
48 %endif
49 </div>
49 </div>
50 <!-- end box / title -->
50 <!-- end box / title -->
51 <div class="table">
51 <div class="table">
52 <div id="groups_list_wrap">
52 <div id="groups_list_wrap">
53 <table id="group_list_table" class="display"></table>
53 <table id="group_list_table" class="display" style="width: 100%"></table>
54 </div>
54 </div>
55 </div>
55 </div>
56
56
57 <div class="table">
57 <div class="table">
58 <div id="repos_list_wrap">
58 <div id="repos_list_wrap">
59 <table id="repo_list_table" class="display"></table>
59 <table id="repo_list_table" class="display" style="width: 100%"></table>
60 </div>
60 </div>
61 </div>
61 </div>
62
62
63 ## no repository groups and repos present, show something to the users
63 ## no repository groups and repos present, show something to the users
64 % if c.repo_groups_data == '[]' and c.repos_data == '[]':
64 % if c.repo_groups_data == '[]' and c.repos_data == '[]':
65 <div class="table">
65 <div class="table">
66 <h2 class="no-object-border">
66 <h2 class="no-object-border">
67 ${_('No repositories or repositories groups exists here.')}
67 ${_('No repositories or repositories groups exists here.')}
68 </h2>
68 </h2>
69 </div>
69 </div>
70 % endif
70 % endif
71
71
72 </div>
72 </div>
73 <script>
73 <script>
74 $(document).ready(function() {
74 $(document).ready(function() {
75
75
76 // repo group list
76 // repo group list
77 % if c.repo_groups_data != '[]':
77 % if c.repo_groups_data != '[]':
78 $('#group_list_table').DataTable({
78 $('#group_list_table').DataTable({
79 data: ${c.repo_groups_data|n},
79 data: ${c.repo_groups_data|n},
80 dom: 'rtp',
80 dom: 'rtp',
81 pageLength: ${c.visual.dashboard_items},
81 pageLength: ${c.visual.dashboard_items},
82 order: [[ 0, "asc" ]],
82 order: [[ 0, "asc" ]],
83 columns: [
83 columns: [
84 { data: {"_": "name",
84 { data: {"_": "name",
85 "sort": "name_raw"}, title: "${_('Name')}", className: "td-componentname" },
85 "sort": "name_raw"}, title: "${_('Name')}", className: "td-componentname" },
86 { data: 'menu', "bSortable": false, className: "quick_repo_menu" },
86 { data: 'menu', "bSortable": false, className: "quick_repo_menu" },
87 { data: {"_": "desc",
87 { data: {"_": "desc",
88 "sort": "desc"}, title: "${_('Description')}", className: "td-description" },
88 "sort": "desc"}, title: "${_('Description')}", className: "td-description" },
89 { data: {"_": "last_change",
89 { data: {"_": "last_change",
90 "sort": "last_change_raw",
90 "sort": "last_change_raw",
91 "type": Number}, title: "${_('Last Change')}", className: "td-time" },
91 "type": Number}, title: "${_('Last Change')}", className: "td-time" },
92 { data: {"_": "owner",
92 { data: {"_": "owner",
93 "sort": "owner"}, title: "${_('Owner')}", className: "td-user" }
93 "sort": "owner"}, title: "${_('Owner')}", className: "td-user" }
94 ],
94 ],
95 language: {
95 language: {
96 paginate: DEFAULT_GRID_PAGINATION,
96 paginate: DEFAULT_GRID_PAGINATION,
97 emptyTable: _gettext("No repository groups available yet.")
97 emptyTable: _gettext("No repository groups available yet.")
98 },
98 },
99 "drawCallback": function( settings, json ) {
99 "drawCallback": function( settings, json ) {
100 timeagoActivate();
100 timeagoActivate();
101 quick_repo_menu();
101 quick_repo_menu();
102 }
102 }
103 });
103 });
104 % endif
104 % endif
105
105
106 // repo list
106 // repo list
107 % if c.repos_data != '[]':
107 % if c.repos_data != '[]':
108 $('#repo_list_table').DataTable({
108 $('#repo_list_table').DataTable({
109 data: ${c.repos_data|n},
109 data: ${c.repos_data|n},
110 dom: 'rtp',
110 dom: 'rtp',
111 order: [[ 0, "asc" ]],
111 order: [[ 0, "asc" ]],
112 pageLength: ${c.visual.dashboard_items},
112 pageLength: ${c.visual.dashboard_items},
113 columns: [
113 columns: [
114 { data: {"_": "name",
114 { data: {"_": "name",
115 "sort": "name_raw"}, title: "${_('Name')}", className: "truncate-wrap td-componentname" },
115 "sort": "name_raw"}, title: "${_('Name')}", className: "truncate-wrap td-componentname" },
116 { data: 'menu', "bSortable": false, className: "quick_repo_menu" },
116 { data: 'menu', "bSortable": false, className: "quick_repo_menu" },
117 { data: {"_": "desc",
117 { data: {"_": "desc",
118 "sort": "desc"}, title: "${_('Description')}", className: "td-description" },
118 "sort": "desc"}, title: "${_('Description')}", className: "td-description" },
119 { data: {"_": "last_change",
119 { data: {"_": "last_change",
120 "sort": "last_change_raw",
120 "sort": "last_change_raw",
121 "type": Number}, title: "${_('Last Change')}", className: "td-time" },
121 "type": Number}, title: "${_('Last Change')}", className: "td-time" },
122 { data: {"_": "last_changeset",
122 { data: {"_": "last_changeset",
123 "sort": "last_changeset_raw",
123 "sort": "last_changeset_raw",
124 "type": Number}, title: "${_('Commit')}", className: "td-hash" },
124 "type": Number}, title: "${_('Commit')}", className: "td-hash" },
125 { data: {"_": "owner",
125 { data: {"_": "owner",
126 "sort": "owner"}, title: "${_('Owner')}", className: "td-user" }
126 "sort": "owner"}, title: "${_('Owner')}", className: "td-user" }
127 ],
127 ],
128 language: {
128 language: {
129 paginate: DEFAULT_GRID_PAGINATION,
129 paginate: DEFAULT_GRID_PAGINATION,
130 emptyTable: _gettext("No repositories available yet.")
130 emptyTable: _gettext("No repositories available yet.")
131 },
131 },
132 "drawCallback": function( settings, json ) {
132 "drawCallback": function( settings, json ) {
133 timeagoActivate();
133 timeagoActivate();
134 quick_repo_menu();
134 quick_repo_menu();
135 }
135 }
136 });
136 });
137 % endif
137 % endif
138
138
139 });
139 });
140 </script>
140 </script>
141 </%def>
141 </%def>
General Comments 0
You need to be logged in to leave comments. Login now