mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 11:10:57 +01:00
A previous change of mine had broken it. Also rename a route parameter in CommitController for consistency with other route params.
33 lines
1.3 KiB
Twig
33 lines
1.3 KiB
Twig
{% extends 'layout_page.twig' %}
|
|
|
|
{% set page = 'files' %}
|
|
|
|
{% block title %}GitList{% endblock %}
|
|
|
|
{% block content %}
|
|
{% include 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
|
|
|
|
<div class="source-view">
|
|
<div class="source-header">
|
|
<div class="meta"></div>
|
|
|
|
<div class="btn-group pull-right">
|
|
<a href="{{ path('blob_raw', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-file"></i> Raw</a>
|
|
<a href="{{ path('blame', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-bullhorn"></i> Blame</a>
|
|
<a href="{{ path('commits', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
|
|
</div>
|
|
</div>
|
|
{% if fileType == 'image' %}
|
|
<center><img src="{{ path('blob_raw', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></center>
|
|
|
|
{% elseif fileType == 'markdown' %}
|
|
<div class="readme-view"><div id="readme-content">{{ blob }}</div></div>
|
|
|
|
{% else %}
|
|
<pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<hr />
|
|
{% endblock %}
|