files_browser_tree.mako
82 lines
| 3.3 KiB
| application/x-mako
|
MakoHtmlLexer
r1282 | <div id="file-tree-wrapper" class="browser-body ${'full-load' if c.full_load else ''}"> | |||
<table class="code-browser rctable"> | ||||
<thead> | ||||
<tr> | ||||
<th>${_('Name')}</th> | ||||
<th>${_('Size')}</th> | ||||
<th>${_('Modified')}</th> | ||||
<th>${_('Last Commit')}</th> | ||||
<th>${_('Author')}</th> | ||||
</tr> | ||||
</thead> | ||||
<tbody id="tbody"> | ||||
%if c.file.parent: | ||||
<tr class="parity0"> | ||||
<td class="td-componentname"> | ||||
r1927 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.file.parent.path)}" class="pjax-link"> | |||
r1939 | <i class="icon-directory"></i>.. | |||
r1282 | </a> | |||
</td> | ||||
<td></td> | ||||
<td></td> | ||||
<td></td> | ||||
<td></td> | ||||
</tr> | ||||
%endif | ||||
%for cnt,node in enumerate(c.file): | ||||
<tr class="parity${cnt%2}"> | ||||
<td class="td-componentname"> | ||||
% if node.is_submodule(): | ||||
<span class="submodule-dir"> | ||||
% if node.url.startswith('http://') or node.url.startswith('https://'): | ||||
<a href="${node.url}"> | ||||
r1939 | <i class="icon-directory browser-dir"></i>${node.name} | |||
r1282 | </a> | |||
% else: | ||||
r1939 | <i class="icon-directory browser-dir"></i>${node.name} | |||
r1282 | % endif | |||
</span> | ||||
% else: | ||||
r1927 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=h.safe_unicode(node.path))}" class="pjax-link"> | |||
r1939 | <i class="${'icon-file-text browser-file' if node.is_file() else 'icon-directory browser-dir'}"></i>${node.name} | |||
r1282 | </a> | |||
% endif | ||||
</td> | ||||
%if node.is_file(): | ||||
<td class="td-size" data-attr-name="size"> | ||||
% if c.full_load: | ||||
<span data-size="${node.size}">${h.format_byte_size_binary(node.size)}</span> | ||||
% else: | ||||
${_('Loading ...')} | ||||
% endif | ||||
</td> | ||||
<td class="td-time" data-attr-name="modified_at"> | ||||
% if c.full_load: | ||||
<span data-date="${node.last_commit.date}">${h.age_component(node.last_commit.date)}</span> | ||||
% endif | ||||
</td> | ||||
<td class="td-hash" data-attr-name="commit_id"> | ||||
% if c.full_load: | ||||
r1843 | <div class="tooltip" title="${h.tooltip(node.last_commit.message)}"> | |||
r1282 | <pre data-commit-id="${node.last_commit.raw_id}">r${node.last_commit.revision}:${node.last_commit.short_id}</pre> | |||
</div> | ||||
% endif | ||||
</td> | ||||
<td class="td-user" data-attr-name="author"> | ||||
% if c.full_load: | ||||
r1947 | <span data-author="${node.last_commit.author}" title="${h.tooltip(node.last_commit.author)}">${h.gravatar_with_user(request, node.last_commit.author)|n}</span> | |||
r1282 | % endif | |||
</td> | ||||
%else: | ||||
<td></td> | ||||
<td></td> | ||||
<td></td> | ||||
<td></td> | ||||
%endif | ||||
</tr> | ||||
%endfor | ||||
</tbody> | ||||
<tbody id="tbody_filtered"></tbody> | ||||
</table> | ||||
</div> | ||||