Ticket #9125: 9125.patch
| File 9125.patch, 2.1 KB (added by Carsten Klein <carsten.klein@…>, 2 years ago) |
|---|
-
trac/ticket/report.py
old new 436 436 header_groups.append([]) 437 437 header_group.append(header) 438 438 439 maxcols = 0 440 for header_group in header_groups: 441 numhidden = 0 442 numcols = 0 443 for header in header_group: 444 if header['hidden']: 445 numhidden += 1 446 else: 447 numcols += 1 448 maxcols = numcols > maxcols and numcols or maxcols 449 i = 1 450 for header in header_group: 451 header['numhidden'] = numhidden 452 header['grpindex'] = i 453 i += 1 454 439 455 # Structure the rows and cells: 440 456 # - group rows according to __group__ value, if defined 441 457 # - group cells the same way headers are grouped … … 467 483 '__fgcolor__', '__bgcolor__', 468 484 '__grouplink__'): 469 485 row[col] = value 470 if col in ('report', 'ticket', 'id', '_id'): 486 col = col.strip('_') 487 if col in ('report', 'ticket', 'id'): 471 488 row['id'] = value 472 489 # Special casing based on column name 473 col = col.strip('_')474 490 if col in ('reporter', 'cc', 'owner'): 475 491 email_cells.append(cell) 476 492 elif col == 'realm': … … 505 521 data.update({'header_groups': header_groups, 506 522 'row_groups': row_groups, 507 523 'numrows': numrows, 524 'maxcols': maxcols, 508 525 'sorting_enabled': len(row_groups)==1, 509 526 'email_map': email_map}) 510 527 … … 765 782 report, args, fragment = formatter.split_link(target) 766 783 return tag.a(label, href=formatter.href.report(report) + args, 767 784 class_='report') 785
