{% extends 'layout-page.twig' %} {% set page = 'files' %} {% block title %}P3X GitList{% endblock %} {% block content %} {% embed 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %} {% block right %}
{% if extension == 'svg' %} {% endif %} {% if enable_editing %} {% endif %} {% embed 'modal/modal-commit.twig' with {type: 'delete', title: 'Delete', bodyTitle: 'file.delete.confirm'|t, wrapForm: true } %} {% block buttons %} {% endblock %} {% endembed %} {% if (((fileType != 'image' and fileType != 'markdown' and not isHtml) or (enforceCodemirror)) and not binary ) %} {% if enable_editing %} {% endif %} {% embed 'modal/modal-commit.twig' with { type: 'commit', title: 'Commit', bodyTitle: 'file.commit.confirm'|t, wrapForm: true } %} {% block buttons %} {% endblock %} {% endembed %} {% elseif fileType == 'markdown' %} {{ 'file.editor'|t }} {% elseif isHtml and not enforceCodemirror %} {{ 'file.editor'|t }} {% endif %}
{% endblock %} {% block left %}
{% if binary %} {{ 'file.download'|t }} {% else %} {{ 'file.raw'|t }} {% endif %} {{ 'file.blame'|t }} {{ 'file.history'|t }}
{% if (((fileType != 'image' and fileType != 'markdown' and not isHtml) or enforceCodemirror) and not binary) %} {% endif %} {% if fileType == 'markdown' %} {% if enforceCodemirror %} {{ 'file.markdown_rendered'|t }} {% else %} {{ 'file.markdown_code'|t }} {% endif %} {% elseif isHtml %} {% if enforceCodemirror %} {{ 'file.html_rendered'|t }} {% else %} {{ 'file.html_code'|t }} {% endif %} {% endif %}
{% endblock %} {% endembed %}
{% if fileType == 'image' %}
{{ file }}
{% elseif fileType == 'markdown' and enforceCodemirror != true %} {% include 'markdown.twig' with {'filename': file, 'data': blob} %} {% elseif isHtml and enforceCodemirror != true %} {% include 'html-viewer.twig' with {'filename': file, 'data': blob} %} {% elseif not binary %}
{{ blob|htmlentities|raw }}
{% endif %} {% if extension == 'svg' %} {% endif %}
{% endblock %}