add support of big file and display commit

This commit is contained in:
tdurieux
2017-10-18 14:36:25 +02:00
parent eaed61eb6d
commit d494a4e498
4 changed files with 132 additions and 28 deletions

6
templates/patch.html Normal file
View File

@@ -0,0 +1,6 @@
{% for item in patch.files %}
<section class="diff">
<h3>{{ item.filename }}</h3>
<pre>{{ item.patch }}</pre>
</section>
{% endfor %}

View File

@@ -25,14 +25,14 @@
{% endfor %}
</div>
<div class="files">
{% for item in current_folder %}
<div class="{{ item.type }} {% if item == current_file %}active{% endif %}">
<a href="/repository/{{ current_repository }}/{{ item.path }}">{{ item.name }}</a>
{% for item in files %}
<div class="{{ item.type }} {% if item.path == current_file.name %}active{% endif %}">
<a href="/repository/{{ current_repository }}/{{ path_directory }}{% if path_directory|length > 0%}/{% endif %}{{ item.path }}{% if item.type == 'tree'%}/{% endif %}">{{ item.path }}</a>
</div>
{% endfor %}
</div>
{% if current_file %}
{{ current_file|file_render(terms) }}
{{ current_file|file_render(repository) }}
{% endif %}
</div>
</div>