Show More
@@ -23,7 +23,7 b' new_args.update(kw)' | |||||
23 | return h.url('', **new_args) |
|
23 | return h.url('', **new_args) | |
24 | %></%def> |
|
24 | %></%def> | |
25 |
|
25 | |||
26 | <%def name="render_diffset(diffset, |
|
26 | <%def name="render_diffset(diffset, commit_id=None, | |
27 |
|
27 | |||
28 | # collapse all file diff entries when there are more than this amount of files in the diff |
|
28 | # collapse all file diff entries when there are more than this amount of files in the diff | |
29 | collapse_when_files_over=20, |
|
29 | collapse_when_files_over=20, | |
@@ -122,12 +122,12 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-${i}" type="checkbox"> |
|
125 | <input ${collapse_all and 'checked' or ''} class="diff-collapse-state" id="diff-collapse-${id(filediff)}" type="checkbox"> | |
126 | <div |
|
126 | <div | |
127 | class="diff" |
|
127 | class="diff" | |
128 | data-f-path="${filediff['patch']['filename']}" |
|
128 | data-f-path="${filediff['patch']['filename']}" | |
129 | id="a_${h.FID('', filediff['patch']['filename'])}"> |
|
129 | id="a_${h.FID(commit_id or '', filediff['patch']['filename'])}"> | |
130 | <label for="diff-collapse-${i}" class="diff-heading"> |
|
130 | <label for="diff-collapse-${id(filediff)}" class="diff-heading"> | |
131 | <div class="diff-collapse-indicator"></div> |
|
131 | <div class="diff-collapse-indicator"></div> | |
132 | ${diff_ops(filediff)} |
|
132 | ${diff_ops(filediff)} | |
133 | </label> |
|
133 | </label> | |
@@ -252,7 +252,7 b' from rhodecode.lib.diffs import NEW_FILE' | |||||
252 | %endif |
|
252 | %endif | |
253 | </span> |
|
253 | </span> | |
254 |
|
254 | |||
255 | <a class="diff-pill diff-anchor" href="#a_${h.FID('', filediff.patch['filename'])}">¶</a> |
|
255 | <a class="diff-pill diff-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="diff-pill-group" style="float: right"> | |
258 | %if BIN_FILENODE in stats['ops']: |
|
258 | %if BIN_FILENODE in stats['ops']: | |
@@ -261,12 +261,12 b' from rhodecode.lib.diffs import NEW_FILE' | |||||
261 | <span class="diff-pill" op="modified">modified</span> |
|
261 | <span class="diff-pill" op="modified">modified</span> | |
262 | %endif |
|
262 | %endif | |
263 | %endif |
|
263 | %endif | |
|
264 | %if stats['added']: | |||
|
265 | <span class="diff-pill" op="added">+${stats['added']}</span> | |||
|
266 | %endif | |||
264 | %if stats['deleted']: |
|
267 | %if stats['deleted']: | |
265 | <span class="diff-pill" op="deleted">-${stats['deleted']}</span> |
|
268 | <span class="diff-pill" op="deleted">-${stats['deleted']}</span> | |
266 | %endif |
|
269 | %endif | |
267 | %if stats['added']: |
|
|||
268 | <span class="diff-pill" op="added">+${stats['added']}</span> |
|
|||
269 | %endif |
|
|||
270 | </span> |
|
270 | </span> | |
271 |
|
271 | |||
272 | </%def> |
|
272 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now