files: changed the copy path label to indicate we're actually copying only the path.
- added copy permalink helper to copy the url quickly - fixes #5602
This commit is contained in:
parent
5c1b8deae8
commit
8d9716b58b
3 changed files with 3 additions and 2 deletions
|
|
@ -253,7 +253,7 @@ class _ToolTip(object):
|
|||
|
||||
tooltip = _ToolTip()
|
||||
|
||||
files_icon = u'<i class="file-breadcrumb-copy tooltip icon-clipboard clipboard-action" data-clipboard-text="{}" title="Copy the full path"></i>'
|
||||
files_icon = u'<i class="file-breadcrumb-copy tooltip icon-clipboard clipboard-action" data-clipboard-text="{}" title="Copy file path"></i>'
|
||||
|
||||
|
||||
def files_breadcrumbs(repo_name, commit_id, file_path, at_ref=None, limit_items=False, linkify_last_item=False):
|
||||
|
|
|
|||
|
|
@ -477,7 +477,7 @@ from rhodecode.lib.diffs import NEW_FILENODE, DEL_FILENODE, \
|
|||
<% 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>
|
||||
<i style="color: #aaa" class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${final_path}" title="${_('Copy file path')}" onclick="return false;"></i>
|
||||
</span>
|
||||
## anchor link
|
||||
<a class="pill filediff-anchor" href="#a_${h.FID(filediff.raw_id, filediff.patch['filename'])}">¶</a>
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
| ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
|
||||
% if not c.file.is_binary:
|
||||
|<a href="#copySource" onclick="return false;" class="no-grey clipboard-action" data-clipboard-text="${c.file.content}">${_('Copy content')}</a>
|
||||
|<a href="#copySource" onclick="return false;" class="no-grey clipboard-action" data-clipboard-text="${h.route_url('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}">${_('Copy permalink')}</a>
|
||||
% endif
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue