fixed path file_source style to match files_tree view

This commit is contained in:
Liviu 2019-06-05 06:45:21 +00:00
parent 30739c0afa
commit de07e75f22
2 changed files with 49 additions and 43 deletions

View file

@ -407,7 +407,6 @@ div.codeblock {
overflow: auto;
padding: 0px;
border: @border-thickness solid @grey6;
background: @grey7;
.border-radius(@border-radius);
#remove_gist {
@ -497,7 +496,14 @@ div.codeblock {
}
.codeblock-header {
border-bottom: 1px solid #eaeaea;
background: @grey7;
height: 36px;
}
.path {
border-bottom: 1px solid @grey6;
padding: .65em 1em;
height: 18px;
}
}

View file

@ -51,60 +51,60 @@
</div>
</div>
<div class="codeblock codeblock-header">
<div class="codeblock">
<div class=" codeblock-header">
<div class="file-filename">
<i class="icon-file"></i> ${c.file}
</div>
<div class="file-stats">
<div class="stats-info">
<span class="stats-first-item">${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
<div class="stats-info">
<span class="stats-first-item">${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
<span> | ${h.format_byte_size_binary(c.file.size)}</span>
% if c.lf_node:
<span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
% endif
<span> | ${c.file.mimetype} </span>
<span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
<span> | ${h.format_byte_size_binary(c.file.size)}</span>
% if c.lf_node:
<span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
% endif
<span> | ${c.file.mimetype} </span>
<span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
</div>
</div>
</div>
<div class="code-body">
<div>
<div class="pull-left">
${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path, request.GET.get('at'))}
</div>
<div class="pull-right stats">
<a id="file_history_overview" href="#loadHistory">
${_('History')}
</a>
|
%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))}
</div>
<div class="path clear-fix">
<div class="pull-left">
${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path, request.GET.get('at'))}
</div>
<div class="pull-right stats">
<a id="file_history_overview" href="#loadHistory">
${_('History')}
</a>
|
%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 c.file.is_binary:
<% rendered_binary = h.render_binary(c.repo_name, c.file)%>
% if rendered_binary:
${rendered_binary}
% else:
<div>
${_('Binary file (%s)') % c.file.mimetype}
</div>
% endif
%else:
</div>
<div class="clear-fix"></div>
</div>
<div class="code-body clear-fix ">
%if c.file.is_binary:
<% rendered_binary = h.render_binary(c.repo_name, c.file)%>
% if rendered_binary:
${rendered_binary}
% else:
<div>
${_('Binary file (%s)') % c.file.mimetype}
</div>
% endif
%else:
% if c.file.size < c.visual.cut_off_limit_file:
%if c.renderer and not c.annotate:
## pick relative url based on renderer