diffs: show copy-to-clipboard next to diff files

This commit is contained in:
Marcin Kuzminski 2017-09-21 23:29:44 +02:00
parent e6fffe4b97
commit 2a06b6b96d
2 changed files with 13 additions and 4 deletions

View file

@ -665,8 +665,9 @@ input.filediff-collapse-state {
width: 0;
height: 0;
border-style: solid;
border-width: 6.5px 0 6.5px 11.3px;
border-color: transparent transparent transparent #ccc;
border-width: 4.5px 0 4.5px 9.3px;
border-color: transparent transparent transparent #aaa;
margin: 6px 0px;
}
.filediff-menu {
display: none;
@ -679,8 +680,10 @@ input.filediff-collapse-state {
width: 0;
height: 0;
border-style: solid;
border-width: 11.3px 6.5px 0 6.5px;
border-color: #ccc transparent transparent transparent;
border-width: 9.3px 4.5px 0 4.5px;
border-color: #aaa transparent transparent transparent;
margin: 6px 0px;
}
.filediff-menu {
display: block;

View file

@ -326,22 +326,28 @@ from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
## file was renamed, or copied
%if RENAMED_FILENODE in filediff.patch['stats']['ops']:
<strong>${filediff.target_file_path}</strong> ⬅ <del>${filediff.source_file_path}</del>
<% final_path = filediff.target_file_path %>
%elif COPIED_FILENODE in filediff.patch['stats']['ops']:
<strong>${filediff.target_file_path}</strong> ⬅ ${filediff.source_file_path}
<% final_path = filediff.target_file_path %>
%endif
%else:
## file was modified
<strong>${filediff.source_file_path}</strong>
<% final_path = filediff.source_file_path %>
%endif
%else:
%if filediff.source_file_path:
## file was deleted
<strong>${filediff.source_file_path}</strong>
<% final_path = filediff.source_file_path %>
%else:
## file was added
<strong>${filediff.target_file_path}</strong>
<% final_path = filediff.target_file_path %>
%endif
%endif
<i style="color: #aaa" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="${_('Copy the full path')}" onclick="return false;"></i>
</span>
<span class="pill-group" style="float: left">
%if filediff.limited_diff: