${h.files_breadcrumbs(c.repo_name, c.rhodecode_db_repo.repo_type, c.commit.raw_id, c.file.path, c.rhodecode_db_repo.landing_ref_name, request.GET.get('at'))}
${_('History')}
|
%if c.annotate:
${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
%else:
${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:
|
${_('Copy content')}
|
${_('Copy permalink')}
% endif
%if c.file.is_binary:
<% rendered_binary = h.render_binary(c.repo_name, c.file)%>
% if rendered_binary:
${rendered_binary}
% else:
${_('Binary file ({})').format(c.file.mimetype)}
% endif
%else:
% if c.file_size_too_big:
${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'),
h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
% else:
%if c.renderer and not c.annotate:
## pick relative url based on renderer
<%
relative_urls = {
'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
}
%>
${h.render(c.file.str_content, renderer=c.renderer, relative_urls=relative_urls)}
%else:
%if c.annotate:
<% color_hasher = h.color_hasher() %>
%for annotation, lines in c.annotated_lines:
${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
%endfor
%else:
%for line_num, tokens in enumerate(c.lines, 1):
${sourceblock.render_line(line_num, tokens)}
%endfor
%endif
%endif
% endif
%endif