Show More
@@ -648,37 +648,37 b' pre.literal-block, .codehilite pre{' | |||||
648 | @cb-line-code-padding: 10px; |
|
648 | @cb-line-code-padding: 10px; | |
649 | @cb-text-padding: 5px; |
|
649 | @cb-text-padding: 5px; | |
650 |
|
650 | |||
651 |
@ |
|
651 | @pill-padding: 2px 7px; | |
652 |
|
652 | |||
653 | input.diff-collapse-state { |
|
653 | input.filediff-collapse-state { | |
654 | display: none; |
|
654 | display: none; | |
655 |
|
655 | |||
656 | &:checked + .diff { /* file diff is collapsed */ |
|
656 | &:checked + .filediff { /* file diff is collapsed */ | |
657 | .cb { |
|
657 | .cb { | |
658 | display: none |
|
658 | display: none | |
659 | } |
|
659 | } | |
660 | .diff-collapse-indicator { |
|
660 | .filediff-collapse-indicator { | |
661 | border-width: 9px 0 9px 15.6px; |
|
661 | border-width: 9px 0 9px 15.6px; | |
662 | border-color: transparent transparent transparent #ccc; |
|
662 | border-color: transparent transparent transparent #ccc; | |
663 | } |
|
663 | } | |
664 | .diff-menu { |
|
664 | .filediff-menu { | |
665 | display: none; |
|
665 | display: none; | |
666 | } |
|
666 | } | |
667 | margin: -1px 0 0 0; |
|
667 | margin: -1px 0 0 0; | |
668 | } |
|
668 | } | |
669 |
|
669 | |||
670 | &+ .diff { /* file diff is expanded */ |
|
670 | &+ .filediff { /* file diff is expanded */ | |
671 | .diff-collapse-indicator { |
|
671 | .filediff-collapse-indicator { | |
672 | border-width: 15.6px 9px 0 9px; |
|
672 | border-width: 15.6px 9px 0 9px; | |
673 | border-color: #ccc transparent transparent transparent; |
|
673 | border-color: #ccc transparent transparent transparent; | |
674 | } |
|
674 | } | |
675 | .diff-menu { |
|
675 | .filediff-menu { | |
676 | display: block; |
|
676 | display: block; | |
677 | } |
|
677 | } | |
678 | margin: 20px 0; |
|
678 | margin: 20px 0; | |
679 | } |
|
679 | } | |
680 | } |
|
680 | } | |
681 | .diff { |
|
681 | .filediff { | |
682 | border: 1px solid @grey5; |
|
682 | border: 1px solid @grey5; | |
683 |
|
683 | |||
684 | /* START OVERRIDES */ |
|
684 | /* START OVERRIDES */ | |
@@ -697,16 +697,16 b' input.diff-collapse-state {' | |||||
697 | * { |
|
697 | * { | |
698 | box-sizing: border-box; |
|
698 | box-sizing: border-box; | |
699 | } |
|
699 | } | |
700 | .diff-anchor { |
|
700 | .filediff-anchor { | |
701 | visibility: hidden; |
|
701 | visibility: hidden; | |
702 | } |
|
702 | } | |
703 | &:hover { |
|
703 | &:hover { | |
704 | .diff-anchor { |
|
704 | .filediff-anchor { | |
705 | visibility: visible; |
|
705 | visibility: visible; | |
706 | } |
|
706 | } | |
707 | } |
|
707 | } | |
708 |
|
708 | |||
709 | .diff-collapse-indicator { |
|
709 | .filediff-collapse-indicator { | |
710 | width: 0; |
|
710 | width: 0; | |
711 | height: 0; |
|
711 | height: 0; | |
712 | border-style: solid; |
|
712 | border-style: solid; | |
@@ -715,22 +715,22 b' input.diff-collapse-state {' | |||||
715 | cursor: pointer; |
|
715 | cursor: pointer; | |
716 | } |
|
716 | } | |
717 |
|
717 | |||
718 | .diff-heading { |
|
718 | .filediff-heading { | |
719 | background: @grey7; |
|
719 | background: @grey7; | |
720 | cursor: pointer; |
|
720 | cursor: pointer; | |
721 | display: block; |
|
721 | display: block; | |
722 | padding: 5px 10px; |
|
722 | padding: 5px 10px; | |
723 | } |
|
723 | } | |
724 | .diff-heading:after { |
|
724 | .filediff-heading:after { | |
725 | content: ""; |
|
725 | content: ""; | |
726 | display: table; |
|
726 | display: table; | |
727 | clear: both; |
|
727 | clear: both; | |
728 | } |
|
728 | } | |
729 | .diff-heading:hover { |
|
729 | .filediff-heading:hover { | |
730 | background: #e1e9f4 !important; |
|
730 | background: #e1e9f4 !important; | |
731 | } |
|
731 | } | |
732 |
|
732 | |||
733 | .diff-menu { |
|
733 | .filediff-menu { | |
734 | float: right; |
|
734 | float: right; | |
735 |
|
735 | |||
736 | a, span { |
|
736 | a, span { | |
@@ -739,13 +739,13 b' input.diff-collapse-state {' | |||||
739 | float: left |
|
739 | float: left | |
740 | } |
|
740 | } | |
741 | } |
|
741 | } | |
742 |
. |
|
742 | .pill { | |
743 | display: block; |
|
743 | display: block; | |
744 | float: left; |
|
744 | float: left; | |
745 |
padding: @ |
|
745 | padding: @pill-padding; | |
746 | } |
|
746 | } | |
747 |
. |
|
747 | .pill-group { | |
748 |
. |
|
748 | .pill { | |
749 | opacity: .8; |
|
749 | opacity: .8; | |
750 | &:first-child { |
|
750 | &:first-child { | |
751 | border-radius: @border-radius 0 0 @border-radius; |
|
751 | border-radius: @border-radius 0 0 @border-radius; | |
@@ -758,7 +758,7 b' input.diff-collapse-state {' | |||||
758 | } |
|
758 | } | |
759 | } |
|
759 | } | |
760 | } |
|
760 | } | |
761 |
. |
|
761 | .pill { | |
762 | &[op="name"] { |
|
762 | &[op="name"] { | |
763 | background: none; |
|
763 | background: none; | |
764 | color: @grey2; |
|
764 | color: @grey2; | |
@@ -809,19 +809,19 b' input.diff-collapse-state {' | |||||
809 | } |
|
809 | } | |
810 | } |
|
810 | } | |
811 |
|
811 | |||
812 | .diff-collapse-button, .diff-expand-button { |
|
812 | .filediff-collapse-button, .filediff-expand-button { | |
813 | cursor: pointer; |
|
813 | cursor: pointer; | |
814 | } |
|
814 | } | |
815 | .diff-collapse-button { |
|
815 | .filediff-collapse-button { | |
816 | display: inline; |
|
816 | display: inline; | |
817 | } |
|
817 | } | |
818 | .diff-expand-button { |
|
818 | .filediff-expand-button { | |
819 | display: none; |
|
819 | display: none; | |
820 | } |
|
820 | } | |
821 | .diff-collapsed .diff-collapse-button { |
|
821 | .filediff-collapsed .filediff-collapse-button { | |
822 | display: none; |
|
822 | display: none; | |
823 | } |
|
823 | } | |
824 | .diff-collapsed .diff-expand-button { |
|
824 | .filediff-collapsed .filediff-expand-button { | |
825 | display: inline; |
|
825 | display: inline; | |
826 | } |
|
826 | } | |
827 | } |
|
827 | } |
@@ -71,8 +71,8 b' collapse_all = len(diffset.files) > coll' | |||||
71 | </div> |
|
71 | </div> | |
72 | % endif |
|
72 | % endif | |
73 |
|
73 | |||
74 |
<div class=" |
|
74 | <div class="diffset"> | |
75 |
<div class=" |
|
75 | <div class="diffset-heading"> | |
76 | %if diffset.files: |
|
76 | %if diffset.files: | |
77 | <div class="pull-right"> |
|
77 | <div class="pull-right"> | |
78 | <div class="btn-group"> |
|
78 | <div class="btn-group"> | |
@@ -94,11 +94,11 b' collapse_all = len(diffset.files) > coll' | |||||
94 | <a |
|
94 | <a | |
95 | class="btn" |
|
95 | class="btn" | |
96 | href="#" |
|
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 | <a |
|
98 | <a | |
99 | class="btn" |
|
99 | class="btn" | |
100 | href="#" |
|
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 | </div> |
|
102 | </div> | |
103 | </div> |
|
103 | </div> | |
104 | %endif |
|
104 | %endif | |
@@ -122,13 +122,13 b' collapse_all = len(diffset.files) > coll' | |||||
122 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] |
|
122 | lines_changed = filediff['patch']['stats']['added'] + filediff['patch']['stats']['deleted'] | |
123 | over_lines_changed_limit = lines_changed > lines_changed_limit |
|
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 | <div |
|
126 | <div | |
127 | class="diff" |
|
127 | class="filediff" | |
128 | data-f-path="${filediff['patch']['filename']}" |
|
128 | data-f-path="${filediff['patch']['filename']}" | |
129 | id="a_${h.FID(commit_id or '', filediff['patch']['filename'])}"> |
|
129 | id="a_${h.FID(commit_id or '', filediff['patch']['filename'])}"> | |
130 | <label for="diff-collapse-${id(filediff)}" class="diff-heading"> |
|
130 | <label for="filediff-collapse-${id(filediff)}" class="filediff-heading"> | |
131 | <div class="diff-collapse-indicator"></div> |
|
131 | <div class="filediff-collapse-indicator"></div> | |
132 | ${diff_ops(filediff)} |
|
132 | ${diff_ops(filediff)} | |
133 | </label> |
|
133 | </label> | |
134 | ${diff_menu(filediff)} |
|
134 | ${diff_menu(filediff)} | |
@@ -206,7 +206,7 b" stats = filediff['patch']['stats']" | |||||
206 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ |
|
206 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ | |
207 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE |
|
207 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE | |
208 | %> |
|
208 | %> | |
209 |
<span class=" |
|
209 | <span class="pill"> | |
210 | %if filediff.source_file_path and filediff.target_file_path: |
|
210 | %if filediff.source_file_path and filediff.target_file_path: | |
211 | %if filediff.source_file_path != filediff.target_file_path: # file was renamed |
|
211 | %if filediff.source_file_path != filediff.target_file_path: # file was renamed | |
212 | <strong>${filediff.target_file_path}</strong> ⬅ <del>${filediff.source_file_path}</del> |
|
212 | <strong>${filediff.target_file_path}</strong> ⬅ <del>${filediff.source_file_path}</del> | |
@@ -224,48 +224,48 b' from rhodecode.lib.diffs import NEW_FILE' | |||||
224 | %endif |
|
224 | %endif | |
225 | %endif |
|
225 | %endif | |
226 | </span> |
|
226 | </span> | |
227 |
<span class=" |
|
227 | <span class="pill-group" style="float: left"> | |
228 | %if filediff.patch['is_limited_diff']: |
|
228 | %if filediff.patch['is_limited_diff']: | |
229 |
<span class=" |
|
229 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> | |
230 | %endif |
|
230 | %endif | |
231 | %if RENAMED_FILENODE in stats['ops']: |
|
231 | %if RENAMED_FILENODE in stats['ops']: | |
232 |
<span class=" |
|
232 | <span class="pill" op="renamed">renamed</span> | |
233 | %endif |
|
233 | %endif | |
234 |
|
234 | |||
235 | %if NEW_FILENODE in stats['ops']: |
|
235 | %if NEW_FILENODE in stats['ops']: | |
236 |
<span class=" |
|
236 | <span class="pill" op="created">created</span> | |
237 | %if filediff['target_mode'].startswith('120'): |
|
237 | %if filediff['target_mode'].startswith('120'): | |
238 |
<span class=" |
|
238 | <span class="pill" op="symlink">symlink</span> | |
239 | %else: |
|
239 | %else: | |
240 |
<span class=" |
|
240 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> | |
241 | %endif |
|
241 | %endif | |
242 | %endif |
|
242 | %endif | |
243 |
|
243 | |||
244 | %if DEL_FILENODE in stats['ops']: |
|
244 | %if DEL_FILENODE in stats['ops']: | |
245 |
<span class=" |
|
245 | <span class="pill" op="removed">removed</span> | |
246 | %endif |
|
246 | %endif | |
247 |
|
247 | |||
248 | %if CHMOD_FILENODE in stats['ops']: |
|
248 | %if CHMOD_FILENODE in stats['ops']: | |
249 |
<span class=" |
|
249 | <span class="pill" op="mode"> | |
250 | ${nice_mode(filediff['source_mode'])} ➡ ${nice_mode(filediff['target_mode'])} |
|
250 | ${nice_mode(filediff['source_mode'])} ➡ ${nice_mode(filediff['target_mode'])} | |
251 | </span> |
|
251 | </span> | |
252 | %endif |
|
252 | %endif | |
253 | </span> |
|
253 | </span> | |
254 |
|
254 | |||
255 |
<a class=" |
|
255 | <a class="pill filediff-anchor" href="#a_${h.FID(commit_id or '', filediff.patch['filename'])}">¶</a> | |
256 |
|
256 | |||
257 |
<span class=" |
|
257 | <span class="pill-group" style="float: right"> | |
258 | %if BIN_FILENODE in stats['ops']: |
|
258 | %if BIN_FILENODE in stats['ops']: | |
259 |
<span class=" |
|
259 | <span class="pill" op="binary">binary</span> | |
260 | %if MOD_FILENODE in stats['ops']: |
|
260 | %if MOD_FILENODE in stats['ops']: | |
261 |
<span class=" |
|
261 | <span class="pill" op="modified">modified</span> | |
262 | %endif |
|
262 | %endif | |
263 | %endif |
|
263 | %endif | |
264 | %if stats['added']: |
|
264 | %if stats['added']: | |
265 |
<span class=" |
|
265 | <span class="pill" op="added">+${stats['added']}</span> | |
266 | %endif |
|
266 | %endif | |
267 | %if stats['deleted']: |
|
267 | %if stats['deleted']: | |
268 |
<span class=" |
|
268 | <span class="pill" op="deleted">-${stats['deleted']}</span> | |
269 | %endif |
|
269 | %endif | |
270 | </span> |
|
270 | </span> | |
271 |
|
271 | |||
@@ -276,7 +276,7 b' from rhodecode.lib.diffs import NEW_FILE' | |||||
276 | </%def> |
|
276 | </%def> | |
277 |
|
277 | |||
278 | <%def name="diff_menu(filediff)"> |
|
278 | <%def name="diff_menu(filediff)"> | |
279 | <div class="diff-menu"> |
|
279 | <div class="filediff-menu"> | |
280 | %if filediff.diffset.source_ref: |
|
280 | %if filediff.diffset.source_ref: | |
281 | %if filediff.patch['operation'] in ['D', 'M']: |
|
281 | %if filediff.patch['operation'] in ['D', 'M']: | |
282 | <a |
|
282 | <a |
General Comments 0
You need to be logged in to leave comments.
Login now