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