##// END OF EJS Templates
diffs: rename .diff to .filediff and use .diffset for grouping...
dan -
r1136:c0265ae8 default
parent child Browse files
Show More
@@ -1,1006 +1,1006 b''
1 1 // Default styles
2 2
3 3 .diff-collapse {
4 4 margin: @padding 0;
5 5 text-align: right;
6 6 }
7 7
8 8 .diff-container {
9 9 margin-bottom: @space;
10 10
11 11 .diffblock {
12 12 margin-bottom: @space;
13 13 }
14 14
15 15 &.hidden {
16 16 display: none;
17 17 overflow: hidden;
18 18 }
19 19 }
20 20
21 21 .compare_view_files {
22 22
23 23 .diff-container {
24 24
25 25 .diffblock {
26 26 margin-bottom: 0;
27 27 }
28 28 }
29 29 }
30 30
31 31 div.diffblock .sidebyside {
32 32 background: #ffffff;
33 33 }
34 34
35 35 div.diffblock {
36 36 overflow-x: auto;
37 37 overflow-y: hidden;
38 38 clear: both;
39 39 padding: 0px;
40 40 background: @grey6;
41 41 border: @border-thickness solid @grey5;
42 42 -webkit-border-radius: @border-radius @border-radius 0px 0px;
43 43 border-radius: @border-radius @border-radius 0px 0px;
44 44
45 45
46 46 .comments-number {
47 47 float: right;
48 48 }
49 49
50 50 // BEGIN CODE-HEADER STYLES
51 51
52 52 .code-header {
53 53 background: @grey6;
54 54 padding: 10px 0 10px 0;
55 55 height: auto;
56 56 width: 100%;
57 57
58 58 .hash {
59 59 float: left;
60 60 padding: 2px 0 0 2px;
61 61 }
62 62
63 63 .date {
64 64 float: left;
65 65 text-transform: uppercase;
66 66 padding: 4px 0px 0px 2px;
67 67 }
68 68
69 69 div {
70 70 margin-left: 4px;
71 71 }
72 72
73 73 div.compare_header {
74 74 min-height: 40px;
75 75 margin: 0;
76 76 padding: 0 @padding;
77 77
78 78 .drop-menu {
79 79 float:left;
80 80 display: block;
81 81 margin:0 0 @padding 0;
82 82 }
83 83
84 84 .compare-label {
85 85 float: left;
86 86 clear: both;
87 87 display: inline-block;
88 88 min-width: 5em;
89 89 margin: 0;
90 90 padding: @button-padding @button-padding @button-padding 0;
91 91 font-family: @text-semibold;
92 92 }
93 93
94 94 .compare-buttons {
95 95 float: left;
96 96 margin: 0;
97 97 padding: 0 0 @padding;
98 98
99 99 .btn {
100 100 margin: 0 @padding 0 0;
101 101 }
102 102 }
103 103 }
104 104
105 105 }
106 106
107 107 .parents {
108 108 float: left;
109 109 width: 100px;
110 110 font-weight: 400;
111 111 vertical-align: middle;
112 112 padding: 0px 2px 0px 2px;
113 113 background-color: @grey6;
114 114
115 115 #parent_link {
116 116 margin: 00px 2px;
117 117
118 118 &.double {
119 119 margin: 0px 2px;
120 120 }
121 121
122 122 &.disabled{
123 123 margin-right: @padding;
124 124 }
125 125 }
126 126 }
127 127
128 128 .children {
129 129 float: right;
130 130 width: 100px;
131 131 font-weight: 400;
132 132 vertical-align: middle;
133 133 text-align: right;
134 134 padding: 0px 2px 0px 2px;
135 135 background-color: @grey6;
136 136
137 137 #child_link {
138 138 margin: 0px 2px;
139 139
140 140 &.double {
141 141 margin: 0px 2px;
142 142 }
143 143
144 144 &.disabled{
145 145 margin-right: @padding;
146 146 }
147 147 }
148 148 }
149 149
150 150 .changeset_header {
151 151 height: 16px;
152 152
153 153 & > div{
154 154 margin-right: @padding;
155 155 }
156 156 }
157 157
158 158 .changeset_file {
159 159 text-align: left;
160 160 float: left;
161 161 padding: 0;
162 162
163 163 a{
164 164 display: inline-block;
165 165 margin-right: 0.5em;
166 166 }
167 167
168 168 #selected_mode{
169 169 margin-left: 0;
170 170 }
171 171 }
172 172
173 173 .diff-menu-wrapper {
174 174 float: left;
175 175 }
176 176
177 177 .diff-menu {
178 178 position: absolute;
179 179 background: none repeat scroll 0 0 #FFFFFF;
180 180 border-color: #003367 @grey3 @grey3;
181 181 border-right: 1px solid @grey3;
182 182 border-style: solid solid solid;
183 183 border-width: @border-thickness;
184 184 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
185 185 margin-top: 5px;
186 186 margin-left: 1px;
187 187 }
188 188
189 189 .diff-actions, .editor-actions {
190 190 float: left;
191 191
192 192 input{
193 193 margin: 0 0.5em 0 0;
194 194 }
195 195 }
196 196
197 197 // END CODE-HEADER STYLES
198 198
199 199 // BEGIN CODE-BODY STYLES
200 200
201 201 .code-body {
202 202 background: white;
203 203 padding: 0;
204 204 background-color: #ffffff;
205 205 position: relative;
206 206 max-width: none;
207 207 box-sizing: border-box;
208 208 // TODO: johbo: Parent has overflow: auto, this forces the child here
209 209 // to have the intended size and to scroll. Should be simplified.
210 210 width: 100%;
211 211 overflow-x: auto;
212 212 }
213 213
214 214 pre.raw {
215 215 background: white;
216 216 color: @grey1;
217 217 }
218 218 // END CODE-BODY STYLES
219 219
220 220 }
221 221
222 222
223 223 table.code-difftable {
224 224 border-collapse: collapse;
225 225 width: 99%;
226 226 border-radius: 0px !important;
227 227
228 228 td {
229 229 padding: 0 !important;
230 230 background: none !important;
231 231 border: 0 !important;
232 232 }
233 233
234 234 .context {
235 235 background: none repeat scroll 0 0 #DDE7EF;
236 236 }
237 237
238 238 .add {
239 239 background: none repeat scroll 0 0 #DDFFDD;
240 240
241 241 ins {
242 242 background: none repeat scroll 0 0 #AAFFAA;
243 243 text-decoration: none;
244 244 }
245 245 }
246 246
247 247 .del {
248 248 background: none repeat scroll 0 0 #FFDDDD;
249 249
250 250 del {
251 251 background: none repeat scroll 0 0 #FFAAAA;
252 252 text-decoration: none;
253 253 }
254 254 }
255 255
256 256 /** LINE NUMBERS **/
257 257 .lineno {
258 258 padding-left: 2px !important;
259 259 padding-right: 2px;
260 260 text-align: right;
261 261 width: 32px;
262 262 -moz-user-select: none;
263 263 -webkit-user-select: none;
264 264 border-right: @border-thickness solid @grey5 !important;
265 265 border-left: 0px solid #CCC !important;
266 266 border-top: 0px solid #CCC !important;
267 267 border-bottom: none !important;
268 268
269 269 a {
270 270 &:extend(pre);
271 271 text-align: right;
272 272 padding-right: 2px;
273 273 cursor: pointer;
274 274 display: block;
275 275 width: 32px;
276 276 }
277 277 }
278 278
279 279 .context {
280 280 cursor: auto;
281 281 &:extend(pre);
282 282 }
283 283
284 284 .lineno-inline {
285 285 background: none repeat scroll 0 0 #FFF !important;
286 286 padding-left: 2px;
287 287 padding-right: 2px;
288 288 text-align: right;
289 289 width: 30px;
290 290 -moz-user-select: none;
291 291 -webkit-user-select: none;
292 292 }
293 293
294 294 /** CODE **/
295 295 .code {
296 296 display: block;
297 297 width: 100%;
298 298
299 299 td {
300 300 margin: 0;
301 301 padding: 0;
302 302 }
303 303
304 304 pre {
305 305 margin: 0;
306 306 padding: 0;
307 307 margin-left: .5em;
308 308 }
309 309 }
310 310 }
311 311
312 312
313 313 // Comments
314 314
315 315 div.comment:target {
316 316 border-left: 6px solid @comment-highlight-color;
317 317 padding-left: 3px;
318 318 margin-left: -9px;
319 319 }
320 320
321 321 //TODO: anderson: can't get an absolute number out of anything, so had to put the
322 322 //current values that might change. But to make it clear I put as a calculation
323 323 @comment-max-width: 1065px;
324 324 @pr-extra-margin: 34px;
325 325 @pr-border-spacing: 4px;
326 326 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
327 327
328 328 // Pull Request
329 329 .cs_files .code-difftable {
330 330 border: @border-thickness solid @grey5; //borders only on PRs
331 331
332 332 .comment-inline-form,
333 333 div.comment {
334 334 width: @pr-comment-width;
335 335 }
336 336 }
337 337
338 338 // Changeset
339 339 .code-difftable {
340 340 .comment-inline-form,
341 341 div.comment {
342 342 width: @comment-max-width;
343 343 }
344 344 }
345 345
346 346 //Style page
347 347 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
348 348 #style-page .code-difftable{
349 349 .comment-inline-form,
350 350 div.comment {
351 351 width: @comment-max-width - @style-extra-margin;
352 352 }
353 353 }
354 354
355 355 #context-bar > h2 {
356 356 font-size: 20px;
357 357 }
358 358
359 359 #context-bar > h2> a {
360 360 font-size: 20px;
361 361 }
362 362 // end of defaults
363 363
364 364 .file_diff_buttons {
365 365 padding: 0 0 @padding;
366 366
367 367 .drop-menu {
368 368 float: left;
369 369 margin: 0 @padding 0 0;
370 370 }
371 371 .btn {
372 372 margin: 0 @padding 0 0;
373 373 }
374 374 }
375 375
376 376 .code-body.textarea.editor {
377 377 max-width: none;
378 378 padding: 15px;
379 379 }
380 380
381 381 td.injected_diff{
382 382 max-width: 1178px;
383 383 overflow-x: auto;
384 384 overflow-y: hidden;
385 385
386 386 div.diff-container,
387 387 div.diffblock{
388 388 max-width: 100%;
389 389 }
390 390
391 391 div.code-body {
392 392 max-width: 1124px;
393 393 overflow-x: auto;
394 394 overflow-y: hidden;
395 395 padding: 0;
396 396 }
397 397 div.diffblock {
398 398 border: none;
399 399 }
400 400
401 401 &.inline-form {
402 402 width: 99%
403 403 }
404 404 }
405 405
406 406
407 407 table.code-difftable {
408 408 width: 100%;
409 409 }
410 410
411 411 /** PYGMENTS COLORING **/
412 412 div.codeblock {
413 413
414 414 // TODO: johbo: Added interim to get rid of the margin around
415 415 // Select2 widgets. This needs further cleanup.
416 416 margin-top: @padding;
417 417
418 418 overflow: auto;
419 419 padding: 0px;
420 420 border: @border-thickness solid @grey5;
421 421 background: @grey6;
422 422 .border-radius(@border-radius);
423 423
424 424 #remove_gist {
425 425 float: right;
426 426 }
427 427
428 428 .author {
429 429 clear: both;
430 430 vertical-align: middle;
431 431 font-family: @text-bold;
432 432 }
433 433
434 434 .btn-mini {
435 435 float: left;
436 436 margin: 0 5px 0 0;
437 437 }
438 438
439 439 .code-header {
440 440 padding: @padding;
441 441 border-bottom: @border-thickness solid @grey5;
442 442
443 443 .rc-user {
444 444 min-width: 0;
445 445 margin-right: .5em;
446 446 }
447 447
448 448 .stats {
449 449 clear: both;
450 450 margin: 0 0 @padding 0;
451 451 padding: 0;
452 452 .left {
453 453 float: left;
454 454 clear: left;
455 455 max-width: 75%;
456 456 margin: 0 0 @padding 0;
457 457
458 458 &.item {
459 459 margin-right: @padding;
460 460 &.last { border-right: none; }
461 461 }
462 462 }
463 463 .buttons { float: right; }
464 464 .author {
465 465 height: 25px; margin-left: 15px; font-weight: bold;
466 466 }
467 467 }
468 468
469 469 .commit {
470 470 margin: 5px 0 0 26px;
471 471 font-weight: normal;
472 472 white-space: pre-wrap;
473 473 }
474 474 }
475 475
476 476 .message {
477 477 position: relative;
478 478 margin: @padding;
479 479
480 480 .codeblock-label {
481 481 margin: 0 0 1em 0;
482 482 }
483 483 }
484 484
485 485 .code-body {
486 486 padding: @padding;
487 487 background-color: #ffffff;
488 488 min-width: 100%;
489 489 box-sizing: border-box;
490 490 // TODO: johbo: Parent has overflow: auto, this forces the child here
491 491 // to have the intended size and to scroll. Should be simplified.
492 492 width: 100%;
493 493 overflow-x: auto;
494 494 }
495 495 }
496 496
497 497 .code-highlighttable,
498 498 div.codeblock {
499 499
500 500 &.readme {
501 501 background-color: white;
502 502 }
503 503
504 504 .markdown-block table {
505 505 border-collapse: collapse;
506 506
507 507 th,
508 508 td {
509 509 padding: .5em;
510 510 border: @border-thickness solid @border-default-color;
511 511 }
512 512 }
513 513
514 514 table {
515 515 border: 0px;
516 516 margin: 0;
517 517 letter-spacing: normal;
518 518
519 519
520 520 td {
521 521 border: 0px;
522 522 vertical-align: top;
523 523 }
524 524 }
525 525 }
526 526
527 527 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
528 528 div.search-code-body {
529 529 background-color: #ffffff; padding: 5px 0 5px 10px;
530 530 pre {
531 531 .match { background-color: #faffa6;}
532 532 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
533 533 }
534 534 .code-highlighttable {
535 535 border-collapse: collapse;
536 536
537 537 tr:hover {
538 538 background: #fafafa;
539 539 }
540 540 td.code {
541 541 padding-left: 10px;
542 542 }
543 543 td.line {
544 544 border-right: 1px solid #ccc !important;
545 545 padding-right: 10px;
546 546 text-align: right;
547 547 font-family: "Lucida Console",Monaco,monospace;
548 548 span {
549 549 white-space: pre-wrap;
550 550 color: #666666;
551 551 }
552 552 }
553 553 }
554 554 }
555 555
556 556 div.annotatediv { margin-left: 2px; margin-right: 4px; }
557 557 .code-highlight {
558 558 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
559 559 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
560 560 pre div:target {background-color: @comment-highlight-color !important;}
561 561 }
562 562
563 563 .linenos a { text-decoration: none; }
564 564
565 565 .CodeMirror-selected { background: @rchighlightblue; }
566 566 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
567 567 .CodeMirror ::selection { background: @rchighlightblue; }
568 568 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
569 569
570 570 .code { display: block; border:0px !important; }
571 571 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
572 572 .codehilite {
573 573 .hll { background-color: #ffffcc }
574 574 .c { color: #408080; font-style: italic } /* Comment */
575 575 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
576 576 .k { color: #008000; font-weight: bold } /* Keyword */
577 577 .o { color: #666666 } /* Operator */
578 578 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
579 579 .cp { color: #BC7A00 } /* Comment.Preproc */
580 580 .c1 { color: #408080; font-style: italic } /* Comment.Single */
581 581 .cs { color: #408080; font-style: italic } /* Comment.Special */
582 582 .gd { color: #A00000 } /* Generic.Deleted */
583 583 .ge { font-style: italic } /* Generic.Emph */
584 584 .gr { color: #FF0000 } /* Generic.Error */
585 585 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
586 586 .gi { color: #00A000 } /* Generic.Inserted */
587 587 .go { color: #808080 } /* Generic.Output */
588 588 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
589 589 .gs { font-weight: bold } /* Generic.Strong */
590 590 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
591 591 .gt { color: #0040D0 } /* Generic.Traceback */
592 592 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
593 593 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
594 594 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
595 595 .kp { color: #008000 } /* Keyword.Pseudo */
596 596 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
597 597 .kt { color: #B00040 } /* Keyword.Type */
598 598 .m { color: #666666 } /* Literal.Number */
599 599 .s { color: #BA2121 } /* Literal.String */
600 600 .na { color: #7D9029 } /* Name.Attribute */
601 601 .nb { color: #008000 } /* Name.Builtin */
602 602 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
603 603 .no { color: #880000 } /* Name.Constant */
604 604 .nd { color: #AA22FF } /* Name.Decorator */
605 605 .ni { color: #999999; font-weight: bold } /* Name.Entity */
606 606 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
607 607 .nf { color: #0000FF } /* Name.Function */
608 608 .nl { color: #A0A000 } /* Name.Label */
609 609 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
610 610 .nt { color: #008000; font-weight: bold } /* Name.Tag */
611 611 .nv { color: #19177C } /* Name.Variable */
612 612 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
613 613 .w { color: #bbbbbb } /* Text.Whitespace */
614 614 .mf { color: #666666 } /* Literal.Number.Float */
615 615 .mh { color: #666666 } /* Literal.Number.Hex */
616 616 .mi { color: #666666 } /* Literal.Number.Integer */
617 617 .mo { color: #666666 } /* Literal.Number.Oct */
618 618 .sb { color: #BA2121 } /* Literal.String.Backtick */
619 619 .sc { color: #BA2121 } /* Literal.String.Char */
620 620 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
621 621 .s2 { color: #BA2121 } /* Literal.String.Double */
622 622 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
623 623 .sh { color: #BA2121 } /* Literal.String.Heredoc */
624 624 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
625 625 .sx { color: #008000 } /* Literal.String.Other */
626 626 .sr { color: #BB6688 } /* Literal.String.Regex */
627 627 .s1 { color: #BA2121 } /* Literal.String.Single */
628 628 .ss { color: #19177C } /* Literal.String.Symbol */
629 629 .bp { color: #008000 } /* Name.Builtin.Pseudo */
630 630 .vc { color: #19177C } /* Name.Variable.Class */
631 631 .vg { color: #19177C } /* Name.Variable.Global */
632 632 .vi { color: #19177C } /* Name.Variable.Instance */
633 633 .il { color: #666666 } /* Literal.Number.Integer.Long */
634 634 }
635 635
636 636 /* customized pre blocks for markdown/rst */
637 637 pre.literal-block, .codehilite pre{
638 638 padding: @padding;
639 639 border: 1px solid @grey6;
640 640 .border-radius(@border-radius);
641 641 background-color: @grey7;
642 642 }
643 643
644 644
645 645 /* START NEW CODE BLOCK CSS */
646 646
647 647 @cb-line-height: 18px;
648 648 @cb-line-code-padding: 10px;
649 649 @cb-text-padding: 5px;
650 650
651 @diff-pill-padding: 2px 7px;
651 @pill-padding: 2px 7px;
652 652
653 input.diff-collapse-state {
653 input.filediff-collapse-state {
654 654 display: none;
655 655
656 &:checked + .diff { /* file diff is collapsed */
656 &:checked + .filediff { /* file diff is collapsed */
657 657 .cb {
658 658 display: none
659 659 }
660 .diff-collapse-indicator {
660 .filediff-collapse-indicator {
661 661 border-width: 9px 0 9px 15.6px;
662 662 border-color: transparent transparent transparent #ccc;
663 663 }
664 .diff-menu {
664 .filediff-menu {
665 665 display: none;
666 666 }
667 667 margin: -1px 0 0 0;
668 668 }
669 669
670 &+ .diff { /* file diff is expanded */
671 .diff-collapse-indicator {
670 &+ .filediff { /* file diff is expanded */
671 .filediff-collapse-indicator {
672 672 border-width: 15.6px 9px 0 9px;
673 673 border-color: #ccc transparent transparent transparent;
674 674 }
675 .diff-menu {
675 .filediff-menu {
676 676 display: block;
677 677 }
678 678 margin: 20px 0;
679 679 }
680 680 }
681 .diff {
681 .filediff {
682 682 border: 1px solid @grey5;
683 683
684 684 /* START OVERRIDES */
685 685 .code-highlight {
686 686 border: none; // TODO: remove this border from the global
687 687 // .code-highlight, it doesn't belong there
688 688 }
689 689 label {
690 690 margin: 0; // TODO: remove this margin definition from global label
691 691 // it doesn't belong there - if margin on labels
692 692 // are needed for a form they should be defined
693 693 // in the form's class
694 694 }
695 695 /* END OVERRIDES */
696 696
697 697 * {
698 698 box-sizing: border-box;
699 699 }
700 .diff-anchor {
700 .filediff-anchor {
701 701 visibility: hidden;
702 702 }
703 703 &:hover {
704 .diff-anchor {
704 .filediff-anchor {
705 705 visibility: visible;
706 706 }
707 707 }
708 708
709 .diff-collapse-indicator {
709 .filediff-collapse-indicator {
710 710 width: 0;
711 711 height: 0;
712 712 border-style: solid;
713 713 float: left;
714 714 margin: 2px 2px 0 0;
715 715 cursor: pointer;
716 716 }
717 717
718 .diff-heading {
718 .filediff-heading {
719 719 background: @grey7;
720 720 cursor: pointer;
721 721 display: block;
722 722 padding: 5px 10px;
723 723 }
724 .diff-heading:after {
724 .filediff-heading:after {
725 725 content: "";
726 726 display: table;
727 727 clear: both;
728 728 }
729 .diff-heading:hover {
729 .filediff-heading:hover {
730 730 background: #e1e9f4 !important;
731 731 }
732 732
733 .diff-menu {
733 .filediff-menu {
734 734 float: right;
735 735
736 736 a, span {
737 737 padding: 5px;
738 738 display: block;
739 739 float: left
740 740 }
741 741 }
742 .diff-pill {
742 .pill {
743 743 display: block;
744 744 float: left;
745 padding: @diff-pill-padding;
745 padding: @pill-padding;
746 746 }
747 .diff-pill-group {
748 .diff-pill {
747 .pill-group {
748 .pill {
749 749 opacity: .8;
750 750 &:first-child {
751 751 border-radius: @border-radius 0 0 @border-radius;
752 752 }
753 753 &:last-child {
754 754 border-radius: 0 @border-radius @border-radius 0;
755 755 }
756 756 &:only-child {
757 757 border-radius: @border-radius;
758 758 }
759 759 }
760 760 }
761 .diff-pill {
761 .pill {
762 762 &[op="name"] {
763 763 background: none;
764 764 color: @grey2;
765 765 opacity: 1;
766 766 color: white;
767 767 }
768 768 &[op="limited"] {
769 769 background: @grey2;
770 770 color: white;
771 771 }
772 772 &[op="binary"] {
773 773 background: @color7;
774 774 color: white;
775 775 }
776 776 &[op="modified"] {
777 777 background: @alert1;
778 778 color: white;
779 779 }
780 780 &[op="renamed"] {
781 781 background: @color4;
782 782 color: white;
783 783 }
784 784 &[op="mode"] {
785 785 background: @grey3;
786 786 color: white;
787 787 }
788 788 &[op="symlink"] {
789 789 background: @color8;
790 790 color: white;
791 791 }
792 792
793 793 &[op="added"] { /* added lines */
794 794 background: @alert1;
795 795 color: white;
796 796 }
797 797 &[op="deleted"] { /* deleted lines */
798 798 background: @alert2;
799 799 color: white;
800 800 }
801 801
802 802 &[op="created"] { /* created file */
803 803 background: @alert1;
804 804 color: white;
805 805 }
806 806 &[op="removed"] { /* deleted file */
807 807 background: @color5;
808 808 color: white;
809 809 }
810 810 }
811 811
812 .diff-collapse-button, .diff-expand-button {
812 .filediff-collapse-button, .filediff-expand-button {
813 813 cursor: pointer;
814 814 }
815 .diff-collapse-button {
815 .filediff-collapse-button {
816 816 display: inline;
817 817 }
818 .diff-expand-button {
818 .filediff-expand-button {
819 819 display: none;
820 820 }
821 .diff-collapsed .diff-collapse-button {
821 .filediff-collapsed .filediff-collapse-button {
822 822 display: none;
823 823 }
824 .diff-collapsed .diff-expand-button {
824 .filediff-collapsed .filediff-expand-button {
825 825 display: inline;
826 826 }
827 827 }
828 828 table.cb {
829 829 width: 100%;
830 830 border-collapse: collapse;
831 831
832 832 .cb-text {
833 833 padding: @cb-text-padding;
834 834 }
835 835 .cb-hunk {
836 836 padding: @cb-text-padding;
837 837 }
838 838 .cb-expand {
839 839 display: none;
840 840 }
841 841 .cb-collapse {
842 842 display: inline;
843 843 }
844 844 &.cb-collapsed {
845 845 .cb-line {
846 846 display: none;
847 847 }
848 848 .cb-expand {
849 849 display: inline;
850 850 }
851 851 .cb-collapse {
852 852 display: none;
853 853 }
854 854 }
855 855
856 856 /* intentionally general selector since .cb-line-selected must override it
857 857 and they both use !important since the td itself may have a random color
858 858 generated by annotation blocks. TLDR: if you change it, make sure
859 859 annotated block selection and line selection in file view still work */
860 860 .cb-line-fresh .cb-content {
861 861 background: white !important;
862 862 }
863 863 .cb-warning {
864 864 background: #fff4dd;
865 865 }
866 866
867 867 &.cb-diff-sideside {
868 868 td {
869 869 &.cb-content {
870 870 width: 50%;
871 871 }
872 872 }
873 873 }
874 874
875 875 tr {
876 876 &.cb-annotate {
877 877 border-top: 1px solid #eee;
878 878
879 879 &+ .cb-line {
880 880 border-top: 1px solid #eee;
881 881 }
882 882
883 883 &:first-child {
884 884 border-top: none;
885 885 &+ .cb-line {
886 886 border-top: none;
887 887 }
888 888 }
889 889 }
890 890
891 891 &.cb-hunk {
892 892 font-family: @font-family-monospace;
893 893 color: rgba(0, 0, 0, 0.3);
894 894
895 895 td {
896 896 &:first-child {
897 897 background: #edf2f9;
898 898 }
899 899 &:last-child {
900 900 background: #f4f7fb;
901 901 }
902 902 }
903 903 }
904 904 }
905 905
906 906 td {
907 907 vertical-align: top;
908 908 padding: 0;
909 909
910 910 &.cb-content {
911 911 font-size: 12.35px;
912 912
913 913 &.cb-line-selected .cb-code {
914 914 background: @comment-highlight-color !important;
915 915 }
916 916
917 917 span.cb-code {
918 918 line-height: @cb-line-height;
919 919 padding-left: @cb-line-code-padding;
920 920 padding-right: @cb-line-code-padding;
921 921 display: block;
922 922 white-space: pre-wrap;
923 923 font-family: @font-family-monospace;
924 924 word-break: break-word;
925 925 }
926 926 }
927 927
928 928 &.cb-lineno {
929 929 padding: 0;
930 930 width: 50px;
931 931 color: rgba(0, 0, 0, 0.3);
932 932 text-align: right;
933 933 border-right: 1px solid #eee;
934 934 font-family: @font-family-monospace;
935 935
936 936 a::before {
937 937 content: attr(data-line-no);
938 938 }
939 939 &.cb-line-selected a {
940 940 background: @comment-highlight-color !important;
941 941 }
942 942
943 943 a {
944 944 display: block;
945 945 padding-right: @cb-line-code-padding;
946 946 padding-left: @cb-line-code-padding;
947 947 line-height: @cb-line-height;
948 948 color: rgba(0, 0, 0, 0.3);
949 949 }
950 950 }
951 951
952 952 &.cb-empty {
953 953 background: @grey7;
954 954 }
955 955
956 956 ins {
957 957 color: black;
958 958 background: #a6f3a6;
959 959 text-decoration: none;
960 960 }
961 961 del {
962 962 color: black;
963 963 background: #f8cbcb;
964 964 text-decoration: none;
965 965 }
966 966 &.cb-addition {
967 967 background: #ecffec;
968 968
969 969 &.blob-lineno {
970 970 background: #ddffdd;
971 971 }
972 972 }
973 973 &.cb-deletion {
974 974 background: #ffecec;
975 975
976 976 &.blob-lineno {
977 977 background: #ffdddd;
978 978 }
979 979 }
980 980
981 981 &.cb-annotate-info {
982 982 width: 320px;
983 983 min-width: 320px;
984 984 max-width: 320px;
985 985 padding: 5px 2px;
986 986 font-size: 13px;
987 987
988 988 strong.cb-annotate-message {
989 989 padding: 5px 0;
990 990 white-space: pre-line;
991 991 display: inline-block;
992 992 }
993 993 .rc-user {
994 994 float: none;
995 995 padding: 0 6px 0 17px;
996 996 min-width: auto;
997 997 min-height: auto;
998 998 }
999 999 }
1000 1000
1001 1001 &.cb-annotate-revision {
1002 1002 cursor: pointer;
1003 1003 text-align: right;
1004 1004 }
1005 1005 }
1006 1006 }
@@ -1,412 +1,412 b''
1 1 <%def name="diff_line_anchor(filename, line, type)"><%
2 2 return '%s_%s_%i' % (h.safeid(filename), type, line)
3 3 %></%def>
4 4
5 5 <%def name="action_class(action)"><%
6 6 return {
7 7 '-': 'cb-deletion',
8 8 '+': 'cb-addition',
9 9 ' ': 'cb-context',
10 10 }.get(action, 'cb-empty')
11 11 %></%def>
12 12
13 13 <%def name="op_class(op_id)"><%
14 14 return {
15 15 DEL_FILENODE: 'deletion', # file deleted
16 16 BIN_FILENODE: 'warning' # binary diff hidden
17 17 }.get(op_id, 'addition')
18 18 %></%def>
19 19
20 20 <%def name="link_for(**kw)"><%
21 21 new_args = request.GET.mixed()
22 22 new_args.update(kw)
23 23 return h.url('', **new_args)
24 24 %></%def>
25 25
26 26 <%def name="render_diffset(diffset, commit_id=None,
27 27
28 28 # collapse all file diff entries when there are more than this amount of files in the diff
29 29 collapse_when_files_over=20,
30 30
31 31 # collapse lines in the diff when more than this amount of lines changed in the file diff
32 32 lines_changed_limit=500,
33 33
34 34 # add a ruler at to the output
35 35 ruler_at_chars=0,
36 36 )">
37 37 <%
38 38 # TODO: dan: move this to an argument - and set a cookie so that it is saved
39 39 # default option for future requests
40 40 diff_mode = request.GET.get('diffmode', 'sideside')
41 41 if diff_mode not in ('sideside', 'unified'):
42 42 diff_mode = 'sideside'
43 43
44 44 collapse_all = len(diffset.files) > collapse_when_files_over
45 45 %>
46 46
47 47 %if diff_mode == 'sideside':
48 48 <style>
49 49 .wrapper {
50 50 max-width: 1600px !important;
51 51 }
52 52 </style>
53 53 %endif
54 54 %if ruler_at_chars:
55 55 <style>
56 56 .diff table.cb .cb-content:after {
57 57 content: "";
58 58 border-left: 1px solid blue;
59 59 position: absolute;
60 60 top: 0;
61 61 height: 18px;
62 62 opacity: .2;
63 63 z-index: 10;
64 64 ## +5 to account for diff action (+/-)
65 65 left: ${ruler_at_chars + 5}ch;
66 66 </style>
67 67 %endif
68 68 % if diffset.limited_diff:
69 69 <div class="alert alert-warning">
70 70 ${_('The requested commit is too big and content was truncated.')} <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
71 71 </div>
72 72 % endif
73 73
74 <div class="cs_files">
75 <div class="cs_files_title">
74 <div class="diffset">
75 <div class="diffset-heading">
76 76 %if diffset.files:
77 77 <div class="pull-right">
78 78 <div class="btn-group">
79 79 <a
80 80 class="btn ${diff_mode == 'sideside' and 'btn-primary'} tooltip"
81 81 title="${_('View side by side')}"
82 82 href="${link_for(diffmode='sideside')}">
83 83 <span>${_('Side by Side')}</span>
84 84 </a>
85 85 <a
86 86 class="btn ${diff_mode == 'unified' and 'btn-primary'} tooltip"
87 87 title="${_('View unified')}" href="${link_for(diffmode='unified')}">
88 88 <span>${_('Unified')}</span>
89 89 </a>
90 90 </div>
91 91 </div>
92 92 <div class="pull-left">
93 93 <div class="btn-group">
94 94 <a
95 95 class="btn"
96 96 href="#"
97 onclick="$('input[class=diff-collapse-state]').prop('checked', false); return false">${_('Expand All')}</a>
97 onclick="$('input[class=filediff-collapse-state]').prop('checked', false); return false">${_('Expand All')}</a>
98 98 <a
99 99 class="btn"
100 100 href="#"
101 onclick="$('input[class=diff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}</a>
101 onclick="$('input[class=filediff-collapse-state]').prop('checked', true); return false">${_('Collapse All')}</a>
102 102 </div>
103 103 </div>
104 104 %endif
105 105 <h2 style="padding: 5px; text-align: center;">
106 106 %if diffset.limited_diff:
107 107 ${ungettext('%(num)s file changed', '%(num)s files changed', diffset.changed_files) % {'num': diffset.changed_files}}
108 108 %else:
109 109 ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted',
110 110 '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', diffset.changed_files) % {'num': diffset.changed_files, 'linesadd': diffset.lines_added, 'linesdel': diffset.lines_deleted}}
111 111 %endif
112 112 </h2>
113 113 </div>
114 114
115 115 %if not diffset.files:
116 116 <p class="empty_data">${_('No files')}</p>
117 117 %endif
118 118
119 119 <div class="filediffs">
120 120 %for i, filediff in enumerate(diffset.files):
121 121 <%
122 122 lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted']
123 123 over_lines_changed_limit = lines_changed > lines_changed_limit
124 124 %>
125 <input ${collapse_all and 'checked' or ''} class="diff-collapse-state" id="diff-collapse-${id(filediff)}" type="checkbox">
125 <input ${collapse_all and 'checked' or ''} class="filediff-collapse-state" id="filediff-collapse-${id(filediff)}" type="checkbox">
126 126 <div
127 class="diff"
127 class="filediff"
128 128 data-f-path="${filediff['patch']['filename']}"
129 129 id="a_${h.FID(commit_id or '', filediff['patch']['filename'])}">
130 <label for="diff-collapse-${id(filediff)}" class="diff-heading">
131 <div class="diff-collapse-indicator"></div>
130 <label for="filediff-collapse-${id(filediff)}" class="filediff-heading">
131 <div class="filediff-collapse-indicator"></div>
132 132 ${diff_ops(filediff)}
133 133 </label>
134 134 ${diff_menu(filediff)}
135 135 <table class="cb cb-diff-${diff_mode} code-highlight ${over_lines_changed_limit and 'cb-collapsed' or ''}">
136 136 %if not filediff.hunks:
137 137 %for op_id, op_text in filediff['patch']['stats']['ops'].items():
138 138 <tr>
139 139 <td class="cb-text cb-${op_class(op_id)}" ${diff_mode == 'unified' and 'colspan=3' or 'colspan=4'}>
140 140 %if op_id == DEL_FILENODE:
141 141 ${_('File was deleted')}
142 142 %elif op_id == BIN_FILENODE:
143 143 ${_('Binary file hidden')}
144 144 %else:
145 145 ${op_text}
146 146 %endif
147 147 </td>
148 148 </tr>
149 149 %endfor
150 150 %endif
151 151 %if over_lines_changed_limit:
152 152 <tr class="cb-warning cb-collapser">
153 153 <td class="cb-text" ${diff_mode == 'unified' and 'colspan=3' or 'colspan=4'}>
154 154 ${_('This diff has been collapsed as it changes many lines, (%i lines changed)' % lines_changed)}
155 155 <a href="#" class="cb-expand"
156 156 onclick="$(this).closest('table').removeClass('cb-collapsed'); return false;">${_('Show them')}
157 157 </a>
158 158 <a href="#" class="cb-collapse"
159 159 onclick="$(this).closest('table').addClass('cb-collapsed'); return false;">${_('Hide them')}
160 160 </a>
161 161 </td>
162 162 </tr>
163 163 %endif
164 164 %if filediff.patch['is_limited_diff']:
165 165 <tr class="cb-warning cb-collapser">
166 166 <td class="cb-text" ${diff_mode == 'unified' and 'colspan=3' or 'colspan=4'}>
167 167 ${_('The requested commit is too big and content was truncated.')} <a href="${link_for(fulldiff=1)}" onclick="return confirm('${_("Showing a big diff might take some time and resources, continue?")}')">${_('Show full diff')}</a>
168 168 </td>
169 169 </tr>
170 170 %endif
171 171 %for hunk in filediff.hunks:
172 172 <tr class="cb-hunk">
173 173 <td ${diff_mode == 'unified' and 'colspan=2' or ''}>
174 174 ## TODO: dan: add ajax loading of more context here
175 175 ## <a href="#">
176 176 <i class="icon-more"></i>
177 177 ## </a>
178 178 </td>
179 179 <td ${diff_mode == 'sideside' and 'colspan=3' or ''}>
180 180 @@
181 181 -${hunk.source_start},${hunk.source_length}
182 182 +${hunk.target_start},${hunk.target_length}
183 183 ${hunk.section_header}
184 184 </td>
185 185 </tr>
186 186 %if diff_mode == 'unified':
187 187 ${render_hunk_lines_unified(hunk)}
188 188 %elif diff_mode == 'sideside':
189 189 ${render_hunk_lines_sideside(hunk)}
190 190 %else:
191 191 <tr class="cb-line">
192 192 <td>unknown diff mode</td>
193 193 </tr>
194 194 %endif
195 195 %endfor
196 196 </table>
197 197 </div>
198 198 %endfor
199 199 </div>
200 200 </div>
201 201 </%def>
202 202
203 203 <%def name="diff_ops(filediff)">
204 204 <%
205 205 stats = filediff['patch']['stats']
206 206 from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
207 207 MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE
208 208 %>
209 <span class="diff-pill">
209 <span class="pill">
210 210 %if filediff.source_file_path and filediff.target_file_path:
211 211 %if filediff.source_file_path != filediff.target_file_path: # file was renamed
212 212 <strong>${filediff.target_file_path}</strong> β¬… <del>${filediff.source_file_path}</del>
213 213 %else:
214 214 ## file was modified
215 215 <strong>${filediff.source_file_path}</strong>
216 216 %endif
217 217 %else:
218 218 %if filediff.source_file_path:
219 219 ## file was deleted
220 220 <strong>${filediff.source_file_path}</strong>
221 221 %else:
222 222 ## file was added
223 223 <strong>${filediff.target_file_path}</strong>
224 224 %endif
225 225 %endif
226 226 </span>
227 <span class="diff-pill-group" style="float: left">
227 <span class="pill-group" style="float: left">
228 228 %if filediff.patch['is_limited_diff']:
229 <span class="diff-pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span>
229 <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span>
230 230 %endif
231 231 %if RENAMED_FILENODE in stats['ops']:
232 <span class="diff-pill" op="renamed">renamed</span>
232 <span class="pill" op="renamed">renamed</span>
233 233 %endif
234 234
235 235 %if NEW_FILENODE in stats['ops']:
236 <span class="diff-pill" op="created">created</span>
236 <span class="pill" op="created">created</span>
237 237 %if filediff['target_mode'].startswith('120'):
238 <span class="diff-pill" op="symlink">symlink</span>
238 <span class="pill" op="symlink">symlink</span>
239 239 %else:
240 <span class="diff-pill" op="mode">${nice_mode(filediff['target_mode'])}</span>
240 <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span>
241 241 %endif
242 242 %endif
243 243
244 244 %if DEL_FILENODE in stats['ops']:
245 <span class="diff-pill" op="removed">removed</span>
245 <span class="pill" op="removed">removed</span>
246 246 %endif
247 247
248 248 %if CHMOD_FILENODE in stats['ops']:
249 <span class="diff-pill" op="mode">
249 <span class="pill" op="mode">
250 250 ${nice_mode(filediff['source_mode'])} ➑ ${nice_mode(filediff['target_mode'])}
251 251 </span>
252 252 %endif
253 253 </span>
254 254
255 <a class="diff-pill diff-anchor" href="#a_${h.FID(commit_id or '', filediff.patch['filename'])}">ΒΆ</a>
255 <a class="pill filediff-anchor" href="#a_${h.FID(commit_id or '', filediff.patch['filename'])}">ΒΆ</a>
256 256
257 <span class="diff-pill-group" style="float: right">
257 <span class="pill-group" style="float: right">
258 258 %if BIN_FILENODE in stats['ops']:
259 <span class="diff-pill" op="binary">binary</span>
259 <span class="pill" op="binary">binary</span>
260 260 %if MOD_FILENODE in stats['ops']:
261 <span class="diff-pill" op="modified">modified</span>
261 <span class="pill" op="modified">modified</span>
262 262 %endif
263 263 %endif
264 264 %if stats['added']:
265 <span class="diff-pill" op="added">+${stats['added']}</span>
265 <span class="pill" op="added">+${stats['added']}</span>
266 266 %endif
267 267 %if stats['deleted']:
268 <span class="diff-pill" op="deleted">-${stats['deleted']}</span>
268 <span class="pill" op="deleted">-${stats['deleted']}</span>
269 269 %endif
270 270 </span>
271 271
272 272 </%def>
273 273
274 274 <%def name="nice_mode(filemode)">
275 275 ${filemode.startswith('100') and filemode[3:] or filemode}
276 276 </%def>
277 277
278 278 <%def name="diff_menu(filediff)">
279 <div class="diff-menu">
279 <div class="filediff-menu">
280 280 %if filediff.diffset.source_ref:
281 281 %if filediff.patch['operation'] in ['D', 'M']:
282 282 <a
283 283 class="tooltip"
284 284 href="${h.url('files_home',repo_name=c.repo_name,f_path=filediff.source_file_path,revision=filediff.diffset.source_ref)}"
285 285 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
286 286 >
287 287 ${_('Show file before')}
288 288 </a>
289 289 %else:
290 290 <span
291 291 class="tooltip"
292 292 title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.source_ref[:12]})}"
293 293 >
294 294 ${_('Show file before')}
295 295 </span>
296 296 %endif
297 297 %if filediff.patch['operation'] in ['A', 'M']:
298 298 <a
299 299 class="tooltip"
300 300 href="${h.url('files_home',repo_name=c.repo_name,f_path=filediff.target_file_path,revision=filediff.diffset.target_ref)}"
301 301 title="${h.tooltip(_('Show file at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
302 302 >
303 303 ${_('Show file after')}
304 304 </a>
305 305 %else:
306 306 <span
307 307 class="tooltip"
308 308 title="${h.tooltip(_('File no longer present at commit: %(commit_id)s') % {'commit_id': filediff.diffset.target_ref[:12]})}"
309 309 >
310 310 ${_('Show file after')}
311 311 </span>
312 312 %endif
313 313 <a
314 314 class="tooltip"
315 315 title="${h.tooltip(_('Raw diff'))}"
316 316 href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='raw')}"
317 317 >
318 318 ${_('Raw diff')}
319 319 </a>
320 320 <a
321 321 class="tooltip"
322 322 title="${h.tooltip(_('Download diff'))}"
323 323 href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=filediff.target_file_path,diff2=filediff.diffset.target_ref,diff1=filediff.diffset.source_ref,diff='download')}"
324 324 >
325 325 ${_('Download diff')}
326 326 </a>
327 327 %endif
328 328 </div>
329 329 </%def>
330 330
331 331
332 332 <%def name="render_hunk_lines_sideside(hunk)">
333 333 %for i, line in enumerate(hunk.sideside):
334 334 <%
335 335 old_line_anchor, new_line_anchor = None, None
336 336 if line.original.lineno:
337 337 old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, line.original.lineno, 'o')
338 338 if line.modified.lineno:
339 339 new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, line.modified.lineno, 'n')
340 340 %>
341 341 <tr class="cb-line">
342 342 <td class="cb-lineno ${action_class(line.original.action)}"
343 343 data-line-number="${line.original.lineno}"
344 344 %if old_line_anchor:
345 345 id="${old_line_anchor}"
346 346 %endif
347 347 >
348 348 %if line.original.lineno:
349 349 <a name="${old_line_anchor}" href="#${old_line_anchor}">${line.original.lineno}</a>
350 350 %endif
351 351 </td>
352 352 <td class="cb-content ${action_class(line.original.action)}"
353 353 data-line-number="o${line.original.lineno}"
354 354 ><span class="cb-code">${line.original.action} ${line.original.content or '' | n}</span>
355 355 </td>
356 356 <td class="cb-lineno ${action_class(line.modified.action)}"
357 357 data-line-number="${line.modified.lineno}"
358 358 %if new_line_anchor:
359 359 id="${new_line_anchor}"
360 360 %endif
361 361 >
362 362 %if line.modified.lineno:
363 363 <a name="${new_line_anchor}" href="#${new_line_anchor}">${line.modified.lineno}</a>
364 364 %endif
365 365 </td>
366 366 <td class="cb-content ${action_class(line.modified.action)}"
367 367 data-line-number="n${line.modified.lineno}"
368 368 >
369 369 <span class="cb-code">${line.modified.action} ${line.modified.content or '' | n}</span>
370 370 </td>
371 371 </tr>
372 372 %endfor
373 373 </%def>
374 374
375 375
376 376 <%def name="render_hunk_lines_unified(hunk)">
377 377 %for old_line_no, new_line_no, action, content in hunk.unified:
378 378 <%
379 379 old_line_anchor, new_line_anchor = None, None
380 380 if old_line_no:
381 381 old_line_anchor = diff_line_anchor(hunk.filediff.source_file_path, old_line_no, 'o')
382 382 if new_line_no:
383 383 new_line_anchor = diff_line_anchor(hunk.filediff.target_file_path, new_line_no, 'n')
384 384 %>
385 385 <tr class="cb-line">
386 386 <td class="cb-lineno ${action_class(action)}"
387 387 data-line-number="${old_line_no}"
388 388 %if old_line_anchor:
389 389 id="${old_line_anchor}"
390 390 %endif
391 391 >
392 392 %if old_line_anchor:
393 393 <a name="${old_line_anchor}" href="#${old_line_anchor}">${old_line_no}</a>
394 394 %endif
395 395 </td>
396 396 <td class="cb-lineno ${action_class(action)}"
397 397 data-line-number="${new_line_no}"
398 398 %if new_line_anchor:
399 399 id="${new_line_anchor}"
400 400 %endif
401 401 >
402 402 %if new_line_anchor:
403 403 <a name="${new_line_anchor}" href="#${new_line_anchor}">${new_line_no}</a>
404 404 %endif
405 405 </td>
406 406 <td class="cb-content ${action_class(action)}"
407 407 data-line-number="${new_line_no and 'n' or 'o'}${new_line_no or old_line_no}"
408 408 ><span class="cb-code">${action} ${content or '' | n}</span>
409 409 </td>
410 410 </tr>
411 411 %endfor
412 412 </%def>
General Comments 0
You need to be logged in to leave comments. Login now