files: don't expose copy content if this is a binary file

This commit is contained in:
Marcin Kuzminski 2019-11-06 14:25:59 +01:00
parent f34ef035b6
commit de0032cf5d

View file

@ -102,7 +102,9 @@
${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
%endif
| ${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="clipboard-action" data-clipboard-text="${c.file.content}">${_('Copy content')}</a>
% endif
</div>
<div class="clear-fix"></div>