Show More
@@ -863,7 +863,6 b' input.filediff-collapse-state {' | |||||
863 |
|
863 | |||
864 | .pill-group { |
|
864 | .pill-group { | |
865 | .pill { |
|
865 | .pill { | |
866 | opacity: .8; |
|
|||
867 | margin-right: 3px; |
|
866 | margin-right: 3px; | |
868 | font-size: 12px; |
|
867 | font-size: 12px; | |
869 | font-weight: normal; |
|
868 | font-weight: normal; |
@@ -3236,3 +3236,23 b' details:not([open]) > :not(summary) {' | |||||
3236 | .old-comments-marker td { |
|
3236 | .old-comments-marker td { | |
3237 | padding-top: 15px; |
|
3237 | padding-top: 15px; | |
3238 | } |
|
3238 | } | |
|
3239 | ||||
|
3240 | .inline-menu { | |||
|
3241 | display: inline-flex; | |||
|
3242 | list-style: none; | |||
|
3243 | margin: 0; | |||
|
3244 | padding: 0; | |||
|
3245 | } | |||
|
3246 | ||||
|
3247 | .inline-menu-item { | |||
|
3248 | display: inline-flex; | |||
|
3249 | justify-content: center; | |||
|
3250 | position: relative; | |||
|
3251 | } | |||
|
3252 | ||||
|
3253 | .inline-menu-item-ellipsis { | |||
|
3254 | overflow: hidden; | |||
|
3255 | white-space: nowrap; /* Don't forget this one */ | |||
|
3256 | text-overflow: ellipsis; | |||
|
3257 | width: 130px; | |||
|
3258 | } |
@@ -124,24 +124,6 b'' | |||||
124 | </div> |
|
124 | </div> | |
125 |
|
125 | |||
126 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> |
|
126 | <div class="fieldset collapsable-content" data-toggle="summary-details" style="display: none;"> | |
127 | <div class="left-label-summary"> |
|
|||
128 | <p>${_('Diff options')}:</p> |
|
|||
129 | <div class="right-label-summary"> |
|
|||
130 | <div class="diff-actions"> |
|
|||
131 | <a href="${h.route_path('repo_commit_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id)}"> |
|
|||
132 | ${_('Raw Diff')} |
|
|||
133 | </a> |
|
|||
134 | | |
|
|||
135 | <a href="${h.route_path('repo_commit_patch',repo_name=c.repo_name,commit_id=c.commit.raw_id)}"> |
|
|||
136 | ${_('Patch Diff')} |
|
|||
137 | </a> |
|
|||
138 | | |
|
|||
139 | <a href="${h.route_path('repo_commit_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(diff='download'))}"> |
|
|||
140 | ${_('Download Diff')} |
|
|||
141 | </a> |
|
|||
142 | </div> |
|
|||
143 | </div> |
|
|||
144 | </div> |
|
|||
145 | </div> |
|
127 | </div> | |
146 |
|
128 | |||
147 | <div class="clear-fix"></div> |
|
129 | <div class="clear-fix"></div> |
@@ -277,12 +277,16 b" return '%s_%s_%i' % (h.md5_safe(commit+f" | |||||
277 | %> |
|
277 | %> | |
278 | <div class="filediff-collapse-indicator icon-"></div> |
|
278 | <div class="filediff-collapse-indicator icon-"></div> | |
279 |
|
279 | |||
280 | ## Comments/Options PILL |
|
280 | <% | |
|
281 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE | |||
|
282 | %> | |||
|
283 | <span class="pill"> | |||
|
284 | <i class="icon-file-text"></i> | |||
|
285 | ${final_file_name} | |||
|
286 | </span> | |||
|
287 | ||||
|
288 | ## Options PILL | |||
281 | <span class="pill-group pull-right"> |
|
289 | <span class="pill-group pull-right"> | |
282 | <span class="pill" op="comments"> |
|
|||
283 | <i class="icon-comment"></i> ${len(total_file_comments)} |
|
|||
284 | </span> |
|
|||
285 |
|
||||
286 | <details class="details-reset details-inline-block"> |
|
290 | <details class="details-reset details-inline-block"> | |
287 | <summary class="noselect"> |
|
291 | <summary class="noselect"> | |
288 | <i class="pill icon-options cursor-pointer" op="options"></i> |
|
292 | <i class="pill icon-options cursor-pointer" op="options"></i> | |
@@ -290,24 +294,77 b" return '%s_%s_%i' % (h.md5_safe(commit+f" | |||||
290 | <details-menu class="details-dropdown"> |
|
294 | <details-menu class="details-dropdown"> | |
291 |
|
295 | |||
292 | <div class="dropdown-item"> |
|
296 | <div class="dropdown-item"> | |
293 |
< |
|
297 | <ul class="inline-menu"> | |
294 | <span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="Copy file path"></span> |
|
298 | <li class="inline-menu-item"><span class="inline-menu-item-ellipsis">${final_path}</span></li> | |
|
299 | <li class="inline-menu-item"><span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="Copy file path"></span></li> | |||
|
300 | </ul> | |||
295 | </div> |
|
301 | </div> | |
296 |
|
302 | |||
297 | <div class="dropdown-divider"></div> |
|
303 | <div class="dropdown-divider"></div> | |
298 |
|
304 | |||
299 | <div class="dropdown-item"> |
|
305 | <div class="dropdown-item"> | |
300 |
|
|
306 | <% permalink = request.current_route_url(_anchor='a_{}'.format(h.FID(filediff.raw_id, filediff.patch['filename']))) %> | |
301 | <a href="${permalink}">ΒΆ permalink</a> |
|
307 | <ul class="inline-menu"> | |
302 | <span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${permalink}" title="Copy permalink"></span> |
|
308 | <li class="inline-menu-item"><a href="${permalink}">ΒΆ permalink</a></li> | |
|
309 | <li class="inline-menu-item"><span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${permalink}" title="Copy permalink"></span></li> | |||
|
310 | </ul> | |||
303 | </div> |
|
311 | </div> | |
304 |
|
312 | |||
305 | </details-menu> |
|
313 | </details-menu> | |
306 | </details> |
|
314 | </details> | |
|
315 | </span> | |||
307 |
|
316 | |||
|
317 | ## Comments PILL | |||
|
318 | <span class="pill-group pull-right"> | |||
|
319 | <span class="pill" op="comments"> | |||
|
320 | <i class="icon-comment"></i> ${len(total_file_comments)} | |||
|
321 | </span> | |||
308 | </span> |
|
322 | </span> | |
309 |
|
323 | |||
310 | ${diff_ops(final_file_name, filediff)} |
|
324 | ## DIFF STATS PILL | |
|
325 | <span class="pill-group pull-right"> | |||
|
326 | ||||
|
327 | ## ops pills | |||
|
328 | %if filediff.limited_diff: | |||
|
329 | <span class="pill tooltip" op="limited" | |||
|
330 | title="The stats for this diff are not complete">limited diff</span> | |||
|
331 | %endif | |||
|
332 | ||||
|
333 | %if NEW_FILENODE in filediff.patch['stats']['ops']: | |||
|
334 | <span class="pill" op="created">created</span> | |||
|
335 | %if filediff['target_mode'].startswith('120'): | |||
|
336 | <span class="pill" op="symlink">symlink</span> | |||
|
337 | %else: | |||
|
338 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> | |||
|
339 | %endif | |||
|
340 | %endif | |||
|
341 | ||||
|
342 | %if RENAMED_FILENODE in filediff.patch['stats']['ops']: | |||
|
343 | <span class="pill" op="renamed">renamed</span> | |||
|
344 | %endif | |||
|
345 | ||||
|
346 | %if COPIED_FILENODE in filediff.patch['stats']['ops']: | |||
|
347 | <span class="pill" op="copied">copied</span> | |||
|
348 | %endif | |||
|
349 | ||||
|
350 | %if DEL_FILENODE in filediff.patch['stats']['ops']: | |||
|
351 | <span class="pill" op="removed">removed</span> | |||
|
352 | %endif | |||
|
353 | ||||
|
354 | %if CHMOD_FILENODE in filediff.patch['stats']['ops']: | |||
|
355 | <span class="pill" op="mode"> ${nice_mode(filediff['source_mode'])} β‘ ${nice_mode(filediff['target_mode'])}</span> | |||
|
356 | %endif | |||
|
357 | ||||
|
358 | %if BIN_FILENODE in filediff.patch['stats']['ops']: | |||
|
359 | <span class="pill" op="binary">binary</span> | |||
|
360 | %if MOD_FILENODE in filediff.patch['stats']['ops']: | |||
|
361 | <span class="pill" op="modified">modified</span> | |||
|
362 | %endif | |||
|
363 | %endif | |||
|
364 | ||||
|
365 | <span class="pill" op="added">${('+' if filediff.patch['stats']['added'] else '')}${filediff.patch['stats']['added']}</span> | |||
|
366 | <span class="pill" op="deleted">${((h.safe_int(filediff.patch['stats']['deleted']) or 0) * -1)}</span> | |||
|
367 | </span> | |||
311 |
|
368 | |||
312 | </label> |
|
369 | </label> | |
313 |
|
370 | |||
@@ -506,64 +563,6 b" return '%s_%s_%i' % (h.md5_safe(commit+f" | |||||
506 | </div> |
|
563 | </div> | |
507 | </%def> |
|
564 | </%def> | |
508 |
|
565 | |||
509 | <%def name="diff_ops(file_name, filediff)"> |
|
|||
510 | <% |
|
|||
511 | from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \ |
|
|||
512 | MOD_FILENODE, RENAMED_FILENODE, CHMOD_FILENODE, BIN_FILENODE, COPIED_FILENODE |
|
|||
513 | %> |
|
|||
514 | <span class="pill"> |
|
|||
515 | <i class="icon-file-text"></i> |
|
|||
516 | ${file_name} |
|
|||
517 | </span> |
|
|||
518 |
|
||||
519 | <span class="pill-group pull-right"> |
|
|||
520 |
|
||||
521 | ## ops pills |
|
|||
522 | %if filediff.limited_diff: |
|
|||
523 | <span class="pill tooltip" op="limited" title="The stats for this diff are not complete">limited diff</span> |
|
|||
524 | %endif |
|
|||
525 |
|
||||
526 | %if NEW_FILENODE in filediff.patch['stats']['ops']: |
|
|||
527 | <span class="pill" op="created">created</span> |
|
|||
528 | %if filediff['target_mode'].startswith('120'): |
|
|||
529 | <span class="pill" op="symlink">symlink</span> |
|
|||
530 | %else: |
|
|||
531 | <span class="pill" op="mode">${nice_mode(filediff['target_mode'])}</span> |
|
|||
532 | %endif |
|
|||
533 | %endif |
|
|||
534 |
|
||||
535 | %if RENAMED_FILENODE in filediff.patch['stats']['ops']: |
|
|||
536 | <span class="pill" op="renamed">renamed</span> |
|
|||
537 | %endif |
|
|||
538 |
|
||||
539 | %if COPIED_FILENODE in filediff.patch['stats']['ops']: |
|
|||
540 | <span class="pill" op="copied">copied</span> |
|
|||
541 | %endif |
|
|||
542 |
|
||||
543 | %if DEL_FILENODE in filediff.patch['stats']['ops']: |
|
|||
544 | <span class="pill" op="removed">removed</span> |
|
|||
545 | %endif |
|
|||
546 |
|
||||
547 | %if CHMOD_FILENODE in filediff.patch['stats']['ops']: |
|
|||
548 | <span class="pill" op="mode"> |
|
|||
549 | ${nice_mode(filediff['source_mode'])} β‘ ${nice_mode(filediff['target_mode'])} |
|
|||
550 | </span> |
|
|||
551 | %endif |
|
|||
552 |
|
||||
553 | %if BIN_FILENODE in filediff.patch['stats']['ops']: |
|
|||
554 | <span class="pill" op="binary">binary</span> |
|
|||
555 | %if MOD_FILENODE in filediff.patch['stats']['ops']: |
|
|||
556 | <span class="pill" op="modified">modified</span> |
|
|||
557 | %endif |
|
|||
558 | %endif |
|
|||
559 |
|
||||
560 | <span class="pill" op="added">${('+' if filediff.patch['stats']['added'] else '')}${filediff.patch['stats']['added']}</span> |
|
|||
561 | <span class="pill" op="deleted">${((h.safe_int(filediff.patch['stats']['deleted']) or 0) * -1)}</span> |
|
|||
562 |
|
||||
563 | </span> |
|
|||
564 |
|
||||
565 | </%def> |
|
|||
566 |
|
||||
567 | <%def name="nice_mode(filemode)"> |
|
566 | <%def name="nice_mode(filemode)"> | |
568 | ${(filemode.startswith('100') and filemode[3:] or filemode)} |
|
567 | ${(filemode.startswith('100') and filemode[3:] or filemode)} | |
569 | </%def> |
|
568 | </%def> | |
@@ -968,10 +967,9 b' def get_comments_for(diff_type, comments' | |||||
968 | <i class="icon-options cursor-pointer" op="options"></i> |
|
967 | <i class="icon-options cursor-pointer" op="options"></i> | |
969 | </summary> |
|
968 | </summary> | |
970 |
|
969 | |||
971 | <div> |
|
|||
972 | <details-menu class="details-dropdown" style="top: 35px;"> |
|
970 | <details-menu class="details-dropdown" style="top: 35px;"> | |
973 |
|
971 | |||
974 |
|
|
972 | <div class="dropdown-item"> | |
975 | <div style="padding: 2px 0px"> |
|
973 | <div style="padding: 2px 0px"> | |
976 | % if request.GET.get('ignorews', '') == '1': |
|
974 | % if request.GET.get('ignorews', '') == '1': | |
977 | <a href="${h.current_route_path(request, ignorews=0)}">${_('Show whitespace changes')}</a> |
|
975 | <a href="${h.current_route_path(request, ignorews=0)}">${_('Show whitespace changes')}</a> | |
@@ -991,8 +989,28 b' def get_comments_for(diff_type, comments' | |||||
991 | </div> |
|
989 | </div> | |
992 | </div> |
|
990 | </div> | |
993 |
|
991 | |||
|
992 | % if commit: | |||
|
993 | <div class="dropdown-item"> | |||
|
994 | <a href="${h.route_path('repo_commit_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id)}"> | |||
|
995 | ${_('Raw Diff')} | |||
|
996 | </a> | |||
|
997 | </div> | |||
|
998 | ||||
|
999 | <div class="dropdown-item"> | |||
|
1000 | <a href="${h.route_path('repo_commit_patch',repo_name=c.repo_name,commit_id=c.commit.raw_id)}"> | |||
|
1001 | ${_('Patch Diff')} | |||
|
1002 | </a> | |||
|
1003 | </div> | |||
|
1004 | ||||
|
1005 | <div class="dropdown-item"> | |||
|
1006 | <a href="${h.route_path('repo_commit_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,_query=dict(diff='download'))}"> | |||
|
1007 | ${_('Download Diff')} | |||
|
1008 | </a> | |||
|
1009 | </div> | |||
|
1010 | % endif | |||
|
1011 | ||||
994 | </details-menu> |
|
1012 | </details-menu> | |
995 | </div> |
|
1013 | ||
996 | </details> |
|
1014 | </details> | |
997 |
|
1015 | |||
998 | </div> |
|
1016 | </div> |
General Comments 0
You need to be logged in to leave comments.
Login now