Teknik is a suite of services with attractive and functional interfaces. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
3.0 KiB

{% extends 'layout_page.twig' %}
{% set page = 'files' %}
{% block content %}
{% embed 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
{% block extra %}
<div class="pull-right">
<div class="btn-group download-buttons">
<a href="{{ app.clone_url }}{{ repo }}" class="btn btn-default btn-xs" title="Clone {{ repo }}"><span class="fa fa-cloud-download"></span> Clone</a>
<a href="{{ app.path_prefix }}{{ path('archive', {repo: repo, branch: branch, format: 'zip'}) }}" class="btn btn-default btn-xs" title="Download '{{ branch }}' as a ZIP archive">ZIP</a>
<a href="{{ app.path_prefix }}{{ path('archive', {repo: repo, branch: branch, format: 'tar'}) }}" class="btn btn-default btn-xs" title="Download '{{ branch }}' as a TAR archive">TAR</a>
</div>
</div>
{% endblock %}
{% endembed %}
{% if files is not empty %}
<table class="table tree">
<thead>
<tr>
<th width="80%">Name</th>
<th width="10%">Mode</th>
<th width="10%">Size</th>
</tr>
</thead>
<tbody>
{% if parent is not null %}
<tr>
<td>
{% if not parent %}
<a href="{{ app.path_prefix }}{{ path('branch', {repo: repo, branch: branch}) }}">..</a>
{% else %}
<a href="{{ app.path_prefix }}{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ parent}) }}">..</a>
{% endif %}
</td>
<td></td>
<td></td>
</tr>
{% endif %}
{% for file in files %}
<tr>
<td><span class="fa {{ file.type == "folder" or file.type == "symlink" ? "fa-folder-open" : "fa-file" }}"></span> <a href="
{%- if file.type == "folder" or file.type == "symlink" -%}
{{ app.path_prefix }}{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{%- else -%}
{{ app.path_prefix }}{{ path('blob', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{%- endif -%}
">{{ file.name }}</a></td>
<td>{{ file.mode }}</td>
<td>{% if file.size %}{{ (file.size / 1024) | number_format }} kb{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>This repository is empty.</p>
{% endif %}
{% if readme is defined and readme is not empty %}
<div class="readme-view">
<div class="md-header">
<span class="meta">{{ readme.filename }}</span>
</div>
<div id="md-content">{{ readme.content }}</div>
</div>
{% endif %}
{% endblock %}